/* Skipper landing page. Tokens follow frontend/src/app/globals.css; the agenda board follows the
   camera tile in backend/app/live/page.html. Light theme only. */

:root {
  --navy: #1f3a4d;
  --raised: #2f5068;
  --orange: #e08d79;
  --orange-deep: #c2552f; /* white text on it reads at AA */
  --orange-ink: #9e3e1c;  /* small orange text on sand reads at AA */
  --teal: #6fa8a6;
  --sky: #a9c4d4;
  --sand: #dfded8;
  --white: #fff;
  --ink: var(--navy);
  --muted: rgba(31, 58, 77, .72);
  --line: rgba(31, 58, 77, .15);
  --line-strong: rgba(31, 58, 77, .3);
  --line-dark: rgba(223, 222, 216, .16);
  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 12px;
  --shadow-sm: 0 1px 2px rgba(31, 58, 77, .08), 0 1px 3px rgba(31, 58, 77, .06);
  --font: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --wrap: 1120px;
  --gutter: 16px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
/* Smooth only for in-page links (the clicked link holds focus). Scroll restoration on reload
   stays instant; otherwise the browser animates the page back to where it was. */
html:focus-within { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--sand);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
a { color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; border-radius: 4px; }

/* ---------- Controls (the app's TextInput and Button) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: var(--r-sm); padding: 10px 14px;
  font-weight: 600; font-size: 15px; line-height: 1.4; text-decoration: none; cursor: pointer;
  transition: filter .15s, background-color .15s;
}
.btn-primary { background: var(--orange-deep); color: var(--white); box-shadow: 0 1px 2px rgba(0, 0, 0, .06); }
.btn-primary:hover { filter: brightness(.92); }
.btn-secondary { background: var(--white); color: var(--navy); outline: 1px solid var(--line-strong); outline-offset: -1px; box-shadow: 0 1px 2px rgba(0, 0, 0, .04); }
.btn-secondary:hover { background: rgba(31, 58, 77, .08); }
.btn:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }

.input {
  width: 100%; min-width: 0; border: 0; border-radius: var(--r-sm); background: var(--white);
  padding: 10px 12px; font: 400 16px/1.5 var(--font); color: var(--navy);
  outline: 1px solid var(--line-strong); outline-offset: -1px;
}
.input::placeholder { color: rgba(31, 58, 77, .45); }
.input:focus, .input:focus-visible { outline: 2px solid var(--orange); outline-offset: -2px; }

.waitlist-form { display: flex; flex-direction: column; gap: 8px; }
@media (min-width: 640px) {
  .waitlist-form { flex-direction: row; flex-wrap: wrap; }
  .waitlist-form .btn { flex: none; }
}
.waitlist-form .btn:disabled { cursor: progress; opacity: .7; }
/* What the form has to say: an error under the field, or the thanks that takes the form's place. */
.form-note { flex-basis: 100%; font-size: 14px; line-height: 1.4; color: var(--muted); text-wrap: pretty; }
.form-note:empty { display: none; }
.form-note.is-error { color: var(--orange-ink); }
.waitlist-form.is-done .input, .waitlist-form.is-done .btn { display: none; }
.waitlist-form.is-done .form-note { font-size: 17px; font-weight: 500; color: var(--ink); }

.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--orange-ink); }
.eyebrow-num { display: inline-block; margin-right: 6px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 40; background: var(--sand); border-bottom: 1px solid var(--line); }
.site-header-row { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand img { height: 38px; width: auto; }
@media (min-width: 640px) { .site-header-row { height: 80px; } .brand img { height: 48px; } }

/* ---------- Hero ---------- */
.hero { padding-top: 56px; padding-bottom: 8px; }
.headline {
  font-weight: 800; font-stretch: 90%; font-optical-sizing: auto;
  font-size: clamp(2.6rem, 7.6vw, 6.1rem); line-height: .98; letter-spacing: -.035em;
  text-wrap: balance; max-width: 17ch;
}
.hero-row { display: grid; gap: 24px; margin-top: 32px; }
.lede { font-size: clamp(1.1rem, 1.6vw, 1.3rem); line-height: 1.45; color: var(--muted); max-width: 40ch; text-wrap: pretty; }
@media (min-width: 900px) {
  .hero { padding-top: 80px; }
  .hero-row { grid-template-columns: minmax(0, 1fr) minmax(0, 480px); align-items: center; justify-content: space-between; column-gap: 48px; }
}

/* ---------- Before / During / After ---------- */
.moments { padding-top: 48px; padding-bottom: 72px; }
.arc-skip { display: none; width: 100%; height: 250px; overflow: visible; margin-bottom: -12px; }
.arc-path { fill: none; stroke: var(--orange); stroke-width: 5; stroke-linecap: round; vector-effect: non-scaling-stroke; stroke-dasharray: 1; stroke-dashoffset: 1; }
.in .arc-path { animation: draw var(--draw, 2s) linear forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
/* Each landing: the stone's mark appears, and rings spread outward from it and fade as they go,
   inner ring first. Only the mark stays. */
.ripple circle { fill: none; stroke: var(--orange); stroke-width: 1.5; opacity: 0; transform: scale(.2); transform-box: fill-box; transform-origin: center; }
.ripple .stone { fill: var(--orange); stroke: none; }
.in .ripple .stone { animation: land .42s var(--ease) var(--d, 0s) forwards; }
.in .ripple circle:not(.stone) { animation: ripple 1.32s ease-out var(--d, 0s) forwards; }
.in .ripple circle:nth-last-child(3) { animation-delay: calc(var(--d, 0s) + .12s); }
.in .ripple circle:nth-last-child(4) { animation-delay: calc(var(--d, 0s) + .24s); }
@keyframes land { from { opacity: 0; transform: scale(.2); } to { opacity: 1; transform: none; } }
@keyframes ripple {
  0% { opacity: 0; transform: scale(.25); }
  18% { opacity: .9; }
  100% { opacity: 0; transform: scale(1.4); }
}

.moment-grid { display: grid; gap: 48px; grid-template-columns: 1fr; margin-top: 16px; }
.moment h2 { margin: 12px 0 10px; font-size: clamp(1.75rem, 2.8vw, 2.2rem); font-weight: 700; font-stretch: 94%; letter-spacing: -.02em; line-height: 1.1; text-wrap: balance; }
.moment-copy p { color: var(--muted); font-size: 17px; text-wrap: pretty; }
@media (min-width: 640px) {
  .moments { padding-top: 40px; }
}
@media (min-width: 900px) {
  /* The stone only skips when there are three columns to land on. */
  .arc-skip { display: block; }
  .moment-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: auto auto 1fr; gap: 0 32px; }
  .moment { display: grid; grid-template-rows: subgrid; grid-row: span 3; }
  /* Sized so each title sits on one line across the three columns. */
  .moment h2 { font-size: clamp(1.4rem, 2vw, 1.75rem); font-stretch: 90%; }
  .frag { min-height: 380px; }
}

.frag { margin-top: 24px; border-radius: var(--r-md); background: var(--white); outline: 1px solid rgba(31, 58, 77, .22); box-shadow: var(--shadow-sm); padding: 18px; font-size: 14.5px; }
.frag-label { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 16px 0 8px; display: flex; justify-content: space-between; align-items: baseline; }
.frag-label:first-child { margin-top: 0; }
.goal-field { border-radius: var(--r-sm); background: rgba(223, 222, 216, .45); outline: 1px solid var(--line); padding: 9px 11px; font-weight: 500; line-height: 1.3; }
.goal-field { min-height: 2.6em; }
.caret { display: inline-block; width: 2px; height: 1em; margin-left: 2px; vertical-align: -.15em; background: var(--orange-deep); animation: blink 1s steps(2, start) infinite; }
.caret[hidden] { display: none; }
@keyframes blink { to { visibility: hidden; } }
.drafting { font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--orange-ink); }
.drafting[hidden] { display: none; }
.draft-list { display: grid; gap: 6px; }
.draft { display: flex; align-items: center; gap: 10px; padding: 7px 9px; border-radius: var(--r-sm); border: 1px solid var(--line); opacity: 0; transform: translateY(6px); transition: opacity .4s var(--ease), transform .4s var(--ease); }
.draft.on { opacity: 1; transform: none; }
.draft .dot { flex: none; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--sky); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* The agenda board, as Skipper's camera tile shows it. */
.frag-board { background: var(--navy); color: var(--sand); outline: none; padding: 0; overflow: hidden; font-variant-numeric: tabular-nums; }
.board { display: flex; flex-direction: column; gap: 8px; padding: 14px 12px 6px; }
.board-head { display: flex; justify-content: space-between; align-items: center; padding: 0 4px 10px; border-bottom: 1px solid var(--line-dark); }
.board-logo { height: 24px; width: auto; }
.live {
  display: inline-flex; align-items: center; gap: 7px; padding: 3px 9px 3px 7px; border-radius: 999px;
  background: rgba(0, 0, 0, .25); font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
}
.live-dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); flex: none; }
.live-dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--orange); animation: pulse 1.4s ease-out infinite; }
@keyframes pulse { from { transform: scale(1); opacity: .9; } to { transform: scale(3.2); opacity: 0; } }
.item { display: flex; align-items: center; gap: 12px; padding: 8px 10px; min-height: 48px; border-bottom: 1px solid var(--line-dark); border-left: 4px solid transparent; border-radius: 6px; transition: background-color .35s, border-color .35s; }
.item:last-child { border-bottom-color: transparent; }
.item.current { background: var(--raised); border-left-color: var(--orange); border-bottom-color: transparent; }
.indicator { flex: 0 0 24px; height: 24px; border: 2px solid var(--sky); border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; color: var(--navy); transition: background-color .35s, border-color .35s, border-width .35s; }
.covered .indicator { color: var(--sky); }
.complete .indicator { background: var(--teal); border-color: var(--teal); color: var(--navy); }
.current .indicator { border-width: 6px; border-color: var(--orange); }
.item-copy { flex: 1; min-width: 0; }
.item-title { font-size: 14px; font-weight: 500; line-height: 1.25; }
.covered .item-title, .complete .item-title { color: var(--sky); }
.item-status { color: var(--sky); font-size: 11.5px; margin-top: 2px; }
.current .item-status { color: var(--orange); font-weight: 600; }

.frag-board { display: flex; flex-direction: column; }
.frag-board .board { flex: 1; }
.frag-chat { display: flex; gap: 8px; align-items: flex-start; padding: 12px 14px 14px; border-top: 1px solid var(--line-dark); background: rgba(0, 0, 0, .22); transition: opacity .35s var(--ease), transform .35s var(--ease); }
.frag-chat.is-off { opacity: 0; transform: translateY(6px); }
.msg-avatar { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; margin-top: 1px; }
.msg-avatar-skipper { background: var(--navy); outline: 1px solid var(--line-dark); }
.msg-avatar-skipper::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); }
.msg-from { display: block; font-size: 11.5px; color: var(--sky); font-weight: 600; }
.msg-text { font-size: 13.5px; line-height: 1.35; overflow-wrap: anywhere; }

.frag-notes { display: grid; gap: 14px; align-content: start; }
.notes-section + .notes-section { border-top: 1px solid var(--line); padding-top: 14px; }
.notes-section h3 { font-size: 15px; font-weight: 600; display: flex; gap: 8px; align-items: baseline; margin-bottom: 8px; }
.notes-section .count { font-size: 12px; color: var(--muted); font-weight: 500; }
.notes-section ul { display: grid; gap: 7px; }
.notes-section li { padding-left: 14px; position: relative; line-height: 1.35; }
.note { opacity: 0; transform: translateY(5px); transition: opacity .4s var(--ease), transform .4s var(--ease); }
.note.on { opacity: 1; transform: none; }
.notes-section li::before { content: ""; position: absolute; left: 0; top: .55em; width: 5px; height: 5px; border-radius: 50%; background: var(--teal); }
.action-items li { display: flex; flex-direction: column; gap: 2px; }
.action-items .task { font-weight: 500; }
.action-items .meta { font-size: 12.5px; color: var(--orange-ink); transition: color .4s; }
.action-items .meta.is-set { color: var(--muted); }


/* ---------- Waiting list ---------- */
.waitlist { padding-top: 24px; padding-bottom: 96px; text-align: center; }
.waitlist h2 { margin: 10px 0 20px; font-size: clamp(2rem, 4.5vw, 3.2rem); font-weight: 800; font-stretch: 92%; letter-spacing: -.03em; line-height: 1; }
.waitlist .waitlist-form { max-width: 520px; margin: 0 auto; text-align: left; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: var(--sky); font-size: 13px; }
.site-footer-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 28px; padding-bottom: 28px; }
.site-footer img { height: 48px; width: auto; }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html:focus-within { scroll-behavior: auto; }
  .in .arc-path, .arc-path { animation: none; stroke-dashoffset: 0; }
  .in .ripple circle, .ripple circle { animation: none; opacity: 0; }
  .in .ripple .stone, .ripple .stone { animation: none; opacity: 1; transform: none; }
  .draft, .note, .frag-chat, .item, .indicator, .action-items .meta { transition: none; }
  .caret { animation: none; }
  .live-dot::after { animation: none; }
}
