/* ==========================================================================
   NEXA — nexaapp.tv (redesign)
   Editorial dark theme: warm near-black, off-white type, NEXA violet as the
   brand accent and a lamp-amber highlight used sparingly.
   Type: Instrument Serif (display) · Geist (UI/body) · Geist Mono (technical)
   ========================================================================== */

:root {
  --bg: #0b0a09;
  --bg-2: #11100e;
  --surface: #161512;
  --surface-2: #1d1b18;
  --line: rgba(255, 244, 228, 0.08);
  --line-2: rgba(255, 244, 228, 0.14);
  --text: #f3eee7;
  --text-2: #cfc8bd;
  --muted: #9a948a;
  --dim: #6d685f;

  --violet: #9b7bff;
  --violet-2: #7c5cf0;
  --violet-ink: #c9b8ff;
  --amber: #e9a95a;
  --good: #7fd3a0;
  --bad: #f08a7e;
  --warn: #e9c46a;

  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --r-sm: 8px;
  --r: 14px;
  --r-lg: 22px;
  --wrap: 1200px;
  --gutter: clamp(20px, 4vw, 40px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
/* photographic grain over everything — keeps flat areas from looking digital */
body::after {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: .045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: rgba(155, 123, 255, .35); }
:focus-visible { outline: 2px solid var(--violet); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hidden, [hidden] { display: none !important; }

/* ── Type ─────────────────────────────────────────────────────────────── */
.display {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 0.98;
  margin: 0;
}
.display em { font-style: italic; color: var(--violet-ink); }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.01em; }
.h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(2.3rem, 4.6vw, 3.9rem); line-height: 1.02; letter-spacing: -0.015em; }
.h2 em { font-style: italic; color: var(--violet-ink); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font: 500 .72rem/1 var(--mono);
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted);
}
.eyebrow::before { content: ""; width: 18px; height: 1px; background: currentColor; opacity: .6; }
.lede { font-size: clamp(1.02rem, 1.3vw, 1.15rem); color: var(--text-2); max-width: 36em; }
.mono { font-family: var(--mono); font-size: .86em; letter-spacing: -0.01em; }
p { margin: 0; }

/* ── Brand mark ───────────────────────────────────────────────────────── */
.brand { display: inline-flex; align-items: center; gap: 10px; font: 600 1.02rem/1 var(--sans); letter-spacing: .26em; }
.brand svg { width: 26px; height: 26px; flex: none; }
.brand b { font-weight: 600; color: var(--violet); }

/* ── Buttons ──────────────────────────────────────────────────────────── */
.btn {
  --h: 48px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: var(--h); padding: 0 22px;
  border-radius: 999px; border: 1px solid transparent;
  font: 500 .95rem/1 var(--sans);
  cursor: pointer; white-space: nowrap;
  transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:active { transform: translateY(1px); }
.btn-light { background: var(--text); color: #14120f; }
.btn-light:hover { background: #fff; }
.btn-violet { background: var(--violet); color: #0f0b1c; }
.btn-violet:hover { background: #ad92ff; }
.btn-ghost { border-color: var(--line-2); color: var(--text); background: rgba(255,255,255,.02); backdrop-filter: blur(6px); }
.btn-ghost:hover { border-color: rgba(255,244,228,.32); background: rgba(255,255,255,.06); }
.btn-sm { --h: 38px; padding: 0 16px; font-size: .88rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn .sub { font: 400 .74rem/1 var(--mono); color: rgba(20,18,15,.6); padding-left: 10px; border-left: 1px solid rgba(20,18,15,.18); }

.link-arrow { white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; color: var(--text); font-weight: 500; border-bottom: 1px solid var(--line-2); padding-bottom: 3px; transition: border-color .2s, gap .2s var(--ease); }
.link-arrow:hover { border-color: var(--text); gap: 12px; }

/* ── Nav ──────────────────────────────────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  transition: background .3s var(--ease), border-color .3s var(--ease), backdrop-filter .3s;
  border-bottom: 1px solid transparent;
}
.nav.solid, .nav.always-solid { background: rgba(11,10,9,.82); backdrop-filter: saturate(140%) blur(14px); -webkit-backdrop-filter: saturate(140%) blur(14px); border-color: var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a:not(.btn) { font-size: .92rem; color: var(--text-2); transition: color .2s; }
.nav-links a:not(.btn):hover { color: var(--text); }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; margin-right: -8px; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 1.5px; background: var(--text); margin: 5px 0; transition: transform .25s var(--ease), opacity .2s; }
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed; inset: 72px 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px var(--gutter) 24px;
    background: rgba(11,10,9,.97); border-bottom: 1px solid var(--line);
    transform: translateY(-8px); opacity: 0; pointer-events: none;
    transition: opacity .2s, transform .25s var(--ease);
  }
  .nav-links a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 1rem; }
  .nav-links .btn { margin-top: 18px; }
  .nav.open { background: rgba(11,10,9,.97); }
  .nav.open .nav-links { opacity: 1; transform: none; pointer-events: auto; }
  .nav.open .nav-toggle span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  .nav.open .nav-toggle span:nth-child(2) { opacity: 0; }
  .nav.open .nav-toggle span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
}

/* ── Hero ─────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: min(100svh, 980px);
  display: flex; align-items: flex-end;
  padding: 140px 0 72px;
  isolation: isolate;
}
.hero-media { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.hero-media picture { display: contents; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; transform: scale(1.02); }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(11,10,9,.94) 0%, rgba(11,10,9,.78) 34%, rgba(11,10,9,.12) 68%, rgba(11,10,9,.35) 100%),
    linear-gradient(0deg, var(--bg) 0%, rgba(11,10,9,0) 38%),
    linear-gradient(180deg, rgba(11,10,9,.7) 0%, rgba(11,10,9,0) 22%);
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 40px; align-items: end; }
.hero h1 { font-size: clamp(3.1rem, 7.4vw, 6.6rem); max-width: 10.5em; }
.hero .lede { margin-top: 26px; max-width: 30em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.hero-notes { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 30px; font: 400 .8rem/1.4 var(--mono); color: var(--muted); }
.hero-notes span { display: inline-flex; align-items: center; gap: 8px; }
.hero-notes span::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--amber); opacity: .85; }

/* server status card floating on the hero */
.status-card {
  justify-self: end;
  width: min(360px, 100%);
  background: rgba(18,17,15,.62);
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  padding: 18px 18px 14px;
  font-family: var(--mono); font-size: .76rem; color: var(--text-2);
  box-shadow: 0 30px 80px rgba(0,0,0,.45);
}
.status-card header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.status-card header strong { font: 500 .86rem/1 var(--sans); color: var(--text); letter-spacing: 0; }
.live { display: inline-flex; align-items: center; gap: 7px; color: var(--good); }
.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 0 rgba(127,211,160,.5); animation: pulse 2.2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(127,211,160,.45); } 70% { box-shadow: 0 0 0 8px rgba(127,211,160,0); } 100% { box-shadow: 0 0 0 0 rgba(127,211,160,0); } }
.stream-row { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.stream-row .t { color: var(--text); font-family: var(--sans); font-size: .85rem; }
.stream-row .d { grid-column: 1 / -1; color: var(--muted); }
.stream-row .q { color: var(--violet-ink); }
.bar { height: 2px; background: var(--line); border-radius: 2px; margin-top: 6px; grid-column: 1 / -1; overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--violet), var(--violet-ink)); }

@media (max-width: 960px) {
  .hero { min-height: auto; padding: 120px 0 56px; align-items: flex-start; }
  .hero-media picture { display: contents; }
.hero-media img { object-position: 82% 30%; }
  .hero { padding-top: 300px; }
  .hero::before { background: linear-gradient(0deg, var(--bg) 0%, rgba(11,10,9,.9) 58%, rgba(11,10,9,.2) 88%, rgba(11,10,9,.55) 100%); }
  .hero-media { bottom: auto; height: 520px; }
  .hero-grid { grid-template-columns: 1fr; }
  .status-card { justify-self: start; }
}

/* ── Sections ─────────────────────────────────────────────────────────── */
.section { padding: clamp(84px, 11vw, 150px) 0; position: relative; }
.section-tight { padding: clamp(56px, 7vw, 90px) 0; }
.section-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px 60px; align-items: end; margin-bottom: clamp(44px, 6vw, 72px); }
.section-head .h2 { margin-top: 18px; }
@media (max-width: 860px) { .section-head { grid-template-columns: 1fr; } }
.rule { height: 1px; background: var(--line); border: 0; margin: 0; }

/* platforms strip */
.platforms { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.platforms .wrap { display: flex; align-items: center; justify-content: space-between; gap: 18px 36px; flex-wrap: wrap; padding-top: 26px; padding-bottom: 26px; }
.platforms .label { font: 500 .72rem/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.platforms ul { display: flex; flex-wrap: wrap; gap: 14px 34px; margin: 0; padding: 0; list-style: none; }
.platforms li { display: inline-flex; align-items: center; gap: 9px; color: var(--text-2); font-size: .95rem; }
.platforms svg { width: 18px; height: 18px; opacity: .75; }

/* split: image + copy */
.split { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: clamp(36px, 6vw, 90px); align-items: center; }
.split.reverse > :first-child { order: 2; }
@media (max-width: 900px) { .split, .split.reverse { grid-template-columns: 1fr; } .split.reverse > :first-child { order: 0; } }

.photo { position: relative; border-radius: var(--r-lg); overflow: hidden; background: var(--surface); }
.photo picture { display: contents; }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255,244,228,.06); pointer-events: none; }
.photo figcaption {
  position: absolute; left: 16px; bottom: 16px;
  font: 400 .72rem/1 var(--mono); color: rgba(243,238,231,.82);
  background: rgba(11,10,9,.55); backdrop-filter: blur(8px);
  padding: 8px 11px; border-radius: 999px; border: 1px solid rgba(255,244,228,.1);
}
.ratio-43 { aspect-ratio: 4 / 3; }
.ratio-169 { aspect-ratio: 16 / 9; }
.ratio-45 { aspect-ratio: 4 / 5; }

.spec { margin-top: 36px; border-top: 1px solid var(--line); }
.spec div { display: grid; grid-template-columns: 170px 1fr; gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.spec dt { font: 500 .74rem/1.5 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding-top: 2px; }
.spec dd { margin: 0; color: var(--text-2); font-size: .96rem; }
@media (max-width: 520px) { .spec div { grid-template-columns: 1fr; gap: 4px; } }

/* anywhere mosaic */
.mosaic { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); grid-template-rows: auto auto; gap: 18px; }
.mosaic .tall { grid-row: span 2; }
.mosaic .photo { height: 100%; min-width: 0; }
.mosaic .photo:not(.tall) { aspect-ratio: auto; min-height: 280px; }
.mosaic .tall img { min-height: 560px; }
@media (max-width: 760px) { .mosaic { grid-template-columns: 1fr; } .mosaic .tall { grid-row: auto; } .mosaic .tall img { min-height: 0; aspect-ratio: 4/5; } .mosaic .photo:not(.tall) { aspect-ratio: 16/9; min-height: 0; } }
.anywhere-notes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; margin-top: 48px; }
.anywhere-notes h3 { font-size: 1.02rem; margin-bottom: 8px; }
.anywhere-notes p { color: var(--muted); font-size: .94rem; }
@media (max-width: 760px) { .anywhere-notes { grid-template-columns: 1fr; gap: 24px; } }

/* feature index — numbered editorial list instead of icon cards */
.index { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.index article { padding: 34px 30px 38px 0; border-bottom: 1px solid var(--line); position: relative; }
.index article:not(:nth-child(3n)) { border-right: 1px solid var(--line); }
.index article:not(:nth-child(3n+1)) { padding-left: 30px; }
.index .n { font: 400 .76rem/1 var(--mono); color: var(--dim); }
.index h3 { font: 400 1.7rem/1.1 var(--serif); letter-spacing: -0.01em; margin: 22px 0 12px; }
.index p { color: var(--muted); font-size: .95rem; }
@media (max-width: 960px) {
  .index { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .index article, .index article:not(:nth-child(3n+1)) { padding: 30px 24px 32px 0; border-right: 0; }
  .index article:nth-child(odd) { border-right: 1px solid var(--line); }
  .index article:nth-child(even) { padding-left: 24px; }
}
@media (max-width: 600px) {
  .index { grid-template-columns: 1fr; }
  .index article, .index article:nth-child(even) { padding: 26px 0; border-right: 0 !important; }
}

/* full-bleed shared-night band */
.band { position: relative; min-height: 640px; display: flex; align-items: flex-end; isolation: isolate; padding: 90px 0 70px; }
.band > picture { position: absolute; inset: 0; z-index: -2; }
.band > picture img { width: 100%; height: 100%; object-fit: cover; }
.band::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(11,10,9,.97) 0%, rgba(11,10,9,.9) 38%, rgba(11,10,9,.35) 70%, rgba(11,10,9,.15) 100%), linear-gradient(180deg, var(--bg) 0%, rgba(11,10,9,.6) 14%, rgba(11,10,9,0) 34%), linear-gradient(90deg, rgba(11,10,9,.55) 0%, rgba(11,10,9,0) 20%, rgba(11,10,9,0) 80%, rgba(11,10,9,.55) 100%); }
.band { min-height: 760px; }
.band-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px 70px; align-items: end; }
.band ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--line-2); }
.band li { display: grid; grid-template-columns: 28px 1fr; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line-2); color: var(--text-2); }
.band li b { color: var(--text); font-weight: 500; }
.band li i { font: normal 400 .74rem/1.9 var(--mono); color: var(--amber); }
@media (max-width: 860px) { .band { min-height: 0; padding-top: 320px; } .band-grid { grid-template-columns: 1fr; } }

/* steps */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; counter-reset: s; }
.steps li { list-style: none; padding: 0 34px 0 0; position: relative; }
.steps li + li { padding-left: 34px; border-left: 1px solid var(--line); }
.steps .k { font: 400 3.4rem/1 var(--serif); color: var(--violet-ink); }
.steps h3 { font-size: 1.1rem; margin: 20px 0 10px; }
.steps p { color: var(--muted); font-size: .95rem; }
.steps code { font-family: var(--mono); font-size: .82em; color: var(--text-2); background: var(--surface-2); padding: 2px 6px; border-radius: 5px; }
.steps-wrap { padding: 0; margin: 0; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; gap: 34px; } .steps li, .steps li + li { padding: 0; border: 0; } }

/* download */
.download { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--bg-2); }
.download .photo { border-radius: 0; min-height: 100%; }
.download .photo img { height: 100%; }
.download-body { padding: clamp(28px, 4vw, 52px); display: flex; flex-direction: column; gap: 22px; }
.download-body .req { font: 400 .78rem/1.7 var(--mono); color: var(--muted); }
.download-body .req b { color: var(--text-2); font-weight: 500; }
@media (max-width: 900px) { .download { grid-template-columns: 1fr; } .download .photo { aspect-ratio: 16/9; } }

.apps { margin-top: 26px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.app { display: flex; flex-direction: column; gap: 14px; padding: 22px; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg-2); transition: border-color .2s; }
.app:hover { border-color: var(--line-2); }
.app-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.app-top svg { width: 22px; height: 22px; color: var(--text-2); }
.app h3 { font-size: 1rem; }
.app .plat { font: 400 .74rem/1.4 var(--mono); color: var(--muted); margin-top: 2px; }
.app p { color: var(--muted); font-size: .9rem; flex: 1; }
.app-cta { align-self: flex-start; }
.app-cta.coming-soon { font: 500 .7rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--dim); border: 1px dashed var(--line-2); border-radius: 999px; padding: 8px 12px; pointer-events: none; }
.app-cta.available { font: 500 .88rem/1 var(--sans); color: #14120f; background: var(--text); border-radius: 999px; padding: 11px 16px; }
.app-cta.available:hover { background: #fff; }
@media (max-width: 960px) { .apps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .apps { grid-template-columns: 1fr; } }
.apps-group { margin-top: 44px; }
.apps-group > .eyebrow { margin-bottom: 4px; }

/* faq */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 24px; align-items: center; padding: 24px 0; font-size: 1.08rem; font-weight: 500; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; width: 12px; height: 12px; flex: none; background: linear-gradient(var(--text-2), var(--text-2)) center/12px 1.5px no-repeat, linear-gradient(var(--text-2), var(--text-2)) center/1.5px 12px no-repeat; transition: transform .25s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); padding: 0 0 26px; max-width: 46em; }
.faq-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 40px 80px; }
@media (max-width: 860px) { .faq-grid { grid-template-columns: 1fr; } }

/* closing CTA — photo tile left, copy right */
.closing { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--bg-2); }
.closing > picture { display: block; min-height: 460px; }
.closing > picture img { width: 100%; height: 100%; object-fit: cover; object-position: 40% 35%; }
.closing-body { align-self: center; padding: clamp(28px, 4.5vw, 60px); }
.closing .h2 { margin: 16px 0 18px; }
.closing .hero-cta { margin-top: 30px; }
@media (max-width: 860px) { .closing { grid-template-columns: 1fr; } .closing > picture { min-height: 0; aspect-ratio: 4 / 3; } }

/* ── Footer ───────────────────────────────────────────────────────────── */
.footer { border-top: 1px solid var(--line); padding: 64px 0 40px; margin-top: clamp(60px, 8vw, 110px); }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 40px; }
.footer p { color: var(--muted); font-size: .92rem; max-width: 26em; margin-top: 16px; }
.footer h4 { font: 500 .72rem/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); margin-bottom: 16px; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer ul a { color: var(--text-2); font-size: .93rem; }
.footer ul a:hover { color: var(--text); }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); font: 400 .76rem/1.6 var(--mono); color: var(--dim); }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }

/* ── Reveal on scroll ─────────────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ==========================================================================
   Auth & account pages
   ========================================================================== */
.auth { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 100svh; }
.auth-media { position: relative; overflow: hidden; isolation: isolate; }
.auth-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; z-index: -2; }
.auth-media::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(11,10,9,.9) 0%, rgba(11,10,9,.1) 50%, rgba(11,10,9,.45) 100%); }
.auth-media .brand { position: absolute; top: 30px; left: 36px; }
.auth-quote { position: absolute; left: 36px; right: 36px; bottom: 40px; }
.auth-quote p { font: 400 clamp(1.7rem, 2.6vw, 2.35rem)/1.1 var(--serif); letter-spacing: -0.01em; max-width: 14em; }
.auth-quote p em { color: var(--violet-ink); }
.auth-quote span { display: block; margin-top: 14px; font: 400 .76rem/1.5 var(--mono); color: var(--muted); }
.auth-main { display: flex; flex-direction: column; padding: 28px clamp(22px, 5vw, 64px) 32px; }
.auth-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 44px; }
.auth-top .brand { visibility: hidden; }
.auth-top nav { display: flex; gap: 22px; align-items: center; font-size: .9rem; color: var(--muted); }
.auth-top nav a:hover { color: var(--text); }
.auth-body { flex: 1; display: flex; align-items: center; justify-content: center; padding: 40px 0; }
.auth-card { width: 100%; max-width: 420px; }
.auth-card.wide { max-width: 560px; }
.auth-card h1 { font: 400 clamp(2.4rem, 4vw, 3.1rem)/1 var(--serif); letter-spacing: -0.015em; }
.auth-card h1 em { color: var(--violet-ink); }
.auth-card .sub { color: var(--muted); margin: 12px 0 30px; }
.auth-foot { font: 400 .74rem/1.6 var(--mono); color: var(--dim); display: flex; gap: 18px; flex-wrap: wrap; }
.auth-foot a:hover { color: var(--text-2); }
@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; }
  .auth-media { display: none; }
  .auth-top .brand { visibility: visible; }
}

/* forms (shared with original page scripts: .form-error.active, .form-success.hidden, .field-hint.ok/.bad) */
.form-group { margin-bottom: 18px; }
.form-group label, .label { display: flex; align-items: center; gap: 8px; font-size: .84rem; font-weight: 500; color: var(--text-2); margin-bottom: 8px; }
.optional { color: var(--dim); font-weight: 400; }
.input, .form-group input {
  width: 100%; height: 50px; padding: 0 16px;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--line-2); border-radius: 12px;
  font-size: 1rem; outline: none;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.form-group input::placeholder { color: var(--dim); }
.form-group input:hover { border-color: rgba(255,244,228,.22); }
.form-group input:focus { border-color: var(--violet); background: var(--surface-2); box-shadow: 0 0 0 4px rgba(155,123,255,.14); }
.form-group input[readonly] { color: var(--muted); background: var(--bg-2); cursor: not-allowed; }
.form-group input.valid { border-color: rgba(127,211,160,.55); }
.form-group input.invalid { border-color: rgba(240,138,126,.65); }
.field-hint, .hint { font-size: .78rem; color: var(--dim); margin-top: 7px; min-height: 1.2em; }
.field-hint.checking { color: var(--muted); }
.field-hint.ok { color: var(--good); }
.field-hint.bad { color: var(--bad); }
.form-error { display: none; }
.form-error.active, .notice-error { display: block; background: rgba(240,138,126,.08); border: 1px solid rgba(240,138,126,.3); color: #f6b3aa; padding: 12px 14px; border-radius: 12px; font-size: .9rem; margin-bottom: 20px; }
.form-success { background: rgba(127,211,160,.08); border: 1px solid rgba(127,211,160,.3); color: #a9e3c0; padding: 12px 14px; border-radius: 12px; font-size: .9rem; margin-bottom: 20px; }
.form-links { margin-top: 26px; display: grid; gap: 10px; color: var(--muted); font-size: .92rem; }
.form-links a { color: var(--text); border-bottom: 1px solid var(--line-2); }
.form-links a:hover { border-color: var(--text); }
.callout { border: 1px solid var(--line-2); background: var(--bg-2); border-radius: 12px; padding: 14px 16px; font-size: .88rem; color: var(--text-2); margin-bottom: 26px; }
.callout strong { color: var(--text); font-weight: 600; }
.pill { display: inline-flex; align-items: center; font: 500 .64rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; padding: 4px 8px; border-radius: 999px; background: rgba(127,211,160,.12); color: var(--good); }

/* status element used by invite-register */
.status { display: none; margin-top: 16px; padding: 12px 14px; border-radius: 12px; font-size: .9rem; }
.status.error { background: rgba(240,138,126,.08); border: 1px solid rgba(240,138,126,.3); color: #f6b3aa; }
.status.success { background: rgba(127,211,160,.08); border: 1px solid rgba(127,211,160,.3); color: #a9e3c0; }

/* welcome / onboarding steps */
.who { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--bg-2); margin-bottom: 26px; }
.who .avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--violet); color: #0f0b1c; font-weight: 600; }
.who small { display: block; font: 400 .7rem/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.who strong { font-weight: 500; }
.next { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.next li { display: grid; grid-template-columns: 44px 1fr; gap: 12px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.next .k { font: 400 1.9rem/1 var(--serif); color: var(--violet-ink); }
.next h3 { font-size: 1rem; margin-bottom: 6px; }
.next p { color: var(--muted); font-size: .92rem; }
.next a { color: var(--text); border-bottom: 1px solid var(--line-2); }

/* ── Account (profile) ────────────────────────────────────────────────── */
.page-top { padding: 132px 0 40px; border-bottom: 1px solid var(--line); }
.page-top h1 { font: 400 clamp(2.6rem, 5vw, 4rem)/1 var(--serif); letter-spacing: -0.015em; margin-top: 16px; }
.page-top p { color: var(--muted); margin-top: 12px; }
.profile-shell { padding-top: 40px; }
.profile-section { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 16px 48px; padding: 36px 0; border-bottom: 1px solid var(--line); }
.profile-section > h3 { font-size: 1.05rem; grid-column: 1; }
.profile-section > .section-desc { grid-column: 1; color: var(--muted); font-size: .9rem; margin-top: -6px; }
.profile-section > :not(h3):not(.section-desc) { grid-column: 2; }
.profile-section > h3 + .section-desc + * { grid-row: 1 / span 3; }
@media (max-width: 760px) { .profile-section { grid-template-columns: 1fr; } .profile-section > * { grid-column: 1 !important; grid-row: auto !important; } }
.server-card { display: flex; align-items: flex-start; gap: 14px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-2); margin-bottom: 10px; }
.server-dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 7px; background: var(--dim); flex: none; }
.server-dot.online { background: var(--good); box-shadow: 0 0 0 4px rgba(127,211,160,.14); }
.server-badge { font: 500 .66rem/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; padding: 4px 8px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--text-2); }
.server-meta { font: 400 .78rem/1.5 var(--mono); color: var(--muted); margin-top: 4px; word-break: break-all; }
.profile-info { display: flex; justify-content: space-between; gap: 20px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: .94rem; }
.profile-info:first-of-type { border-top: 1px solid var(--line); }
.profile-info .label { color: var(--muted); margin: 0; font-weight: 400; }
.profile-info .val { text-align: right; word-break: break-all; }
.empty-state { text-align: left; padding: 24px; border: 1px dashed var(--line-2); border-radius: 12px; color: var(--muted); font-size: .92rem; }
.empty-state .icon { display: none; }
.empty-state strong { color: var(--text); font-weight: 500; }

#admin-section { display: none; margin-top: 56px; padding: 30px; border: 1px solid var(--line-2); border-radius: var(--r-lg); background: var(--bg-2); }
#admin-section > h3 { display: flex; align-items: center; gap: 10px; font: 400 1.7rem/1 var(--serif); margin-bottom: 22px; }
#admin-section > h3 svg { color: var(--violet); }
#admin-section h4 { font: 500 .72rem/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 30px 0 12px; }
.admin-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.admin-stat { padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.admin-stat .label { display: block; font: 400 .68rem/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--dim); margin: 0; }
.admin-stat .value { font: 400 2.1rem/1 var(--serif); margin-top: 10px; color: var(--text); }
.admin-toolbar { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.admin-toolbar input { flex: 1; height: 42px; padding: 0 14px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line-2); color: var(--text); outline: none; }
.admin-toolbar input:focus { border-color: var(--violet); }
.admin-toolbar .count { font: 400 .74rem/1 var(--mono); color: var(--dim); white-space: nowrap; }
.admin-table-wrap { max-height: 480px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: .86rem; }
.admin-table th { position: sticky; top: 0; z-index: 1; background: var(--surface); text-align: left; padding: 11px 14px; font: 500 .66rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); cursor: pointer; white-space: nowrap; }
.admin-table th:hover { color: var(--text); }
.admin-table th .arrow { color: var(--violet); margin-left: 4px; }
.admin-table td { padding: 11px 14px; border-top: 1px solid var(--line); color: var(--text-2); }
.admin-table tr:hover td { background: rgba(255,244,228,.025); }
.admin-badge { display: inline-block; padding: 3px 8px; border-radius: 999px; font: 500 .64rem/1.2 var(--mono); text-transform: uppercase; letter-spacing: .05em; }
.admin-badge.active { background: rgba(127,211,160,.12); color: var(--good); }
.admin-badge.disabled { background: rgba(240,138,126,.12); color: var(--bad); }
.admin-badge.pending { background: rgba(233,196,106,.12); color: var(--warn); }

/* ── Legal ────────────────────────────────────────────────────────────── */
.legal-grid { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 60px; padding-top: 56px; }
.legal-toc { position: sticky; top: 104px; align-self: start; font-size: .88rem; }
.legal-toc ol { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 9px; }
.legal-toc a { color: var(--muted); }
.legal-toc a:hover { color: var(--text); }
.legal { max-width: 44em; }
.legal h2 { font: 400 1.85rem/1.1 var(--serif); margin: 48px 0 14px; scroll-margin-top: 100px; }
.legal h2:first-child { margin-top: 0; }
.legal p, .legal li { color: var(--text-2); font-size: 1rem; line-height: 1.75; }
.legal p + p { margin-top: 14px; }
.legal ul { padding-left: 20px; margin: 14px 0; }
.legal li + li { margin-top: 6px; }
.legal a { color: var(--violet-ink); border-bottom: 1px solid rgba(201,184,255,.3); }
@media (max-width: 860px) { .legal-grid { grid-template-columns: 1fr; gap: 20px; } .legal-toc { position: static; } }

/* ── Center card pages (TV link, Alexa link, invite) ──────────────────── */
.center-page { min-height: 100svh; display: grid; place-items: center; padding: 110px var(--gutter) 60px; position: relative; isolation: isolate; }
.center-page > .bg { position: fixed; inset: 0; z-index: -2; }
.center-page > .bg img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.85); }
.center-page::before { content: ""; position: fixed; inset: 0; z-index: -1; background: radial-gradient(ellipse at center, rgba(11,10,9,.72) 0%, rgba(11,10,9,.94) 70%); }
.panel { width: 100%; max-width: 460px; background: rgba(17,16,14,.8); border: 1px solid var(--line-2); border-radius: var(--r-lg); padding: clamp(28px, 5vw, 44px); backdrop-filter: blur(20px) saturate(130%); -webkit-backdrop-filter: blur(20px) saturate(130%); box-shadow: 0 40px 120px rgba(0,0,0,.5); }
.panel h1 { font: 400 2.5rem/1 var(--serif); letter-spacing: -0.015em; }
.panel .sub { color: var(--muted); margin: 12px 0 26px; }
.code-input { height: 76px !important; font: 500 2.1rem/1 var(--mono) !important; text-align: center; letter-spacing: .4em; text-transform: uppercase; padding-left: .4em !important; }

.eyebrow.plain::before { display: none; }
