/* Layout: a rack elevation. The hero is a live rack of real phones answering one tap;
   everything below reads like an equipment spec sheet on brushed aluminum, tagged with label-maker tape. */
:root {
  --bg: #e7eaed;          /* brushed aluminum */
  --surface: #f4f6f7;
  --ink: #142029;         /* navy ink */
  --muted: #4f5d69;
  --line: #c4cbd2;
  --tape: #ffc93a;        /* label-maker tape */
  --tape-ink: #1b1a10;
  --led: #1f9d55;
  --warn: #c2410c;
  --rack: #232b32;
  --rack-edge: #11171c;
  --rack-label: #8d9aa6;
  --bezel: #0b0e10;
  --code-bg: #182128;
  --code-fg: #dde5ea;
  --btn-bg: #142029;
  --btn-fg: #f4f6f7;
  --font-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Hanken Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111519; --surface: #192026; --ink: #e3e8ec; --muted: #97a4b0; --line: #2c353d;
    --tape: #f4bf2a; --tape-ink: #1b1a10; --led: #3ed182; --warn: #fb923c;
    --rack: #1b2228; --rack-edge: #070a0c; --rack-label: #7d8a96; --bezel: #050708;
    --code-bg: #0b1014; --code-fg: #dde5ea; --btn-bg: #e3e8ec; --btn-fg: #111519;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #111519; --surface: #192026; --ink: #e3e8ec; --muted: #97a4b0; --line: #2c353d;
  --tape: #f4bf2a; --tape-ink: #1b1a10; --led: #3ed182; --warn: #fb923c;
  --rack: #1b2228; --rack-edge: #070a0c; --rack-label: #7d8a96; --bezel: #050708;
  --code-bg: #0b1014; --code-fg: #dde5ea; --btn-bg: #e3e8ec; --btn-fg: #111519;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  padding-inline: clamp(16px, 4vw, 48px);
  padding-block: 0;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 1180px; margin-inline: auto; }
h1, h2, h3 { font-family: var(--font-display); text-wrap: balance; margin: 0; line-height: 1.05; }
h2 { font-size: clamp(1.9rem, 4.2vw, 2.9rem); font-weight: 800; font-stretch: 110%; letter-spacing: -0.015em; }
h3 { font-size: 1.15rem; font-weight: 700; font-stretch: 104%; line-height: 1.25; }
p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--tape); outline-offset: 3px; border-radius: 4px; }

.mono { font-family: var(--font-mono); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tape {
  display: inline-block;
  background: var(--tape);
  color: var(--tape-ink);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 9px 2px;
  border-radius: 2px;
  transform: rotate(-0.6deg);
}
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
/* Placeholder values the team still has to fill in */
.tbd {
  font-family: var(--font-mono);
  font-size: 0.86em;
  background: color-mix(in srgb, var(--tape) 30%, transparent);
  border: 1px dashed color-mix(in srgb, var(--tape-ink) 35%, var(--tape));
  border-radius: 3px;
  padding: 0 4px;
  white-space: nowrap;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body); font-weight: 600; font-size: 1rem;
  text-decoration: none; border-radius: 8px; padding: 13px 22px;
  border: 1.5px solid transparent; cursor: pointer; transition: transform .15s ease, background .15s ease;
}
.btn-primary { background: var(--btn-bg); color: var(--btn-fg); }
.btn-primary:hover { transform: translateY(-1px); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--ink); }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  margin-inline: calc(-1 * clamp(16px, 4vw, 48px));
  padding-inline: clamp(16px, 4vw, 48px);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--font-display); font-weight: 800; font-stretch: 118%; font-size: 1.2rem; letter-spacing: -0.01em; }
.brand svg { width: 26px; height: 22px; }
.nav-links { display: flex; align-items: center; gap: 26px; font-size: 0.95rem; }
.nav-links a { text-decoration: none; color: var(--muted); }
.nav-links a:hover { color: var(--ink); }
.nav-links .btn { padding: 9px 16px; font-size: 0.92rem; color: var(--btn-fg); }
@media (max-width: 760px) { .nav-links a:not(.btn) { display: none; } }

/* ---------- Hero ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr); gap: clamp(32px, 5vw, 64px); align-items: center; padding-block: clamp(48px, 7vw, 96px) clamp(48px, 6vw, 80px); }
.hero-copy { display: flex; flex-direction: column; gap: 22px; align-items: flex-start; }
.hero h1 { font-size: clamp(2.7rem, 6.2vw, 4.9rem); font-weight: 850; font-stretch: 112%; letter-spacing: -0.025em; line-height: 0.98; }
.hero .sub { font-size: 1.15rem; color: var(--muted); max-width: 33em; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.micro { font-size: 0.88rem; color: var(--muted); }
@media (max-width: 960px) { .hero { grid-template-columns: minmax(0, 1fr); } }

/* Rack illustration */
.rack-fig { margin: 0; display: flex; flex-direction: column; gap: 12px; }
.rack {
  position: relative;
  background: var(--rack);
  border: 1px solid var(--rack-edge);
  border-radius: 14px;
  padding: 16px 34px 18px;
  box-shadow: 0 30px 60px -30px rgba(10, 16, 22, .55), inset 0 1px 0 rgba(255,255,255,.06);
}
.rack::before, .rack::after {
  content: ""; position: absolute; top: 14px; bottom: 14px; width: 12px;
  background: radial-gradient(circle, var(--rack-edge) 0 2.4px, transparent 2.8px) center / 12px 16px repeat-y;
  border-radius: 3px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.05);
}
.rack::before { left: 11px; }
.rack::after { right: 11px; }
.rack-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: .08em; color: var(--rack-label); text-transform: uppercase; margin-bottom: 14px; }
.rack-head .online { display: inline-flex; align-items: center; gap: 7px; }
.led { width: 7px; height: 7px; border-radius: 50%; background: var(--led); box-shadow: 0 0 8px var(--led); flex: none; }
.rack-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px 10px; }
.slot { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.phone { width: 100%; aspect-ratio: 9 / 19; background: var(--bezel); border-radius: 10px; padding: 3px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.screen { position: relative; height: 100%; border-radius: 7px; overflow: hidden; background: #0f1418; }
.screen::before { /* status bar */
  content: ""; position: absolute; inset: 4px 6px auto; height: 3px; z-index: 2;
  background: linear-gradient(90deg, rgba(255,255,255,.55) 0 22%, transparent 22% 70%, rgba(255,255,255,.55) 70% 100%);
  border-radius: 2px; opacity: .7;
}
.pages { height: 200%; display: flex; flex-direction: column; animation: swap 5.2s ease-in-out infinite; animation-delay: calc(var(--i) * 70ms + 700ms); }
.pg { flex: 1; background-repeat: no-repeat; }
.pg.a {
  background-image:
    linear-gradient(hsl(var(--h) 52% 46%), hsl(var(--h) 52% 46%)),
    linear-gradient(rgba(255,255,255,.75), rgba(255,255,255,.75)),
    linear-gradient(rgba(255,255,255,.35), rgba(255,255,255,.35)),
    linear-gradient(rgba(255,255,255,.35), rgba(255,255,255,.35)),
    linear-gradient(hsl(var(--h) 70% 62%), hsl(var(--h) 70% 62%));
  background-size: 100% 36%, 62% 5%, 80% 3.5%, 54% 3.5%, 76% 11%;
  background-position: 0 14%, 50% 56%, 50% 65%, 50% 71.5%, 50% 86%;
}
.pg.b {
  background-image:
    radial-gradient(circle at 50% 38%, #3ed182 0 13%, transparent 13.5%),
    linear-gradient(rgba(255,255,255,.7), rgba(255,255,255,.7)),
    linear-gradient(rgba(255,255,255,.3), rgba(255,255,255,.3));
  background-size: 100% 100%, 58% 5%, 74% 3.5%;
  background-position: 0 0, 50% 62%, 50% 71%;
}
.tap {
  position: absolute; left: 50%; top: 43%; width: 34%; aspect-ratio: 1; border-radius: 50%;
  background: rgba(255,255,255,.85); opacity: 0; transform: translate(-50%, -50%) scale(.2);
  animation: tap 5.2s ease-out infinite; animation-delay: calc(var(--i) * 70ms + 700ms);
}
.slot-id { font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: .06em; color: var(--rack-label); }
.rack-cap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted); }
@keyframes tap {
  0%, 9% { opacity: 0; transform: translate(-50%, -50%) scale(.2); }
  11% { opacity: .9; transform: translate(-50%, -50%) scale(.35); }
  22% { opacity: 0; transform: translate(-50%, -50%) scale(1.7); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.7); }
}
@keyframes swap {
  0%, 14% { transform: translateY(0); }
  21%, 82% { transform: translateY(-50%); }
  90%, 100% { transform: translateY(0); }
}
@media (max-width: 560px) {
  .rack-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .slot:nth-child(n+9) { display: none; }
  .rack { padding-inline: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  .pages, .tap { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Fact strip ---------- */
.facts { list-style: none; margin: 0; display: flex; flex-wrap: wrap; gap: 10px 28px; padding-block: 18px; border-block: 1px solid var(--line); font-family: var(--font-mono); font-size: 0.82rem; color: var(--muted); }
.facts li { display: inline-flex; align-items: center; gap: 8px; }
.facts li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--led); }

/* ---------- Sections ---------- */
.section { padding-block: clamp(64px, 9vw, 112px); }
.section + .section { border-top: 1px solid var(--line); }
.section-head { display: flex; flex-direction: column; gap: 14px; max-width: 40rem; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head p { color: var(--muted); font-size: 1.08rem; }

/* Problem */
.problem { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); align-items: start; }
.problem .copy { display: flex; flex-direction: column; gap: 18px; max-width: 34rem; }
.problem .copy p { color: var(--muted); }
.problem .copy strong { color: var(--ink); }
.log { background: var(--code-bg); color: var(--code-fg); border-radius: 12px; padding: 20px 22px; font-family: var(--font-mono); font-size: 0.84rem; line-height: 1.75; min-width: 0; overflow-x: auto; }
.log-title { color: #8d9aa6; font-size: 0.72rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 10px; }
.log ol { list-style: none; margin: 0; padding: 0; }
.log li { display: grid; grid-template-columns: 4.2em 3.2em minmax(0, 1fr); gap: 10px; }
.log .t { color: #8d9aa6; }
.log .s { color: #ffc93a; }
.log .bad { color: #fb923c; }
@media (max-width: 860px) { .problem { grid-template-columns: minmax(0, 1fr); } }

/* Benefits: spec list */
.spec { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(32px, 6vw, 80px); align-items: start; }
.spec .section-head { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 90px); margin-bottom: 0; }
.spec-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.spec-list li { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr); gap: 8px 24px; padding-block: 26px; border-top: 1px solid var(--line); }
.spec-list li:last-child { border-bottom: 1px solid var(--line); }
.spec-list .tape { align-self: start; justify-self: start; margin-top: 2px; }
.spec-list .body { display: flex; flex-direction: column; gap: 8px; }
.spec-list p { color: var(--muted); }
@media (max-width: 860px) {
  .spec { grid-template-columns: minmax(0, 1fr); }
  .spec .section-head { position: static; }
}
@media (max-width: 520px) { .spec-list li { grid-template-columns: minmax(0, 1fr); } }

/* How it works */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 36px); counter-reset: step; }
.steps li { display: flex; flex-direction: column; gap: 10px; counter-increment: step; }
.steps li::before {
  content: counter(step);
  font-family: var(--font-display); font-weight: 850; font-stretch: 120%; font-size: 2.6rem; line-height: 1;
  color: var(--ink); padding-bottom: 12px; border-bottom: 3px solid var(--tape); align-self: stretch;
}
.steps p { color: var(--muted); }
@media (max-width: 760px) { .steps { grid-template-columns: minmax(0, 1fr); } }
.api { margin-top: clamp(36px, 5vw, 56px); display: grid; grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr); gap: clamp(24px, 4vw, 48px); align-items: center; }
.api .copy { display: flex; flex-direction: column; gap: 12px; }
.api .copy p { color: var(--muted); }
.code { background: var(--code-bg); color: var(--code-fg); border-radius: 12px; padding: 20px 22px; font-family: var(--font-mono); font-size: 0.82rem; line-height: 1.7; overflow-x: auto; min-width: 0; margin: 0; }
.code .c { color: #7f8c97; }
.code .k { color: #ffc93a; }
.code .ok { color: #3ed182; }
@media (max-width: 860px) { .api { grid-template-columns: minmax(0, 1fr); } }

/* Audiences */
.audiences { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.aud { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 26px; display: flex; flex-direction: column; gap: 8px; }
.aud p { color: var(--muted); }
@media (max-width: 700px) { .audiences { grid-template-columns: minmax(0, 1fr); } }

/* Comparison */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
table { width: 100%; min-width: 620px; border-collapse: collapse; font-size: 0.97rem; }
th, td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
thead th { font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
thead th.us { color: var(--ink); }
td.us, th.us { background: color-mix(in srgb, var(--tape) 14%, transparent); }
thead th.us { box-shadow: inset 0 3px 0 var(--tape); }
.y, .n, .m { display: inline-flex; align-items: center; gap: 8px; }
.y::before, .n::before, .m::before { content: ""; width: 8px; height: 8px; border-radius: 50%; flex: none; }
.y::before { background: var(--led); }
.n::before { background: transparent; border: 1.5px solid var(--muted); }
.m::before { background: linear-gradient(90deg, var(--muted) 50%, transparent 50%); border: 1.5px solid var(--muted); }

/* Pricing + self-hosted */
.plans { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 16px; }
.plan { border-radius: 14px; padding: clamp(24px, 4vw, 40px); display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.plan.main { background: var(--surface); border: 1px solid var(--line); }
.plan.later { border: 1.5px dashed var(--line); }
.price { font-family: var(--font-display); font-weight: 850; font-stretch: 115%; font-size: clamp(2.6rem, 6vw, 3.8rem); line-height: 1; letter-spacing: -0.02em; }
.price small { font-family: var(--font-body); font-weight: 500; font-size: 1rem; color: var(--muted); letter-spacing: 0; }
.plan ul { margin: 0; padding-left: 1.1em; color: var(--muted); display: flex; flex-direction: column; gap: 6px; }
.plan > p { color: var(--muted); }
@media (max-width: 820px) { .plans { grid-template-columns: minmax(0, 1fr); } }

/* FAQ */
.faq { max-width: 52rem; display: flex; flex-direction: column; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-block: 20px; font-family: var(--font-display); font-weight: 700; font-stretch: 104%; font-size: 1.1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--font-mono); font-size: 1.3rem; color: var(--muted); transition: transform .2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); padding-bottom: 22px; max-width: 44rem; }

/* Reserve */
.reserve { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 72px); align-items: start; }
.reserve .copy { display: flex; flex-direction: column; gap: 16px; }
.reserve .copy p { color: var(--muted); font-size: 1.08rem; }
form { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: clamp(22px, 3.5vw, 32px); display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
label { font-size: 0.9rem; font-weight: 600; }
input, select {
  font: inherit; font-size: 1rem; color: var(--ink); background: var(--bg);
  border: 1.5px solid var(--line); border-radius: 8px; padding: 11px 12px; width: 100%;
}
input:focus, select:focus { outline: none; border-color: var(--ink); }
.form-note { font-size: 0.9rem; color: var(--muted); }
.form-msg { font-size: 0.92rem; border-left: 3px solid var(--tape); padding: 8px 12px; background: var(--bg); border-radius: 0 6px 6px 0; }
@media (max-width: 860px) { .reserve { grid-template-columns: minmax(0, 1fr); } }

/* Footer */
footer { border-top: 1px solid var(--line); padding-block: 32px 48px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; font-size: 0.9rem; color: var(--muted); }
footer nav { display: flex; flex-wrap: wrap; gap: 20px; }
footer a { text-decoration: none; }
footer a:hover { color: var(--ink); }

/* ---------- Production additions ---------- */
.skip { position: absolute; left: -9999px; top: 8px; z-index: 50; background: var(--btn-bg); color: var(--btn-fg); padding: 10px 14px; border-radius: 6px; }
.skip:focus { left: 16px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.btn[disabled] { opacity: .6; cursor: progress; transform: none; }
.form-msg.ok { border-left-color: var(--led); }
.form-msg.err { border-left-color: var(--warn); }
.consent { font-size: 0.85rem; color: var(--muted); }
.consent a { color: var(--ink); }

/* Legal / secondary pages */
.doc { max-width: 46rem; padding-block: clamp(48px, 7vw, 88px); display: flex; flex-direction: column; gap: 18px; }
.doc h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); font-weight: 850; font-stretch: 110%; letter-spacing: -0.02em; }
.doc h2 { font-size: 1.35rem; font-stretch: 104%; margin-top: 18px; }
.doc p, .doc li { color: var(--muted); }
.doc ul { margin: 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: 6px; }
.doc .updated { font-family: var(--font-mono); font-size: 0.8rem; color: var(--muted); }
.notfound { min-height: 60vh; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 18px; padding-block: 64px; }
.notfound h1 { font-size: clamp(2.6rem, 7vw, 4.4rem); font-weight: 850; font-stretch: 112%; letter-spacing: -0.02em; }
