/* Fourwind landing page. Colours are the board's own tokens (board_ui), Life Returning (ST-T541); every
   colour comes from the variables below (test_fourwind_palette.py checks them). No outside requests. */
:root {
  --bg: #f2eee3; --panel: #fbf9f2; --panel-2: #e7e1d2; --line: #d4cbb6;
  --text: #26231c; --muted: #5f594b; --accent: #2e7a3d; --accent-2: #225e2e;
  --ok: #617a10; --warn: #a35e10; --claude: #b0583a; --codex: #2f6390; --on-fill: #ffffff;
  --ink: #15170f; --ink-text: #ece8da; --ink-muted: #a9a493; --ink-accent: #86c98f;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(29,28,26,.06), 0 8px 28px rgba(29,28,26,.08);
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --display: "Bahnschrift", "DIN Alternate", "Arial Narrow", var(--font);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15170f; --panel: #1e211a; --panel-2: #272b22; --line: #3b4034;
    --text: #ece8da; --muted: #a9a493; --accent: #358341; --accent-2: #86c98f;
    --ok: #a9cc5e; --warn: #e0a350; --claude: #e39070; --codex: #7fb0e0; --on-fill: #15170f;
    --ink: #0e100a; --ink-text: #ece8da; --ink-muted: #a9a493; --ink-accent: #86c98f;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 28px rgba(0,0,0,.35);
  }
  .lockup-light { display: none; }
  .lockup-dark { display: block !important; }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.55 var(--font); }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); line-height: 1.1; letter-spacing: -0.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.3rem, 5.4vw, 4.1rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); font-weight: 700; max-width: 22ch; }
h3 { font-size: 1.25rem; font-weight: 700; }
p { margin: 0 0 1em; }
.wrap { width: min(1160px, 100% - 40px); margin-inline: auto; }
.accent { color: var(--accent); }
.eyebrow { font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: .8em; }
.fine { font-size: .85rem; color: var(--muted); }
.center { text-align: center; }
section { padding: 96px 0; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .85em 1.5em; border-radius: 999px; background: var(--accent); color: #fff;
  font-weight: 700; text-decoration: none; border: 2px solid var(--accent);
  transition: background .15s, transform .15s; }
.btn:hover { background: color-mix(in srgb, var(--accent) 82%, #000); border-color: color-mix(in srgb, var(--accent) 82%, #000); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { background: var(--panel); border-color: var(--text); }
.btn-small { padding: .5em 1.1em; font-size: .9rem; }
.btn-invert { background: #fff; color: var(--accent); border-color: #fff; }
.btn-invert:hover { background: color-mix(in srgb, var(--accent) 15%, #fff); border-color: color-mix(in srgb, var(--accent) 15%, #fff); }

/* Header */
.top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top-row { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand img { width: 232px; height: 52px; }
.lockup-dark { display: none; }
.top-nav { display: flex; align-items: center; gap: 28px; font-size: .95rem; }
.top-nav a:not(.btn) { text-decoration: none; color: var(--muted); }
.top-nav a:not(.btn):hover { color: var(--text); }

/* Hero */
.hero { padding: 72px 0 96px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 48px; align-items: center; }
.lede { font-size: 1.2rem; color: var(--muted); max-width: 36em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 16px; }
.hero-art { position: relative; justify-self: center; width: min(440px, 100%); }
.hero-art img { position: relative; width: 100%; filter: drop-shadow(0 24px 40px color-mix(in srgb, var(--accent) 25%, transparent)); }
.hero-halo { position: absolute; inset: 8%; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%); }

/* Selling points */
.points { background: var(--panel); border-block: 1px solid var(--line); }
.point-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; margin-top: 40px; }
.point { grid-column: span 2; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; position: relative; }
.point p { color: var(--muted); margin: 0; }
.point-lead { grid-column: span 3; background: var(--ink); color: var(--ink-text); border-color: var(--ink); padding: 36px; }
.point-lead h3 { font-size: 1.45rem; }
.point-lead p { color: var(--ink-muted); font-size: 1.05rem; }
.point-num { display: block; font-family: var(--display); font-weight: 700; font-size: .95rem; color: var(--accent); margin-bottom: 14px; }
.point-lead .point-num { color: var(--ink-accent); }

/* How it works diagram */
.section-lede { color: var(--muted); font-size: 1.1rem; max-width: 44em; }
.diagram { display: grid; grid-template-columns: 1fr 64px 1.2fr 64px 1.6fr; align-items: center; gap: 0;
  margin: 48px 0 56px; grid-template-areas: "you l1 cloud l2 pcs" ". . . . l3" ". . . . main"; }
.tier { position: relative; }
.tier-you { grid-area: you; } .tier-cloud { grid-area: cloud; } .tier-pcs { grid-area: pcs; }
.link-1 { grid-area: l1; }
.link-2 { grid-area: l2; }
.link-last { grid-area: l3; }
.tier-main { grid-area: main; }
.tier-label { position: absolute; top: -28px; left: 0; font-size: .75rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted); }
.node { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px;
  box-shadow: var(--shadow); }
.node strong { display: block; font-size: 1.05rem; }
.node small { display: block; color: var(--muted); font-size: .85rem; margin-top: 2px; }
.node-icons { display: flex; gap: 10px; align-items: flex-end; margin-bottom: 12px; }
.dev { display: block; border: 3px solid var(--text); border-radius: 6px; }
.dev-phone { width: 22px; height: 38px; border-radius: 6px; }
.dev-laptop { width: 50px; height: 32px; border-radius: 4px 4px 0 0; position: relative; }
.dev-laptop::after { content: ""; position: absolute; left: -9px; right: -9px; bottom: -8px; height: 5px;
  background: var(--text); border-radius: 0 0 4px 4px; }
.node-cloud { background: var(--accent); border-color: var(--accent); color: #fff; padding: 26px 20px;
  border-radius: 48px 48px var(--radius) var(--radius); }
.node-cloud small { color: rgba(255,255,255,.85); }
.cloud-parts { display: grid; gap: 12px; }
.part { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25); border-radius: 12px; padding: 12px 14px; }
.pcs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.node-pc { padding: 16px; }
.slots { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.slot { font-size: .78rem; font-weight: 600; padding: 5px 9px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--bg); display: flex; align-items: center; gap: 6px; }
.slot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.slot-claude::before { background: var(--claude); }
.slot-codex::before { background: var(--codex); }
.slot-idle { color: var(--muted); border-style: dashed; }
.slot-idle::before { background: transparent; border: 1.5px solid var(--muted); }
.subs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.sub-label { width: 100%; font-size: .78rem; color: var(--muted); }
.sub { font-size: .8rem; font-weight: 700; padding: 5px 12px; border-radius: 999px; color: var(--on-fill); }
.sub-claude { background: var(--claude); } .sub-codex { background: var(--codex); }
.link { position: relative; height: 2px; background: repeating-linear-gradient(90deg, var(--accent) 0 8px, transparent 8px 14px); margin: 0 6px; }
.link::after { content: ""; position: absolute; right: -2px; top: -5px; border: 6px solid transparent; border-left: 9px solid var(--accent); border-right: 0; }
.link span { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); font-size: .7rem; color: var(--muted);
  white-space: nowrap; text-align: center; }
.link-1 span, .link-2 span { white-space: normal; width: 78px; line-height: 1.2; bottom: 10px; }
.link-last { width: 2px; height: 56px; margin: 8px auto; background: repeating-linear-gradient(180deg, var(--accent) 0 8px, transparent 8px 14px); }
.link-last::after { right: auto; left: -5px; top: auto; bottom: -4px; border: 6px solid transparent; border-top: 9px solid var(--accent); border-bottom: 0; }
.link-last span { left: 14px; bottom: auto; top: 50%; transform: translateY(-50%); }
.node-main { background: var(--ok); border-color: var(--ok); color: var(--on-fill); text-align: center; }
.node-main small { color: color-mix(in srgb, var(--on-fill) 85%, transparent); }

.steps { list-style: none; counter-reset: s; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.steps li { counter-increment: s; color: var(--muted); font-size: .95rem; }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--ink); color: #fff; font-family: var(--display); font-weight: 700; margin-bottom: 12px; }
.steps strong { display: block; color: var(--text); font-size: 1.05rem; margin-bottom: 4px; }

/* Board */
.board { border-bottom: 1px solid var(--line); }

.board-head > p:not(.eyebrow) { color: var(--muted); font-size: 1.1rem; }
.ticks { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 10px; }
.ticks li { padding-left: 32px; position: relative; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); }
.ticks li::after { content: ""; position: absolute; left: 6px; top: 8px; width: 8px; height: 5px; border: 2px solid #fff;
  border-top: 0; border-right: 0; transform: rotate(-45deg); }

.board-head { max-width: 44em; }
.shots-more figure, .games-shot { margin: 0; }
figcaption { font-size: .88rem; color: var(--muted); margin-top: 10px; }
.shot-desk { background: var(--bg); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; }
.shot-desk img, .shot-card img, .phone-body img { display: block; width: 100%; height: auto; }
.shot-desk figcaption { padding: 0 16px 14px; }
.frame-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--panel-2); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.frame-title { margin-left: 10px; font-size: .8rem; color: var(--muted); font-weight: 600; }
.shot-phone { width: 260px; text-align: center; }
.phone-body { background: var(--ink); border-radius: 34px; padding: 10px; box-shadow: var(--shadow); }
.phone-body img { border-radius: 25px; }
.shots-more { display: grid; grid-template-columns: 260px 260px 1fr; gap: 48px; align-items: center; margin-top: 48px; }
.shots-more .shot-phone { align-self: start; }
.shots-side .ticks { margin: 0 0 32px; }
.shot-card { max-width: 480px; }
.shot-card img { border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.shots-note { margin-top: 40px; }

/* For game studios (ST-T536) */
.games { background: var(--panel); border-block: 1px solid var(--line); }
.games-shot { margin-top: 40px; }
.games-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 32px; }
.games-grid .point { grid-column: auto; }
.games-grid .games-lead { grid-column: 1 / -1; }
.games-lead p { max-width: 52em; }

/* Also in the box */
.also { padding: 72px 0; }
.also-title { font-size: 1.4rem; }
.also-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px 40px; margin-top: 24px; }
.also-grid strong { display: block; margin-bottom: 4px; }
.also-grid p { color: var(--muted); font-size: .95rem; margin: 0; }

/* Downloads */
.download { background: var(--panel); border-block: 1px solid var(--line); text-align: center; }
.download h2 { margin-inline: auto; }
.dl-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 40px 0 20px; }
.dl { display: flex; align-items: center; gap: 14px; text-align: left; padding: 18px 20px; border-radius: 16px; text-decoration: none;
  background: var(--ink); color: var(--ink-text); border: 1px solid var(--ink); transition: transform .15s; }
.dl:hover { transform: translateY(-2px); }
.dl-store { background: var(--bg); color: var(--text); border-color: var(--line); }
.dl-text small { display: block; font-size: .72rem; opacity: .75; }
.dl-text strong { display: block; font-size: 1.2rem; font-family: var(--display); }
.dl-icon { width: 34px; height: 34px; flex: none; position: relative; }
.dl-win { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; }
.dl-win i { background: var(--ink-accent); border-radius: 2px; }
.dl-mac::before { content: ""; position: absolute; inset: 2px 2px 8px; border: 3px solid var(--ink-text); border-radius: 4px; }
.dl-mac::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 1px; height: 3px; background: var(--ink-text); border-radius: 2px; }
.dl-phone::before { content: ""; position: absolute; left: 8px; right: 8px; top: 0; bottom: 0; border: 3px solid var(--text); border-radius: 6px; }
.dl-phone::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 2px; background: var(--text); border-radius: 2px; }
.dl-android::before { content: ""; position: absolute; left: 5px; right: 5px; top: 8px; height: 13px; background: var(--ok); border-radius: 13px 13px 0 0; }
.dl-android::after { content: ""; position: absolute; left: 5px; right: 5px; top: 23px; height: 10px; background: var(--ok); border-radius: 0 0 4px 4px; }

/* Closing CTA */
.cta { background: var(--accent); color: #fff; text-align: center; }
.cta-inner { display: flex; flex-direction: column; align-items: center; }
.cta img { width: 96px; height: 96px; border-radius: 22px; margin-bottom: 24px; }
.cta h2 { max-width: 18ch; }
.cta p { color: rgba(255,255,255,.85); font-size: 1.15rem; margin-bottom: 28px; }

/* Footer */
.foot { padding: 28px 0; font-size: .85rem; color: var(--muted); }
.foot-row { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.foot-links { display: flex; gap: 20px; }
.foot-links a { text-decoration: none; }

/* Tablet */
@media (max-width: 1000px) {
  .point-grid .point,   .diagram { grid-template-columns: 1fr; grid-template-areas: none; gap: 0; max-width: 520px; margin-inline: auto; }
  .diagram > * { grid-area: auto !important; }
  .tier { margin-top: 28px; }
  .tier-main { margin-top: 0; }
  .link, .link-last { width: 2px; height: 56px; margin: 8px auto 0;
    background: repeating-linear-gradient(180deg, var(--accent) 0 8px, transparent 8px 14px); }
  .link::after, .link-last::after { right: auto; left: -5px; top: auto; bottom: -4px; border: 6px solid transparent; border-top: 9px solid var(--accent); border-bottom: 0; }
  .link span, .link-1 span, .link-2 span {
    left: 14px; bottom: auto; top: 50%; transform: translateY(-50%); width: auto; white-space: nowrap; }
  .steps { grid-template-columns: 1fr 1fr; }
  .games-grid { grid-template-columns: 1fr 1fr; }
  .shots-more { grid-template-columns: 1fr 1fr; gap: 32px; }
  .shots-more .shot-phone { width: auto; max-width: 260px; justify-self: center; }
  .shots-side { grid-column: 1 / -1; }
  .dl-grid { grid-template-columns: 1fr 1fr; }
}

/* Phone */
@media (max-width: 640px) {
  body { font-size: 16px; }
  section { padding: 64px 0; }
  .wrap { width: calc(100% - 32px); }
  .top-row { height: 60px; }
  .brand img { width: 178px; height: 40px; }
  .top-nav a:not(.btn) { display: none; }
  .hero { padding: 36px 0 56px; }
  .hero-grid { grid-template-columns: 1fr; gap: 8px; }
  .hero-art { order: -1; width: 180px; justify-self: start; }
  .lede { font-size: 1.05rem; }
  .hero-actions .btn { flex: 1 1 100%; }
  .point-grid { grid-template-columns: 1fr; gap: 14px; margin-top: 28px; }
  .point-grid .point { grid-column: auto; padding: 24px; }
  .point-lead h3 { font-size: 1.35rem; }
  .pcs { grid-template-columns: 1fr 1fr; gap: 10px; }
  .steps { grid-template-columns: 1fr; }
  .games-grid { grid-template-columns: 1fr; gap: 14px; margin-top: 28px; }
  .games-grid .point { padding: 24px; }
  .shots-more { grid-template-columns: 1fr; gap: 32px; margin-top: 40px; }
  .shots-more .shot-phone { margin-inline: auto; width: 240px; }
  .also-grid { grid-template-columns: 1fr; gap: 18px; }
  .dl-grid { grid-template-columns: 1fr; }
}

/* The waitlist dialog (ST-T99) */
.waitlist { width: min(460px, calc(100% - 32px)); padding: 0; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--panel); color: var(--text); box-shadow: var(--shadow); }
.waitlist::backdrop { background: rgba(25,25,25,.55); backdrop-filter: blur(3px); }
.waitlist-form, .waitlist-done { position: relative; padding: 32px 28px 24px; }
.waitlist h2 { font-size: 1.7rem; margin-bottom: .35em; }
.waitlist-lede { color: var(--muted); }
.waitlist label { display: block; font-weight: 700; font-size: .9rem; margin-bottom: 6px; }
.waitlist-row { display: flex; gap: 10px; }
.waitlist-row input { flex: 1; min-width: 0; font: inherit; padding: .7em 1em; border-radius: 999px;
  border: 2px solid var(--line); background: var(--bg); color: var(--text); }
.waitlist-row input:focus { outline: none; border-color: var(--accent); }
.waitlist .btn { cursor: pointer; font: inherit; font-weight: 700; }
.waitlist .btn:disabled { opacity: .55; cursor: default; transform: none; }
.waitlist-status { min-height: 1.5em; margin: 12px 0 0; font-size: .9rem; color: var(--muted); }
.waitlist-status.bad { color: var(--accent); }
.waitlist-close { position: absolute; top: 12px; right: 14px; width: 36px; height: 36px; border: 0; border-radius: 50%;
  background: transparent; color: var(--muted); font-size: 1.6rem; line-height: 1; cursor: pointer; }
.waitlist-close:hover { background: var(--panel-2); color: var(--text); }
.waitlist-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 640px) {
  .waitlist-row { flex-direction: column; }
}
