/* ==========================================================================
   shepherd — landing page.
   The palette and type are lifted from the app's "Ridgeline" design system
   (frontend/src/style.css) on purpose: someone who has seen the site should
   recognise the product the second it opens. Dark is the default; the daylight
   palette comes in via [data-theme="light"], set before first paint.

   Layout rules of the page, so additions stay in rhythm:
     · one band = one idea, padded --band-y top and bottom
     · every band opens with .band-head (eyebrow → h2 → optional lede)
     · anything showing the app sits in a .window (title bar + screenshot)
     · text columns stop at ~68ch; only figures are allowed to go wide
   ========================================================================== */

/* --- self-hosted type ---------------------------------------------------- */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal; font-weight: 400; font-display: swap;
  src: url('/assets/fonts/ibm-plex-sans-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal; font-weight: 500; font-display: swap;
  src: url('/assets/fonts/ibm-plex-sans-latin-500-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal; font-weight: 600; font-display: swap;
  src: url('/assets/fonts/ibm-plex-sans-latin-600-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal; font-weight: 400; font-display: swap;
  src: url('/assets/fonts/ibm-plex-mono-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal; font-weight: 500; font-display: swap;
  src: url('/assets/fonts/ibm-plex-mono-latin-500-normal.woff2') format('woff2');
}

/* --- tokens -------------------------------------------------------------- */
:root {
  --bg: #101318;
  --panel: #191e25;
  --panel-2: #222834;
  --text: #e7eaef;
  --muted: #8a93a2;
  --muted-2: #7b8391;   /* dimmer still — captions, fineprint. Kept above the app's
                           #565e6b: on a text-first page it has to stay readable. */
  --accent: #5e93e8;
  --accent-ink: #0d1520;   /* text sitting on the accent */
  --pick: #3fb950;
  --border: #2b323c;
  --border-2: #3a4150;
  --sheep: #c8ccd2;

  --font: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  /* rhythm */
  --wrap: 1160px;
  --wrap-wide: 1320px;
  --band-y: clamp(4.25rem, 9vw, 7.5rem);
  --head-gap: clamp(2.25rem, 4vw, 3.25rem);   /* band head → its content */
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 14px 40px -20px rgb(0 0 0 / 0.75);
  --shadow-lg: 0 2px 4px rgb(0 0 0 / 0.35), 0 40px 90px -40px rgb(0 0 0 / 0.95);

  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #eceef1;
  --panel: #ffffff;
  --panel-2: #e2e6ea;
  --text: #1c1f25;
  --muted: #5f6773;
  --muted-2: #6b7381;
  --accent: #3665c9;
  --accent-ink: #ffffff;
  --pick: #1f9740;
  --border: #d6dbe1;
  --border-2: #c4c9d1;
  --sheep: #7c8494;

  --shadow: 0 1px 2px rgb(16 19 24 / 0.06), 0 14px 34px -22px rgb(16 19 24 / 0.5);
  --shadow-lg: 0 2px 6px rgb(16 19 24 / 0.08), 0 40px 80px -40px rgb(16 19 24 / 0.55);

  color-scheme: light;
}

/* --- base ---------------------------------------------------------------- */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { line-height: 1.14; margin: 0 0 .5em; letter-spacing: -0.022em; font-weight: 600; }
/* Sized so the hero headline sets on two lines down to tablet width — the second
   line is the long one, so the measure below (.hero-copy) has to clear it. */
h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); letter-spacing: -0.035em; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); letter-spacing: -0.03em; }
h3 { font-size: 1.12rem; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
img { max-width: 100%; height: auto; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--text); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }

/* The header is sticky, so jump targets need to clear it. */
section[id], main[id] { scroll-margin-top: 78px; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: var(--accent-ink);
  padding: .6rem 1rem; border-radius: 0 0 8px 0; z-index: 50;
}
.skip:focus { left: 0; }

.eyebrow {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 .9rem;
}

.sub { color: var(--muted); font-size: .95rem; }

/* --- header -------------------------------------------------------------- */
.site-head {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.head-inner { display: flex; align-items: center; gap: 1.4rem; min-height: 62px; }

.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: inherit; }
/* The fur inherits `fill` across the <use> shadow boundary; the eye parts carry
   inline fills in the symbol, since selectors can't reach inside it. */
.mark { width: 30px; height: 30px; display: block; flex: none; fill: currentColor; }
.brand-name { font-weight: 600; font-size: 1.15rem; letter-spacing: -0.02em; }

.nav { margin-left: auto; display: flex; gap: 1.35rem; flex-wrap: wrap; }
.nav a { color: var(--muted); text-decoration: none; font-size: .93rem; }
.nav a:hover { color: var(--text); }

/* Language switch: two links, the current one marked. Small enough to sit beside the
   theme toggle, explicit enough that nobody has to hunt for the other language. */
.lang { display: flex; align-items: center; gap: .1rem; flex: none; }
.lang a {
  font-family: var(--mono); font-size: .74rem; letter-spacing: .04em;
  color: var(--muted-2); text-decoration: none;
  padding: .3rem .4rem; border-radius: 6px;
}
.lang a:hover { color: var(--text); }
.lang a[aria-current] { color: var(--text); background: color-mix(in srgb, var(--panel-2) 80%, transparent); }

.theme-toggle {
  background: transparent; border: 1px solid var(--border);
  color: var(--muted); border-radius: 8px;
  width: 34px; height: 34px; flex: none;
  cursor: pointer; font-size: .95rem; line-height: 1;
  display: grid; place-items: center;
}
.theme-toggle:hover { color: var(--text); border-color: var(--border-2); }
.theme-toggle-light { display: none; }
:root[data-theme="light"] .theme-toggle-dark { display: none; }
:root[data-theme="light"] .theme-toggle-light { display: block; }

/* Narrow screens: the links get their own row and scroll sideways rather than
   wrapping into a three-line header. */
@media (max-width: 780px) {
  .head-inner { flex-wrap: wrap; gap: .5rem 1rem; padding-bottom: .3rem; }
  .brand { margin-right: auto; }
  .nav {
    order: 3; width: 100%; margin-left: 0;
    flex-wrap: nowrap; overflow-x: auto; gap: 1.1rem;
    padding-bottom: .3rem; scrollbar-width: none;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { white-space: nowrap; }
  section[id], main[id] { scroll-margin-top: 108px; }
}

/* --- hero ---------------------------------------------------------------- */
.hero {
  padding-top: clamp(3.5rem, 8vw, 6.5rem);
  text-align: center;
  /* `clip` rather than `hidden`: it contains decorative bleed without making the
     section a scroll container. Without it the glow below adds a horizontal
     scrollbar to the whole page. */
  overflow-x: clip;
  background:
    radial-gradient(1100px 520px at 50% -10%, color-mix(in srgb, var(--accent) 15%, transparent), transparent 70%);
}
.hero-copy { max-width: 52rem; }
.hero h1 { margin-bottom: .45em; }
.lede {
  font-size: clamp(1.06rem, 1.5vw, 1.22rem);
  color: var(--text);
  max-width: 40rem; margin-inline: auto;
}
.cta-row { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; margin: 2rem 0 1.6rem; }

.btn {
  display: inline-block;
  padding: .78rem 1.45rem;
  border-radius: var(--radius-sm);
  font-size: .95rem; font-weight: 500;
  text-decoration: none; cursor: pointer;
  border: 1px solid transparent;
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 84%, var(--text)); color: var(--accent-ink); }
.btn-ghost { border-color: var(--border-2); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--accent); color: var(--text); background: color-mix(in srgb, var(--accent) 8%, transparent); }

.chips { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; list-style: none; padding: 0; margin: 0; }
.chips li {
  font-family: var(--mono); font-size: .74rem;
  color: var(--muted);
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--panel) 70%, transparent);
  border-radius: 999px; padding: .32rem .75rem;
}

/* The hero screenshot is the widest thing on the page and is allowed to be. */
.hero-shot {
  position: relative;
  width: min(100% - 2.5rem, var(--wrap-wide));
  margin: clamp(2.5rem, 5vw, 4rem) auto 0;
  text-align: center;
}
.hero-shot .glow {
  position: absolute; inset: 8% 0 -12%;
  background: radial-gradient(60% 60% at 50% 40%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%);
  filter: blur(50px);
  z-index: 0;
}
.hero-shot .window { position: relative; z-index: 1; box-shadow: var(--shadow-lg); }
.hero-shot figcaption { margin-top: 1rem; color: var(--muted-2); font-size: .84rem; }

/* Only the top of the app window is shown — it fades out rather than being cut. */
.window-tall img {
  max-height: min(62vh, 620px);
  object-fit: cover; object-position: top center;
  -webkit-mask-image: linear-gradient(180deg, #000 72%, transparent);
  mask-image: linear-gradient(180deg, #000 72%, transparent);
}

/* --- the app window frame ------------------------------------------------ */
.window {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.window-bar {
  display: flex; align-items: center; gap: .4rem;
  height: 34px; padding: 0 .85rem;
  background: var(--panel-2);
  border-bottom: 1px solid var(--border);
}
.window-bar .dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--border-2);
}
.window-title {
  font-family: var(--mono); font-size: .68rem; color: var(--muted-2);
  margin-inline: auto; padding-right: 3rem;   /* optically centred against the dots */
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.window img { display: block; width: 100%; }

/* --- the dot-herd illustration ------------------------------------------- */
.flock-strip {
  height: clamp(90px, 12vw, 132px);
  border-block: 1px solid var(--border);
  background: color-mix(in srgb, var(--panel) 45%, var(--bg));
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  margin-top: clamp(3rem, 6vw, 5rem);
}
.herd { width: 100%; height: 100%; }
.herd herd-dots, .herd svg { display: block; width: 100%; height: 100%; }

/* --- bands --------------------------------------------------------------- */
.band { padding-block: var(--band-y); border-bottom: 1px solid var(--border); }
.band-alt { background: color-mix(in srgb, var(--panel) 55%, var(--bg)); }

.band-head { margin-bottom: var(--head-gap); max-width: 52rem; }
.band-head h2 { margin-bottom: .35em; }
.band-lede { color: var(--muted); max-width: 42rem; font-size: 1.02rem; margin: 0; }

.grid { display: grid; gap: 1.15rem; }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1000px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 820px) { .grid-3 { grid-template-columns: 1fr; } }
@media (max-width: 620px) { .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem 1.4rem;
}
.card-icon {
  display: grid; place-items: center;
  width: 38px; height: 38px; margin-bottom: 1rem;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
}
.card-icon svg { width: 20px; height: 20px; }
.card h3 { margin-bottom: .5em; }
.card p { color: var(--muted); font-size: .93rem; }

/* --- showcase (copy beside a screenshot, alternating sides) --------------- */
.showcase {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  padding-block: clamp(2rem, 4vw, 3.25rem);
}
.showcase + .showcase { border-top: 1px solid var(--border); }
/* Flipped rows put the copy on the right — and the wide column has to travel with the
   screenshot, or every second shot renders a size smaller than its neighbours. */
.showcase-flip { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); }
.showcase-flip .showcase-copy { order: 2; }
.showcase-copy h3 { font-size: clamp(1.3rem, 2vw, 1.6rem); letter-spacing: -0.025em; }
.showcase-copy > p { color: var(--muted); font-size: .97rem; max-width: 40ch; }
@media (max-width: 900px) {
  .showcase { grid-template-columns: 1fr; }
  .showcase-flip .showcase-copy { order: 0; }
}

.ticks { list-style: none; padding: 0; margin: 1.4rem 0 0; }
.ticks li {
  position: relative; padding-left: 1.65rem; margin-bottom: .5rem;
  font-size: .92rem; color: var(--muted);
}
.ticks li::before {
  content: ""; position: absolute; left: .1rem; top: .48em;
  width: 9px; height: 5px;
  border-left: 1.5px solid var(--pick); border-bottom: 1.5px solid var(--pick);
  transform: rotate(-45deg);
}

.shot { margin: 0; }
.shot-wide { width: min(100%, var(--wrap-wide)); margin: 0 auto var(--head-gap); }
.shot figcaption { margin-top: .75rem; color: var(--muted-2); font-size: .82rem; }

.minicards { margin-top: 0; }
.minicard {
  border-top: 2px solid var(--border-2);
  padding-top: 1rem;
}
.minicard h3 { font-size: 1rem; margin-bottom: .3em; }
.minicard p { color: var(--muted); font-size: .92rem; }

/* --- packages ------------------------------------------------------------ */
.plans { align-items: stretch; }

.plan {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  display: flex; flex-direction: column; height: 100%;
}
.plan-featured {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
  box-shadow: var(--shadow);
}
.plan-flag {
  position: absolute; top: -.75rem; left: 1.5rem;
  font-family: var(--mono); font-size: .66rem; letter-spacing: .14em; text-transform: uppercase;
  background: var(--accent); color: var(--accent-ink);
  padding: .2rem .6rem; border-radius: 999px; margin: 0;
}
.plan-tier {
  font-family: var(--mono); font-size: .7rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted-2); margin: 0 0 .15rem;
}
.plan-name { font-size: 1.65rem; letter-spacing: -0.03em; margin: 0 0 .5rem; }
.plan-price { margin: 0; display: flex; align-items: baseline; }
.plan-price .amount { font-size: 2.6rem; font-weight: 600; letter-spacing: -0.045em; }
.plan-price .cur { font-size: 1.35rem; color: var(--muted); }
.plan-note { font-family: var(--mono); font-size: .72rem; color: var(--muted-2); margin: .2rem 0 1.1rem; }
.plan-blurb { color: var(--muted); font-size: .92rem; }

.plan-list { list-style: none; margin: .6rem 0 1.75rem; padding: 0; }
.plan-list li {
  position: relative; padding-left: 1.5rem; margin-bottom: .55rem;
  font-size: .92rem; color: var(--muted);
}
.plan-list li::before {
  content: ""; position: absolute; left: .25rem; top: .62em;
  width: 6px; height: 6px; border-radius: 50%; background: var(--pick);
}
.plan-list strong { color: var(--text); }
.plan-cta { margin-top: auto; text-align: center; }

.fineprint {
  margin: clamp(2rem, 4vw, 3rem) 0 0;
  color: var(--muted-2); font-size: .87rem; max-width: 68ch;
  border-left: 2px solid var(--border-2); padding-left: 1rem;
}

/* --- the walkthrough ------------------------------------------------------ */
/* Each step is a .showcase row; this is the number that labels it. */
.step-n {
  font-family: var(--mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 .5rem;
}

.aside {
  margin-top: clamp(2rem, 4vw, 3rem);
  background: var(--panel);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.5rem 1.6rem;
}
.aside h3 { margin-bottom: .45em; }
.aside p { color: var(--muted); font-size: .95rem; max-width: 76ch; }

/* --- contact ------------------------------------------------------------- */
.contact-wrap {
  display: grid; gap: clamp(2rem, 5vw, 4rem);
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  align-items: start;
}
@media (max-width: 900px) { .contact-wrap { grid-template-columns: 1fr; } }

.contact-copy p { color: var(--muted); max-width: 46ch; }
.contact-mail { font-family: var(--mono); font-size: 1.12rem; margin: 1.3rem 0 .9rem; }
.contact-mail a {
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
}

.contact-form {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 1.6rem;
  box-shadow: var(--shadow);
}
.field-row { display: flex; flex-direction: column; gap: .35rem; margin-bottom: 1rem; }
.field-row label { font-size: .82rem; color: var(--muted); font-weight: 500; }
.contact-form input,
.contact-form select,
.contact-form textarea {
  font: inherit; font-size: .95rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border-2);
  border-radius: 9px;
  padding: .62rem .78rem;
  width: 100%;
}
.contact-form textarea { resize: vertical; min-height: 7rem; }
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  border-color: var(--accent); outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}
.contact-form .btn { width: 100%; }
.form-note { color: var(--muted-2); font-size: .82rem; margin: .9rem 0 0; text-align: center; }
.hedge { position: absolute; left: -9999px; }

/* --- faq ----------------------------------------------------------------- */
.faq {
  columns: 2; column-gap: 3rem;
  max-width: 100%;
}
@media (max-width: 880px) { .faq { columns: 1; } }
.faq details {
  break-inside: avoid; -webkit-column-break-inside: avoid;
  border-bottom: 1px solid var(--border);
  padding: .3rem 0;
}
.faq summary {
  cursor: pointer; list-style: none;
  padding: .95rem 2rem .95rem 0;
  font-weight: 500; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute; right: .3rem; top: .8rem;
  font-family: var(--mono); color: var(--accent); font-size: 1.2rem;
}
.faq details[open] summary::after { content: "−"; }
.faq summary:hover { color: var(--accent); }
.faq details p { color: var(--muted); font-size: .95rem; padding: 0 1.5rem 1.1rem 0; margin: 0; }

/* --- footer -------------------------------------------------------------- */
.site-foot { padding: 2.75rem 0 3.25rem; }
.foot-inner { display: grid; gap: 1.4rem; }
.foot-brand { display: flex; align-items: center; gap: .75rem; }
.foot-brand .brand-name { margin: 0; }
.foot-brand .sub { margin: 0; font-size: .85rem; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 1.2rem; }
.foot-nav a { color: var(--muted); text-decoration: none; font-size: .9rem; }
.foot-nav a:hover { color: var(--text); }
.foot-legal { color: var(--muted-2); font-size: .82rem; margin: 0; }

/* --- post-purchase page --------------------------------------------------- */
.receipt {
  max-width: 40rem;
  padding: clamp(3rem, 8vw, 5.5rem) 0 4rem;
}
.receipt .mark { width: 44px; height: 44px; margin-bottom: 1.6rem; }
.receipt h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
.receipt .lede { text-align: left; margin-inline: 0; max-width: none; }
.receipt code, .faq code {
  font-family: var(--mono); font-size: .88em;
  background: var(--panel-2); border-radius: 5px; padding: .1em .4em;
}
.order {
  margin: 1.6rem 0 0;
  font-size: .9rem; color: var(--muted);
  border-left: 2px solid var(--border-2); padding-left: .9rem;
}
.next { margin: 2rem 0 1.75rem; padding-left: 1.3rem; }
.next li { margin-bottom: .9rem; color: var(--muted); font-size: .95rem; }
.next strong { color: var(--text); }
.next::marker, .next li::marker { color: var(--accent); font-family: var(--mono); }
.receipt-cta { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 2rem; }

/* --- thank-you page ------------------------------------------------------ */
.centered {
  min-height: 70vh;
  display: grid; place-items: center; text-align: center;
  padding: 4rem 0;
}
.centered .mark { width: 56px; height: 56px; margin: 0 auto 1.4rem; }
.centered p { color: var(--muted); max-width: 46ch; margin-inline: auto; }
