:root {
  color-scheme: dark;
  --bg: #06070a;
  --bg-2: #0b0d11;
  --line: rgba(255, 255, 255, 0.07);
  --line-2: rgba(255, 255, 255, 0.13);
  --text: #e9eef0;
  --muted: #8b959c;
  --dim: #5d666d;
  --red: #ff2f55;
  --cyan: #74f0e2;
  --gold: #e7c47c;
  --display: 'Montserrat', system-ui, sans-serif;
  --body: 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --mx: 50vw;
  --my: 40vh;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; min-height: 100svh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--text);
  font: 400 16px/1.6 var(--body); -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }

/* ---------- background ---------- */
.bg { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 20%, transparent 80%);
  opacity: .6;
}
/* A brighter copy of the grid, only visible around the cursor. */
.grid--lit {
  background-image:
    linear-gradient(rgba(116, 240, 226, .22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 47, 85, .22) 1px, transparent 1px);
  mask-image: radial-gradient(260px circle at var(--mx) var(--my), #000, transparent 70%);
  opacity: 1;
}
.glow { position: absolute; width: 70vmax; height: 70vmax; border-radius: 50%; filter: blur(100px); }
.glow--red { background: var(--red); left: -38vmax; bottom: -42vmax; opacity: .22; animation: drift 18s ease-in-out infinite alternate; }
.glow--cyan { background: #1d6f78; right: -36vmax; top: -40vmax; opacity: .38; animation: drift 22s ease-in-out -6s infinite alternate-reverse; }
@keyframes drift { to { transform: translate(6vmax, -4vmax); } }
.scan {
  position: absolute; inset: 0; opacity: .5;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .18) 0 1px, transparent 1px 3px);
}

/* ---------- stage ---------- */
/* Everything fits one screen: sizes follow the viewport height as well as
   the width. Wide screens get the emblem on the left, content on the right. */
.stage {
  flex: 1; width: min(1180px, 100% - 32px); margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  align-items: center; gap: clamp(24px, 5vw, 80px);
  padding: clamp(16px, 3vh, 40px) 0;
}
.side { display: flex; flex-direction: column; align-items: flex-start; text-align: left; min-width: 0; }

.mark {
  position: relative; justify-self: center; width: min(100%, 460px, 62vh); aspect-ratio: 1;
  display: grid; place-items: center;
}
.mark img {
  position: relative; width: 80%;
  opacity: .06; filter: grayscale(1) brightness(.6);
  animation: power-on 1.6s .35s steps(1, end) forwards, breathe 5s 2.2s ease-in-out infinite;
}
/* Neon sign catching: a few dead flickers, then it holds. */
@keyframes power-on {
  0%   { opacity: .06; filter: grayscale(1) brightness(.6); }
  12%  { opacity: .9;  filter: drop-shadow(0 0 18px rgba(255, 47, 85, .6)); }
  16%  { opacity: .1;  filter: grayscale(1) brightness(.6); }
  30%  { opacity: .75; filter: drop-shadow(0 0 12px rgba(255, 47, 85, .4)); }
  34%  { opacity: .15; filter: grayscale(1) brightness(.6); }
  52%  { opacity: 1;   filter: drop-shadow(0 0 22px rgba(255, 47, 85, .55)) drop-shadow(0 0 60px rgba(255, 47, 85, .25)); }
  56%  { opacity: .4;  filter: drop-shadow(0 0 8px rgba(255, 47, 85, .3)); }
  100% { opacity: 1;   filter: drop-shadow(0 0 22px rgba(255, 47, 85, .55)) drop-shadow(0 0 60px rgba(255, 47, 85, .25)); }
}
@keyframes breathe {
  50% { filter: drop-shadow(0 0 30px rgba(255, 47, 85, .7)) drop-shadow(0 0 80px rgba(255, 47, 85, .3)); transform: translateY(-6px); }
}
.ring {
  position: absolute; inset: 2%; border-radius: 50%;
  border: 1px solid rgba(116, 240, 226, .16);
  background: radial-gradient(circle, rgba(255, 47, 85, .12), transparent 62%);
  opacity: 0; animation: fade-in 1s 1.2s forwards, spin 26s linear infinite;
}
.ring::before {
  content: ''; position: absolute; top: -4px; left: 50%; width: 7px; height: 7px; border-radius: 50%;
  background: var(--cyan); box-shadow: 0 0 14px var(--cyan);
}
.ring--2 { inset: 14%; border-color: rgba(255, 47, 85, .2); background: none; animation-duration: 1s, 18s; animation-direction: normal, reverse; }
.ring--2::before { background: var(--red); box-shadow: 0 0 14px var(--red); }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fade-in { to { opacity: 1; } }

.wordmark {
  display: flex; margin: 0;
  font: 800 clamp(22px, min(3vw, 4.6vh), 36px)/1 var(--display); letter-spacing: .14em;
  text-shadow: 0 0 22px rgba(233, 238, 240, .25);
}
.wordmark span { opacity: 0; transform: translateY(8px); animation: letter .5s var(--ease) forwards; }
.wordmark span:nth-child(1) { animation-delay: 1.1s; }
.wordmark span:nth-child(2) { animation-delay: 1.16s; }
.wordmark span:nth-child(3) { animation-delay: 1.22s; }
.wordmark span:nth-child(4) { animation-delay: 1.28s; }
.wordmark span:nth-child(6) { animation-delay: 1.4s; }
.wordmark span:nth-child(7) { animation-delay: 1.46s; }
.wordmark span:nth-child(8) { animation-delay: 1.52s; }
.wordmark .gap { width: .5em; }
.wordmark .dim { color: var(--muted); font-weight: 700; }
@keyframes letter { to { opacity: 1; transform: none; } }

.reveal, .eyebrow, h1, .lead, .term, .cta, .countdown { opacity: 0; animation: rise .8s var(--ease) forwards; }
.eyebrow { animation-delay: 1.6s; }
h1 { animation-delay: 1.75s; }
.lead { animation-delay: 1.9s; }
.countdown { animation-delay: 2s; }
.term { animation-delay: 2.05s; }
.cta { animation-delay: 2.2s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.eyebrow { margin: clamp(8px, 1.4vh, 14px) 0 0; font: 400 13px/1 var(--mono); letter-spacing: .04em; color: var(--muted); }
.brace { color: var(--red); text-shadow: 0 0 12px rgba(255, 47, 85, .6); }

h1 {
  margin: clamp(14px, 3vh, 32px) 0 0;
  font: 800 clamp(30px, min(4.6vw, 7.4vh), 62px)/1.05 var(--display); letter-spacing: -0.025em; text-wrap: balance;
}
.grad {
  background: linear-gradient(90deg, var(--red) 0%, #ff7a8d 35%, var(--gold) 65%, var(--cyan) 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: sheen 6s ease-in-out infinite alternate;
}
@keyframes sheen { to { background-position: 100% 0; } }
.lead { max-width: 480px; margin: clamp(8px, 1.6vh, 18px) 0 0; font-size: clamp(15px, 2vh, 17px); color: var(--muted); }

/* ---------- terminal ---------- */
.term {
  width: min(540px, 100%); margin-top: clamp(16px, 3.2vh, 34px); text-align: left;
  border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden;
  background: rgba(11, 13, 17, .82); backdrop-filter: blur(8px);
  box-shadow: 0 30px 60px -30px #000, 0 0 0 1px rgba(255, 47, 85, .06);
}
.term-bar {
  display: flex; align-items: center; gap: 7px; padding: 10px 14px;
  border-bottom: 1px solid var(--line); font: 400 12px/1 var(--mono); color: var(--dim);
}
.term-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-2); }
.term-bar i:first-child { background: var(--red); box-shadow: 0 0 6px var(--red); }
.term-bar span { margin-left: 8px; }
/* min-height reserves the six log lines so the page doesn't jump while typing. */
.term-body {
  --lh: clamp(19px, 2.7vh, 25px);
  list-style: none; margin: 0; padding: clamp(8px, 1.4vh, 14px) 16px 4px;
  min-height: calc(var(--lh) * 6 + 14px); font: 400 13px/var(--lh) var(--mono);
}
.term-body li { display: flex; gap: 10px; align-items: baseline; white-space: nowrap; }
.term-body .p { color: var(--red); }
.term-body .k { color: var(--text); }
.term-body .dots { flex: 1; min-width: 12px; border-bottom: 1px dotted var(--dim); transform: translateY(-4px); opacity: .6; }
.term-body .v { color: var(--cyan); }
.term-body .v.warn { color: var(--gold); }
.term-body .caret { display: inline-block; width: 8px; height: 15px; background: var(--cyan); transform: translateY(3px); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.term-tail { min-height: 0; padding-top: 4px; padding-bottom: 12px; }
.term-tail:empty { display: none; }
.build { padding: 4px 16px 10px; font: 400 13px/1 var(--mono); }
.build-row { display: flex; justify-content: space-between; margin-bottom: 8px; }
.build-row span:first-child::before { content: '> '; color: var(--red); }
.build-pct { color: var(--gold); }
.build-track { height: 6px; border-radius: 99px; background: rgba(255, 255, 255, .06); overflow: hidden; }
.build-fill {
  height: 100%; width: 0; border-radius: inherit;
  background: linear-gradient(90deg, var(--red), var(--gold), var(--cyan));
  box-shadow: 0 0 14px rgba(255, 47, 85, .6);
  transition: width .25s linear;
}

/* ---------- countdown (only when a launch date is set) ---------- */
.countdown { display: flex; gap: 12px; margin-top: clamp(14px, 2.6vh, 28px); }
.countdown[hidden] { display: none; }
.countdown div {
  min-width: 74px; padding: 12px 8px 10px; border-radius: 10px;
  border: 1px solid var(--line-2); background: rgba(11, 13, 17, .7);
}
.countdown b { display: block; font: 800 28px/1 var(--display); font-variant-numeric: tabular-nums; }
.countdown small { display: block; margin-top: 6px; font: 400 11px/1 var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }

/* ---------- call to action ---------- */
.cta { margin-top: clamp(14px, 2.6vh, 28px); }
.cta:not(:has(.btn:not([hidden]))) { display: none; }
.btn {
  display: inline-flex; align-items: center; gap: 10px; height: 48px; padding: 0 22px; border-radius: 10px;
  background: var(--red); color: #fff; font: 600 15px/1 var(--display);
  box-shadow: 0 0 0 1px rgba(255, 47, 85, .5), 0 8px 28px -8px rgba(255, 47, 85, .8);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 0 0 1px rgba(255, 47, 85, .8), 0 12px 36px -6px rgba(255, 47, 85, .95); }
.btn[hidden] { display: none; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }

/* ---------- ticker ---------- */
.ticker {
  overflow: hidden; border-block: 1px solid var(--line); padding: clamp(9px, 1.4vh, 14px) 0;
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.ticker-track { display: flex; width: max-content; animation: ticker 40s linear infinite; }
.ticker-track span { padding: 0 22px; font: 500 13px/1 var(--mono); letter-spacing: .12em; color: var(--muted); white-space: nowrap; }
.ticker-track span b { color: var(--red); font-weight: 400; margin-right: 22px; }
@keyframes ticker { to { transform: translateX(-50%); } }

.foot { padding: clamp(8px, 1.6vh, 18px) 16px clamp(10px, 2vh, 22px); text-align: center; font-size: 12.5px; color: var(--dim); }

/* Narrow screens: one centred column, emblem on top. */
@media (max-width: 900px) {
  .stage { grid-template-columns: 1fr; gap: clamp(10px, 2vh, 24px); align-content: center; }
  .side { align-items: center; text-align: center; }
  .mark { width: min(60vw, 22vh, 260px); }
  .wordmark { justify-content: center; font-size: clamp(22px, 3.6vh, 32px); }
  h1 { font-size: clamp(28px, min(8.4vw, 5.2vh), 52px); }
}
@media (max-width: 560px) {
  .term-body { --lh: clamp(17px, 2.4vh, 22px); font-size: 11.5px; padding-inline: 12px; }
  .term-bar { padding-block: 8px; }
  .build { padding-inline: 12px; }
  .countdown { gap: 8px; }
  .countdown div { min-width: 64px; }
  .countdown b { font-size: 22px; }
}
/* Short phones: the ticker is decoration, the terminal is the story. */
@media (max-width: 560px) and (max-height: 720px) {
  .ticker { display: none; }
  .mark { width: min(60vw, 18vh); }
  .foot { padding-block: 6px 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0s !important; animation-delay: 0s !important; transition: none !important; }
  .ticker-track { animation: none; }
}
