/* GoSEQ — landing page. Same design tokens as the app itself.

   Modern CSS used, with what happens without it:
   - :has()          drives the sending overlay. Without it, the button's own small spinner shows instead.
   - text-wrap       balance/pretty on headings. Without it, headings wrap normally.
   - color-mix()     only in the input focus ring. Without it, the border colour change still shows focus.
   - position:sticky on the map screenshot. Without it, the screenshot simply scrolls.
*/
@font-face { font-family: 'Jakarta'; src: url('/fonts/jakarta.woff2') format('woff2'); font-weight: 200 800; font-display: swap; }

:root {
  --bg: #F6F3EF; --surface: #FFFFFF; --surface-2: #EFEBE6; --text: #1B1614; --muted: #6B625D;
  --line: rgba(27,22,20,.12); --field-line: rgba(27,22,20,.47);
  --accent: #B8341B; --accent-hover: #9C2A14; --accent-soft: #FCE6DE; --on-accent: #FFF;
  --ok: #137347; --ok-soft: #E1F3E9; --bad: #B42318;
  --shadow: 0 1px 2px rgba(27,22,20,.06), 0 18px 48px -12px rgba(27,22,20,.22);
  --font: "Jakarta", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --ease: cubic-bezier(.2,.8,.2,1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #131110; --surface: #1D1A19; --surface-2: #272322; --text: #F4EFEC; --muted: #A99F99;
    --line: rgba(244,239,236,.12); --field-line: rgba(244,239,236,.36);
    --accent: #FF8A63; --accent-hover: #FFA283; --accent-soft: #3D2119; --on-accent: #2B0D05;
    --ok: #4CD39A; --ok-soft: #173427; --bad: #FF8A7E;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 24px 60px -16px rgba(0,0,0,.7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #131110; --surface: #1D1A19; --surface-2: #272322; --text: #F4EFEC; --muted: #A99F99;
  --line: rgba(244,239,236,.12); --field-line: rgba(244,239,236,.36);
  --accent: #FF8A63; --accent-hover: #FFA283; --accent-soft: #3D2119; --on-accent: #2B0D05;
  --ok: #4CD39A; --ok-soft: #173427; --bad: #FF8A7E;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 24px 60px -16px rgba(0,0,0,.7);
  color-scheme: dark;
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
html { overflow-x: clip; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 var(--font);
  -webkit-font-smoothing: antialiased; }
.ledger time, .notif-t, .week { font-variant-numeric: tabular-nums; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
@media (min-width: 768px) { .wrap { padding: 0 36px; } }
a { color: inherit; text-decoration-color: var(--accent); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
[hidden] { display: none !important; }

/* ---------- header ---------- */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 22px; padding-bottom: 22px; }
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 800; font-size: 19px;
  letter-spacing: -.02em; text-decoration: none; }
.brand:hover { color: var(--text); }
.brand svg { width: 34px; height: 34px; border-radius: 9px; display: block; }
.status { margin: 0; font-size: 14px; font-weight: 600; color: var(--muted); }

/* ---------- 1. hero ---------- */
.hero { display: grid; gap: 48px; padding-top: 28px; padding-bottom: 88px; }
@media (min-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1fr) 330px; column-gap: clamp(48px, 7vw, 112px); padding-top: 48px; padding-bottom: 128px; }
  .hero-shot { margin-top: 88px; }  /* sits lower than the headline on purpose: the eye goes headline → form → proof */
}
.kicker { margin: 0 0 20px; font-size: 14px; font-weight: 600; color: var(--muted); }
h1 { margin: 0 0 28px; font-size: clamp(52px, 9.4vw, 112px); line-height: .92; letter-spacing: -.055em; font-weight: 800; }
h1 em { font-style: normal; color: var(--accent); }
/* Jakarta sets a heavy full stop well away from the letter before it; in big headings that reads as "leave ." */
.stop { margin-left: -.07em; }
.lede { margin: 0 0 14px; max-width: 31em; font-size: clamp(18px, 1.9vw, 21px); line-height: 1.5; letter-spacing: -.01em; }
.lede { margin-bottom: 36px; }
/* On a short laptop screen the form fell below the fold: tighten the hero so the email field and button show. */
@media (min-width: 900px) and (max-height: 860px) {
  .top { padding-top: 14px; padding-bottom: 14px; }
  .hero { padding-top: 16px; }
  .hero-shot { margin-top: 40px; }
  .kicker { margin-bottom: 14px; }
  h1 { font-size: min(9.4vw, 112px, 12vh); margin-bottom: 18px; }
  .lede { margin-bottom: 20px; }
  .signup { padding: 18px 22px; }
  .signup .note { margin-bottom: 12px; }
}

/* ---------- sign-up ---------- */
.signup { position: relative; max-width: 560px; padding: 22px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.signup h2 { margin: 0 0 2px; font-size: 17px; letter-spacing: -.015em; }
.signup .note { margin: 0 0 18px; font-size: 14px; color: var(--muted); }
.fields { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .fields { grid-template-columns: 1fr 1.4fr; } }
label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 700; color: var(--muted); }
.opt { font-weight: 500; }
input { width: 100%; min-height: 50px; padding: 0 14px; font: 16px var(--font); color: var(--text);
  background: var(--bg); border: 1px solid var(--field-line); border-radius: 10px; }
input:focus-visible { outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent); }
input[aria-invalid="true"] { border-color: var(--bad); }
#email { scroll-margin-top: 140px; }
button.go { width: 100%; min-height: 52px; margin-top: 14px; font: 700 16px var(--font); color: var(--on-accent);
  background: var(--accent); border: 0; border-radius: 10px; cursor: pointer; }
button.go:hover { background: var(--accent-hover); }
button.go[disabled] { cursor: progress; }
@media (prefers-reduced-motion: no-preference) {
  button.go { transition: transform .12s ease; }
  button.go:active { transform: scale(.985); }
}
/* the button's own spinner: the fallback for browsers without :has(), which never see the overlay */
.spin { display: inline-block; width: 15px; height: 15px; margin-right: 9px; vertical-align: -2px;
  border: 2px solid currentColor; border-top-color: transparent; border-radius: 50%; }
@media (prefers-reduced-motion: no-preference) { .spin { animation: turn .8s linear infinite; } }

/* two lines are always reserved for the message, so an error (or the rate-limit text, whose
   length the server decides) never pushes the page down */
.signup { --msg-h: 21px; }
.msg:focus { outline: none; }
.msg { margin: 8px 0 0; min-height: var(--msg-h); font-size: 14.5px; font-weight: 600; line-height: 21px; }
.msg.ok { color: var(--ok); } .msg.bad { color: var(--bad); }
.fineprint { margin: 4px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.5; }

/* --- sending: a full-card overlay with the spinner, while the request is in flight --- */
.sending { display: none; }
.js .sending { position: absolute; inset: 0; z-index: 2; display: grid; place-content: center; justify-items: center;
  gap: 18px; padding: 24px; background: var(--surface); border-radius: inherit; text-align: center;
  opacity: 0; pointer-events: none; }
.js .signup:has(#submit[disabled]:not([hidden])) .sending { opacity: 1; pointer-events: auto; }
.sending-t { font-size: 15px; font-weight: 600; }

/* The spinner: a 3/4 arc whose front runs ahead while its tail catches up. Built from two
   half-circles in clipping boxes so that only transform ever animates. */
.arc { position: relative; display: block; width: 46px; height: 46px; color: var(--accent); }
.arc-layer { position: absolute; inset: 0; }
.arc-clip { position: absolute; top: 0; width: 50%; height: 100%; overflow: hidden; }
.arc-clip.l { left: 0; } .arc-clip.r { right: 0; }
.arc-gap { position: absolute; top: 0; left: 45%; width: 10%; height: 100%; overflow: hidden; }
.arc-c { position: absolute; top: 0; width: 200%; height: 100%; border: 4px solid currentColor;
  border-bottom-color: transparent; border-radius: 50%; }
.arc-gap .arc-c { width: 1000%; left: -450%; }
/* at rest (reduced motion) it holds at its longest: a still 3/4 arc */
.arc-clip.l .arc-c { left: 0; border-right-color: transparent; transform: rotate(-5deg); }
.arc-clip.r .arc-c { left: -100%; border-left-color: transparent; transform: rotate(5deg); }

/* --- success: the message takes over the card; the hidden fields keep their space so nothing below moves --- */
.signup .fields[hidden] { display: grid !important; visibility: hidden; }
.signup .note[hidden] { display: block !important; visibility: hidden; }
.signup #submit[hidden] { display: block !important; visibility: hidden; }
.signup .msg.ok { position: absolute; inset: 0; z-index: 1; margin: 0; padding: 24px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 14px; background: var(--surface); border-radius: inherit;
  font-size: 18px; font-weight: 700; letter-spacing: -.01em; text-align: center; color: var(--text); }
.signup:has(.msg.ok) .fineprint { margin-top: calc(16px + var(--msg-h)); }  /* the space .msg held before it went absolute */
.signup .msg.ok::before { content: ""; width: 14px; height: 26px; margin-bottom: 6px;
  border: solid var(--ok); border-width: 0 4px 4px 0; transform: rotate(45deg); }

/* ---------- screenshots ---------- */
.shot { margin: 0; display: grid; gap: 16px; align-content: start; }
.shot img { display: block; width: 100%; max-width: 330px; height: auto; border-radius: 34px;
  border: 1px solid var(--line); background: #131110; box-shadow: var(--shadow); }
.shot figcaption { max-width: 30ch; font-size: 14px; line-height: 1.5; color: var(--muted); }
.shot figcaption strong { color: var(--text); }
/* in between phone and desktop, the caption sits beside the screenshot rather than under it */
@media (min-width: 560px) and (max-width: 899px) {
  .hero-shot, .map-shot { grid-template-columns: 300px minmax(0, 1fr); column-gap: 36px; align-items: center; }
  .shot figcaption { max-width: 32ch; font-size: 17px; }
}

/* ---------- 2. working backwards ---------- */
.back { border-top: 1px solid var(--line); padding: 80px 0 96px; }
.back-grid { display: grid; gap: 44px; }
@media (min-width: 900px) { .back-grid { grid-template-columns: 5fr 7fr; gap: 72px; align-items: start; }
  .back-head { position: sticky; top: 40px; } }
.back-head h2, .more-head, .maker-head { margin: 0 0 16px; font-size: clamp(32px, 4.6vw, 52px); line-height: 1.02; letter-spacing: -.04em; font-weight: 800; }
.back-head p { margin: 0 0 14px; max-width: 30em; font-size: 17px; color: var(--muted); }
.back-head .aside { font-size: 13.5px; }

.ledger { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--line); }
.ledger > li { display: grid; gap: 6px 28px; padding: 22px 0; border-top: 1px solid var(--line); align-items: baseline; }
@media (min-width: 560px) { .ledger > li { grid-template-columns: 9.5rem minmax(0, 1fr); } }
.ledger time { font-size: clamp(34px, 4vw, 44px); font-weight: 300; line-height: 1; letter-spacing: -.04em; }
.ledger time small { margin-left: .18em; font-size: .38em; font-weight: 600; letter-spacing: 0; color: var(--muted); }
.ledger p { margin: 0; font-size: 16px; color: var(--muted); }
.ledger p b { color: var(--text); font-weight: 700; }
/* the one row that matters is the only big, heavy, coloured thing in the section */
.ledger > li.lead { grid-template-columns: 1fr; padding: 26px 0 30px; }
.ledger .lead time { font-size: clamp(76px, 12vw, 136px); font-weight: 800; letter-spacing: -.06em; color: var(--accent); }
.ledger .lead time small { color: var(--accent); }
.ledger .lead p { font-size: 17px; }
.count-label { margin-top: 18px !important; font-size: 14px !important; }
.notif { max-width: 360px; margin-top: 12px; padding: 12px 16px 14px; border: 1px solid var(--line); border-radius: 20px;
  background: var(--surface); box-shadow: var(--shadow); }
.notif p { margin: 0 !important; }
.notif-top { display: flex; align-items: center; gap: 7px; font-size: 12.5px !important; font-weight: 700; color: var(--text) !important; }
.notif-top span:last-child { font-weight: 500; color: var(--muted); }
.notif-ico { width: 18px; height: 18px; border-radius: 5px; background: linear-gradient(135deg, #FF9152, #F0513E 55%, #B8264A); }
.notif-t { margin-top: 6px !important; font-size: 16px !important; line-height: 1.35 !important; font-weight: 800; letter-spacing: -.01em; color: var(--text) !important; }
.notif-b { font-size: 14px !important; }
/* the minutes: a column of values behind a one-line window, parked on "1 min" when nothing moves */
.tick { display: inline-block; height: 1.35em; overflow: hidden; vertical-align: top; color: var(--accent); }
.tick-in { display: block; transform: translateY(-83.3333%); }
.tick-in span { display: block; height: 1.35em; line-height: 1.35em; }

/* ---------- 3. details ---------- */
.more { padding: 88px 0 72px; border-top: 1px solid var(--line); }
.more-grid { display: grid; gap: 36px; grid-template-areas: "head" "shot" "spec"; }
.more-head { grid-area: head; margin: 0; }
.map-shot { grid-area: shot; }
.spec { grid-area: spec; }
@media (min-width: 900px) {
  .more-grid { grid-template-columns: minmax(0, 1fr) 330px; column-gap: clamp(48px, 7vw, 112px); row-gap: 28px;
    grid-template-areas: "head shot" "spec shot"; grid-template-rows: auto 1fr; align-items: start; }
  .map-shot { position: sticky; top: 40px; align-self: start; }
}
.spec { list-style: none; margin: 0; padding: 0; display: grid; column-gap: 40px; }
@media (min-width: 640px) { .spec { grid-template-columns: 1fr 1fr; } }
@media (min-width: 700px) and (max-width: 899px) {
  .more-grid { grid-template-columns: minmax(0, 1fr) 260px; column-gap: 36px; grid-template-areas: "head head" "spec shot"; align-items: start; }
  .map-shot { grid-template-columns: 1fr; }
  .spec { grid-template-columns: 1fr; }
}
.spec li { padding: 20px 0 26px; border-top: 1px solid var(--line); }
.spec h3 { margin: 0 0 6px; font-size: 17px; line-height: 1.3; letter-spacing: -.015em; }
.spec p { margin: 0; max-width: 38ch; font-size: 15px; color: var(--muted); }

.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; max-width: 300px; margin-top: 16px; }
.week span { padding: 7px 0 8px; border-radius: 7px; text-align: center; font-size: 12.5px; font-weight: 700;
  color: var(--muted); background: var(--surface-2); }
.week span.on { color: var(--accent); background: var(--accent-soft); }
.week small { display: block; font-size: 10.5px; font-weight: 700; color: var(--muted); }

/* ---------- 4. maker ---------- */
.maker { padding: 96px 0; border-top: 1px solid var(--line); }
.maker-grid { display: grid; gap: 20px; }
@media (min-width: 900px) { .maker-grid { grid-template-columns: 5fr 7fr; gap: 72px; } }
.label { margin: 6px 0 0; font-size: 14px; font-weight: 700; color: var(--muted); letter-spacing: 0; }
.maker-head { margin: 0; }
.letter { max-width: 36em; }
.letter p { margin: 0 0 16px; font-size: 17px; line-height: 1.65; color: var(--muted); }
.letter .first { font-size: clamp(22px, 2.6vw, 28px); line-height: 1.3; letter-spacing: -.02em; font-weight: 700; color: var(--text); }
.letter em { font-style: normal; color: var(--text); font-weight: 600; }
.letter .sig { margin: 24px 0 0; color: var(--text); font-weight: 600; }
.letter .sig span { display: block; margin-top: 2px; font-size: 14px; font-weight: 500; color: var(--muted); }

/* ---------- 5. closing ---------- */
.closing { padding: 56px 0; background: var(--surface); border-top: 1px solid var(--line); }
.closing-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 40px; }
.closing h2 { margin: 0 0 4px; font-size: clamp(24px, 3vw, 32px); line-height: 1.15; letter-spacing: -.03em; }
.closing p { margin: 0; color: var(--muted); }
.btn { display: inline-flex; align-items: center; min-height: 52px; padding: 0 26px; border-radius: 10px;
  background: var(--accent); color: var(--on-accent); font-weight: 700; text-decoration: none; }
.btn:hover { background: var(--accent-hover); color: var(--on-accent); }

/* ---------- footer ---------- */
/* The parent company. The wordmark is a mask, so it takes the text colour in light and dark alike. */
.parent { display: flex; align-items: center; gap: 16px; margin: 0 0 22px; padding-bottom: 22px;
  border-bottom: 1px solid var(--line); }
.parent p { margin: 0; color: var(--muted); }
.parent b { color: var(--text); font-weight: 700; }
.ed-mark { flex: none; display: block; width: 64px; height: 18px; background: var(--text);
  -webkit-mask: url('/ed-collective.png') left center / contain no-repeat;
          mask: url('/ed-collective.png') left center / contain no-repeat; }
footer { border-top: 1px solid var(--line); padding: 32px 0 48px; font-size: 13.5px; color: var(--muted); }
footer p { margin: 0 0 10px; max-width: 62em; }
.links { display: flex; flex-wrap: wrap; gap: 4px 24px; margin-bottom: 14px; font-weight: 700; }
.links a { color: var(--text); text-decoration: none; }
.links a:hover { color: var(--accent); }
.links a, footer p a { display: inline-block; padding: 5px 0; }

/* =======================================================================
   MOTION — eight things move, and each one explains something.
   All of it sits inside prefers-reduced-motion: no-preference; with reduced
   motion the page is completely still and every element is in its final
   state. Only transform and opacity animate. Nothing loops except the
   spinner, which only exists while a request is in flight.
   ======================================================================= */
@keyframes turn { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: no-preference) {
  @keyframes up { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

  /* 1. the real screenshot arrives once, just after the headline, so the page reads idea → proof */
  .js .hero-shot img { animation: up .9s var(--ease) .15s both; }
  .js .hero-shot figcaption { animation: up .7s var(--ease) .45s both; }

  /* 2. blocks rise gently into view as you scroll — one rule for the whole page */
  .js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s var(--ease); }
  .js .reveal.in { opacity: 1; transform: none; }

  /* 3. the example trip is worked out the way the app works it out: from 8:30 back to 7:42 */
  .js .ledger > li { opacity: 0; }
  .js .ledger.in > li { animation: up .55s var(--ease) both; }
  .js .ledger.in > li:nth-child(4) { animation-delay: .05s; }
  .js .ledger.in > li:nth-child(3) { animation-delay: .35s; }
  .js .ledger.in > li:nth-child(2) { animation-delay: .65s; }
  .js .ledger.in > li.lead { animation: land .8s var(--ease) 1s both; }
  @keyframes land { from { opacity: 0; transform: translateY(24px) scale(.97); } to { opacity: 1; transform: none; } }

  /* 4. then the lock-screen notification counts down 15 → 1 min, once, and stops */
  .js .ledger.in .tick-in { animation: tick 3s steps(5, end) 2s both; }
  @keyframes tick { from { transform: translateY(0); } to { transform: translateY(-83.3333%); } }

  /* 5. the sending overlay fades in over the form, and back out when the answer comes */
  .js .sending { transition: opacity .3s ease; }

  /* 6. the spinner, only while it's visible. The whole thing turns; the layer steps round by 135°;
        the two halves open and close, so the arc's head races ahead and its tail reels in. */
  .js .signup:has(#submit[disabled]:not([hidden])) .arc { animation: turn 1568ms linear infinite; }
  .js .signup:has(#submit[disabled]:not([hidden])) .arc-layer { animation: arc-step 5332ms cubic-bezier(.4,0,.2,1) infinite both; }
  .js .signup:has(#submit[disabled]:not([hidden])) .arc-clip.l .arc-c { animation: arc-l 1333ms cubic-bezier(.4,0,.2,1) infinite both; }
  .js .signup:has(#submit[disabled]:not([hidden])) .arc-clip.r .arc-c { animation: arc-r 1333ms cubic-bezier(.4,0,.2,1) infinite both; }
  @keyframes arc-step {
    12.5% { transform: rotate(135deg); } 25% { transform: rotate(270deg); } 37.5% { transform: rotate(405deg); }
    50% { transform: rotate(540deg); } 62.5% { transform: rotate(675deg); } 75% { transform: rotate(810deg); }
    87.5% { transform: rotate(945deg); } to { transform: rotate(1080deg); }
  }
  @keyframes arc-l { from { transform: rotate(118deg); } 50% { transform: rotate(-5deg); } to { transform: rotate(118deg); } }
  @keyframes arc-r { from { transform: rotate(-118deg); } 50% { transform: rotate(5deg); } to { transform: rotate(-118deg); } }
  .js .signup:has(#submit[disabled]:not([hidden])) .sending-t { animation: up .5s var(--ease) .1s both; }

  /* 7. the success message settles in, and the tick draws on */
  .signup .msg.ok { animation: fadein .35s ease both; }
  .signup .msg.ok::before { animation: check .5s cubic-bezier(.3,1.5,.5,1) .15s both; }
  @keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
  @keyframes check { from { opacity: 0; transform: rotate(45deg) scale(.3); } to { opacity: 1; transform: rotate(45deg) scale(1); } }

  /* 8. the button gives under your thumb (declared with the button, above) */
}
