/* QuiRQ's website: the app's own night-time palette -- the scope's deep
   navy, its green trace, the waterfall's ramp, and the app's purple. */
:root {
  --bg: #05070d;
  --bg-2: #0b0f1a;
  --panel: #12172a;
  --line: rgba(255, 255, 255, 0.08);
  --text: #e8ebf4;
  --muted: #9aa3bd;
  --green: #3ddc97;
  --cyan: #0090c0;
  --purple: #b9a3ff;
  --amber: #e8d020;
  --red: #e8503a;
  --radius: 16px;
  --max: 1160px;
  --head: 'Space Grotesk', system-ui, sans-serif;
  --body: 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--purple); }
a:hover { color: #d4c7ff; }
img { max-width: 100%; height: auto; display: block; }

h1, h2, h3 { font-family: var(--head); line-height: 1.1; margin: 0 0 0.5em; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.8rem); letter-spacing: -0.01em; }
h3 { font-size: 1.15rem; }

section { padding: clamp(64px, 9vw, 120px) 20px; }
section > * { max-width: var(--max); margin-left: auto; margin-right: auto; }
.section-lede { color: var(--muted); font-size: 1.1rem; margin-top: -0.2em; margin-bottom: 2.5rem; }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--panel); padding: 8px 12px; border-radius: 8px; }

/* --- Navigation --- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px clamp(16px, 4vw, 40px);
  background: linear-gradient(to bottom, rgba(5, 7, 13, 0.85), rgba(5, 7, 13, 0));
  backdrop-filter: blur(6px);
}
.nav nav { display: flex; align-items: center; gap: clamp(10px, 2.5vw, 28px); }
.nav nav a { color: var(--text); text-decoration: none; font-weight: 500; font-size: 0.95rem; }
.nav nav a:not(.button):hover { color: var(--green); }
@media (max-width: 720px) { .nav nav a:not(.button) { display: none; } }

.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font: 700 1.4rem var(--head); color: var(--text); text-decoration: none;
  letter-spacing: -0.02em;
}
.brand .rq { color: var(--green); }
.brand.small { font-size: 1.1rem; }
.brand-mark {
  width: 22px; height: 22px; border-radius: 6px;
  background:
    linear-gradient(180deg, transparent 55%, rgba(61, 220, 151, 0.35) 55%),
    repeating-linear-gradient(90deg, var(--green) 0 2px, transparent 2px 5px);
  box-shadow: 0 0 18px rgba(61, 220, 151, 0.5);
}

/* --- Buttons --- */
.button {
  display: inline-block; cursor: pointer; border: 0;
  padding: 14px 26px; border-radius: 999px;
  font: 600 1rem var(--body); text-decoration: none;
  color: #04110b; background: var(--green);
  box-shadow: 0 0 0 1px rgba(61, 220, 151, 0.6), 0 8px 30px rgba(61, 220, 151, 0.25);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}
.button:hover { color: #04110b; transform: translateY(-1px); box-shadow: 0 0 0 1px var(--green), 0 10px 40px rgba(61, 220, 151, 0.4); }
.button.ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25); }
.button.ghost:hover { color: var(--text); box-shadow: inset 0 0 0 1px var(--purple); }
.button.small { padding: 8px 16px; font-size: 0.9rem; }
.button.wide { width: 100%; margin-top: 8px; }
.button:disabled { opacity: 0.6; cursor: progress; transform: none; }

/* --- Hero --- */
.hero > * { max-width: none; }
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: grid; place-items: center; overflow: hidden; padding: 25vh 20px 80px;
}
#waterfall { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-shade {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 50% 48%, rgba(5, 7, 13, 0.78) 0, rgba(5, 7, 13, 0.45) 45%, rgba(5, 7, 13, 0.25) 75%),
    linear-gradient(to bottom, rgba(5, 7, 13, 0) 60%, var(--bg) 99%);
}
.hero-inner { position: relative; text-align: center; max-width: 860px !important; }
.hero h1 { font-size: clamp(2.8rem, 8vw, 5.6rem); letter-spacing: -0.03em; }
.glow {
  background: linear-gradient(90deg, var(--green), #7ff0c4 40%, var(--purple));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 24px rgba(61, 220, 151, 0.35));
}
.lede { font-size: clamp(1.05rem, 2vw, 1.3rem); color: #c8cee0; max-width: 640px; margin: 0 auto 2rem; }
.cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font: 500 0.85rem var(--mono); letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--green); background: rgba(61, 220, 151, 0.08);
  padding: 6px 14px; border-radius: 999px; border: 1px solid rgba(61, 220, 151, 0.25);
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); animation: pulse 1.8s infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(61, 220, 151, 0.6); } 50% { box-shadow: 0 0 0 7px rgba(61, 220, 151, 0); } }
@media (prefers-reduced-motion: reduce) { .dot { animation: none; } }

.tuned { margin-top: 2.6rem; display: inline-flex; align-items: baseline; gap: 8px; font-family: var(--mono); color: #fff; }
.readout { font-size: clamp(1.6rem, 3.4vw, 2.4rem); font-weight: 700; text-shadow: 0 0 20px rgba(255, 255, 255, 0.25); }
.unit { color: var(--muted); }
.mode { margin-left: 14px; font-size: 0.85rem; color: var(--green); border: 1px solid rgba(61, 220, 151, 0.4); padding: 2px 8px; border-radius: 6px; }

/* --- Radios strip --- */
.radios { padding: 28px 20px; border-block: 1px solid var(--line); background: var(--bg-2); }
.radios { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px 22px; }
.radios p { margin: 0; color: var(--muted); font: 500 0.8rem var(--mono); text-transform: uppercase; letter-spacing: 0.12em; }
.radios ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 26px; justify-content: center; }
.radios li { font: 600 1.05rem var(--head); color: #dfe4f2; }
.radios li.more { color: var(--muted); font-weight: 500; font-style: italic; }
.radios ul + p { margin-left: 18px; }

/* --- Status labels: what's been tried (TODO.md, "honest claims") --- */
.pill {
  display: inline-block; vertical-align: middle;
  font: 600 0.72rem var(--mono); letter-spacing: 0.06em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 999px; border: 1px solid; white-space: nowrap;
}
.pill.today { color: var(--green); border-color: rgba(61, 220, 151, 0.45); background: rgba(61, 220, 151, 0.08); }
.pill.inbeta { color: var(--purple); border-color: rgba(185, 163, 255, 0.45); background: rgba(185, 163, 255, 0.08); }
.pill.coming { color: var(--muted); border-color: rgba(154, 163, 189, 0.35); }
.card .pill { position: absolute; top: 22px; right: 22px; }
.radios ul.later li { color: var(--muted); font-weight: 500; }

/* --- Where it runs --- */
.where { list-style: none; padding: 0; margin: 28px auto 0; display: grid; gap: 10px; }
.where .pill { justify-self: start; }
.where li {
  display: grid; grid-template-columns: 96px minmax(180px, 280px) 1fr; gap: 14px; align-items: center;
  padding: 14px 18px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line);
}
.where li strong { font-family: var(--head); }
.where li span:last-child { color: var(--muted); }
@media (max-width: 720px) { .where li { grid-template-columns: 1fr; gap: 4px; } .where .pill { justify-self: start; } }

/* --- Features --- */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.card {
  position: relative; padding: 26px; border-radius: var(--radius);
  background: linear-gradient(160deg, var(--panel), var(--bg-2));
  border: 1px solid var(--line); overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.card::after {
  content: ''; position: absolute; inset: auto -40% -60% auto; width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(61, 220, 151, 0.12), transparent 65%);
  transition: opacity 0.3s; opacity: 0;
}
.card:hover { transform: translateY(-3px); border-color: rgba(61, 220, 151, 0.35); }
.card:hover::after { opacity: 1; }
.card p { color: var(--muted); margin: 0; }
.icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon {
  width: 44px; height: 44px; display: grid; place-items: center; margin-bottom: 16px;
  border-radius: 12px; color: var(--green);
  background: rgba(61, 220, 151, 0.1); border: 1px solid rgba(61, 220, 151, 0.25);
}

/* --- Side by side: a wide table that scrolls inside itself on a phone,
   the feature names staying put, never the page. --- */
.compare { background: linear-gradient(180deg, transparent, rgba(11, 15, 26, 0.7) 30%, transparent); }
.table-wrap {
  overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line);
  background: var(--bg-2); -webkit-overflow-scrolling: touch;
}
.table-wrap:focus-visible { outline: 2px solid var(--purple); outline-offset: 3px; }
.versus { width: 100%; min-width: 860px; border-collapse: separate; border-spacing: 0; font-size: 0.92rem; }
.versus th, .versus td { padding: 12px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.versus thead th {
  font: 600 0.95rem var(--head); color: var(--text); white-space: nowrap;
  position: sticky; top: 0; background: var(--panel);
}
.versus th[scope='row'] {
  position: sticky; left: 0; z-index: 1; background: var(--bg-2);
  font-weight: 500; color: #dfe4f2; min-width: 190px; max-width: 240px;
}
.versus thead th:first-child { left: 0; z-index: 2; }
.versus .group th {
  font: 600 0.72rem var(--mono); letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); background: var(--bg); padding-top: 18px;
}
.versus .group th { position: sticky; left: 0; }
.versus td { color: var(--muted); }
.versus td small { display: block; font-size: 0.8rem; color: var(--muted); opacity: 0.85; margin-top: 3px; }
.versus td.yes { color: var(--text); }
.versus td.yes::before { content: '✓ '; color: var(--green); font-weight: 700; }
.versus td.part::before { content: '◐ '; color: var(--amber); }
.versus td.no { color: rgba(154, 163, 189, 0.5); }
.versus .us { background: rgba(61, 220, 151, 0.06); color: var(--text); border-left: 1px solid rgba(61, 220, 151, 0.25); border-right: 1px solid rgba(61, 220, 151, 0.25); }
.versus thead .us { color: var(--green); background: rgba(18, 23, 42, 1); box-shadow: inset 0 3px 0 var(--green); }
.versus tbody tr:last-child th, .versus tbody tr:last-child td { border-bottom: 0; }
@media (max-width: 720px) { .versus th[scope='row'] { min-width: 128px; max-width: 150px; font-size: 0.85rem; } }
.fine { color: var(--muted); font-size: 0.85rem; margin-top: 16px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* --- Tour --- */
.tour { background: radial-gradient(ellipse at 50% 0%, rgba(185, 163, 255, 0.08), transparent 60%); }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.tabs button {
  cursor: pointer; font: 500 0.95rem var(--body); color: var(--muted);
  background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 9px 18px;
}
.tabs button[aria-selected='true'] { color: #04110b; background: var(--green); border-color: var(--green); }
.tabs button:hover:not([aria-selected='true']) { color: var(--text); border-color: rgba(255, 255, 255, 0.3); }
.stage { display: grid; grid-template-columns: 1fr 230px; gap: 28px; align-items: start; }
@media (max-width: 900px) { .stage { grid-template-columns: 1fr; } .phone { max-width: 240px; margin: 0 auto; } }
figure { margin: 0; }
.window {
  border-radius: 14px; overflow: hidden; background: #000;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(61, 220, 151, 0.06), 0 0 120px rgba(61, 220, 151, 0.08);
}
.window-bar { display: flex; gap: 7px; padding: 11px 14px; background: #161a2a; }
.window-bar span { width: 11px; height: 11px; border-radius: 50%; background: #2c324a; }
.window img { transition: opacity 0.25s ease; }
.window img.fading { opacity: 0; }
.window figcaption, .phone figcaption { color: var(--muted); font-size: 0.92rem; padding: 12px 16px; }
.window figcaption { background: #0b0f1a; border-top: 1px solid var(--line); }
.phone img {
  border-radius: 28px; border: 6px solid #1d2236;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.6);
}
.phone figcaption { text-align: center; }
.note { color: var(--muted); font-size: 0.85rem; margin-top: 18px; }

/* --- How it works --- */
.how { background: var(--bg-2); border-block: 1px solid var(--line); }
.flow svg { width: 100%; height: auto; }
.node rect { fill: var(--panel); stroke: rgba(255, 255, 255, 0.14); stroke-width: 1.5; }
.node.accent rect { stroke: var(--green); fill: #0f1d1b; }
.t1 { fill: var(--text); font: 600 20px var(--head); }
.t2 { fill: var(--muted); font: 14px var(--body); }
.t3 { fill: var(--green); font: 500 13px var(--mono); }
.wire { stroke: rgba(255, 255, 255, 0.3); stroke-width: 3; fill: none; stroke-dasharray: 8 8; animation: flow 1.2s linear infinite; }
.wire.link { stroke: url(#link); }
@keyframes flow { to { stroke-dashoffset: -16; } }
@media (prefers-reduced-motion: reduce) { .wire { animation: none; } }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; padding: 0; list-style: none; counter-reset: step; margin-top: 36px; }
.steps li { counter-increment: step; color: var(--muted); padding-left: 48px; position: relative; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: -2px;
  width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%;
  font: 700 1rem var(--mono); color: var(--green); border: 1px solid rgba(61, 220, 151, 0.4);
}
.steps strong { color: var(--text); }

/* --- Beta sign-up --- */
.beta { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(28px, 5vw, 70px); max-width: calc(var(--max) + 40px); margin: 0 auto; }
.beta > * { max-width: none; margin: 0; }
@media (max-width: 900px) { .beta { grid-template-columns: 1fr; } }
.beta-copy p { color: #c8cee0; font-size: 1.1rem; }
.ticks { list-style: none; padding: 0; margin: 24px 0 0; }
.ticks li { padding-left: 30px; position: relative; margin: 10px 0; }
.ticks li::before { content: '✓'; position: absolute; left: 0; color: var(--green); font-weight: 700; }
.signup {
  padding: clamp(22px, 3vw, 34px); border-radius: var(--radius);
  background: linear-gradient(160deg, #141a30, var(--bg-2));
  border: 1px solid rgba(61, 220, 151, 0.25);
  box-shadow: 0 0 80px rgba(61, 220, 151, 0.07);
}
.signup label, .signup legend { display: block; font-weight: 600; font-size: 0.95rem; margin: 16px 0 6px; }
.signup label:first-child { margin-top: 0; }
.opt { color: var(--muted); font-weight: 400; }
.signup input[type='email'], .signup input[type='text'], .signup textarea {
  width: 100%; padding: 12px 14px; border-radius: 10px;
  background: #080b14; color: var(--text); border: 1px solid rgba(255, 255, 255, 0.14);
  font: 1rem var(--body);
}
.signup #callsign { font-family: var(--mono); text-transform: uppercase; }
.signup input:focus, .signup textarea:focus { outline: 2px solid var(--green); outline-offset: 1px; border-color: transparent; }
fieldset { border: 0; padding: 0; margin: 18px 0 0; }
fieldset legend { margin: 0 0 8px !important; padding: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips label {
  margin: 0; font-weight: 500; font-size: 0.9rem; cursor: pointer;
  padding: 7px 13px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.16);
  display: inline-flex; align-items: center; gap: 6px; user-select: none;
}
.chips input { accent-color: var(--green); margin: 0; }
.chips label:has(input:checked) { border-color: var(--green); background: rgba(61, 220, 151, 0.12); color: #fff; }
.chips label:has(input:focus-visible) { outline: 2px solid var(--green); }
.consent { display: flex !important; gap: 10px; align-items: flex-start; font-weight: 400 !important; color: var(--muted); }
.consent input { margin-top: 5px; accent-color: var(--green); }
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.status { min-height: 1.6em; margin: 12px 0 0; font-weight: 500; }
.status.ok { color: var(--green); }
.status.error { color: #ff8a73; }
.signup.done { text-align: center; }
.signup.done h3 { font-size: 1.6rem; margin-top: 8px; }
.signup.done .big { font-size: 3rem; }

/* --- FAQ --- */
.faq-inner { max-width: 820px; }
.faq details { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq summary { cursor: pointer; font: 600 1.15rem var(--head); list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--green); font-family: var(--mono); transition: transform 0.2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); margin: 12px 0 0; }

/* --- Footer --- */
.footer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding: 30px clamp(16px, 4vw, 40px); border-top: 1px solid var(--line); color: var(--muted); font-size: 0.9rem; }
.footer p { margin: 0; }
.seventy-three { font: 700 1rem var(--mono); color: var(--green); }

/* --- Plain pages (privacy) --- */
.page { max-width: 760px; margin: 0 auto; padding: 120px 20px 80px; }
.page h1 { font-size: clamp(2rem, 5vw, 3rem); }
.page p, .page li { color: #c8cee0; }

/* Reveal on scroll. */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.shown { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }
