/* Layout: one column of alternating bands; the green slab with one tight corner is the
   brand shape, used for the hero art, the mission band and the download card. Dark first,
   like the app. */
:root {
  --bg: #0A0D0C; --surface: #141A18; --surface-2: #1B2421; --line: #25302C;
  --ink: #E7EFEB; --soft: #C4D0CA; --muted: #9BAAA3;
  --slab: #1C5543; --slab-deep: #15443A; --slab-ink: #EAF7F1;
  --accent: #5FD3A5; --on-accent: #06130E; --amber: #F2A04A;
  --font: "Hanken Grotesk", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --r-big: 44px; --r-mid: 22px; --r-tight: 6px;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #F3F5F4; --surface: #FFFFFF; --surface-2: #E9EEEB; --line: #DCE3DF;
    --ink: #13201B; --soft: #3A4842; --muted: #5A6862;
    --slab: #123F31; --slab-deep: #0C2F24; --slab-ink: #E8F5EF;
    --accent: #0F6B4D; --on-accent: #FFFFFF; --amber: #B25A07;
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #F3F5F4; --surface: #FFFFFF; --surface-2: #E9EEEB; --line: #DCE3DF;
  --ink: #13201B; --soft: #3A4842; --muted: #5A6862;
  --slab: #123F31; --slab-deep: #0C2F24; --slab-ink: #E8F5EF;
  --accent: #0F6B4D; --on-accent: #FFFFFF; --amber: #B25A07;
  color-scheme: light;
}

* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.wrap {
  max-width: 1160px; margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}
h1, h2, h3 { margin: 0; text-wrap: balance; letter-spacing: -0.03em; }
p { margin: 0; }
.eyebrow { font-family: var(--mono); font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

/* buttons: 12px corners, like the app */
.btn { display: inline-flex; align-items: center; gap: 10px; font: inherit; font-weight: 700; font-size: 16px; text-decoration: none; border-radius: 12px; padding: 13px 22px; min-height: 48px; border: 1px solid transparent; cursor: pointer; }
.btn.primary { background: var(--accent); color: var(--on-accent); }
.btn.primary:hover { filter: brightness(1.07); }
.btn.quiet { color: var(--ink); border-color: var(--line); }
.btn.quiet:hover { background: var(--surface); }
.btn svg { width: 18px; height: 18px; }

/* header */
.top { display: flex; align-items: center; gap: 28px; padding-block: 22px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 20px; letter-spacing: -0.03em; }
.brand svg { width: 30px; height: 30px; color: var(--accent); }
.top nav { display: flex; gap: 22px; margin-left: auto; font-weight: 600; font-size: 15px; }
.top nav a { color: var(--muted); text-decoration: none; }
.top nav a:hover { color: var(--ink); }
.top .btn { padding: 9px 16px; min-height: 40px; font-size: 15px; }
@media (max-width: 760px) {
  .top { flex-wrap: wrap; row-gap: 14px; }
  .top nav { order: 3; flex-basis: 100%; margin-left: 0; gap: 18px; overflow-x: auto; white-space: nowrap; }
  .top .btn { margin-left: auto; }
}

/* hero */
.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 48px; align-items: center; padding-block: 40px 72px; }
.hero h1 { font-size: clamp(42px, 6.4vw, 74px); line-height: 1.0; font-weight: 800; letter-spacing: -0.045em; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lede { margin-top: 22px; font-size: 19.5px; color: var(--soft); max-width: 34em; }
.hero .cta { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero .fine { margin-top: 14px; font-size: 14px; color: var(--muted); }
.art { position: relative; background: var(--slab); border-radius: var(--r-big) var(--r-big) var(--r-big) var(--r-tight); padding: 58px clamp(18px, 4vw, 40px) 40px; min-width: 0; }
.art .tag { position: absolute; top: 18px; left: 22px; color: var(--slab-ink); font-family: var(--mono); font-size: 12px; letter-spacing: .06em; opacity: .8; }
@media (max-width: 880px) { .hero { grid-template-columns: 1fr; gap: 36px; } }

/* how it works: a real sequence */
section { padding-block: 64px; }
.section-head { display: flex; flex-direction: column; gap: 10px; max-width: 46em; margin-bottom: 32px; }
.section-head h2 { font-size: clamp(30px, 4vw, 44px); line-height: 1.08; font-weight: 800; }
.section-head p { color: var(--soft); font-size: 18px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; counter-reset: s; }
.steps li { counter-increment: s; display: flex; flex-direction: column; gap: 10px; padding: 26px; background: var(--surface); border-radius: var(--r-mid); }
.steps li::before { content: counter(s); font-family: var(--mono); font-size: 13px; color: var(--accent); }
.steps h3 { font-size: 22px; line-height: 1.2; font-weight: 800; }
.steps p { color: var(--soft); font-size: 16px; }
.steps .example { margin-top: auto; padding-top: 8px; font-size: 15px; font-style: italic; color: var(--ink); border-top: 1px solid var(--line); }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }

/* mission band */
.band { background: var(--slab); color: var(--slab-ink); border-radius: 0 var(--r-big) var(--r-big) 0; margin-right: max(20px, env(safe-area-inset-right, 0px)); }
.band .wrap { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 40px; align-items: center; padding-block: 60px; }
.band h2 { font-size: clamp(32px, 4.4vw, 50px); line-height: 1.05; font-weight: 800; }
.band p { margin-top: 16px; font-size: 18.5px; opacity: .9; max-width: 32em; }
.dominoes { width: 100%; max-width: 360px; justify-self: center; color: var(--slab-ink); }
@media (max-width: 820px) { .band .wrap { grid-template-columns: 1fr; } .dominoes { max-width: 220px; justify-self: start; } }

/* features: mixed sizes on purpose */
.features { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 18px; }
.f { background: var(--surface); border-radius: var(--r-mid); padding: 26px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.f h3 { font-size: 21px; font-weight: 800; line-height: 1.2; }
.f p { color: var(--soft); font-size: 16px; }
.f.wide { grid-column: span 4; }
.f.half { grid-column: span 3; }
.f.narrow { grid-column: span 2; }
.f.shot { padding-bottom: 0; overflow: hidden; }
.f.shot img { margin-top: 8px; border-radius: 14px 14px 0 0; border: 1px solid var(--line); border-bottom: 0; width: 100%; max-height: 420px; object-fit: cover; object-position: left top; }
.f.full { grid-column: span 6; }
.stack { grid-column: span 2; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.stack .f { flex: 1; }
.f.quote { background: transparent; border: 1px solid var(--line); border-radius: var(--r-mid) var(--r-mid) var(--r-mid) var(--r-tight); }
.f.quote blockquote { margin: 0; font-size: 21px; line-height: 1.4; font-style: italic; font-weight: 500; }
.f.quote .who { font-size: 14px; color: var(--muted); }
.chip { align-self: flex-start; font-family: var(--mono); font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
@media (max-width: 900px) { .features { grid-template-columns: 1fr; } .f.wide, .f.half, .f.narrow, .f.full, .stack { grid-column: auto; } }

/* why */
.why { display: grid; grid-template-columns: minmax(0, 15em) minmax(0, 1fr); gap: 40px; }
.why .text { display: flex; flex-direction: column; gap: 18px; font-size: 18.5px; color: var(--soft); max-width: 40em; }
.why .text p:first-child::first-letter { font-size: 1.1em; }
.why .sign { color: var(--ink); margin-top: 10px; }
@media (max-width: 820px) { .why { grid-template-columns: 1fr; gap: 16px; } }

/* plans */
.plans { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: stretch; }
.plan { background: var(--surface); border-radius: var(--r-mid); padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.plan.free { background: var(--slab); color: var(--slab-ink); border-radius: var(--r-big) var(--r-big) var(--r-big) var(--r-tight); }
.plan h3 { font-size: 24px; font-weight: 800; }
.plan .price { font-size: 44px; font-weight: 800; letter-spacing: -0.04em; line-height: 1; }
.plan .price small { font-size: 16px; font-weight: 600; letter-spacing: 0; opacity: .8; }
.plan ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 15.5px; }
.plan.free ul { opacity: .92; }
.plan .soon { font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--amber); }
.plan .btn { margin-top: auto; align-self: flex-start; }
.plan.free .btn.primary { background: var(--slab-ink); color: var(--slab); }
@media (max-width: 900px) { .plans { grid-template-columns: 1fr; } }

/* faq */
.faq { display: flex; flex-direction: column; max-width: 52em; }
.faq details { border-bottom: 1px solid var(--line); padding-block: 18px; }
.faq summary { cursor: pointer; font-weight: 700; font-size: 18.5px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-weight: 800; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin-top: 10px; color: var(--soft); max-width: 44em; }

/* download + footer */
.download { background: var(--surface); border-radius: var(--r-big) var(--r-big) var(--r-big) var(--r-tight); padding: 44px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.download h2 { font-size: clamp(28px, 3.6vw, 40px); font-weight: 800; line-height: 1.1; }
.download p { margin-top: 8px; color: var(--soft); }
.specs { font-family: var(--mono); font-size: 13px; color: var(--muted); margin-top: 14px; }
footer { padding-block: 40px 56px; display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; color: var(--muted); font-size: 14.5px; }
footer a { color: var(--muted); }
footer a.donate { color: var(--accent); font-weight: 700; }
footer .brand { font-size: 17px; }
footer .brand svg { width: 24px; height: 24px; }
footer .links { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-left: auto; }

@media (prefers-reduced-motion: no-preference) {
  .dominoes .t2 { transform-origin: 32.5px 52px; animation: tip 4.5s ease-in-out infinite; }
  .dominoes .t3 { transform-origin: 46.5px 52px; animation: tip3 4.5s ease-in-out infinite; }
  @keyframes tip { 0%, 30% { transform: rotate(0deg); } 45%, 85% { transform: rotate(14deg); } 100% { transform: rotate(0deg); } }
  @keyframes tip3 { 0%, 40% { transform: rotate(0deg); } 55%, 85% { transform: rotate(30deg); } 100% { transform: rotate(0deg); } }
}

/* the block card, drawn in HTML (as it looks in the app) */
.bc { max-width: 430px; margin-inline: auto; background: var(--surface); color: var(--ink); border-radius: 30px 30px 30px 8px; overflow: hidden; box-shadow: 0 28px 60px rgba(0,0,0,.38); font-size: 15px; line-height: 1.45; }
.bc-top { background: var(--slab-deep); color: var(--slab-ink); padding: 20px 24px 18px; }
.bc-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 12.5px; font-weight: 600; opacity: .85; }
.bc-row b { display: inline-flex; align-items: center; gap: 5px; font-weight: 800; letter-spacing: -0.02em; }
.bc-row svg { width: 14px; height: 14px; }
.bc-title { margin-top: 6px; font-size: 26px; line-height: 1.12; font-weight: 800; letter-spacing: -0.03em; }
.bc-body { padding: 20px 24px 24px; display: flex; flex-direction: column; gap: 14px; }
.bc-quote { border-left: 3px solid var(--amber); padding-left: 12px; font-style: italic; font-weight: 500; font-size: 16px; }
.bc-quote small { display: block; margin-top: 6px; font-style: normal; font-weight: 400; font-size: 12.5px; color: var(--muted); }
.bc-left { font-size: 13.5px; font-weight: 600; color: var(--muted); }
.bc-btn { display: flex; justify-content: center; align-items: center; min-height: 44px; border-radius: 12px; font-weight: 700; font-size: 15px; }
.bc-btn.go { background: var(--accent); color: var(--on-accent); }
.bc-btn.alt { border: 1px solid var(--line); }

/* pages other than home */
.page-head { padding-block: 40px 8px; display: flex; flex-direction: column; gap: 12px; }
.page-head > * { max-width: 46rem; }
.page-head h1 { font-size: clamp(38px, 5.4vw, 60px); line-height: 1.02; font-weight: 800; letter-spacing: -0.045em; }
.page-head p { color: var(--soft); font-size: 19px; }
.top nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 7px; }
.more { margin-top: 26px; }
.rules { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.rules > div { background: var(--surface); border-radius: var(--r-mid); padding: 26px; display: flex; flex-direction: column; gap: 8px; }
.rules h3 { font-size: 21px; font-weight: 800; line-height: 1.2; }
.rules p { color: var(--soft); font-size: 16px; }
@media (max-width: 820px) { .rules { grid-template-columns: 1fr; } }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.split .copy { display: flex; flex-direction: column; gap: 14px; }
.split h2 { font-size: clamp(28px, 3.6vw, 40px); line-height: 1.08; font-weight: 800; }
.split p { color: var(--soft); font-size: 18px; }
@media (max-width: 880px) { .split { grid-template-columns: 1fr; gap: 32px; } }

/* coming soon: where the download goes, until the first release */
.soon-tag { display: inline-flex; align-items: center; min-height: 40px; padding: 8px 14px; border-radius: 12px; border: 1px dashed var(--muted); color: var(--soft); font-weight: 700; font-size: 14px; white-space: nowrap; }
@media (max-width: 760px) { .top .soon-tag { margin-left: auto; } }
.soon-tag.on-slab { align-self: flex-start; margin-top: auto; border-color: currentColor; color: inherit; }

/* privacy and other plain text pages */
.legal { max-width: 46rem; display: flex; flex-direction: column; gap: 14px; color: var(--soft); font-size: 17px; }
.legal h2 { color: var(--ink); font-size: 24px; font-weight: 800; margin-top: 18px; }
.legal ul { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.legal strong { color: var(--ink); }

/* three short cards in a row; an odd last card spans the row */
.rules.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 820px) { .rules.three { grid-template-columns: 1fr; } }
.rules:not(.three) > div:last-child:nth-child(odd) { grid-column: 1 / -1; }

.why-h { font-size: clamp(28px, 3.6vw, 40px); line-height: 1.08; font-weight: 800; }

/* a screenshot shown at its own size (not stretched or cut), e.g. the two checks */
.f.shot img.natural { width: auto; max-width: 100%; height: auto; max-height: none; object-fit: contain; }

/* "Notify me": the launch email list (notify.js, worker/subscribe.js) */
.sr { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.notify { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; width: 100%; max-width: 460px; }
.notify input[type="email"] { flex: 1 1 220px; min-width: 0; min-height: 48px; padding: 12px 16px; font: inherit; font-size: 16px; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 12px; }
.notify input[type="email"]:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.notify button:disabled { opacity: .6; cursor: default; }
.download .notify-msg { flex-basis: 100%; margin-top: 0; font-size: 14px; }
.notify-msg:empty { display: none; }
.notify.done input, .notify.done button { display: none; }
