/* Tokens taken from AetherLake Log (PhosphorConsole.jsx) so all four sites share one look. */
:root {
  --amber: #ffb000;
  --pink: #ff5c8a;
  --bg: #0b0805;
  --a10: rgba(255, 176, 0, 0.1);
  --a25: rgba(255, 176, 0, 0.25);
  --a40: rgba(255, 176, 0, 0.4);
  --a50: rgba(255, 176, 0, 0.5);
  --a60: rgba(255, 176, 0, 0.6);
  --glow: 0 0 8px rgba(255, 176, 0, 0.28);
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); }
body {
  font-family: var(--mono);
  color: var(--amber);
  text-shadow: var(--glow);
  -webkit-font-smoothing: antialiased;
  animation: crt-flicker 7s linear infinite;
  -webkit-tap-highlight-color: transparent;
}

.lake { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; opacity: 0.55; }

.shell {
  position: relative; z-index: 1;
  min-height: 100dvh;
  display: flex; flex-direction: column;
  padding: max(12px, env(safe-area-inset-top)) clamp(16px, 4vw, 48px) max(16px, env(safe-area-inset-bottom));
  max-width: 1200px; margin: 0 auto;
}

.top {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  border-bottom: 1px solid var(--a25); padding: 12px 0;
}
.brand { margin: 0; font-weight: 700; letter-spacing: 0.3em; font-size: 14px; }
.sub { margin: 2px 0 0; font-size: 10px; color: var(--a50); }
.status { margin: 0; font-size: 10px; color: var(--a60); white-space: nowrap; }
.dot { display: inline-block; width: 6px; height: 6px; background: var(--pink); box-shadow: 0 0 6px var(--pink); animation: blink 1.6s steps(2) infinite; vertical-align: 1px; }

main { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 6vh 0 4vh; }

.label { margin: 0 0 12px; font-size: 10px; letter-spacing: 0.3em; color: var(--a50); }
.hero h1 {
  margin: 0; font-size: clamp(44px, 11vw, 132px); line-height: 0.9; letter-spacing: 0.06em; font-weight: 700;
  text-shadow: 0 0 18px rgba(255, 176, 0, 0.45);
}
.pink { color: var(--pink); text-shadow: 0 0 18px rgba(255, 92, 138, 0.5); }
.lede { margin: 16px 0 0; font-size: 13px; color: var(--a60); max-width: 46ch; }

.channels {
  margin-top: 6vh;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px;
}
.ch {
  position: relative; display: flex; flex-direction: column; gap: 10px;
  min-height: 210px; padding: 18px;
  color: var(--amber); text-decoration: none;
  border: 1px solid var(--a40);
  background: rgba(11, 8, 5, 0.72);
  box-shadow: inset 0 0 40px rgba(255, 176, 0, 0.06);
  backdrop-filter: blur(2px);
  transition: background-color 160ms ease-out, border-color 160ms ease-out, transform 160ms ease-out;
}
.ch:focus-visible { outline: 2px solid var(--pink); outline-offset: 3px; }
.ch .num { font-size: 10px; color: var(--a50); display: flex; justify-content: space-between; }
.ch .num .tag { letter-spacing: 0.2em; }
.ch h2 { margin: auto 0 0; font-size: 18px; letter-spacing: 0.12em; font-weight: 700; }
.ch p { margin: 0; font-size: 11px; line-height: 1.55; color: var(--a60); }
.ch .go {
  align-self: flex-start; margin-top: 6px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.2em;
  border: 1px solid var(--amber); padding: 7px 12px;
  transition: background-color 160ms ease-out, color 160ms ease-out;
}
.ch .bars { display: flex; gap: 3px; align-items: flex-end; height: 18px; }
.ch .bars i { width: 3px; background: var(--amber); opacity: 0.7; height: 30%; animation: eq 900ms ease-in-out infinite alternate; }
.ch .bars i:nth-child(2) { animation-delay: -200ms; }
.ch .bars i:nth-child(3) { animation-delay: -450ms; }
.ch .bars i:nth-child(4) { animation-delay: -650ms; }
.ch .bars i:nth-child(5) { animation-delay: -100ms; }

@media (hover: hover) and (pointer: fine) {
  .ch:hover { border-color: var(--amber); background: rgba(255, 176, 0, 0.08); }
  .ch:hover .go { background: var(--amber); color: var(--bg); text-shadow: none; }
}
.ch:active { transform: scale(0.985); }

.hint { margin: 18px 0 0; font-size: 10px; color: var(--a40); }
kbd { font-family: inherit; border: 1px solid var(--a40); padding: 0 5px; color: var(--amber); }

.foot { border-top: 1px solid var(--a25); padding-top: 12px; font-size: 10px; color: rgba(255, 176, 0, 0.3); text-align: center; }

/* CRT overlay — same values as Log's CrtOverlay */
.crt { pointer-events: none; position: fixed; inset: 0; z-index: 65; }
.scan { position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(0,0,0,0.22) 0px, rgba(0,0,0,0.22) 1px, transparent 1px, transparent 3px); }
.vignette { position: absolute; inset: 0; background: radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,0.5) 100%); }

/* Boot sequence — same lines style as Log's BootSequence */
.boot {
  position: fixed; inset: 0; z-index: 80; background: var(--bg);
  display: flex; flex-direction: column; justify-content: center;
  padding: 0 clamp(24px, 8vw, 64px); font-size: 12px; line-height: 1.7;
  text-shadow: 0 0 8px rgba(255, 176, 0, 0.35);
  transition: opacity 300ms ease-out;
}
.boot pre { margin: 0; white-space: pre-wrap; font: inherit; }
.boot.done { opacity: 0; pointer-events: none; }
.cursor { margin-top: 8px; animation: blink 1s steps(2) infinite; }

@keyframes crt-flicker { 0%, 91%, 94%, 100% { opacity: 1; } 92.5% { opacity: 0.93; } }
@keyframes blink { to { visibility: hidden; } }
@keyframes eq { from { height: 20%; } to { height: 100%; } }

@media (max-width: 760px) {
  .channels { grid-template-columns: 1fr; }
  .ch { min-height: 0; }
  .ch h2 { margin-top: 8px; }
  .status { display: none; }
  .hint { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  body, .dot, .cursor, .ch .bars i { animation: none; }
  .ch, .ch .go, .boot { transition: none; }
}
