/* Dotmochi landing page. Tokens and type follow docs/brand/brand_guide.html:
   rice, ink and one pink dot; Pixelify Sans for headings, Inter for text.
   The fonts are served from this site (/fonts/fonts.css, written by scripts/build.ts). */

:root {
  --paper: #FBF6EF;
  --card: #FFFFFF;
  --ink: #2B2630;
  --ink-soft: #5A4F57;
  --line: rgba(43, 38, 48, 0.14);
  --grid: rgba(43, 38, 48, 0.07);
  --mist: #F2E6E9;
  --kinako: #E6D5BF;
  --dot: #F06A8A;
  --accent-text: #A8325A;
  --btn-bg: #2B2630;
  --btn-fg: #FBF6EF;
  --tv: #2B2630;
  --tv-edge: #3D3642;
  --ok: #2F6B4F;
  --bad: #B23A55;
  --font-display: 'Pixelify Sans', 'Courier New', monospace;
  /* Pixelify Sans's "fi" ligature reads as "A" (Confirm, Profile): headings set it off */
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #1E1A21; --card: #28232C; --ink: #F5EFE8; --ink-soft: #C4B9BF;
    --line: rgba(245, 239, 232, 0.14); --grid: rgba(245, 239, 232, 0.06);
    --mist: #2A2430; --accent-text: #F49AB4;
    --btn-bg: #FFF7EC; --btn-fg: #2B2630; --tv: #121014; --tv-edge: #2E2833;
    --ok: #8FD3AE; --bad: #F49AAE;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #1E1A21; --card: #28232C; --ink: #F5EFE8; --ink-soft: #C4B9BF;
  --line: rgba(245, 239, 232, 0.14); --grid: rgba(245, 239, 232, 0.06);
  --mist: #2A2430; --accent-text: #F49AB4;
  --btn-bg: #FFF7EC; --btn-fg: #2B2630; --tv: #121014; --tv-edge: #2E2833;
  --ok: #8FD3AE; --bad: #F49AAE;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font-body); font-size: 17px; line-height: 1.55; }
img { max-width: 100%; height: auto; }
.px { image-rendering: pixelated; image-rendering: crisp-edges; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.05; text-wrap: balance; margin: 0; font-variant-ligatures: no-common-ligatures; }
h1 { font-weight: 700; }
h2 { font-weight: 600; font-size: clamp(32px, 5vw, 44px); }
h3 { font-weight: 600; font-size: 22px; }
p { margin: 0; max-width: 62ch; }
a { color: var(--accent-text); }
:focus-visible { outline: 2px solid var(--dot); outline-offset: 3px; }
.nowrap { white-space: nowrap; }
.mono { font-family: var(--font-mono); font-size: 0.92em; }
.wrap { max-width: 1120px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.stack { display: flex; flex-direction: column; gap: 40px; }
.stack-sm { display: flex; flex-direction: column; gap: 14px; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-text); }
.sec-head { display: flex; flex-direction: column; gap: 12px; }
.sec-head p { color: var(--ink-soft); }
.fine { font-size: 14px; color: var(--ink-soft); }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--card); padding: 8px 12px; border-radius: 6px; z-index: 10; }
.skip:focus { left: 8px; }
main > section { padding-block: 88px; }
main > .hero { padding-block: 72px 80px; }
.band { background: var(--mist); border-block: 1px solid var(--line); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 8px; font: inherit; font-weight: 600; font-size: 16px; text-decoration: none; cursor: pointer; border: 2px solid transparent; transition: transform 0.12s steps(2, end); }
.btn:active { transform: translateY(1px); }
.btn-ink { background: var(--btn-bg); color: var(--btn-fg); }
.btn-ink:hover { box-shadow: 0 3px 0 var(--dot); }
.btn-line { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-line:hover { background: var(--card); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 15px; }
.btn[disabled] { opacity: 0.6; cursor: progress; }

/* header */
.top { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.top-row { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.lockup { display: inline-flex; align-items: center; gap: 0.35em; font-family: var(--font-display); font-weight: 700; font-size: 26px; line-height: 1; color: var(--ink); text-decoration: none; }
.lockup img { width: 1.15em; height: auto; }
.lockup-sm { font-size: 22px; }
.top-nav { display: flex; gap: 22px; margin-left: auto; font-size: 15px; font-weight: 500; }
.top-nav a { color: var(--ink); text-decoration: none; padding-block: 6px; border-bottom: 2px solid transparent; }
.top-nav a:hover { border-bottom-color: var(--dot); }
@media (max-width: 760px) { .top-nav { display: none; } .top-row .btn { margin-left: auto; } }

/* hero */
.hero { background-color: var(--mist); background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 24px 24px; border-bottom: 1px solid var(--line); overflow: hidden; }
.hero-row { display: flex; flex-wrap: wrap; align-items: center; gap: 56px; }
.hero-text { flex: 1 1 400px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.hero h1 { font-size: clamp(40px, 5.6vw, 66px); letter-spacing: -0.01em; }
.lede { font-size: 20px; color: var(--ink-soft); }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-screen { flex: 0 1 552px; min-width: 0; margin: 0; position: relative; padding-top: 70px; display: flex; flex-direction: column; gap: 12px; }
.bit-perch { position: absolute; top: 0; right: 44px; width: 96px; z-index: 1; }
@media (prefers-reduced-motion: no-preference) {
  .bit-perch { animation: bob 2.4s steps(2, end) infinite; }
  @keyframes bob { 50% { transform: translateY(-6px); } }
}
.tv { background: var(--tv); border-radius: 18px; padding: 20px 20px 12px; box-shadow: inset 0 0 0 2px var(--tv-edge), 0 6px 0 rgba(43, 38, 48, 0.18); }
.tv-glass { position: relative; aspect-ratio: 256 / 224; border-radius: 6px; overflow: hidden; background: #000; }
.tv-glass .shot { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; }
.tv-glass .shot.is-on { opacity: 1; }
.tv-foot { display: flex; align-items: center; gap: 8px; padding-top: 10px; }
.led { width: 6px; height: 6px; background: var(--dot); }
.tv-name { font-family: var(--font-display); font-size: 13px; color: #C4B9BF; letter-spacing: 0.04em; }
.hero-screen figcaption { font-size: 13px; color: var(--ink-soft); text-align: center; }

/* steps */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 28px; }
.step { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.step-text { display: flex; flex-direction: column; gap: 8px; }
.step-text p { color: var(--ink-soft); font-size: 16px; }
.num { font-family: var(--font-display); font-weight: 700; font-size: 15px; width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; background: var(--btn-bg); color: var(--btn-fg); border-radius: 4px; }
.win { margin: 0; background: #16131A; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.win::before { content: ''; height: 22px; flex: none; background: radial-gradient(circle at 14px 11px, #5A4F57 3.5px, transparent 4.5px), radial-gradient(circle at 28px 11px, #5A4F57 3.5px, transparent 4.5px), radial-gradient(circle at 42px 11px, #5A4F57 3.5px, transparent 4.5px), #221E26; }
.win img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: left top; }
.steps .win img { aspect-ratio: 8 / 7; }
.win figcaption { font-size: 14px; color: #C4B9BF; padding: 10px 14px; border-top: 1px solid rgba(245, 239, 232, 0.1); }

/* features */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 18px; }
.feat { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 24px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.feat h3 { font-size: 21px; }
.feat p { color: var(--ink-soft); font-size: 16px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); gap: 18px; }
.gallery .win img { aspect-ratio: 16 / 11; }

/* hardware */
.hardware { background: #2B2630; color: #F5EFE8; }
.hw-row { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; }
.hw-text { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.hw-text p { color: #C4B9BF; }
.eyebrow-rev { color: #F49AB4; }
.specs { flex: 1 1 340px; min-width: 0; margin: 0; display: flex; flex-direction: column; border-top: 1px solid rgba(245, 239, 232, 0.14); }
.specs div { display: grid; grid-template-columns: 90px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid rgba(245, 239, 232, 0.14); }
.specs dt { font-family: var(--font-display); font-weight: 600; color: #F5EFE8; }
.specs dd { margin: 0; color: #C4B9BF; }

/* people */
.people-row { display: flex; flex-wrap: wrap; align-items: center; gap: 36px; }
.people-row > img { width: 112px; flex: none; }
.people-row .stack-sm { flex: 1 1 360px; min-width: 0; }
.people-row p { color: var(--ink-soft); font-size: 18px; }

/* beta form */
.beta-row { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; }
.beta-text { flex: 1 1 340px; min-width: 0; }
@media (min-width: 900px) { .beta-text { position: sticky; top: 96px; } }
.beta-text p { color: var(--ink-soft); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.waitlist { flex: 1 1 480px; min-width: 0; padding: 28px; display: flex; flex-direction: column; gap: 22px; }
.field { display: flex; flex-direction: column; gap: 8px; border: 0; margin: 0; padding: 0; min-width: 0; }
.field label, .field legend { font-weight: 600; font-size: 15px; padding: 0; }
.field legend { margin-bottom: 8px; }
.opt { font-weight: 400; color: var(--ink-soft); font-size: 13px; margin-left: 4px; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 16px; }
input[type="email"], input[type="text"], select { font: inherit; font-size: 16px; color: var(--ink); background: var(--paper); border: 1px solid color-mix(in srgb, var(--ink) 35%, transparent); border-radius: 8px; min-height: 46px; padding: 0 12px; width: 100%; }
input::placeholder { color: color-mix(in srgb, var(--ink-soft) 75%, transparent); }
input[aria-invalid="true"] { border-color: var(--bad); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips label { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; font-size: 15px; min-height: 40px; padding: 0 14px 0 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); cursor: pointer; }
.chips label:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.chips input, .check input { accent-color: var(--ink); width: 18px; height: 18px; margin: 0; }
.check { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 500; cursor: pointer; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.waitlist .btn { align-self: flex-start; }
.form-status { font-size: 15px; min-height: 1.5em; }
.form-status.is-error { color: var(--bad); }
.waitlist.is-done .field, .waitlist.is-done .field-row, .waitlist.is-done .check, .waitlist.is-done .btn, .waitlist.is-done .fine { display: none; }
.done-note { display: flex; align-items: center; gap: 18px; }
.done-note img { width: 80px; flex: none; }
.done-note > div { display: flex; flex-direction: column; gap: 6px; }
.form-status:empty { display: none; }

/* faq */
.faq { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: 14px; align-items: start; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 0 20px; }
.faq summary { cursor: pointer; font-weight: 600; padding: 18px 0; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-family: var(--font-display); font-size: 22px; line-height: 1; color: var(--ink-soft); }
.faq details[open] summary::after { content: '–'; }
.faq details p { padding-bottom: 18px; color: var(--ink-soft); font-size: 16px; }

/* legal notice and privacy policy (legal.html, privacy.html) */
.legal { padding-block: 64px 88px; }
.legal .wrap { max-width: 760px; display: flex; flex-direction: column; gap: 36px; }
.legal-head { display: flex; flex-direction: column; gap: 12px; }
.legal-head h1 { font-size: clamp(36px, 5vw, 48px); }
.legal-head p { color: var(--ink-soft); }
.legal section { display: flex; flex-direction: column; gap: 12px; scroll-margin-top: 88px; }
.legal h2 { font-size: 26px; }
.legal ul { margin: 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: 6px; max-width: 62ch; }
.legal .mono { overflow-wrap: anywhere; }
.legal .note { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px; }
.legal address { font-style: normal; }
[hidden] { display: none !important; }
/* the waitlist entry page (waitlist.html) */
.entry-facts { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.entry-facts > div { display: grid; grid-template-columns: minmax(0, 9em) minmax(0, 1fr); gap: 12px; }
.entry-facts dt { font-weight: 600; }
.entry-facts dd { margin: 0; overflow-wrap: anywhere; }
.entry-facts ul { padding-left: 1.1em; }
.entry-actions { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 520px) { .entry-facts > div { grid-template-columns: 1fr; gap: 2px; } }

/* footer */
.foot { border-top: 1px solid var(--line); }
.foot-row { padding-block: 40px 48px; display: grid; grid-template-columns: 1fr auto; gap: 24px 40px; align-items: start; }
.foot-brand { display: flex; flex-direction: column; gap: 8px; }
.foot-brand p { font-size: 14px; color: var(--ink-soft); }
.foot-nav { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 15px; }
.foot-nav a { color: var(--ink); }
.disclaimer { grid-column: 1 / -1; font-size: 13px; color: var(--ink-soft); max-width: none; }
@media (max-width: 600px) {
  main > section { padding-block: 64px; }
  main > .hero { padding-block: 56px 64px; }
  .foot-row { grid-template-columns: 1fr; }
  .waitlist { padding: 20px; }
  .bit-perch { width: 72px; right: 24px; }
  .hero-screen { padding-top: 52px; }
}

/* The launch phase (packages/server launch.ts fills <html data-phase>): elements marked
   data-phase-only="…" show only in the phases they list. */
html[data-phase="waitlist"] [data-phase-only]:not([data-phase-only~="waitlist"]),
html[data-phase="beta"] [data-phase-only]:not([data-phase-only~="beta"]),
html[data-phase="open"] [data-phase-only]:not([data-phase-only~="open"]) { display: none !important; }
