/* Stokd marketing site — the app's own visual language, lifted from
 * lib/theme.ts. One sheet, every page.
 *
 * The host caches this file for an hour while HTML is always fresh, so a
 * deploy can hand visitors new markup with hour-old styles — which is a
 * broken page, not a stale one. Every page therefore links site.css?v=N:
 * when you edit this file, bump the ?v= on every page together. */

:root {
  /* The page declares its own dark styles below, so dark-mode phones and
     force-darkening extensions (Noir, Chrome auto-dark) use ours instead of
     algorithmically inverting the light one — which blacked out the logo
     and smeared the phone-frame fades. */
  color-scheme: light dark;
  --page: #F7F4EF;
  --raised: #FFFDFA;
  --tinted: #EFE9DE;
  --ink: #1C1A17;
  /* The dark SURFACE (hero, CTA block, dark buttons) — split from --ink so
     dark mode can flip ink to light text without turning the hero light. */
  --shell: #1C1A17;
  --note: #544E45;
  --muted: #6B655C;
  --faint: #7E776B;
  --placeholder: #A79F94;
  --hairline: #D8D2C7;
  --rule: #EDE7DC;
  --card-border: #E2DCD1;
  --accent: #B4532C;
  --accent-dark: #8E3D1D;
  --accent-bright: #D97B52;
  --success-text: #3B6237;
  --success-surface: #E1EBDF;
  --warning-text: #7A5518;
  --warning-surface: #F6E9D8;
  --alert: #8E2A16;
  --alert-surface-soft: #FCF2EE;
  --alert-border: #E8C9BE;
  --ink-raised: #282420;
  --ink-border: #3A342D;
  --ink-faint: #9A9287;
  --ink-soft: #B5AEA3;
  --sans: 'Familjen Grotesk', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --shadow-card: 0 14px 34px rgba(28, 26, 23, .13);
  --shadow-shell: 0 30px 80px rgba(0, 0, 0, .45);
}

/* ── dark mode: the same warm world, inverted. The ink surfaces (hero, CTA,
   dark buttons) ride --shell and lift slightly above the page; the phone
   frames and shotcards stay light because the app inside them is. */
@media (prefers-color-scheme: dark) {
  :root {
    --page: #161310;
    --raised: #1F1B17;
    --tinted: #262119;
    --ink: #F2EDE5;
    --shell: #211D19;
    --note: #C9C1B5;
    --muted: #A79E92;
    --faint: #8B8277;
    --placeholder: #6E675C;
    --hairline: #3A342C;
    --rule: #2B2620;
    --card-border: #332E26;
    --accent: #D97B52;
    --accent-dark: #E6926C;
    --accent-bright: #E08D63;
    --success-text: #A3CB9A;
    --success-surface: #202B1D;
    --warning-text: #D9B678;
    --warning-surface: #2D2413;
    --alert: #EC9C85;
    --alert-surface-soft: #2E1B13;
    --alert-border: #4C2F22;
    --ink-raised: #2E2A24;
    --ink-border: #423B33;
    --shadow-card: 0 14px 34px rgba(0, 0, 0, .5);
    --shadow-shell: 0 30px 80px rgba(0, 0, 0, .75);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 22px; }

/* ── type ── */
.kicker {
  font: 400 11px/1 var(--mono);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--faint);
}
.on-ink .kicker { color: var(--ink-faint); }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.025em; }
h1 { font-size: clamp(34px, 5.2vw, 56px); line-height: 1.06; letter-spacing: -.03em; margin: 16px 0 18px; text-wrap: balance; }
h2 { font-size: clamp(27px, 3.4vw, 38px); line-height: 1.12; margin: 12px 0 14px; text-wrap: balance; }
h3 { font-size: 19px; letter-spacing: -.01em; }
.lede { font-size: clamp(16.5px, 1.5vw, 19px); line-height: 1.55; color: var(--note); max-width: 640px; }
.on-ink .lede, .on-ink p { color: var(--ink-soft); }
p { margin: 0; color: var(--note); }
.mono { font-family: var(--mono); }

/* ── nav ── */
.nav { display: flex; align-items: center; gap: 30px; padding: 20px 0; }
.nav .logo img { height: 34px; width: auto; }
.nav .links { display: flex; gap: 26px; margin-left: auto; font-size: 15.5px; font-weight: 500; }
.nav .links a { color: var(--note); }
.nav .links a:hover, .nav .links a.here { color: var(--accent); }
.nav .links a.here { font-weight: 600; }
.btn {
  display: inline-block;
  font: 600 15.5px/1 var(--sans);
  padding: 13px 22px;
  border-radius: 999px;
  background: var(--accent);
  color: #FFFDFA;
  white-space: nowrap;
}
.btn:hover { background: var(--accent-dark); color: #FFFDFA; }
.btn.big { font-size: 17px; padding: 17px 30px; border-radius: 14px; }
.btn.ghost { background: transparent; border: 1px solid var(--ink-border); color: #F7F4EF; }
.btn.ghost:hover { border-color: var(--ink-faint); background: transparent; }

/* ── phone menu ── */
.menu { display: none; position: relative; }
.menu summary {
  list-style: none; cursor: pointer;
  color: var(--ink);
  width: 44px; height: 44px;
  border: 1px solid var(--hairline); border-radius: 12px;
  background: var(--raised);
  display: flex; align-items: center; justify-content: center;
}
.menu summary::-webkit-details-marker { display: none; }
.menu[open] summary { background: var(--tinted); }
/* The drawer: a full-height panel sliding in from the right — Log in up top,
   links as big tappable rows, the calls to action right beneath them. The
   dimmed page behind it IS the summary (its ::before stretched over the
   viewport), so tapping anywhere off the drawer closes it — the drawer
   itself needs no JavaScript. */
.menu .sheet {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: min(320px, 86vw);
  background: var(--raised);
  border-left: 1px solid var(--card-border);
  box-shadow: -28px 0 70px rgb(28 26 23 / .28);
  padding: 22px 22px calc(24px + env(safe-area-inset-bottom));
  overflow-y: auto;
  animation: drawer-in .26s ease;
  display: flex; flex-direction: column;
  z-index: 60;
}
.menu .sheet::before {
  content: "MENU";
  font: 700 10px/1 var(--mono); letter-spacing: .16em; color: var(--faint);
  padding: 10px 8px 16px;
}
@keyframes drawer-in { from { transform: translateX(105%); } }
.menu[open] summary::before {
  content: ""; position: fixed; inset: 0; z-index: 55;
  background: rgb(28 26 23 / .42);
  animation: dim-in .26s ease;
}
@keyframes dim-in { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .menu .sheet, .menu[open] summary::before { animation: none; }
  .nav, .nav .logo img, .nav .btn, .menu summary { transition: none; }
}
.menu .sheet a { padding: 15px 8px; border-bottom: 1px solid var(--hairline); font-size: 17px; font-weight: 500; color: var(--note); }
.menu .sheet a:hover { background: var(--tinted); color: var(--note); }
.menu .sheet a.here { color: var(--accent); font-weight: 600; }
/* A fixed breath, not a stretch: the buttons follow the menu items rather
   than hiding at the far bottom, where a phone's floating toolbar can sit
   over them. */
.menu .sheet .grow { flex: 0 0 18px; }
/* Log in rides at the top of the drawer — someone with an account is looking
   for a door, not a tour. */
.menu .sheet a.btn.login { margin: 2px 0 14px; background: var(--shell); }
.menu .sheet a.btn.login:hover { background: var(--ink-raised); }
.menu .sheet a.btn { text-align: center; background: var(--accent); color: #FFFDFA; font-weight: 600; border-bottom: 0; border-radius: 13px; padding: 15px 14px; }
.menu .sheet a.btn:hover { background: var(--accent-dark); }
.menu .sheet a.btn.outline { background: transparent; border: 1px solid var(--hairline); color: var(--ink); margin-bottom: 10px; }
.menu .sheet a.btn.outline:hover { background: var(--tinted); }

/* ── sections ── */
.section { padding-top: clamp(56px, 8vw, 96px); }
.ink {
  background: var(--shell);
  color: #F7F4EF;
}
.ink h1, .ink h2, .ink h3 { color: #F7F4EF; }
.band { padding: clamp(48px, 7vw, 80px) 0; }

/* ── hero ── */
.hero { margin-top: 14px; }
.hero .wrap { display: flex; gap: 60px; align-items: center; padding-top: clamp(48px, 7vw, 84px); padding-bottom: clamp(48px, 7vw, 84px); }
.hero .copy { flex: 1; min-width: 0; }
.hero .btn-row { display: flex; gap: 12px; margin-top: 32px; flex-wrap: wrap; }
.hero .fine { font: 400 12px/1.7 var(--mono); color: var(--ink-faint); margin-top: 16px; }
/* Two labelled views side by side — no overlap, so the phones keep their
   default relative position and the crop fades stay anchored to their frames. */
.hero .art { flex: 0 0 500px; display: flex; gap: 18px; align-items: flex-start; }
.hero .art .view { flex: 1; min-width: 0; }
/* Bright pill chips — the hero shell is dark in both color schemes, so the
   light-on-dark literals are safe here. */
.viewtag {
  width: fit-content; margin: 0 auto 14px;
  font: 700 13px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase;
  color: #F7F4EF; background: rgb(247 244 239 / .08);
  border: 1px solid rgb(247 244 239 / .22);
  padding: 10px 18px; border-radius: 999px;
}

/* ── phone frames ── */
.phone {
  margin: 0;
  position: relative;
  border-radius: 34px;
  border: 1px solid var(--card-border);
  /* the app inside is always light — the frame's ground matches IT, not the site */
  background: #F7F4EF;
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.ink .phone, .hero .phone { box-shadow: var(--shadow-shell); border-color: var(--ink-border); }
.phone img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
/* The frames are shorter than the captures, so the screen continues past the
   crop. A fade to the app's own paper makes the cut read as designed —
   without it the bottom edge slices a line of UI text in half. */
.phone:not(.full)::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 72px;
  /* fades to the APP's paper, not the site's page — anchored so dark mode
     (or a force-darkener) can never paint a dark smear across a light shot */
  background: linear-gradient(rgb(247 244 239 / 0), #F7F4EF);
  pointer-events: none;
}
.phone.h520 { aspect-ratio: 390 / 520; }
.phone.h600 { aspect-ratio: 390 / 600; }
.phone.h700 { aspect-ratio: 390 / 700; }
.phone.full { aspect-ratio: 390 / 844; }

/* ── feature rows ── */
.feature { display: flex; gap: clamp(36px, 6vw, 72px); align-items: center; }
.feature > .copy { flex: 1; min-width: 0; }
.feature > .copy p { max-width: 470px; line-height: 1.6; }
.feature > .shot { flex: 0 0 min(360px, 88vw); }
.feature.flip { flex-direction: row-reverse; }
.more { display: inline-block; font-weight: 600; font-size: 16.5px; margin-top: 20px; }
.ink .more { color: var(--accent-bright); }

/* ── card grids ── */
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.card {
  background: var(--raised);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  padding: 26px;
}
.card.tint { background: var(--tinted); border-color: transparent; }
.card.dark { background: var(--ink-raised); border-color: transparent; color: #F7F4EF; }
.card.dark p { color: var(--ink-soft); }
.card h3 { margin-bottom: 8px; }
.card p { font-size: 15.5px; line-height: 1.55; }

/* the numbered step cards on home */
.step { padding: 22px; }
.step .n { font: 700 10px/1 var(--mono); letter-spacing: .12em; color: var(--accent); }
.step h3 { margin: 8px 0 0; }
.step .shotcard {
  margin: 14px 0 12px;
  border: 1px solid var(--card-border);
  border-radius: 15px;
  overflow: hidden;
  background: #F7F4EF;
}
/* Shot sources are pre-cropped to whole cards with clean edges — the images
   size themselves, so no width can ever slice a line of text. */
.step .shotcard img { display: block; width: 100%; height: auto; }
.step p { font-size: 14.5px; }

/* ── panel (big raised block) ── */
.panel {
  background: var(--raised);
  border: 1px solid var(--card-border);
  border-radius: 22px;
  padding: clamp(26px, 4vw, 48px);
}

/* ── pricing ── */
.tiers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.tier { display: flex; flex-direction: column; padding: 34px; position: relative; border-radius: 22px; }
.tier .price { font: 700 20px/1.3 var(--mono); margin-top: 10px; }
.tier .yearly { font-size: 15px; color: var(--faint); margin-top: 4px; min-height: 22px; }
.tier .blurb { font-size: 16px; line-height: 1.55; margin-top: 14px; }
.tier hr { border: 0; height: 1px; background: var(--rule); margin: 20px 0; width: 100%; }
.tier ul { list-style: none; margin: 0 0 0; padding: 0; display: flex; flex-direction: column; gap: 11px; font-size: 15.5px; flex: 1; }
.tier li { padding-left: 24px; position: relative; }
.tier li::before { content: '✓'; position: absolute; left: 0; color: var(--success-text); font-weight: 700; }
.tier .btn { margin-top: 24px; text-align: center; border-radius: 12px; padding: 14px 0; font-size: 15.5px; }
.tier.hi { background: var(--shell); color: #F7F4EF; }
.tier.hi .yearly { color: var(--ink-faint); }
.tier.hi .blurb { color: var(--ink-soft); }
.tier.hi hr { background: var(--ink-border); }
.tier.hi li::before { color: #7FD3A0; }
.tier .flag {
  position: absolute; top: -12px; left: 34px;
  background: var(--accent); color: #FFFDFA;
  font: 700 10px/1 var(--mono); letter-spacing: .1em;
  padding: 7px 12px; border-radius: 999px;
}
.btn.outline { background: transparent; border: 1px solid var(--hairline); color: var(--ink); }
.btn.outline:hover { border-color: var(--ink); background: transparent; }
.btn.dark { background: var(--shell); color: #F7F4EF; }
.btn.dark:hover { background: var(--ink-raised); }

/* ── FAQ ── */
.faq { padding: 24px; border-radius: 16px; }
.faq h3 { font-size: 17px; }
.faq p { font-size: 15.5px; margin-top: 7px; }

/* ── final CTA ── */
.cta-block {
  background: var(--shell);
  border-radius: 22px;
  padding: clamp(36px, 6vw, 64px);
  text-align: center;
  color: #F7F4EF;
}
.cta-block h2 { font-size: clamp(28px, 4vw, 44px); letter-spacing: -.03em; }
.cta-block .sub { color: var(--ink-soft); margin-top: 12px; font-size: 18px; }
.cta-block .btn { margin-top: 28px; }
.cta-block .fine { font: 400 12px/1.7 var(--mono); color: var(--ink-faint); margin-top: 14px; }
.cta-block .alt { margin-top: 16px; font-size: 15.5px; }
.cta-block .alt a { color: var(--accent-bright); font-weight: 600; }

/* ── footer ── */
.footer { display: flex; align-items: center; gap: 24px; padding: 40px 0 48px; flex-wrap: wrap; }
.footer img { height: 26px; width: auto; }
.footer .links { margin-left: auto; display: flex; gap: 22px; font-size: 14.5px; }
.footer .links a, .footer .links span { color: var(--faint); }

/* ── support form ── */
.form { max-width: 560px; }
.form label {
  display: block; font: 700 10px/1 var(--mono); letter-spacing: .12em;
  text-transform: uppercase; color: var(--faint); margin: 18px 0 7px;
}
.form input, .form textarea {
  width: 100%; box-sizing: border-box;
  font: 400 16px/1.5 var(--sans); color: var(--ink);
  background: var(--raised); border: 1px solid var(--hairline);
  border-radius: 12px; padding: 13px 14px;
}
.form input:focus, .form textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.form textarea { min-height: 150px; resize: vertical; }
.form .btn { border: 0; cursor: pointer; width: 100%; margin-top: 22px; font-size: 16px; }
.form .btn:disabled { opacity: .6; cursor: default; }
/* a field only bots can see; a filled one is a bot, and bots get silence */
.form .hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.form .formerr { color: var(--warning-text); font-size: 15px; margin: 12px 0 0; }
.form .fine { font: 400 12px/1.7 var(--mono); color: var(--faint); }
.sentcard {
  max-width: 560px; margin-top: 28px; padding: 22px;
  background: var(--success-surface); color: var(--success-text);
  border-radius: 16px;
}
.sentcard h3, .sentcard p, .sentcard strong { color: var(--success-text); }

/* ── legal pages ── */
.legal { max-width: 720px; }
.legal h1 { font-size: 38px; }
.legal h2 { font-size: 22px; margin-top: 36px; }
.legal p, .legal li { color: var(--note); line-height: 1.65; }
.legal .updated { font: 400 12px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }

/* ── responsive ── */
@media (max-width: 960px) {
  .hero .wrap { flex-direction: column; align-items: flex-start; }
  .hero .art { flex: none; width: 100%; max-width: 460px; align-self: center; gap: 14px; }
  .feature, .feature.flip { flex-direction: column; align-items: stretch; }
  /* container-relative, not viewport-relative — inside a padded .panel a
     vw-based width overflows the page sideways */
  .feature > .shot { flex: none; margin: 0 auto; width: min(360px, 100%); max-width: 100%; }
  .grid3, .grid4, .tiers { grid-template-columns: 1fr; }
  .grid2 { grid-template-columns: 1fr; }
  /* Stacked tiers keep their price order — free, £19, £39 — reading like a
     menu, cheapest first. Hoisting the highlighted one broke the ladder. */
}
@media (max-width: 760px) {
  .nav .links { display: none; }
  /* the bar is full on a phone — Log in lives at the top of the drawer.
     Direct child only: the drawer's own Log in is inside .nav too, and a
     descendant selector here would hide both. */
  .nav > .btn.login { display: none; }
  .menu { display: block; }

  /* The bar keeps every call to action in reach: Book a demo in ink,
     Start free in accent, the menu at the far right. At the top of the page
     everything is sized to fill the bar — viewport-relative, so it still
     fits a 360px phone — and it steps down to the compact size on scroll. */
  .nav { gap: clamp(5px, 1.5vw, 8px); padding: 16px 0; transition: padding .18s ease; }
  .nav .logo img { height: clamp(24px, 7.2vw, 30px); transition: height .18s ease; }
  .nav .btn {
    font-size: clamp(13px, 3.6vw, 14.5px);
    padding: 12px clamp(11px, 3.4vw, 15px);
    transition: font-size .18s ease, padding .18s ease;
  }
  .nav .btn.demo { margin-left: auto; background: var(--shell); border-color: var(--shell); color: #FFFDFA; }
  .nav .btn.demo:hover { background: var(--ink-raised); }
  .menu summary { width: 42px; height: 42px; transition: width .18s ease, height .18s ease; }

  /* The header rides along with the scroll — stuck to the top, then the
     whole bar steps down to the compact size (site.js flips .scrolled) so
     it never eats the screen. */
  body > .wrap:first-of-type { position: sticky; top: 0; z-index: 70; background: var(--page); }
  body > .wrap:first-of-type:has(.nav.scrolled) {
    border-bottom: 1px solid var(--hairline);
    box-shadow: 0 10px 30px rgb(28 26 23 / .07);
  }
  .nav.scrolled { padding: 8px 0; }
  .nav.scrolled .logo img { height: 20px; }
  .nav.scrolled .btn { font-size: 13px; padding: 9px 12px; }
  .nav.scrolled .menu summary { width: 40px; height: 40px; }

  .hero .art { flex-direction: column; gap: 26px; }
  .footer { justify-content: center; }
  .footer .links { margin-left: 0; flex-wrap: wrap; justify-content: center; }
}
