/* forest.ws design system (forest.css)
   One forest hue family (deep evergreen -> mist) plus one isolated action colour (dawn amber).
   Shared by every page. Homepage-only scene styles live in /assets/home.css.
   Rules: no external resources, no inline styles, transform/opacity animations only. */

/* ---------- tokens ---------- */
:root {
  color-scheme: light dark;
  /* surfaces + text (light = misty morning) */
  --bg: #f3f6f2;
  --surface: #fbfcfa;
  --surface-2: #e6ede6;
  --text: #0f1f18;
  --muted: #4a5f53;
  --line: #d3dcd4;
  --line-strong: #7d9385;
  --link: #1f5a41;
  /* the isolated action colour: dawn amber, used only for the primary CTA + focus */
  --cta: #e9a83b;
  --cta-hover: #f2b650;
  --on-cta: #10241b;
  --focus: #b7791a;
  /* deep forest surfaces (hero, bands, footer) are fixed in both themes */
  --forest-950: #0a1912;
  --forest-900: #0f2a20;
  --forest-800: #143528;
  --forest-700: #1f5a41;
  --forest-600: #2e7354;
  --mist-200: #c9d6cb;
  --mist-100: #e3eae3;
  --on-forest: #f3f6f2;
  --on-forest-muted: #b8c9bc;
  --on-forest-line: #244a3a;
  /* type */
  --font-sans: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", "DejaVu Sans Mono", monospace;
  --t-xs: .75rem;
  --t-sm: .875rem;
  --t-base: 1rem;
  --t-lg: 1.125rem;
  --t-xl: 1.25rem;
  --t-2xl: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
  --t-3xl: clamp(2rem, 1.4rem + 2.2vw, 3rem);
  --t-display: clamp(2.5rem, 1.5rem + 3.9vw, 4.75rem);
  /* space + shape */
  --s-1: .25rem; --s-2: .5rem; --s-3: .75rem; --s-4: 1rem; --s-5: 1.25rem; --s-6: 1.5rem;
  --s-8: 2rem; --s-10: 2.5rem; --s-12: 3rem; --s-16: 4rem; --s-20: 5rem; --s-24: 6rem;
  --wrap: 1216px;
  --gutter: clamp(20px, 4vw, 48px);
  --radius: 4px;
  --radius-lg: 8px;
  --header-h: 72px;
  /* motion */
  --ease: cubic-bezier(.2, .7, .2, 1);
  --fast: 160ms;
  --slow: 600ms;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c1a14;
    --surface: #122420;
    --surface-2: #182f27;
    --text: #e6eee7;
    --muted: #a8baac;
    --line: #26392f;
    --line-strong: #3f5a4b;
    --link: #a8d6ba;
    --cta: #e9a83b;
    --cta-hover: #f2b650;
    --on-cta: #10241b;
    --focus: #f2b650;
  }
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 24px; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font-sans); font-size: var(--t-base); line-height: 1.6;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
h1, h2, h3, h4 { font-weight: 650; letter-spacing: -.025em; line-height: 1.12; text-wrap: balance; }
h1 { font-size: var(--t-display); letter-spacing: -.035em; line-height: 1.04; }
h2 { font-size: var(--t-3xl); letter-spacing: -.03em; }
h3 { font-size: var(--t-xl); }
h4 { font-size: var(--t-lg); }
p { overflow-wrap: break-word; }
a { color: var(--link); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
code, kbd, pre, .mono { font-family: var(--font-mono); }
code { font-size: .9em; }
pre { margin: 0; overflow-x: auto; }
::selection { background: var(--cta); color: var(--on-cta); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: var(--radius); }
[hidden] { display: none !important; }

.skip-link { position: absolute; top: var(--s-3); left: var(--s-4); z-index: 100; padding: var(--s-3) var(--s-4); background: var(--cta); color: var(--on-cta); border-radius: var(--radius); font-weight: 600; text-decoration: none; transform: translateY(-200%); }
.skip-link:focus { transform: none; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.wrap { width: 100%; max-width: var(--wrap); min-width: 0; margin-inline: auto; padding-inline: var(--gutter); }
.wrap > * { min-width: 0; }
.pixel { image-rendering: pixelated; image-rendering: crisp-edges; }

/* ---------- small type ---------- */
.eyebrow { display: inline-flex; align-items: center; gap: var(--s-3); font-family: var(--font-mono); font-size: var(--t-xs); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.eyebrow::before { content: ""; width: 20px; height: 1px; background: currentColor; }
.lede { font-size: var(--t-xl); line-height: 1.5; color: var(--muted); max-width: 60ch; }
.muted { color: var(--muted); }
.small { font-size: var(--t-sm); }
.caption { font-family: var(--font-mono); font-size: var(--t-xs); color: var(--muted); letter-spacing: .02em; }

/* honesty chips: everything that is not live wears one */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border: 1px solid var(--line-strong); border-radius: var(--radius); font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.chip::before { content: ""; width: 6px; height: 6px; background: currentColor; }
.chip-soon { color: var(--link); border-color: currentColor; }

/* the wink: styled where funded startups put their investor line */
.wink { display: inline-flex; align-items: center; gap: 10px; font-size: var(--t-sm); color: var(--on-forest-muted); text-decoration: none; }
.wink-mark { display: inline-grid; place-items: center; width: 22px; height: 22px; background: var(--cta); color: var(--on-cta); border-radius: 3px; }
.wink-mark svg { width: 14px; height: 14px; }
.wink-mark path { fill: currentColor; }
.wink b { font-weight: 600; color: var(--on-forest); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: var(--radius); border: 1px solid transparent; font: 600 var(--t-sm)/1 var(--font-sans); text-decoration: none; white-space: nowrap; cursor: pointer; transition: background-color var(--fast) var(--ease), color var(--fast) var(--ease), border-color var(--fast) var(--ease); }
.btn svg { width: 14px; height: 14px; flex: none; }
.btn-primary, .on-forest .btn-primary { background: var(--cta); color: var(--on-cta); }
.btn-primary:hover { background: var(--cta-hover); }
.btn-secondary { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn-secondary:hover { background: var(--surface-2); }
.on-forest .btn-secondary { color: var(--on-forest); border-color: var(--on-forest-muted); }
.on-forest .btn-secondary:hover { background: rgba(243, 246, 242, .1); }
.btn-light, .on-forest .btn-light { background: var(--on-forest); color: var(--forest-900); }
.btn-light:hover { background: #ffffff; }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: 13px; }
.btn-lg { min-height: 50px; padding: 0 26px; font-size: var(--t-base); }
.actions { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; }

/* ---------- header / nav ---------- */
.site-header { position: relative; z-index: 5; }
.site-header .wrap { display: flex; align-items: center; gap: var(--s-8); min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; font-weight: 700; font-size: 1.375rem; letter-spacing: -.03em; }
.brand-mark { width: 28px; height: 28px; flex: none; }
.brand-mark path, .brand-mark rect { fill: currentColor; }
.site-header nav { margin-left: auto; }
.nav-links { display: flex; gap: var(--s-6); list-style: none; padding: 0; margin: 0; font-size: var(--t-sm); font-weight: 500; }
.nav-links a { color: inherit; text-decoration: none; opacity: .85; }
.nav-links a:hover, .nav-links a[aria-current="page"] { opacity: 1; }
.nav-links a[aria-current="page"] { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }
.nav-cta { flex: none; }
.menu { display: none; }
.on-forest .site-header, .site-header.on-forest { color: var(--on-forest); }
@media (max-width: 880px) {
  .site-header .wrap { gap: var(--s-2); }
  .site-header .wrap > nav, .site-header .nav-cta { display: none; }
  .menu { display: block; margin-left: auto; }
  .menu summary { display: grid; place-items: center; width: 44px; min-height: 44px; border: 1px solid currentColor; border-radius: var(--radius); cursor: pointer; list-style: none; }
  .menu summary::-webkit-details-marker { display: none; }
  .menu-icon { width: 24px; height: 24px; }
  .site-header .menu-panel { position: absolute; top: 100%; left: var(--gutter); right: var(--gutter); display: grid; gap: var(--s-1); max-height: calc(100dvh - var(--header-h) - var(--s-4)); overflow-y: auto; padding: var(--s-3); margin: 0; background: var(--surface); color: var(--text); border: 1px solid var(--line-strong); border-radius: var(--radius-lg); }
  .site-header .menu-panel a { display: flex; align-items: center; min-height: 44px; padding: var(--s-2) var(--s-3); color: inherit; text-decoration: none; border-radius: var(--radius); }
  .menu-panel a:hover { background: var(--surface-2); }
  .menu-panel a[aria-current="page"] { font-weight: 650; text-decoration: underline; text-underline-offset: 6px; }
  .site-header .menu-panel .btn-primary { color: var(--on-cta); }
  .site-header .menu-panel .btn-primary:hover { background: var(--cta-hover); }
}
@media (max-width: 380px) {
  .site-header .brand { gap: 8px; }
  .site-header .brand-mark { width: 24px; height: 24px; }
}

/* ---------- sections ---------- */
.section { padding-block: clamp(64px, 9vw, 120px); }
.section-tight { padding-block: clamp(40px, 6vw, 72px); }
.section-head { display: grid; gap: var(--s-4); max-width: 46rem; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head .lede { margin-top: var(--s-2); }
.grid-3 { display: grid; gap: var(--s-8); grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { display: grid; gap: var(--s-8); grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 880px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

/* dark forest band: deep surfaces with light text */
.on-forest { background: var(--forest-900); color: var(--on-forest); }
.on-forest .muted, .on-forest .lede, .on-forest .eyebrow, .on-forest .caption { color: var(--on-forest-muted); }
.on-forest a { color: var(--on-forest); }
.on-forest .chip { color: var(--on-forest-muted); border-color: var(--on-forest-line); }
.on-forest .chip-soon { color: var(--cta); border-color: currentColor; }
.on-forest .card { background: var(--forest-800); border-color: var(--on-forest-line); }

/* ---------- cards ---------- */
.card { display: flex; flex-direction: column; gap: var(--s-3); padding: var(--s-6); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.card h3 { font-size: var(--t-xl); }
.card p { color: var(--muted); }
.card .chip { align-self: flex-start; }
.card-media { margin: calc(var(--s-6) * -1) calc(var(--s-6) * -1) var(--s-2); border-bottom: 1px solid var(--line); border-radius: var(--radius-lg) var(--radius-lg) 0 0; overflow: hidden; background: var(--surface-2); }
.card-media img { width: 100%; height: auto; }
.card-label { display: flex; justify-content: space-between; gap: var(--s-3); }

/* a media card like boat's three illustrated features: mono label, art, mono caption */
.feature { display: grid; gap: var(--s-3); }
.feature-art { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--forest-900); aspect-ratio: 16 / 9; }
.feature-art img { width: 100%; height: 100%; object-fit: cover; }
.feature h3 { margin-top: var(--s-2); font-size: var(--t-xl); }
.feature p { color: var(--muted); }

/* steps */
.steps { display: grid; gap: var(--s-6); grid-template-columns: repeat(3, minmax(0, 1fr)); list-style: none; padding: 0; counter-reset: step; }
.steps li { position: relative; padding: var(--s-6); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); counter-increment: step; }
.step-no { display: inline-flex; align-items: center; gap: 8px; margin-bottom: var(--s-4); font-family: var(--font-mono); font-size: var(--t-xs); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.step-no img { width: 24px; height: 24px; }
.steps h3 { font-size: var(--t-lg); margin-bottom: var(--s-2); }
.steps p { color: var(--muted); font-size: var(--t-sm); }
@media (max-width: 880px) { .steps { grid-template-columns: 1fr; } }

/* definition list rows (status, changelog, specs) */
.rows { display: grid; border-top: 1px solid var(--line); }
.row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s-4); align-items: center; padding: var(--s-4) 0; border-bottom: 1px solid var(--line); }
.row h3, .row h4 { font-size: var(--t-base); font-weight: 600; }
.row p { color: var(--muted); font-size: var(--t-sm); }
.list-check { display: grid; gap: var(--s-3); padding: 0; list-style: none; }
.list-check li { position: relative; padding-left: 28px; }
.check-icon { position: absolute; left: 0; top: .55em; width: 14px; height: 8px; color: var(--link); transform: rotate(-45deg); }
.on-forest .check-icon { color: var(--cta); }

/* FAQ */
.faq { display: grid; border-top: 1px solid var(--line); max-width: 52rem; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: var(--s-4); padding: var(--s-5) 0; font-weight: 600; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq-chevron { flex: none; width: 10px; height: 10px; color: var(--muted); transform: rotate(45deg); transition: transform var(--fast) var(--ease); }
.faq details[open] .faq-chevron { transform: rotate(-135deg); }
.faq details p { padding: 0 0 var(--s-5); color: var(--muted); max-width: 60ch; }

/* notices (used by pricing/servers for the honest "not published yet") */
.notice { display: grid; gap: var(--s-2); padding: var(--s-5) var(--s-6); border: 1px solid var(--line-strong); border-left: 4px solid var(--cta); border-radius: var(--radius); background: var(--surface); }
.notice p { color: var(--muted); }
.reload-notice { position: fixed; z-index: 90; bottom: var(--s-4); right: var(--s-4); left: var(--s-4); margin-left: auto; max-width: 34rem; max-height: calc(100dvh - var(--s-8)); overflow-y: auto; gap: var(--s-4); }

/* ---------- pixel scene layers (shared: homepage hero, content-page forest band) ----------
   Every tile is 480x300 source px; the ground band is rows 240-300. Anchored to the bottom, repeat-x. */
:root { --px: 3; --tile-w: calc(480px * var(--px)); --tile-h: calc(300px * var(--px)); }
@media (max-width: 880px) { :root { --px: 2; } }
@media (min-width: 2000px) { :root { --px: 4; } }
.layer { position: absolute; left: 0; right: 0; bottom: 0; height: var(--tile-h); background-repeat: repeat-x; background-position: 0 100%; background-size: var(--tile-w) var(--tile-h); image-rendering: pixelated; image-rendering: crisp-edges; pointer-events: none; }
.layer-far { background-image: url(/assets/scene/far.png); }
.layer-mid { background-image: url(/assets/scene/mid.png); }
.layer-rays { background-image: url(/assets/scene/rays.png); }
.layer-ground { background-image: url(/assets/scene/ground.png); }
.layer-mist { background-image: url(/assets/scene/mist-a.png); }
.layer-mist-b { background-image: url(/assets/scene/mist-b.png); }
.dawn-sky { background: linear-gradient(to bottom, var(--forest-900) 0%, #15382c 22%, #2a5a4a 40%, #5e8272 50%, #b9bfa6 57%, #e2d9b6 61%, #cfd0b9 65%, #a4b4a7 72%, #8ea598 100%); }

/* ---------- content pages ---------- */
/* Static content header: a slice of the homepage forest and a mist fade. */
.page-band { position: relative; isolation: isolate; overflow: hidden; padding-top: clamp(40px, 6vw, 72px); }
.page-band::before { content: ""; position: absolute; z-index: -2; inset: auto 0 0; height: 200px;
  background-image: url(/assets/scene/mist-b.png), url(/assets/scene/ground.png), url(/assets/scene/mid.png), url(/assets/scene/far.png), linear-gradient(var(--forest-900), var(--mist-200));
  background-repeat: repeat-x; background-size: 960px 600px; background-position: center bottom -110px; image-rendering: pixelated; mask-image: linear-gradient(to bottom, transparent, var(--on-forest) 48%); }
.page-band::after { content: ""; position: absolute; z-index: -1; inset: 0; background: linear-gradient(to bottom, var(--forest-900), transparent 62%, transparent 78%, var(--bg)); pointer-events: none; }
.page-band .wrap { display: grid; gap: var(--s-4); padding-bottom: 164px; }
.page-band h1 { font-size: var(--t-3xl); letter-spacing: -.03em; max-width: 28ch; }
.page-band .lede { max-width: 60ch; }
.prose { max-width: 68ch; }
.prose > * + * { margin-top: var(--s-5); }
.prose h2 { font-size: var(--t-2xl); margin-top: var(--s-12); }
.prose h3 { margin-top: var(--s-8); }
.prose ul, .prose ol { padding-left: 1.25rem; }
.prose li + li { margin-top: var(--s-2); }
.prose pre { padding: var(--s-4) var(--s-5); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); font-size: var(--t-sm); }
.layout-side { display: grid; gap: var(--s-12); grid-template-columns: minmax(0, 1fr) 280px; align-items: start; }
.side { position: sticky; top: var(--s-6); display: grid; gap: var(--s-4); }
.side .card p { font-size: var(--t-sm); }
@media (max-width: 880px) { .layout-side { grid-template-columns: 1fr; } .side { position: static; } }

/* the "coming soon" pattern: one honest panel per unfinished page */
.coming-soon { display: grid; gap: var(--s-4); padding: clamp(24px, 4vw, 40px); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.coming-soon h2 { font-size: var(--t-2xl); }
.coming-soon p { color: var(--muted); max-width: 60ch; }
.coming-soon .actions { margin-top: var(--s-2); }

/* final CTA band */
.cta-band { position: relative; overflow: hidden; }
.cta-band .wrap { display: grid; gap: var(--s-5); padding-block: clamp(64px, 9vw, 112px); position: relative; z-index: 1; }
.cta-band h2 { max-width: 20ch; }
.cta-band p { max-width: 50ch; }

/* ---------- footer ---------- */
.site-footer { background: var(--forest-950); color: var(--on-forest-muted); }
.site-footer .wrap { display: grid; gap: var(--s-10); padding-block: clamp(40px, 6vw, 64px) var(--s-8); grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); }
.site-footer .brand { color: var(--on-forest); }
.footer-tag { margin-top: var(--s-3); max-width: 28ch; font-size: var(--t-sm); }
.footer-col h2 { font-family: var(--font-mono); font-size: var(--t-xs); letter-spacing: .12em; text-transform: uppercase; color: var(--on-forest-muted); font-weight: 500; margin-bottom: var(--s-3); }
.footer-col ul { list-style: none; padding: 0; display: grid; gap: var(--s-2); font-size: var(--t-sm); }
.footer-col a { color: var(--on-forest); text-decoration: none; }
.footer-col a:hover { text-decoration: underline; }
.footer-bar { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-3); padding-top: var(--s-5); border-top: 1px solid var(--on-forest-line); font-family: var(--font-mono); font-size: var(--t-xs); letter-spacing: .04em; }
.footer-bar a { color: inherit; }
.footer-note { display: grid; gap: var(--s-1); }
.publisher-credit { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); }
.publisher-credit a { display: inline-flex; align-items: center; gap: var(--s-2); }
.publisher-credit img { width: 62px; height: 32px; }
@media (max-width: 880px) { .site-footer .wrap { grid-template-columns: 1fr 1fr; } .site-footer .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 480px) { .site-footer .wrap { grid-template-columns: 1fr; } }

/* ---------- motion contract ---------- */
.reveal { opacity: 0; transform: translate3d(0, 16px, 0); transition: opacity var(--slow) var(--ease), transform var(--slow) var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
.motif { position: absolute; pointer-events: none; }
.motif img { width: 100%; height: 100%; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* Inline caption arrow keeps the original monospace advance and baseline. */
.caption-arrow { display: inline-block; vertical-align: -.15em; }
