/* generated by scripts/build.js from tokens.json; edit tokens.json or src/styles.css */
:root {
  --color-navy: #003366;
  --color-gold: #ffc823;
  --color-paper: #f6f1e8;
  --color-ink: #141414;
  --color-muted: #474a52;
  --color-hairline: #cfccc3;
  --color-white: #ffffff;
  --color-lake-overlay: #1a2744;
  --color-ridge0: #efeae0;
  --color-ridge1: #e7e1d5;
  --color-ridge2: #ddd6c8;
  --color-ridge3: #d1cabc;
  --color-ridge4: #c4bcad;
  --color-ridges-0: #efeae0;
  --color-ridges-1: #e7e1d5;
  --color-ridges-2: #ddd6c8;
  --color-ridges-3: #d1cabc;
  --color-ridges-4: #c4bcad;
  --color-gold-glow: rgba(255, 200, 35, 0.2);
  --type-grotesk: "aktiv-grotesk-1", "Grotesk Fallback", "Helvetica Neue", Arial, sans-serif;
  --type-serif: "freight-display-pro-1", "Serif Fallback", Georgia, serif;
  --type-ui: "aktiv-grotesk-1", "Helvetica Neue", Arial, sans-serif;
  --type-wordmark: clamp(120px, 23.5vw, 340px);
  --type-sentence: clamp(30px, 4.3vw, 62px);
  --type-label: 12px;
  --motion-ridge-0: 144s;
  --motion-ridge-1: 89s;
  --motion-ridge-2: 55s;
  --motion-ridge-3: 34s;
  --motion-ridge-4: 21s;
  --motion-sun: 89s;
  --motion-reveal: 377ms;
  --motion-ridge-shift: 40px;
  --motion-bob: 5s;
  --motion-tug: 3s;
  --motion-swim-0: 8s;
  --motion-swim-1: 13s;
  --motion-swim-2: 5s;
  --motion-swim-3: 8s;
  --motion-swim-4: 13s;
  --layout-mark-width: 44vw;
  --layout-mark-split: 5;
  --layout-lake-height: 620px;
  --fonts-kit-url: https://use.typekit.net/iuh2bpb.css;
  --fonts-google-stand-in: https://fonts.googleapis.com/css2?family=Archivo:wght@900&family=Instrument+Serif:ital@0;1&family=Inter:wght@400;500;600&display=swap;
  --contrast-allowlist-0: wordmark-ai-on-paper;
  --surface-grain: url("data:image/svg+xml;utf8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'160'%20height%3D'160'%3E%3Cfilter%20id%3D'n'%3E%3CfeTurbulence%20type%3D'fractalNoise'%20baseFrequency%3D'.9'%20numOctaves%3D'2'%20stitchTiles%3D'stitch'%2F%3E%3CfeColorMatrix%20values%3D'0%200%200%200%200%20%200%200%200%200%200%20%200%200%200%200%200%20%200%200%200%20.06%200'%2F%3E%3C%2Ffilter%3E%3Crect%20width%3D'160'%20height%3D'160'%20filter%3D'url(%23n)'%2F%3E%3C%2Fsvg%3E");
}

/* cocai.io landing page. Colors, type, timings and layout numbers come from the
   :root block that scripts/build.js prepends from tokens.json. Nothing here
   hard-codes a color or a cycle length. Ported from design/mockup-approved-2026-10-27.html
   with the spec's overlap decision (mark larger, photo under the first line). */

*, *::before, *::after { box-sizing: border-box; }

main:focus { outline: none; }
html { background: var(--color-paper); color: var(--color-ink); scroll-behavior: smooth; }
body { margin: 0; font-family: var(--type-ui); font-size: 16px; line-height: 1.5; min-width: 320px; overflow-x: hidden; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }

/* ---------- fallbacks (metrics tuned in Task 7) ---------- */
/* Measured 2026-10-27 with Playwright at 200px: Aktiv Grotesk Black "cocai" = 474px wide, Arial Black = 535px (88.6%),
   line box 256px vs 282px, so ascent/descent are pulled in. Freight Display Pro at 60px is 85.1% the width of Georgia. */
@font-face { font-family: "Grotesk Fallback"; src: local("Arial Black"), local("Arial-Black"); size-adjust: 88.6%; ascent-override: 82%; descent-override: 21%; line-gap-override: 0%; }
@font-face { font-family: "Serif Fallback"; src: local("Georgia"); size-adjust: 85.1%; ascent-override: 92%; descent-override: 24%; line-gap-override: 0%; }

/* ---------- accessibility primitives ---------- */
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 16px; top: -200px; z-index: 50; padding: 12px 18px; background: var(--color-navy); color: var(--color-white); font-weight: 600; text-decoration: none; border-radius: 4px; }
.skip:focus, .skip:focus-visible { top: 12px; }
:focus-visible { outline: 3px solid var(--color-navy); outline-offset: 3px; }
.lake :focus-visible, .btn.primary:focus-visible { outline-color: var(--color-white); }

/* ---------- header / nav ---------- */
header { position: relative; z-index: 3; }
nav { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 28px 40px 0; }
nav .brand { font-family: var(--type-grotesk); font-weight: 900; font-size: 22px; letter-spacing: -0.04em; color: var(--color-navy); text-decoration: none; }
nav .links { display: flex; gap: 32px; list-style: none; margin: 0 0 0 auto; padding: 0; font-size: 15px; font-weight: 500; }
nav .links a { text-decoration: none; padding: 10px 0; display: inline-block; }
nav .links a:hover { text-decoration: underline; text-underline-offset: 4px; }
button.menu { width: 52px; height: 52px; border-radius: 50%; border: 0; background: var(--color-gold); display: grid; place-items: center; cursor: pointer; padding: 0; }
button.menu span { display: block; width: 20px; height: 2px; background: var(--color-ink); margin: 2px 0; }
.no-js nav .links { display: flex; }
.no-js nav .menu { display: none; }

#menu-panel { position: fixed; inset: 0; z-index: 40; background: var(--color-paper); padding: 96px 40px 40px; overflow-y: auto; overscroll-behavior: contain; }
body.menu-open { overflow: hidden; }
#menu-panel ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; max-width: 720px; }
#menu-panel a { display: block; font-family: var(--type-grotesk); font-weight: 900; font-size: clamp(32px, 6vw, 64px); letter-spacing: -0.03em; color: var(--color-navy); text-decoration: none; padding: 8px 0; border-bottom: 1px solid var(--color-hairline); }
#menu-panel .close { position: absolute; top: 28px; right: 40px; width: 52px; height: 52px; border-radius: 50%; border: 2px solid var(--color-ink); background: transparent; font: 600 13px var(--type-ui); cursor: pointer; }

/* ---------- hero ---------- */
.hero { position: relative; padding: 8px 40px 56px; overflow: hidden; isolation: isolate; }
.surface { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; background-image: var(--surface-grain); }
.surface .bg-ridge { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 100%; }
.surface .light { position: absolute; inset: 0; background: radial-gradient(60% 50% at 20% 10%, var(--color-gold-glow), transparent 70%); animation: sun var(--motion-sun) ease-in-out infinite alternate; }
.surface .r0 { animation: ridgeX var(--motion-ridge-0) ease-in-out infinite alternate-reverse; }
.surface .r1 { animation: ridgeX var(--motion-ridge-1) ease-in-out infinite alternate; }
.surface .r2 { animation: ridgeX var(--motion-ridge-2) ease-in-out infinite alternate-reverse; }
.surface .r3 { animation: ridgeX var(--motion-ridge-3) ease-in-out infinite alternate; }
.surface .r4 { animation: ridgeX var(--motion-ridge-4) ease-in-out infinite alternate-reverse; }
@keyframes ridgeX { from { transform: translateX(0); } to { transform: translateX(calc(-1 * var(--motion-ridge-shift))); } }
@keyframes sun { from { transform: translate(0, 0); } to { transform: translate(30vw, 12vh); } }

.wordwrap { position: relative; z-index: 1; }
.tag { position: relative; z-index: 2; font-size: var(--type-label); font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; color: var(--color-muted); margin: 0 0 10px; }
.word { position: relative; z-index: 2; margin: 0 0 0 -0.04em; font-family: var(--type-grotesk); font-weight: 900; font-size: var(--type-wordmark); line-height: 0.8; letter-spacing: -0.065em; width: fit-content; white-space: nowrap; }
.word .c { color: var(--color-navy); }
/* The gold `ai` is part of the cocai logotype: WCAG 2.2 SC 1.4.3 exempts text in a logo from the
   contrast minimum (1.61:1 on paper). Allow-listed by name in scripts/contrast-check.js. Gold is used for no other text. */
.word .a { color: var(--color-gold); }
/* The mark: about 60% of the viewport, letters on its upper third, photo bottom fading into paper. */
.markphoto { position: absolute; z-index: 1; width: min(var(--layout-mark-width), 640px); height: auto; left: 26%; top: 36%; mask-image: linear-gradient(#000 76%, transparent 97%); -webkit-mask-image: linear-gradient(#000 76%, transparent 97%); }
.sentence { position: relative; z-index: 2; font-family: var(--type-serif); font-weight: 400; font-size: var(--type-sentence); line-height: 1.08; letter-spacing: -0.01em; max-width: 1180px; margin: clamp(200px, 28vw, 410px) 0 36px; }
.ctas { position: relative; z-index: 2; display: flex; flex-wrap: wrap; gap: 12px; }
.btn { font-family: var(--type-ui); font-weight: 500; font-size: 15px; color: var(--color-ink); text-decoration: none; padding: 12px 20px; min-height: 44px; border: 1.5px solid var(--color-ink); border-radius: 999px; display: inline-flex; gap: 10px; align-items: center; background: transparent; }
.btn::after { content: "\2192"; }
.btn.primary { background: var(--color-navy); border-color: var(--color-navy); color: var(--color-white); }
.btn:hover { background: var(--color-ink); color: var(--color-paper); }
.btn.primary:hover { background: var(--color-navy); color: var(--color-white); text-decoration: underline; text-underline-offset: 4px; }

/* ---------- lake ---------- */
.lake { position: relative; height: var(--layout-lake-height); overflow: hidden; display: grid; place-items: center; background: var(--color-lake-overlay); }
.lake picture img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.lake .marklake { position: relative; width: 300px; height: auto; filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.35)); }


/* ---------- fishing scene in the lake ---------- */
.boat { position: absolute; right: 7%; top: 38%; width: clamp(150px, 17vw, 250px); animation: bob var(--motion-bob) ease-in-out infinite; transform-origin: 50% 100%; }
.boat img { width: 100%; height: auto; }
.boat::after { content: ""; position: absolute; left: 4%; right: 4%; bottom: -6px; height: 14px; background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.35), transparent 70%); }
.line { position: absolute; width: 1.5px; background: rgba(255, 255, 255, 0.85); right: calc(7% + 4px); top: 39%; height: 24%; transform-origin: top; animation: sway var(--motion-bob) ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-0.6deg); } 50% { transform: translateY(5px) rotate(0.6deg); } }
@keyframes sway { 0%, 100% { transform: rotate(-1.2deg); } 50% { transform: rotate(1.2deg); } }

.fish { position: absolute; display: block; text-decoration: none; width: var(--w, 200px); animation: swim var(--t) ease-in-out infinite alternate; }
.fish img { width: 100%; height: auto; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.35)); transition: transform var(--motion-reveal) ease; }
.fish span { position: absolute; left: 16%; top: 50%; width: 56%; transform: translateY(-58%); text-align: center; font-family: var(--type-grotesk); font-weight: 700; font-size: 20px; line-height: 1.05; letter-spacing: -0.01em; color: var(--color-navy); }
.fish.flip img { transform: scaleX(-1); }
.fish.flip span { left: 28%; }
.fish:hover img, .fish:focus-visible img { transform: scale(1.06) rotate(-3deg); }
.fish.flip:hover img, .fish.flip:focus-visible img { transform: scaleX(-1) scale(1.06) rotate(3deg); }
.fish:focus-visible { outline: 3px solid var(--color-white); outline-offset: 6px; border-radius: 999px; }
.fish.hooked { animation: tug var(--motion-tug) ease-in-out infinite; }
@keyframes swim { from { transform: translate(0, 0); } to { transform: translate(var(--dx, 40px), var(--dy, 6px)); } }
@keyframes tug { 0%, 100% { transform: translateY(0) rotate(0); } 40% { transform: translateY(-6px) rotate(-6deg); } 60% { transform: translateY(2px) rotate(3deg); } }
.f1 { right: calc(7% + 110px - 90px); top: 61%; --w: 180px; --t: var(--motion-swim-0); }
.f2 { left: 9%; top: 54%; --w: 220px; --t: var(--motion-swim-1); --dx: 60px; --dy: 10px; }
.f3 { left: 31%; top: 68%; --w: 280px; --t: var(--motion-swim-2); --dx: -50px; --dy: -8px; }
.f4 { left: 55%; top: 76%; --w: 220px; --t: var(--motion-swim-3); --dx: 35px; --dy: -6px; }
.f5 { left: 60%; top: 55%; --w: 190px; --t: var(--motion-swim-4); --dx: 30px; --dy: -4px; }
.f6 { left: 6%; top: 77%; --w: 170px; --t: var(--motion-swim-2); --dx: 45px; --dy: -5px; }
.hint { position: absolute; right: 40px; bottom: 28px; margin: 0; font-size: var(--type-label); letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255, 255, 255, 0.78); }


/* ---------- the game ---------- */
.catch { position: absolute; left: 40px; top: 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; max-width: 520px; }
.catch button { min-height: 44px; padding: 10px 18px; border-radius: 999px; border: 1.5px solid var(--color-white); background: rgba(0, 0, 0, 0.35); color: var(--color-white); font: 500 14px var(--type-ui); cursor: pointer; }
.catch button:hover { background: var(--color-white); color: var(--color-navy); }
.catch button:disabled { opacity: 0.6; cursor: default; }
.catch button.reel { background: var(--color-gold); border-color: var(--color-gold); color: var(--color-navy); animation: pulse var(--motion-tug) ease-in-out infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 200, 35, 0.55); } 50% { box-shadow: 0 0 0 10px rgba(255, 200, 35, 0); } }
.catch .status { width: 100%; margin: 0; font-family: var(--type-serif); font-size: 20px; color: var(--color-white); text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6); min-height: 1.3em; }
.catch .result { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.catch .result[hidden], .catch button[hidden] { display: none; }
.catch .result a.go { min-height: 44px; display: inline-flex; align-items: center; padding: 10px 18px; border-radius: 999px; background: var(--color-white); color: var(--color-navy); font: 600 14px var(--type-ui); text-decoration: none; }
.catch .result a.go::after { content: " \2192"; }
.lake.cast .line { height: 34%; transition: height 987ms ease-in-out; }
.lake.cast .fish:not(.biting):not(.caught) { animation-play-state: running; }
.fish.biting { animation: none; transition: left 987ms ease-in-out, top 987ms ease-in-out, transform 987ms ease-in-out; left: auto; right: calc(7% + 110px - 90px); top: 61%; z-index: 3; }
.fish.biting img { animation: tug var(--motion-tug) ease-in-out infinite; }
.fish.caught { animation: none; transition: top 1597ms ease-in, transform 1597ms ease-in; left: auto; right: calc(7% + 110px - 90px); top: 30%; transform: rotate(-70deg) scale(0.8); z-index: 3; }
.lake.landed .line { height: 8%; }
.hint { top: auto; bottom: 28px; }

/* ---------- rows ---------- */
.rows { padding: 72px 40px 80px; }
.rows .label { font-size: var(--type-label); font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; color: var(--color-muted); margin: 0 0 8px; }
.row { display: grid; grid-template-columns: 1.2fr 2fr 140px; gap: 24px; align-items: baseline; padding: 30px 0; border-top: 1px solid var(--color-hairline); scroll-margin-top: 24px; }
.row:last-child { border-bottom: 1px solid var(--color-hairline); }
.row h3 { margin: 0; font-family: var(--type-grotesk); font-weight: 900; font-size: clamp(34px, 4.6vw, 68px); line-height: 0.95; letter-spacing: -0.045em; color: var(--color-navy); }
.row .body { max-width: 560px; }
.row p { margin: 0; max-width: 520px; font-size: 17px; line-height: 1.5; color: var(--color-muted); }
.entries { list-style: none; margin: 22px 0 0; padding: 18px 0 0; border-top: 1px dashed var(--color-hairline); display: grid; gap: 16px; }
.entries h4 { margin: 0 0 4px; font-family: var(--type-grotesk); font-weight: 700; font-size: 19px; line-height: 1.25; letter-spacing: -0.01em; color: var(--color-ink); }
.entries .meta { font-size: var(--type-label); letter-spacing: 0.12em; text-transform: uppercase; color: var(--color-navy); margin: 0 0 8px; }
.entries p { font-size: 15.5px; }
.entries .list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 10px; }
.entries .list li { font-size: 15px; line-height: 1.5; color: var(--color-muted); padding: 10px 14px; border-left: 3px solid var(--color-gold); background: var(--color-white); }
.entries .list strong { color: var(--color-ink); font-weight: 600; }
.entries a { display: inline-block; margin-top: 8px; font-size: 14px; font-weight: 500; color: var(--color-ink); padding: 6px 0; }
.entries a::after { content: " \2197"; }
.row a { justify-self: end; font-size: 13px; font-weight: 500; text-decoration: none; padding: 10px 0; }
.row a::after { content: " \2192"; }
.row a:hover { text-decoration: underline; text-underline-offset: 4px; }
.js .row { opacity: 0; transform: translateY(12px); transition: opacity var(--motion-reveal) ease-out, transform var(--motion-reveal) ease-out; }
.js .row.is-visible { opacity: 1; transform: none; }

/* ---------- footer ---------- */
footer { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding: 28px 40px 36px; border-top: 1px solid var(--color-hairline); font-size: 13px; color: var(--color-muted); }
footer p { margin: 0; }
footer a { color: var(--color-ink); display: inline-block; padding: 6px 0; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  nav { padding: 20px 20px 0; }
  nav .links { display: none; }
  .no-js nav .links { flex-wrap: wrap; gap: 8px 20px; margin: 0; }
  .no-js nav { flex-wrap: wrap; }
  .hero, .rows, footer { padding-left: 20px; padding-right: 20px; }
  .word { font-size: clamp(72px, 24vw, 160px); }
  .markphoto { width: 78vw; left: 12%; top: 30%; }
  .sentence { margin-top: clamp(200px, 60vw, 420px); }
  .row { grid-template-columns: 1fr; gap: 10px; }
  .row a { justify-self: start; }
  .lake { height: 420px; }
  .lake .marklake { width: 200px; }
  .boat { width: 130px; top: 46%; }
  .line { display: none; }
  .fish, .hint, .catch { display: none; }
  #menu-panel { padding: 88px 20px 20px; }
  #menu-panel .close { right: 20px; top: 20px; }
}
@media (max-width: 480px) {
  .ctas { flex-direction: column; align-items: stretch; }
  .btn { justify-content: space-between; }
  .word { font-size: clamp(64px, 23vw, 110px); }
  .sentence { margin-top: clamp(180px, 64vw, 320px); }
}

/* ---------- user preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .row { opacity: 1; transform: none; }
}
@media (prefers-contrast: more) {
  .row, .row:last-child, footer, #menu-panel a { border-color: var(--color-ink); border-width: 2px; }
  :focus-visible { outline-width: 4px; }
  .btn { border-width: 2px; }
  .surface .light { display: none; }
}
@media print {
  .surface, .lake img, button.menu, .skip { display: none; }
  .js .row { opacity: 1; transform: none; transition: none; }
  .markphoto { position: static; width: 60%; margin: 24px 0; }
}
