:root {
  color-scheme: dark;
  --ink: #f6f3e9;
  --muted: #9b9a91;
  --void: #090a09;
  --panel: #111310;
  --line: #2b2d28;
  --acid: #d9ff43;
  --orange: #ff6b2c;
  --mono: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--void); scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--void); font-family: var(--sans); }
a { color: inherit; }
.shell { width: min(1180px, calc(100% - 34px)); margin-inline: auto; }

.nav {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  font: 700 12px/1 var(--mono);
  letter-spacing: .12em;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-size: 15px; }
.status-dot { width: 9px; height: 9px; background: var(--acid); border-radius: 50%; box-shadow: 0 0 20px var(--acid); }
.nav-link { color: var(--muted); text-decoration: none; }
.nav-link:hover { color: var(--acid); }

.hero { padding: 86px 0 90px; }
.eyebrow, .section-label {
  margin: 0;
  color: var(--muted);
  font: 700 11px/1.4 var(--mono);
  letter-spacing: .13em;
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, .55fr); gap: 70px; align-items: center; }
h1 {
  max-width: 900px;
  margin: 22px 0 30px;
  font-size: clamp(50px, 8vw, 112px);
  line-height: .86;
  letter-spacing: -.075em;
  font-weight: 900;
}
h1 span { color: var(--acid); }
.lead { margin: 0; font-size: clamp(20px, 2vw, 28px); line-height: 1.36; font-weight: 630; letter-spacing: -.025em; }
.timing { margin: 22px 0 0; color: var(--muted); font: 12px/1.5 var(--mono); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 38px; }
.button {
  min-height: 52px;
  padding: 0 21px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 26px;
  border: 1px solid var(--line);
  text-decoration: none;
  font: 800 12px/1 var(--mono);
  letter-spacing: .07em;
  transition: transform .15s ease, background .15s ease;
}
.button:hover { transform: translateY(-2px); }
.primary { background: var(--acid); color: #080900; border-color: var(--acid); }
.secondary:hover { border-color: var(--ink); }

.clock-card { padding: 23px; border: 1px solid var(--line); background: radial-gradient(circle at 50% 35%, #22251a 0, #111310 60%); }
.clock-face { position: relative; width: 100%; aspect-ratio: 1; border: 1px solid #45493d; border-radius: 50%; }
.clock-face::before, .clock-face::after { content: ""; position: absolute; inset: 10%; border: 1px solid #292c25; border-radius: 50%; }
.clock-face::after { inset: 24%; }
.tick { position: absolute; left: 50%; top: 3%; width: 1px; height: 8%; background: #7a7f6c; transform-origin: 50% 588%; }
.t1 { transform: rotate(30deg); } .t2 { transform: rotate(60deg); } .t3 { transform: rotate(90deg); }
.t4 { transform: rotate(120deg); } .t5 { transform: rotate(150deg); } .t6 { transform: rotate(180deg); }
.t7 { transform: rotate(210deg); } .t8 { transform: rotate(240deg); } .t9 { transform: rotate(270deg); }
.t10 { transform: rotate(300deg); } .t11 { transform: rotate(330deg); }
.hand { position: absolute; bottom: 50%; left: calc(50% - 2px); width: 4px; transform-origin: 50% 100%; border-radius: 4px; }
.hour { height: 26%; background: var(--ink); }
.minute { height: 37%; width: 2px; left: calc(50% - 1px); background: var(--acid); box-shadow: 0 0 14px #d9ff4377; }
.pin { position: absolute; width: 11px; height: 11px; left: calc(50% - 5.5px); top: calc(50% - 5.5px); border-radius: 50%; background: var(--orange); }
.clock-caption { display: flex; justify-content: space-between; gap: 12px; margin-top: 18px; font: 700 10px/1 var(--mono); }
.clock-caption span { color: var(--acid); }
.clock-caption time { font: inherit; }
.clock-caption code { color: var(--muted); }

.flow-section { border-block: 1px solid var(--line); background: #0d0e0c; padding: 27px 0 34px; }
.flow { display: grid; grid-template-columns: repeat(5, 1fr); padding: 0; margin: 22px 0 0; list-style: none; border: 1px solid var(--line); }
.flow li { position: relative; min-height: 112px; padding: 16px; display: flex; flex-direction: column; justify-content: space-between; border-right: 1px solid var(--line); }
.flow li:last-child { border-right: 0; }
.flow li:not(:last-child)::after { content: "→"; position: absolute; right: -10px; top: 45px; z-index: 1; background: #0d0e0c; color: var(--muted); padding: 3px; }
.flow b { color: #55584f; font: 500 10px/1 var(--mono); }
.flow span { font: 850 clamp(22px, 3.4vw, 45px)/1 var(--mono); letter-spacing: -.06em; }
.flow .wake { background: var(--orange); color: #100a07; }
.flow .wake b { color: #592313; }

.details { display: grid; grid-template-columns: 1fr 1fr; gap: 17px; padding: 70px 0; }
.stats-panel, .api-panel { min-width: 0; border: 1px solid var(--line); background: var(--panel); }
.panel-head { min-height: 52px; padding: 0 18px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.panel-head > span { color: var(--muted); font: 700 9px/1 var(--mono); letter-spacing: .08em; }
#stats-state.ok { color: var(--acid); }
#stats-state.error { color: var(--orange); }
.stats { display: grid; grid-template-columns: 1fr 1fr; margin: 0; }
.stats div { min-height: 122px; padding: 20px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stats div:nth-child(even) { border-right: 0; }
.stats dt { color: var(--muted); font: 700 10px/1 var(--mono); }
.stats dd { margin: 21px 0 0; font: 750 33px/1 var(--mono); }
.stats-note { margin: 0; padding: 16px 20px; color: var(--muted); font: 10px/1.5 var(--mono); }
pre { margin: 0; min-height: 330px; overflow: auto; padding: 25px; color: #cccfc5; font: 12px/1.65 var(--mono); }
pre i { color: var(--orange); font-style: normal; font-weight: 800; }
pre em { color: var(--acid); font-style: normal; }
pre strong { color: var(--ink); }

footer { min-height: 95px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 20px; color: var(--muted); font: 700 9px/1.5 var(--mono); letter-spacing: .08em; }
footer nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px 20px; }
footer a { text-decoration: none; }
footer a:hover { color: var(--acid); }

@media (max-width: 800px) {
  .hero { padding: 55px 0 65px; }
  .hero-grid { grid-template-columns: 1fr; gap: 55px; }
  .clock-card { max-width: 390px; }
  .details { grid-template-columns: 1fr; }
  footer { padding: 24px 0; align-items: flex-start; flex-wrap: wrap; }
  footer nav { width: 100%; justify-content: flex-start; }
}

@media (max-width: 560px) {
  .shell { width: min(100% - 24px, 1180px); }
  .nav { min-height: 63px; }
  h1 { font-size: clamp(45px, 16vw, 75px); }
  .flow { grid-template-columns: 1fr; }
  .flow li { min-height: 67px; flex-direction: row; align-items: center; border-right: 0; border-bottom: 1px solid var(--line); }
  .flow li:last-child { border-bottom: 0; }
  .flow li:not(:last-child)::after { content: "↓"; top: auto; bottom: -10px; right: 18px; }
  .flow span { font-size: 26px; }
  .stats dd { font-size: 26px; }
  footer { padding: 24px 0; align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button { transition: none; }
}
