:root {
  --paper: #fbf8f3;
  --card: #ffffff;
  --ink: #1c1611;
  --ink-deep: #140f0b;
  --muted: #857a6e;
  --muted-deep: #6b6055;
  --faint: #b3a99c;
  --line: #eae3d6;
  --heat: #e8590c;
  --heat-deep: #b93206;
  --amber: #f2b53a;
  --green: #35b57d;
  --red: #e0362b;
  --safe: #4bb98a;
  --panel-ink: #f4ede3;
  --panel-muted: #98897a;
  --panel-line: rgba(244, 237, 227, 0.13);
  --thermal: linear-gradient(90deg, #f2b53a 0%, #e8590c 55%, #b93206 100%);
  --thermal-text: linear-gradient(96deg, #e8590c, #b93206);
  --btn-hot: linear-gradient(100deg, #c0360a, #8c2405);
  --shadow-lift: 0 2px 4px rgba(28, 22, 17, 0.05), 0 18px 40px -18px rgba(185, 50, 6, 0.32);
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Archivo", "Helvetica Neue", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: var(--font-body);
  background:
    radial-gradient(ellipse 60% 50% at 4% 104%, rgba(242, 181, 58, 0.32), transparent 62%),
    var(--paper);
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: rgba(232, 89, 12, 0.18); }

a { color: inherit; text-decoration: none; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.hp { position: absolute; left: -9999px; }

.signal-strip {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 5px;
  display: flex;
  z-index: 100;
}

.signal-strip i { flex: 1; }
.signal-strip i:nth-child(1) { background: var(--green); }
.signal-strip i:nth-child(2) { background: var(--amber); }
.signal-strip i:nth-child(3) { background: var(--red); }

/* ---------- Thermal lens ---------- */

.lens {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.2s ease;
  background: radial-gradient(circle 250px at var(--mx, 22%) var(--my, 60%), rgba(232, 89, 12, 0.2), rgba(242, 181, 58, 0.11) 45%, transparent 72%);
}

.lens.on { opacity: 1; }

/* ---------- Stage ---------- */

.stage {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(300px, 30vw, 430px);
}

.editorial {
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding: 48px clamp(26px, 5vw, 78px) 34px;
  min-width: 0;
}

/* ---------- Top ---------- */

.stage-top {
  display: flex;
  align-items: baseline;
  gap: 18px;
  flex-wrap: wrap;
}

.brand { display: flex; align-items: baseline; gap: 2px; }

.brand .word {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1;
}

.brand .degree {
  font-family: var(--font-display);
  font-size: 27px;
  font-weight: 600;
  color: var(--heat);
  transform: translateY(-11px);
  display: inline-block;
}

.brand-sub {
  font-size: 10.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted-deep);
  padding-bottom: 4px;
  border-bottom: 1px solid var(--line);
}

.soon-tag {
  margin-left: auto;
  align-self: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #fff;
  background: var(--ink);
  border-radius: 999px;
  padding: 8px 16px;
}

/* ---------- Hero ---------- */

.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 26px 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--heat-deep);
  font-weight: 600;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 16px 7px 13px;
}

.pulse {
  position: relative;
  flex-shrink: 0;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--heat);
}

.pulse::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--heat);
  animation: ring 2.6s ease-out infinite;
}

@keyframes ring {
  0% { transform: scale(1); opacity: 0.5; }
  70%, 100% { transform: scale(3.6); opacity: 0; }
}

.headline {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(42px, 5.6vw, 88px);
  line-height: 0.97;
  letter-spacing: -0.025em;
  margin: 26px 0 0;
}

.headline .line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.09em;
  margin-bottom: -0.09em;
}

.headline .line > span {
  display: block;
  transform: translateY(105%);
  animation: liftIn 0.95s cubic-bezier(0.19, 1, 0.22, 1) var(--d, 0s) forwards;
}

@keyframes liftIn { to { transform: translateY(0); } }

.headline em {
  font-style: italic;
  font-weight: 600;
  background: var(--thermal-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.tagline {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.3vw, 34px);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin-top: 24px;
}

.lede {
  color: var(--muted-deep);
  font-size: clamp(15px, 1.15vw, 17px);
  margin-top: 18px;
  max-width: 48ch;
}

.lede b { font-weight: 700; padding-bottom: 1px; border-bottom: 2px solid currentColor; }
.c-green { color: #1f8f5f; }
.c-amber { color: #b57a08; }
.c-red { color: var(--red); }

/* ---------- Notify form ---------- */

.notify {
  margin-top: 34px;
  display: flex;
  gap: 10px;
  width: 100%;
  max-width: 520px;
  flex-wrap: wrap;
}

.notify input[type="email"] {
  flex: 1 1 230px;
  min-width: 0;
  font-family: inherit;
  font-size: 15px;
  color: inherit;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 14px 22px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.notify input[type="email"]::placeholder { color: var(--muted); }

.notify input[type="email"]:focus {
  outline: none;
  border-color: var(--heat);
  box-shadow: 0 0 0 4px rgba(232, 89, 12, 0.14);
}

.btn {
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  border: 0;
  border-radius: 999px;
  padding: 14px 28px;
  color: #fff;
  background: var(--ink);
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s ease;
}

.btn.hot { background: var(--btn-hot); }

.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.btn[disabled] { opacity: 0.65; cursor: default; transform: none; box-shadow: none; }

.micro { margin-top: 14px; font-size: 12.5px; color: var(--muted-deep); }

.notify-done {
  margin-top: 34px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 16px;
  font-weight: 500;
  color: var(--heat-deep);
}

.notify-done::before {
  content: "";
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--thermal);
  flex-shrink: 0;
}

/* ---------- Facts ---------- */

.facts {
  display: grid;
  grid-template-columns: 1.7fr 1fr 1.2fr;
  border-top: 1px solid var(--line);
  padding-top: 24px;
  gap: 28px;
}

.fact {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.fact + .fact { padding-left: 28px; }

.fact + .fact::before {
  content: "";
  position: absolute;
  left: 0; top: 4px; bottom: 4px;
  width: 1px;
  background: var(--line);
}

.fact strong {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  line-height: 1;
}

.fact span { font-size: 13px; color: var(--muted-deep); }

.fact-lead strong {
  font-size: 50px;
  background: var(--thermal-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.fact-lead span { font-size: 14.5px; color: var(--ink); max-width: 32ch; }

/* ---------- Footer ---------- */

.stage-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--muted-deep);
}

.stage-foot a { font-weight: 500; border-bottom: 1px solid var(--line); }
.stage-foot a:hover { color: var(--heat-deep); border-color: var(--heat); }

/* ---------- Instrument panel ---------- */

.panel {
  position: relative;
  overflow: hidden;
  background: var(--ink-deep);
  color: var(--panel-ink);
  display: flex;
  flex-direction: column;
  gap: 26px;
  padding: 48px clamp(26px, 2.6vw, 40px) 40px;
}

.panel-glow {
  position: absolute;
  left: -30%; bottom: -34%;
  width: 150%; height: 78%;
  border-radius: 50%;
  background-color: var(--state-glow);
  filter: blur(60px);
  animation: breathe 8s ease-in-out infinite;
  transition: background-color 1s ease;
  pointer-events: none;
}

@keyframes breathe {
  0%, 100% { transform: scale(1); opacity: 0.75; }
  50% { transform: scale(1.12); opacity: 1; }
}

.panel > *:not(.panel-glow) { position: relative; z-index: 1; }

.panel-head {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--panel-muted);
}

.live-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--safe);
  flex-shrink: 0;
  animation: blink 2.6s ease-in-out infinite;
}

@keyframes blink { 50% { opacity: 0.25; } }

.panel[data-state="green"] { --state: var(--green); --state-glow: rgba(53, 181, 125, 0.5); }
.panel[data-state="amber"] { --state: var(--amber); --state-glow: rgba(242, 181, 58, 0.5); }
.panel[data-state="red"] { --state: var(--red); --state-glow: rgba(224, 54, 43, 0.55); }

.status {
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.status.out { opacity: 0; transform: translateY(6px); }

.status-name {
  font-family: var(--font-display);
  font-size: clamp(40px, 3.8vw, 56px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--state);
  transition: color 0.6s ease;
}

.status-desc {
  margin-top: 12px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--panel-muted);
  max-width: 30ch;
}

.states-hint {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--panel-muted);
  opacity: 0.7;
}

.states {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.states-hint { margin-bottom: 6px; }

.state-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid transparent;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  opacity: 0.42;
  transition: opacity 0.5s ease, border-color 0.5s ease, background-color 0.5s ease, transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.state-row:hover { opacity: 0.8; transform: translateX(3px); }
.state-row:focus-visible { outline: 2px solid var(--panel-ink); outline-offset: 2px; opacity: 1; }

.state-row.on {
  opacity: 1;
  border-color: var(--panel-line);
  background: rgba(255, 255, 255, 0.045);
  transform: none;
}

.state-row[data-state="red"] { --c: var(--red); }
.state-row[data-state="amber"] { --c: var(--amber); }
.state-row[data-state="green"] { --c: var(--green); }

.lamp {
  position: relative;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--c);
  box-shadow: inset 0 -7px 12px rgba(0, 0, 0, 0.35), inset 0 3px 6px rgba(255, 255, 255, 0.25);
  filter: saturate(0.45) brightness(0.55);
  transition: filter 0.5s ease, box-shadow 0.5s ease;
}

.state-row.on .lamp {
  filter: none;
  box-shadow: inset 0 -7px 12px rgba(0, 0, 0, 0.25), inset 0 3px 6px rgba(255, 255, 255, 0.35), 0 0 30px var(--c);
}

.state-row.on .lamp::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--c);
  animation: halo 2.2s ease-out infinite;
}

@keyframes halo {
  0% { transform: scale(1); opacity: 0.7; }
  70%, 100% { transform: scale(1.7); opacity: 0; }
}

.state-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }

.state-text strong {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c);
}

.state-row:not(.on) .state-text strong { color: var(--panel-ink); }

.state-text span { font-size: 13px; color: var(--panel-muted); line-height: 1.4; }

.panel-foot {
  margin-top: auto;
  display: flex;
  gap: 14px;
  border-top: 1px solid var(--panel-line);
  padding-top: 18px;
}

.stat { flex: 1; display: flex; flex-direction: column; gap: 3px; }

.stat span {
  font-size: 9.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--panel-muted);
}

.stat strong { font-size: 14px; font-weight: 600; }
.stat .ok { color: var(--green); }
.stat .cut { color: var(--red); }

/* ---------- Reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--d, 0s);
}

.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */

@media (max-width: 1020px) {
  .stage { grid-template-columns: minmax(0, 1fr); }

  .editorial { padding: 44px 26px 30px; gap: 28px; }
  .hero { padding: 12px 0 4px; }

  .panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas:
      "head states"
      "status states"
      "foot states";
    align-content: start;
    gap: 18px 32px;
    padding: 34px 26px 30px;
  }
  .panel-head { grid-area: head; }
  .status { grid-area: status; }
  .states { grid-area: states; }
  .panel-foot { grid-area: foot; align-self: end; }
  .panel-glow { left: -20%; bottom: -55%; height: 115%; }
}

@media (max-width: 560px) {
  .brand .word { font-size: 34px; }
  .brand .degree { font-size: 23px; transform: translateY(-9px); }
  .headline { font-size: clamp(38px, 11vw, 54px); }
  .lede { margin-top: 22px; }
  .facts { grid-template-columns: 1fr; gap: 20px; }
  .fact + .fact { padding-left: 0; padding-top: 20px; }
  .fact + .fact::before { left: 0; right: 0; top: 0; bottom: auto; width: auto; height: 1px; }
  .fact-lead strong { font-size: 44px; }
  .notify input[type="email"], .btn { flex: 1 1 100%; }
  .panel {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "head" "status" "states" "foot";
  }
  .soon-tag { margin-left: 0; }
  .tagline { margin-top: 18px; }
}

@media (min-width: 1021px) and (max-height: 980px) {
  .editorial { gap: 22px; padding: 36px clamp(26px, 4.4vw, 64px) 28px; }
  .hero { padding: 10px 0; }
  .headline { font-size: clamp(40px, 4.7vw, 68px); }
  .tagline { margin-top: 18px; }
  .lede { margin-top: 14px; }
  .notify { margin-top: 26px; }
  .facts { padding-top: 20px; }
  .fact-lead strong { font-size: 42px; }
  .panel { padding-top: 36px; gap: 20px; }
  .status-name { font-size: clamp(36px, 3.3vw, 48px); }
  .state-row { padding: 9px 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .headline .line > span { transform: none; }
  .lens { display: none; }
}
