/* Public pages (home, join, welcome). Builds on app.css tokens. */
.site { background: var(--bg); }
.site main { overflow-x: clip; }
.shell { width: min(1160px, 100% - 32px); margin: 0 auto; }
.nav { display: flex; align-items: center; gap: 12px; padding: 18px 0; }
.nav .brand { font-size: 20px; }
.nav .brand svg { width: 26px; height: 26px; }
.nav a.plain { color: var(--ink); text-decoration: none; font-weight: 500; padding: 12px; }
.btn { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; text-decoration: none; font-weight: 600; border-radius: 11px; padding: 11px 18px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); }
.btn.primary { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn.primary:hover { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.big { padding: 15px 24px; font-size: 16px; border-radius: 13px; }
.eyebrow { font: 500 12px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--brand); }

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 56px; align-items: center; padding: 56px 0 88px; }
.hero h1 { font-size: clamp(54px, 8.4vw, 112px); line-height: .9; font-weight: 800; letter-spacing: -.045em; margin: 18px 0 22px; font-variation-settings: "opsz" 96; }
.hero h1 em { font-style: normal; color: var(--brand); }
.hero p.lede { font-size: 19px; line-height: 1.5; color: var(--muted); max-width: 31em; margin: 0 0 30px; }
.hero p.lede b { color: var(--ink); font-weight: 600; }
.hero .ctas { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.hero .fine { margin-top: 16px; font-size: 13px; color: var(--muted); }

/* The signature: three lines ring, two fall away, one lights up. */
.board { position: relative; background: #171433; color: #ecebf8; border-radius: 26px; padding: 22px; box-shadow: 0 30px 80px -30px rgba(23, 20, 51, .55); }
.board-head { display: flex; justify-content: space-between; align-items: center; font: 500 11px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: #9b98bd; padding: 2px 4px 16px; }
.board-head .rec { display: inline-flex; align-items: center; gap: 7px; }
.board-head .rec::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--lamp); }
.jack { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 16px 18px; border-radius: 16px; background: #221e48; margin-top: 10px; position: relative; transition: none; }
.lamp { width: 14px; height: 14px; border-radius: 50%; border: 2px solid #4b4680; }
.jack .who { min-width: 0; }
.jack .who b { display: block; font: 600 15px var(--sans); color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jack .who span { font: 400 12px var(--mono); color: #9b98bd; white-space: nowrap; }
.jack .status { font: 500 11px var(--mono); text-transform: uppercase; letter-spacing: .06em; color: #9b98bd; text-align: right; }
.jack .status { display: grid; justify-items: end; }
.jack .status i { font-style: normal; grid-area: 1 / 1; white-space: nowrap; }
.jack .s-end, .jack .s-live { opacity: 0; }
.jack .s-live { color: var(--lamp); }
.live-panel { margin-top: 14px; border-radius: 16px; padding: 16px 18px; background: var(--lamp); color: #2b1c00; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; opacity: 0; transform: translateY(8px); }
.live-panel div span { display: block; font: 500 10px var(--mono); text-transform: uppercase; letter-spacing: .06em; opacity: .7; }
.live-panel div b { font-weight: 600; font-size: 14px; }

@media (prefers-reduced-motion: no-preference) {
  .board .lamp { animation: blink .55s steps(2, jump-none) infinite; }
  .j1 { animation: j1 8s infinite; } .j1 .lamp { animation: blink .55s steps(2, jump-none) infinite, j1lamp 8s infinite; }
  .j2 { animation: j2 8s infinite; } .j2 .lamp { animation: blink .55s steps(2, jump-none) infinite, j2lamp 8s infinite; }
  .j3 { animation: j3 8s infinite; } .j3 .lamp { animation: j3lamp 8s infinite; }
  .j1 .s-ring { animation: hideAt 8s infinite; } .j1 .s-end { animation: showFrom1 8s infinite; }
  .j2 .s-ring { animation: hideAt2 8s infinite; } .j2 .s-end { animation: showFrom2 8s infinite; }
  .j3 .s-ring { animation: hideAt3 8s infinite; } .j3 .s-live { animation: showFrom3 8s infinite; }
  .live-panel { animation: panel 8s infinite; }
}
@keyframes blink { 0% { background: transparent; border-color: #4b4680; } 100% { background: var(--lamp); border-color: var(--lamp); } }
@keyframes j1 { 0%, 26% { opacity: 1; transform: none; } 34%, 92% { opacity: .32; transform: scale(.97); } 100% { opacity: 1; transform: none; } }
@keyframes j2 { 0%, 40% { opacity: 1; transform: none; } 48%, 92% { opacity: .32; transform: scale(.97); } 100% { opacity: 1; transform: none; } }
@keyframes j3 { 0%, 52% { background: #221e48; box-shadow: inset 0 0 0 2px transparent; } 56%, 92% { background: #2f2866; box-shadow: inset 0 0 0 2px var(--lamp); } 100% { background: #221e48; box-shadow: inset 0 0 0 2px transparent; } }
@keyframes j1lamp { 0%, 26% { opacity: 1; } 27%, 99% { opacity: 0; } }
@keyframes j2lamp { 0%, 40% { opacity: 1; } 41%, 99% { opacity: 0; } }
@keyframes j3lamp { 0%, 14% { background: transparent; border-color: #4b4680; } 7% { background: var(--lamp); border-color: var(--lamp); }
  21%, 35%, 49% { background: var(--lamp); border-color: var(--lamp); } 28%, 42% { background: transparent; border-color: #4b4680; }
  53%, 94% { background: var(--lamp); border-color: var(--lamp); box-shadow: 0 0 0 5px rgba(255, 176, 32, .25); } 100% { background: transparent; } }
@keyframes hideAt { 0%, 26% { opacity: 1; } 27%, 99% { opacity: 0; } }
@keyframes showFrom1 { 0%, 26% { opacity: 0; } 27%, 99% { opacity: 1; } }
@keyframes hideAt2 { 0%, 40% { opacity: 1; } 41%, 99% { opacity: 0; } }
@keyframes showFrom2 { 0%, 40% { opacity: 0; } 41%, 99% { opacity: 1; } }
@keyframes hideAt3 { 0%, 52% { opacity: 1; } 53%, 99% { opacity: 0; } }
@keyframes showFrom3 { 0%, 52% { opacity: 0; } 53%, 99% { opacity: 1; } }
@keyframes panel { 0%, 55% { opacity: 0; transform: translateY(8px); } 60%, 92% { opacity: 1; transform: none; } 100% { opacity: 0; } }
/* No motion: show the end state (the connected call). */
@media (prefers-reduced-motion: reduce) {
  .j1, .j2 { opacity: .32; } .j1 .s-ring, .j2 .s-ring, .j3 .s-ring { opacity: 0; } .j1 .s-end, .j2 .s-end, .j3 .s-live { opacity: 1; } .j3 .lamp { background: var(--lamp); border-color: var(--lamp); } .j3 { box-shadow: inset 0 0 0 2px var(--lamp); }
  .j1 .lamp, .j2 .lamp { opacity: 0; } .live-panel { opacity: 1; transform: none; }
}

@media (prefers-color-scheme: dark) { .board { background: #0a0819; border: 1px solid var(--line); box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .8); } }

/* ---------- sections ---------- */
.band { padding: 84px 0; border-top: 1px solid var(--line); }
.band h2 { font-size: clamp(32px, 4.4vw, 52px); line-height: 1; letter-spacing: -.035em; font-weight: 750; margin: 12px 0 18px; max-width: 16em; }
.band p.sub { color: var(--muted); font-size: 17px; max-width: 34em; margin: 0; }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin-top: 44px; border-top: 2px solid var(--ink); }
.fact { padding: 22px 22px 0 0; }
.fact + .fact { padding-left: 22px; border-left: 1px solid var(--line); }
.fact h3 { font-size: 19px; margin: 0 0 8px; font-weight: 700; }
.fact p { margin: 0; color: var(--muted); }
.shift { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 40px; counter-reset: step; list-style: none; padding: 0; }
.shift li { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 22px; counter-increment: step; }
.shift li::before { content: counter(step); display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); font: 600 13px var(--mono); margin-bottom: 14px; }
.shift li b { display: block; font: 700 17px var(--display); margin-bottom: 6px; letter-spacing: -.01em; }
.shift li span { color: var(--muted); }
.shift li .key { display: inline-block; margin-top: 10px; }

/* ---------- pricing ---------- */
.pricing { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: 56px; align-items: start; }
.plan { background: var(--panel); border: 1px solid var(--line); border-radius: 24px; padding: 30px; box-shadow: var(--shadow); }
.plan .top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.plan h3 { margin: 0; font-size: 22px; }
.price { font: 600 52px/1 var(--mono); letter-spacing: -.04em; margin: 20px 0 4px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.price small { font: 400 14px var(--sans); letter-spacing: 0; color: var(--muted); }
.price s { font-size: 22px; color: var(--muted); font-weight: 400; }
.plan .codeline { font-size: 13.5px; min-height: 1.5em; }
.plan .codeline.ok { color: var(--good); } .plan .codeline.err { color: var(--bad); }
.plan ul { list-style: none; padding: 0; margin: 22px 0; display: grid; gap: 10px; }
.plan li { display: grid; grid-template-columns: 18px 1fr; gap: 10px; }
.plan li::before { content: ""; width: 10px; height: 10px; margin-top: 6px; border-radius: 50%; background: var(--brand); }
.code-row { display: flex; gap: 8px; margin: 16px 0 6px; }
.code-row input { font: 500 14px var(--mono); text-transform: uppercase; letter-spacing: .04em; }
.plan .btn { width: 100%; justify-content: center; }

.faq { display: grid; gap: 0; margin-top: 32px; border-top: 1px solid var(--line); max-width: 760px; }
.faq details { border-bottom: 1px solid var(--line); padding: 8px 0; }
.faq summary { cursor: pointer; font: 600 17px var(--display); list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 48px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 400 20px var(--mono); color: var(--brand); }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); margin: 0 0 12px; max-width: 40em; }
.foot { padding: 22px 0 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; display: flex; gap: 16px; justify-content: space-between; flex-wrap: wrap; }
.foot a { color: var(--muted); display: inline-block; padding: 12px 4px; }
.foot { align-items: center; }
.pw { position: relative; }
.pw button { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--brand); font-weight: 600; min-height: 40px; padding: 0 10px; }
.pw input { padding-right: 64px; }

/* ---------- join ---------- */
.join { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 400px); gap: 40px; padding: 36px 0 80px; align-items: start; }
.join h1 { font-size: clamp(36px, 5vw, 56px); letter-spacing: -.04em; line-height: .95; margin: 10px 0 12px; font-weight: 800; }
.join form { display: grid; gap: 14px; max-width: 460px; margin-top: 26px; }
.join .err { color: var(--bad); min-height: 1.3em; margin: 0; }
.summary { position: sticky; top: 20px; }
.summary .line-item { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.summary .line-item:last-child { border-bottom: 0; }
.summary .mono { font-family: var(--mono); }
.done { max-width: 560px; padding: 80px 0; }
.done h1 { font-size: clamp(40px, 6vw, 64px); letter-spacing: -.04em; line-height: .95; margin: 14px 0; }

@media (max-width: 900px) {
  .hero, .pricing, .join { grid-template-columns: 1fr; gap: 36px; }
  .hero { padding-top: 24px; }
  .facts, .shift { grid-template-columns: 1fr 1fr; }
  .fact:nth-child(3) { padding-left: 0; border-left: 0; }
  .summary { position: static; }
}
@media (max-width: 560px) {
  .facts, .shift { grid-template-columns: 1fr; }
  .fact + .fact { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); margin-top: 18px; }
  .nav a.plain { display: none; }
  .live-panel { grid-template-columns: 1fr 1fr; }
  .board { padding: 14px; border-radius: 20px; }
  .board-head span:last-child { display: none; }
  .jack { gap: 10px; padding: 13px 14px; }
  .jack .status { font-size: 9.5px; }
}
