:root {
  --bg: #f4f1ea;
  --ink: #0a0a0a;
  --dim: #7a7569;
  --line: #d8d2c4;
  --accent: #0a0a0a;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --display: "Fraunces", "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html, body, #root { height: 100%; margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.page {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: var(--bg);
  transition: background 320ms ease;
}

.wave-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: .035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' seed='5'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.6'/></svg>");
}

/* ---------- Top bar ---------- */
.top {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 32px;
  border-bottom: 1px solid var(--line);
}
.top-left .wordmark {
  height: 18px;
  display: block;
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  border: 1px solid;
  padding: 7px 12px 7px 10px;
  border-radius: 999px;
}
.pulse {
  position: relative;
  width: 8px; height: 8px; border-radius: 50%;
  display: inline-block;
}
.pulse-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  animation: ring 1.8s ease-out infinite;
  opacity: 0.6;
}
@keyframes ring {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(3.2); opacity: 0; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  justify-items: center;
  padding: 24px 32px 28px;
  gap: 32px;
  min-height: 0;
}

.hero-inner {
  width: 100%;
  max-width: 1100px;
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 28px;
}

.hero-mark {
  width: 130px;
  height: auto;
  filter: drop-shadow(0 10px 60px rgba(0,0,0,0.35));
}
.hero-mark .cres {
  transform-origin: 50% 100%;
  animation: cres 4.6s ease-in-out infinite;
}
.hero-mark .cres-1 { animation-delay: 0s; }
.hero-mark .cres-2 { animation-delay: 0.18s; }
.hero-mark .cres-3 { animation-delay: 0.36s; }

@keyframes cres {
  0%, 100% { transform: translateY(0) scaleY(1); }
  50%      { transform: translateY(-6px) scaleY(1.06); }
}

.headline {
  font-family: var(--display);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(48px, 8vw, 120px);
  line-height: 0.95;
  letter-spacing: -0.025em;
  margin: 0;
  text-wrap: balance;
}
.headline-line { display: inline-block; }
.word {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.4em);
  animation: rise 900ms cubic-bezier(.2,.7,.2,1) forwards;
}
@keyframes rise {
  to { opacity: 1; transform: translateY(0); }
}

.sub {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  max-width: 480px;
  margin: 0;
  letter-spacing: 0.005em;
}

/* meta row */
.meta-row {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-top: 4px;
}
.meta-divider {
  width: 1px;
  height: 48px;
}
.eta {
  text-align: left;
}
.eta-label {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.eta-clock {
  font-family: var(--mono);
  font-size: 30px;
  letter-spacing: -0.01em;
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}
.eta-clock .unit { display: inline-flex; align-items: baseline; gap: 2px; }
.eta-clock .u { font-size: 13px; letter-spacing: 0.04em; }
.eta-clock .colon {
  display: inline-block;
  transform: translateY(-2px);
  animation: blink 1s step-start infinite;
}
@keyframes blink { 50% { opacity: 0.25; } }
.eta-sub {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 2px;
}

.meta-block { text-align: left; display: grid; gap: 4px; }
.meta-label {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.meta-link {
  font-family: var(--mono);
  font-size: 13px;
  text-decoration: none;
  letter-spacing: 0.005em;
}
.meta-link:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Log panel ---------- */
.log {
  position: absolute;
  right: 32px;
  bottom: 70px;
  width: min(360px, 36vw);
  border: 1px solid;
  background: color-mix(in oklab, var(--bg) 88%, transparent);
  backdrop-filter: blur(6px);
  font-family: var(--mono);
  font-size: 11.5px;
  padding: 12px 14px 12px 14px;
  border-radius: 2px;
  z-index: 3;
}
.log-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 10px;
  margin-bottom: 8px;
  border-bottom: 1px dashed var(--line);
  letter-spacing: 0.04em;
}
.log-head .dot { width: 6px; height: 6px; border-radius: 50%; animation: blink 1.2s step-start infinite; }
.log-meta { margin-left: auto; opacity: 0.6; }
.log-body { display: grid; gap: 4px; }
.log-line {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  gap: 8px;
  align-items: baseline;
  letter-spacing: 0.005em;
  animation: slide 360ms ease-out;
}
.log-t { opacity: 0.55; }
.log-arrow { opacity: 0.5; }
.log-msg { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.log-state { opacity: 0.7; }
.blink { font-style: normal; animation: blink 1s step-start infinite; }
@keyframes slide {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Ticker ---------- */
.ticker {
  position: relative;
  z-index: 2;
  border-top: 1px solid;
  overflow: hidden;
  height: 38px;
}
.ticker-track {
  display: flex;
  gap: 56px;
  padding: 12px 0;
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.05em;
  text-transform: lowercase;
  animation: marquee 60s linear infinite;
  width: max-content;
}
.ticker-item { display: inline-block; }
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* responsive tweaks */
@media (max-width: 900px) {
  .log { display: none; }
  .meta-row { flex-direction: column; gap: 16px; }
  .meta-divider { display: none; }
}
