/* Layout concept: a dark display case. Every page is a set of case panels, and the e-ink label is the one light object on the page. */
:root {
  --bg: #0E0F1C;
  --surface: #181A2E;
  --surface-2: #23263F;
  --line: #2C2F4A;
  --fg: #F2F3FA;
  --muted: #A9ADC8;
  --cyan: #22D3EE;
  --cyan-text: #67E8F9;
  --indigo: #6366F1;
  --indigo-deep: #4338CA;
  --magenta: #D946EF;
  --magenta-soft: #F0A3F7;
  --paper: #E8E7E1;
  --ink: #111111;
  --bezel: #2B2D31;
  --font-display: 'Bricolage Grotesque', 'Avenir Next', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Figtree', 'Helvetica Neue', 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.3rem;
  --step-2: 1.7rem;
  --step-3: clamp(2rem, 4vw, 2.6rem);
  --step-4: clamp(2.5rem, 6.4vw, 4.4rem);
  --radius: 18px;
  --wrap: 1140px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--bg); }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.08; letter-spacing: -0.02em; text-wrap: balance; margin: 0; }
p { margin: 0; }
a { color: var(--cyan-text); }
a:hover { color: var(--fg); }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }
button { font-family: inherit; cursor: pointer; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.eyebrow { font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--cyan-text); }
.muted { color: var(--muted); }
.lede { font-size: var(--step-1); color: var(--muted); max-width: 40ch; line-height: 1.5; }
.prose { max-width: 65ch; display: flex; flex-direction: column; gap: 1.1rem; }

/* Header */
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 12px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--fg); font-family: var(--font-display); font-weight: 800; font-size: 1.35rem; letter-spacing: -0.02em; }
.brand .wordmark span { color: var(--cyan-text); }
.nav { display: flex; gap: 4px; overflow-x: auto; max-width: 100%; }
.nav a { text-decoration: none; color: var(--muted); font-weight: 600; font-size: 0.95rem; padding: 10px 14px; border-radius: 999px; white-space: nowrap; min-height: 44px; display: inline-flex; align-items: center; }
.nav a:hover { color: var(--fg); background: var(--surface); }
.nav a[aria-current="page"] { color: var(--bg); background: var(--cyan); }

main { padding-block: 0 72px; }
.view { display: flex; flex-direction: column; gap: 88px; padding-top: 56px; }
.section { display: flex; flex-direction: column; gap: 28px; }
.section-head { display: flex; flex-direction: column; gap: 12px; max-width: 60ch; }
.section-head h2 { font-size: var(--step-3); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 14px; font-weight: 700; font-size: 1rem; text-decoration: none; border: 1px solid transparent; }
.btn-primary { background: var(--magenta); color: var(--bg); }
.btn-primary:hover { color: var(--bg); filter: brightness(1.08); }
.btn-ghost { border-color: var(--line); color: var(--fg); background: transparent; }
.btn-ghost:hover { background: var(--surface); color: var(--fg); }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }

/* Hero */
.hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.hero h1 { font-size: var(--step-4); }
.hero h1 em { font-style: normal; color: var(--cyan-text); }
.hero-copy { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.demo { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 28px; display: flex; flex-direction: column; gap: 20px; align-items: stretch; min-width: 0; }
.demo-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }

/* The e-ink label */
.label { width: 100%; max-width: 340px; aspect-ratio: 300 / 146; background: var(--bezel); border-radius: 16px; padding: 11px; box-shadow: 0 10px 30px rgba(0,0,0,0.45); align-self: center; }
.label-screen { width: 100%; height: 100%; background: var(--paper); color: var(--ink); border-radius: 7px; padding: 8px 14px; display: flex; flex-direction: column; justify-content: space-between; }
.label-top { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 0.8rem; font-weight: 700; min-height: 1.2em; }
.label-top s { text-decoration-thickness: 2px; }
.label-price { font-family: var(--font-display); font-weight: 800; font-size: clamp(2.6rem, 9vw, 3.7rem); letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.label-foot { display: flex; justify-content: space-between; align-items: center; font-family: var(--font-mono); font-size: 0.8rem; }
.label-foot svg { width: 40px; height: 25px; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { min-height: 44px; padding: 0 16px; border-radius: 999px; font-weight: 700; font-size: 0.95rem; border: 1px solid var(--line); background: var(--surface-2); color: var(--fg); }
.chip[aria-pressed="true"] { background: var(--cyan); border-color: var(--cyan); color: var(--bg); }
.demo-status { font-size: 0.95rem; color: var(--muted); min-height: 3em; }
.demo-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }

/* Cards and grids */
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.panel h3 { font-size: var(--step-1); }
.panel p { color: var(--muted); }
.step-no { font-family: var(--font-mono); font-weight: 700; color: var(--cyan-text); font-size: 0.85rem; letter-spacing: 0.1em; }
.icon { width: 28px; height: 28px; color: var(--cyan-text); }

.band { background: var(--indigo-deep); border-radius: 24px; padding: 40px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 32px; align-items: center; }
.band h2 { font-size: var(--step-3); color: #FFFFFF; }
.band p { color: #E0E3FF; }
.band .btn-primary { background: var(--fg); color: var(--indigo-deep); }

.markets { display: flex; flex-wrap: wrap; gap: 10px; }
.markets span { border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; color: var(--muted); font-weight: 600; }
.markets span.first { border-color: var(--cyan); color: var(--cyan-text); }

/* Story */
.story-hero { display: flex; flex-direction: column; gap: 20px; max-width: 760px; }
.story-hero h1 { font-size: var(--step-4); }
.compare { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.compare table { width: 100%; border-collapse: collapse; min-width: 560px; }
.compare th, .compare td { text-align: left; padding: 16px 20px; border-bottom: 1px solid var(--line); vertical-align: top; }
.compare tr:last-child td { border-bottom: 0; }
.compare thead th { font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); background: var(--surface); }
.compare td:first-child { font-weight: 700; }
.compare td.good { color: var(--cyan-text); }
.timeline { display: flex; flex-direction: column; gap: 0; border-left: 2px solid var(--line); margin-left: 8px; }
.timeline li { list-style: none; position: relative; padding: 0 0 28px 28px; }
.timeline li::before { content: ""; position: absolute; left: -9px; top: 6px; width: 16px; height: 16px; border-radius: 50%; background: var(--bg); border: 3px solid var(--cyan); }
.timeline li:last-child { padding-bottom: 0; }
.timeline h3 { font-size: var(--step-1); margin-bottom: 6px; }
.timeline p { color: var(--muted); max-width: 60ch; }
.timeline { padding: 0; margin-block: 0; }
blockquote { margin: 0; padding: 28px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); font-family: var(--font-display); font-size: var(--step-2); line-height: 1.25; letter-spacing: -0.01em; }

/* App mockups */
.phones { display: flex; gap: 28px; flex-wrap: wrap; justify-content: center; }
.phone-col { display: flex; flex-direction: column; gap: 14px; align-items: center; width: 290px; max-width: 100%; }
.phone { width: 100%; max-width: 290px; border-radius: 40px; background: #05060D; padding: 10px; box-shadow: 0 20px 50px rgba(0,0,0,0.5); }
.screen { border-radius: 31px; background: var(--bg); min-height: 560px; padding: 22px 16px 18px; display: flex; flex-direction: column; gap: 12px; overflow: hidden; }
.screen-title { font-family: var(--font-display); font-weight: 800; font-size: 1.45rem; letter-spacing: -0.02em; }
.screen-sub { font-size: 0.82rem; color: var(--muted); }
.row { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; gap: 10px; align-items: center; background: var(--surface); border-radius: 12px; padding: 10px; }
.row .lbl { font-family: var(--font-mono); font-size: 0.72rem; color: var(--cyan-text); background: var(--surface-2); border-radius: 8px; padding: 6px 0; text-align: center; }
.row .name { font-size: 0.88rem; font-weight: 600; line-height: 1.25; min-width: 0; }
.row .name small { display: block; color: var(--muted); font-weight: 500; font-size: 0.74rem; }
.row .price { font-family: var(--font-mono); font-weight: 700; font-size: 0.88rem; font-variant-numeric: tabular-nums; }
.pill { font-family: var(--font-mono); font-size: 0.68rem; border-radius: 999px; padding: 2px 8px; display: inline-block; margin-top: 2px; }
.pill-ok { background: rgba(34, 211, 238, 0.15); color: var(--cyan-text); }
.pill-warn { background: rgba(217, 70, 239, 0.18); color: var(--magenta-soft); }
.search { background: var(--surface); border-radius: 12px; padding: 10px 12px; color: var(--muted); font-size: 0.85rem; display: flex; gap: 8px; align-items: center; }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.tile { background: var(--surface); border-radius: 12px; padding: 10px 12px; }
.tile span { display: block; font-size: 0.74rem; color: var(--muted); }
.tile strong { font-family: var(--font-display); font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.tile.floor strong { color: var(--magenta-soft); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 0.8rem; color: var(--muted); font-weight: 600; }
.field-row { display: flex; gap: 8px; }
.field input { flex: 1 1 auto; min-width: 0; min-height: 46px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); color: var(--fg); font-family: var(--font-mono); font-size: 1.05rem; padding: 0 12px; }
.save { min-height: 46px; padding: 0 16px; border-radius: 12px; border: 0; background: var(--cyan); color: var(--bg); font-weight: 800; }
.toast { font-size: 0.82rem; color: var(--cyan-text); min-height: 1.3em; }
.mini-label { width: 100%; aspect-ratio: 300 / 146; background: var(--bezel); border-radius: 12px; padding: 8px; }
.mini-label .label-screen { padding: 6px 10px; }
.mini-label .label-price { font-size: 2.3rem; }
.mini-label .label-top, .mini-label .label-foot { font-size: 0.66rem; }
.mini-label .label-foot svg { width: 30px; height: 19px; }
.hh-big { background: var(--surface); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.hh-pcts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.hh-pcts span { text-align: center; border-radius: 10px; padding: 10px 0; background: var(--surface-2); font-weight: 700; font-size: 0.9rem; }
.hh-pcts span.on { background: var(--cyan); color: var(--bg); }
.hh-start { border-radius: 14px; background: var(--magenta); color: var(--bg); text-align: center; font-weight: 800; padding: 14px; }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 0.85rem; color: var(--muted); }
.check b { color: var(--fg); }
.caption { font-size: 0.9rem; color: var(--muted); text-align: center; max-width: 30ch; }

/* Setup */
.steps { display: flex; flex-direction: column; gap: 16px; counter-reset: s; padding: 0; margin: 0; }
.steps > li { list-style: none; display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.steps > li::before { counter-increment: s; content: counter(s); font-family: var(--font-display); font-weight: 800; font-size: 1.6rem; width: 56px; height: 56px; border-radius: 16px; display: flex; align-items: center; justify-content: center; background: var(--surface-2); color: var(--cyan-text); }
.steps h3 { font-size: var(--step-1); margin-bottom: 6px; }
.steps p, .steps li li { color: var(--muted); }
.steps ul { margin: 8px 0 0; padding-left: 1.1rem; display: flex; flex-direction: column; gap: 4px; }
.note { border: 1px dashed var(--line); border-radius: var(--radius); padding: 18px 22px; color: var(--muted); }
.note strong { color: var(--fg); }
details { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 0 20px; }
details + details { margin-top: 10px; }
summary { cursor: pointer; font-weight: 700; padding: 16px 0; min-height: 44px; }
details p { color: var(--muted); padding-bottom: 18px; max-width: 65ch; }
kbd { font-family: var(--font-mono); font-size: 0.85em; background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; color: var(--fg); }

/* Pricing */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: stretch; }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 28px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.plan.featured { border-color: var(--cyan); box-shadow: 0 0 0 1px var(--cyan) inset; }
.plan h3 { font-size: var(--step-2); }
.plan .for { color: var(--muted); }
.plan .price { font-family: var(--font-display); font-weight: 800; font-size: 2rem; letter-spacing: -0.02em; }
.plan .price small { font-family: var(--font-body); font-size: 0.95rem; font-weight: 500; color: var(--muted); }
.plan ul { margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.plan li { list-style: none; display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 8px; color: var(--fg); font-size: 0.97rem; }
.plan li svg { width: 18px; height: 18px; margin-top: 4px; color: var(--cyan-text); }
.plan .tag { align-self: flex-start; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; background: var(--cyan); color: var(--bg); padding: 4px 10px; border-radius: 999px; font-weight: 700; }
.hardware { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }

/* Trays */
.tray-teaser { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 32px; }
.mini-tray { background: #1B1D2E; border: 2px solid #34385A; border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.mini-tray-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.mini-tray-row span { display: flex; flex-direction: column; gap: 4px; font-family: var(--font-display); font-weight: 800; font-size: clamp(0.62rem, 1.8vw, 0.95rem); line-height: 1.6; text-align: center; color: var(--ink); font-variant-numeric: tabular-nums; border-radius: 4px; background-image: linear-gradient(to top, var(--paper) 0 1.6em, transparent 1.6em); }
.mini-tray-row span::before { content: ""; display: block; aspect-ratio: 3 / 4; border-radius: 4px; background: var(--indigo); border: 3px solid #D9DCE6; }
.renders { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.render { margin: 0; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.render img { width: 100%; max-width: 100%; height: auto; display: block; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
.render figcaption { font-size: 0.9rem; color: var(--muted); }
@media (max-width: 900px) { .renders { grid-template-columns: minmax(0, 1fr); } .render:not(.render-main) { max-width: 420px; } }
.tray-demo { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.tray { background: #1B1D2E; border: 2px solid #34385A; border-radius: 18px; padding: 16px; display: flex; flex-direction: column; gap: 12px; min-width: 0; box-shadow: 0 24px 50px rgba(0,0,0,0.45); }
.tray-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.slot { display: flex; flex-direction: column; gap: 6px; align-items: stretch; background: transparent; border: 0; padding: 4px; border-radius: 10px; color: inherit; min-width: 0; }
.slot[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--cyan); }
.slot-card { aspect-ratio: 3 / 4; background: #D9DCE6; border-radius: 5px; padding: 4px; display: flex; flex-direction: column; gap: 3px; }
.slot-card b { height: 10px; background: #FFFFFF; border-radius: 2px; }
.slot-card i { flex: 1 1 auto; border-radius: 3px; }
.slot-label { background: var(--bezel); border-radius: 6px; padding: 3px; }
.slot-label span { display: block; background: var(--paper); color: var(--ink); border-radius: 3px; text-align: center; font-family: var(--font-display); font-weight: 800; font-size: clamp(0.66rem, 2.2vw, 1rem); padding: 2px 0; font-variant-numeric: tabular-nums; }
.slot-id { font-family: var(--font-mono); font-size: 0.72rem; color: #8C90AE; text-align: center; }
.slot[aria-pressed="true"] .slot-id { color: var(--cyan-text); }
.tray-sel { display: flex; align-items: center; gap: 14px; }
.tray-sel strong { font-family: var(--font-display); font-size: 3rem; color: var(--cyan-text); line-height: 1; }
@media (max-width: 900px) { .tray-teaser, .tray-demo { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) { .tray-teaser { padding: 20px; } .tray { padding: 10px; } .tray-row { gap: 4px; } .slot { padding: 2px; } }

.site-footer { border-top: 1px solid var(--line); }
.site-footer .wrap { padding-block: 32px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: 0.9rem; }

@media (max-width: 900px) {
  .hero, .grid-3, .plans, .hardware { grid-template-columns: minmax(0, 1fr); }
  .band { grid-template-columns: minmax(0, 1fr); padding: 28px; }
}
@media (max-width: 640px) {
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .view { gap: 64px; padding-top: 36px; }
  .demo { padding: 20px; }
  .steps > li { grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 20px; }
}

/* Privacy policy and other long text */
.prose h2 { font-size: var(--step-2); margin-top: 1rem; }
.prose ul { margin: 0; padding-left: 1.2rem; display: flex; flex-direction: column; gap: 8px; color: var(--muted); }
.prose ul strong { color: var(--fg); }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-links a { color: inherit; }
