/*
 * Holding page for aether.run. A static copy of the home hero on `improvements`:
 * colors from site/src/styles/tokens.css (no new ones), type and buttons from
 * base.css, the frame from TerminalChrome.astro, the table from ProcessTable.astro,
 * and the dot field from hero-field.ts (pre-rendered to field.svg; no JS here).
 */
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url(/fonts/jetbrains-mono-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Same weight range as the Latin face on purpose: faces whose descriptors differ
   aren't merged by unicode-range, so Chrome would pick this one for all text and
   fall back to a system mono for Latin. */
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url(/fonts/jetbrains-mono-symbols.woff2) format("woff2");
  unicode-range: U+2190, U+2192, U+2197, U+2264-2265, U+250A, U+258B, U+25B6, U+25CF, U+26A0-26A1, U+2715;
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/ibm-plex-sans-latin-400.woff2) format("woff2");
}
/* Metric-matched to Arial so the swap doesn't reflow the lead (from base.css). */
@font-face {
  font-family: "IBM Plex Sans Fallback";
  src: local("Arial"), local("ArialMT"), local("Liberation Sans"), local("Arimo");
  size-adjust: 100.24%;
  ascent-override: 102.25%;
  descent-override: 27.43%;
  line-gap-override: 0%;
}

:root {
  color-scheme: dark;
  --void: #070d0b;
  --surface: #0c1512;
  --raised: #111d19;
  --border: #1e4a38;
  --border-bright: #2d6e52;
  --cyan: #00e5ff;
  --cyan-dim: #7efff5;
  --green: #4ade80;
  --amber: #fbbf24;
  --muted: #54896f;
  --muted-bright: #6fa890;
  --text-body: #b9e6dc;
  --focus: rgba(0, 229, 255, 0.6);
  --shadow-chrome: 0 0 0 1px rgba(0, 229, 255, 0.08), 0 24px 64px rgba(0, 0, 0, 0.6), 0 0 80px rgba(0, 229, 255, 0.06) inset;
  --font-mono: "JetBrains Mono", "Cascadia Code", ui-monospace, "SF Mono", Menlo, monospace;
  --font-sans: "IBM Plex Sans", "IBM Plex Sans Fallback", system-ui, -apple-system, "Segoe UI", sans-serif;
  --max: 1200px;
  --gutter: 24px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  position: relative;
  isolation: isolate;
  overflow-x: hidden;
  background-color: var(--void);
  background-image:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(0, 229, 255, 0.07) 0%, transparent 70%),
    linear-gradient(180deg, #070d0b 0%, #050a08 100%);
  color: var(--cyan-dim);
  font: 15px/1.6 var(--font-mono);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
/* .bg-grid from base.css */
body::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  opacity: 0.22;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(30, 74, 56, 0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 74, 56, 0.16) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 90%);
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 90%);
}

/* The braille-dot field (HeroField.astro). One sweep crosses it on load. */
.field {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 45%, transparent 90%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 45%, transparent 90%);
}
.field-dim, .field-lit {
  position: absolute;
  inset: 0;
  background: url(/field.svg) 0 0 / 440px 288px repeat;
}
.field-lit {
  background-image: url(/field-lit.svg);
  -webkit-mask: linear-gradient(90deg, transparent, #000, transparent) -240px 0 / 120px 100% no-repeat;
  mask: linear-gradient(90deg, transparent, #000, transparent) -240px 0 / 120px 100% no-repeat;
}

.wrap {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.top { display: flex; align-items: center; height: 60px; }

.braille {
  display: inline-block;
  width: 0.6em;
  height: 1.05em;
  fill: currentColor;
  vertical-align: -0.16em;
  flex: none;
}

/* Wordmark.astro */
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  font-weight: 600;
  font-size: 17px;
  letter-spacing: 0.06em;
  color: var(--cyan);
  text-shadow: 0 0 16px rgba(0, 229, 255, 0.6);
  white-space: nowrap;
}
.wordmark .braille { filter: drop-shadow(0 0 5px rgba(0, 229, 255, 0.6)); }
.cursor {
  display: inline-block;
  width: 0.55em;
  height: 1.05em;
  margin-left: -0.3em;
  background: var(--cyan);
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.5);
}

/* Hero (index.astro) */
.hero {
  align-self: center;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 48px;
  align-items: center;
  padding-block: 48px 72px;
}

.kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  text-wrap: balance;
}

h1 {
  margin: 4px 0 0;
  font-size: clamp(34px, 4.6vw, 60px);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.lead {
  margin: 24px 0 0;
  max-width: 66ch;
  font-family: var(--font-sans);
  font-size: 18px;
  line-height: 1.65;
  color: var(--text-body);
}

.ctas { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 32px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 10px 16px;
  border-radius: 6px;
  border: 1px solid var(--border);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 120ms, box-shadow 160ms;
}
.btn-primary { background: var(--cyan); border-color: var(--cyan); color: var(--void); }
.btn-primary:hover { box-shadow: 0 0 16px rgba(0, 229, 255, 0.18), 0 0 24px rgba(0, 229, 255, 0.28); }
.btn-secondary { background: transparent; color: var(--cyan-dim); }
.btn-secondary:hover { border-color: var(--cyan); }

.micro { margin: 16px 0 0; font-size: 13px; color: var(--muted); text-wrap: balance; }

a:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }

/* TerminalChrome.astro */
.terminal {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
  box-shadow: var(--shadow-chrome);
}
.terminal-bar {
  height: 32px;
  display: grid;
  grid-template-columns: 60px 1fr 60px;
  align-items: center;
  padding: 0 12px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, var(--raised), var(--surface));
}
.terminal-dots { display: inline-flex; gap: 6px; }
.terminal-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--border-bright); }
.terminal-title {
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ProcessTable.astro, in its reduced-motion frame: page-watcher's event already happened */
.table-wrap { overflow-x: auto; }
.process-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.process-table caption {
  caption-side: bottom;
  text-align: right;
  padding: 10px 12px 8px;
  font-size: 11px;
  color: var(--muted);
}
.process-table thead th {
  text-align: left;
  color: var(--muted);
  font-weight: 500;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid var(--border);
  padding: 8px 10px;
  white-space: nowrap;
}
.process-table td,
.process-table tbody th {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(30, 74, 56, 0.4);
  vertical-align: top;
  text-align: left;
  font-weight: 400;
  white-space: nowrap;
}
.process-table .num { text-align: right; }
.name { font-weight: 600; color: var(--cyan-dim); }
.muted { color: var(--muted); }
.leash { font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; }
.leash-required { color: var(--amber); }
.leash-auto { color: var(--muted); }

/* StatusPill.astro */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid var(--border);
  white-space: nowrap;
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.pill-running { color: var(--green); border-color: rgba(74, 222, 128, 0.35); background: rgba(74, 222, 128, 0.07); }
.pill-queued { color: var(--amber); border-color: rgba(251, 191, 36, 0.35); background: rgba(251, 191, 36, 0.07); }

.process-table tr.event > * { background: rgba(0, 229, 255, 0.04); }
.process-table tr.event > th { box-shadow: inset 2px 0 0 var(--cyan); }
.pt-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-left: 8px;
  border-radius: 50%;
  vertical-align: 1px;
  background: var(--cyan);
  box-shadow: 0 0 0 4px rgba(0, 229, 255, 0.2);
}
.swap { display: inline-grid; }
.swap > * { grid-area: 1 / 1; justify-self: start; align-self: center; }
.swap .leash { opacity: 0; }

/* Motion: the tick sweeps the field once, then page-watcher's change queues for Allow.
   Under 3s and never repeats. With reduced motion, the final frame above is all there is. */
@media (prefers-reduced-motion: no-preference) {
  .cursor { animation: blink 1s step-end 5; }
  .field-lit { animation: sweep 1.2s cubic-bezier(0.4, 0, 0.2, 1) 0.3s both; }
  .process-table tr.event > td { animation: row-in 0.6s ease-out 1.4s both; }
  .process-table tr.event > th { animation: row-in-edge 0.6s ease-out 1.4s both; }
  .pt-dot { animation: dot-in 1.2s ease-out 1.4s both; }
  .swap .leash { animation: fade-out 0.3s ease-out 1.6s both; }
  .swap .pill-queued { animation: fade-in 0.3s ease-out 1.7s both; }
}
@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
}
@keyframes blink { 50% { opacity: 0; } }
@keyframes sweep {
  from { -webkit-mask-position: -240px 0; mask-position: -240px 0; }
  to { -webkit-mask-position: calc(100% + 240px) 0; mask-position: calc(100% + 240px) 0; }
}
@keyframes row-in { from { background-color: transparent; } }
@keyframes row-in-edge { from { background-color: transparent; box-shadow: inset 0 0 0 var(--cyan); } }
@keyframes dot-in {
  from { background-color: transparent; box-shadow: 0 0 0 0 rgba(0, 229, 255, 0); }
  35% { background-color: var(--cyan); box-shadow: 0 0 0 9px rgba(0, 229, 255, 0.28); }
}
@keyframes fade-out { from { opacity: 1; } }
@keyframes fade-in { from { opacity: 0; } }

.foot { padding-block: 24px; font-size: 12px; color: var(--muted); }

@media (max-width: 1023px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero-text { max-width: 720px; }
}
@media (max-width: 800px) {
  :root { --gutter: 16px; }
  .hero { padding-block: 32px 48px; }
  .lead { font-size: 17px; }
  /* Phones get the site's 4-row hero table: name, status, leash, cost. */
  .process-table { font-size: 12px; }
  .process-table .c-desk,
  .process-table .c-desk-row { display: none; }
  .process-table td,
  .process-table th { padding: 8px 6px; }
  .pill { padding: 1px 7px; }
}
@media (max-width: 420px) {
  .process-table td,
  .process-table th { padding: 8px 4px; }
  .process-table td:first-child,
  .process-table th:first-child { padding-left: 8px; }
  .process-table td:last-child,
  .process-table th:last-child { padding-right: 8px; }
  .pill { gap: 4px; padding: 1px 6px; font-size: 10px; letter-spacing: 0.04em; }
  .pt-dot { margin-left: 6px; }
}
@media (max-width: 379px) {
  .process-table { font-size: 11px; }
}
