/* Aether proof site — shared design system (S2 scaffold, 2026-08-21) */

:root {
  --base-0: #05070c;
  --panel: rgba(13, 21, 36, 0.82);
  --line: rgba(148, 163, 184, 0.22);
  --text: #f7fbff;
  --muted: #aab6c8;
  --soft: #738095;
  --proof: #31f6b4;
  --sky: #7dd3fc;
  --warn: #f7c66b;
  --alert: #ff6b7a;
  --shadow: 0 26px 80px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--base-0);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  background:
    radial-gradient(circle at 14% 8%, rgba(49, 246, 180, 0.13), transparent 30%),
    radial-gradient(circle at 88% 14%, rgba(125, 211, 252, 0.11), transparent 32%),
    linear-gradient(135deg, #02040a 0%, #07101e 50%, #03050b 100%);
}

/* ---------- Navigation ---------- */

.site-tabs {
  position: sticky;
  top: 16px;
  z-index: 50;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  width: min(1180px, calc(100vw - 32px));
  margin: 16px auto 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(5, 7, 12, 0.86);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.36);
  backdrop-filter: blur(18px);
}

.site-tabs a {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 13px;
  background: rgba(255, 255, 255, 0.055);
  color: #dff8ff;
  font-size: 13px;
  font-weight: 780;
  text-decoration: none;
}

.site-tabs a.active {
  border-color: rgba(49, 246, 180, 0.48);
  background: rgba(49, 246, 180, 0.12);
  color: var(--text);
}

/* Mobile: the wrapped pill bar used to stack 3-4 sticky rows and blanket the
   top of the viewport. Below 720px it becomes ONE slim horizontally-scrollable
   row that hides itself while scrolling down and returns on scroll-up. */
@media (max-width: 720px) {
  .site-tabs {
    top: 8px;
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 8px;
    padding: 8px;
    transition: transform 0.28s ease, opacity 0.28s ease;
  }
  .site-tabs::-webkit-scrollbar { display: none; }
  .site-tabs a { flex: 0 0 auto; padding: 8px 12px; font-size: 12.5px; }
  .site-tabs.nav-hidden { transform: translateY(-160%); opacity: 0; pointer-events: none; }
}

/* ---------- Typography ---------- */

.kicker {
  margin: 0 0 14px;
  color: var(--proof);
  font-size: 12px;
  font-weight: 760;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1, h2 {
  margin: 0;
  font-family: ui-serif, Georgia, "Times New Roman", serif;
  letter-spacing: -0.04em;
  line-height: 1.06;
}

h1 { font-size: clamp(36px, 5.6vw, 60px); }
h2 { font-size: clamp(26px, 3.4vw, 36px); }

.lede {
  margin: 18px 0 0;
  max-width: 62ch;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
}

.rail {
  margin: 18px 0 0;
  color: var(--soft);
  font-size: 12px;
  letter-spacing: 0.04em;
  line-height: 1.6;
}

/* ---------- Library panels (interior pages) ---------- */

.panel {
  position: relative;
  width: min(1080px, calc(100vw - 24px));
  margin: 34px auto 0;
  padding: 44px 48px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background:
    linear-gradient(135deg, rgba(8, 13, 23, 0.98), rgba(4, 8, 15, 0.98)),
    radial-gradient(circle at 80% 10%, rgba(49, 246, 180, 0.08), transparent 32%);
  box-shadow: var(--shadow);
  isolation: isolate;
  overflow: hidden;
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(125, 211, 252, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(125, 211, 252, 0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at 50% 25%, black, transparent 80%);
  z-index: -1;
}

/* ---------- Scroll scenes (homepage) ---------- */

.scene {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 72px 20px;
}

.scene-inner {
  width: min(980px, calc(100vw - 32px));
  text-align: center;
}

.scene-inner.left { text-align: left; }

.beat {
  font-family: ui-serif, Georgia, "Times New Roman", serif;
  font-size: clamp(26px, 4.2vw, 44px);
  letter-spacing: -0.03em;
  line-height: 1.2;
  max-width: 26ch;
  margin: 0 auto;
}

.beat .accent { color: var(--proof); }

.scroll-cue {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--soft);
  font-size: 12.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  animation: cue-drift 2.4s ease-in-out infinite;
}

@keyframes cue-drift {
  0%, 100% { transform: translate(-50%, 0); opacity: 0.7; }
  50% { transform: translate(-50%, 8px); opacity: 1; }
}

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

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}

.reveal.on {
  opacity: 1;
  transform: translateY(0);
}

.reveal.d1 { transition-delay: 0.15s; }
.reveal.d2 { transition-delay: 0.3s; }
.reveal.d3 { transition-delay: 0.45s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .scroll-cue { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Chips, stats, nodes ---------- */

.chips { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 22px; justify-content: inherit; }

.chip {
  padding: 7px 13px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: #dff8ff;
}

.chip.proof { border-color: rgba(49, 246, 180, 0.45); background: rgba(49, 246, 180, 0.10); color: var(--proof); }
.chip.warn  { border-color: rgba(247, 198, 107, 0.45); background: rgba(247, 198, 107, 0.10); color: var(--warn); }
.chip.sky   { border-color: rgba(125, 211, 252, 0.45); background: rgba(125, 211, 252, 0.10); color: var(--sky); }

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
  margin-top: 28px;
}

.stat {
  padding: 20px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
  text-align: center;
}

.stat b {
  display: block;
  font-size: clamp(26px, 3vw, 38px);
  font-family: ui-serif, Georgia, serif;
  letter-spacing: -0.03em;
  color: var(--proof);
}

.stat span { display: block; margin-top: 8px; color: var(--muted); font-size: 13px; line-height: 1.5; }

.nodes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.node {
  padding: 18px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
  text-align: left;
}

.node .num { display: block; color: var(--sky); font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase; }
.node b { display: block; margin-top: 6px; font-size: 15px; }
.node span:last-child { display: block; margin-top: 6px; color: var(--muted); font-size: 13.5px; line-height: 1.55; }

.node.gate { border-color: rgba(247, 198, 107, 0.35); }

/* ---------- Media ---------- */

video, .concept {
  width: 100%;
  border-radius: 16px;
  border: 1px solid var(--line);
  margin-top: 22px;
  display: block;
  background: #000;
}

/* ---------- Forks + CTA ---------- */

.forks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 26px;
}

.fork {
  display: block;
  padding: 22px 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  text-decoration: none;
  text-align: left;
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.fork:hover { border-color: rgba(49, 246, 180, 0.5); transform: translateY(-3px); }
.fork .num { display: block; color: var(--sky); font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase; }
.fork b { display: block; margin-top: 8px; font-size: 17px; }
.fork span { display: block; margin-top: 8px; color: var(--muted); font-size: 13.5px; line-height: 1.55; }
.fork .go { margin-top: 12px; color: var(--proof); font-weight: 700; font-size: 13.5px; }

.cta-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 26px;
}

.cta-form input {
  flex: 1 1 200px;
  max-width: 300px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 14.5px;
}

.cta-form input::placeholder { color: var(--soft); }

.cta-form button, .btn {
  padding: 13px 26px;
  border: 1px solid rgba(49, 246, 180, 0.55);
  border-radius: 12px;
  background: rgba(49, 246, 180, 0.14);
  color: var(--proof);
  font-size: 14.5px;
  font-weight: 760;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

.cta-form button:hover, .btn:hover { background: rgba(49, 246, 180, 0.22); }

.btn.ghost { border-color: var(--line); background: rgba(255, 255, 255, 0.05); color: #dff8ff; }

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

footer {
  margin: 60px auto 40px;
  width: min(1080px, calc(100vw - 24px));
  color: var(--soft);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  text-align: center;
  line-height: 1.7;
}

/* ---------- Evidence grades (promoted from evidence.html, ATR-1 miss #30) ---------- */

.grade-proven { color: var(--proof); font-weight: 700; }
.grade-mixed_evidence { color: var(--warn); font-weight: 700; }
.grade-unproven,
.grade-insufficient_samples,
.grade-measurement_underpowered,
.grade-not_a_measurement,
.grade-coverage_limited_by_book_span,
.grade-no_contact_by_construction { color: var(--soft); font-weight: 700; }
.grade-scored_not_promoted { color: var(--warn); font-weight: 700; opacity: 0.85; }

/* Publication-state chips — separate vocabulary from evidence-grade colors. */
.atr-state-public {
  color: var(--sky);
  font-weight: 700;
  letter-spacing: 0.02em;
}
.atr-state-held,
.atr-state-pending,
.atr-state-owed,
.atr-state-dataroom {
  color: var(--warn);
  font-weight: 600;
  font-style: italic;
}

/* ---------- Ask the Record ---------- */

.atr-disclaimer .atr-rail-block {
  margin-top: 22px;
  padding: 16px 18px;
  border: 1px solid rgba(247, 198, 107, 0.35);
  border-radius: 16px;
  background: rgba(247, 198, 107, 0.07);
}

.atr-disclaimer .atr-rail-block + .atr-rail-block {
  border-color: rgba(125, 211, 252, 0.35);
  background: rgba(125, 211, 252, 0.07);
}

.atr-rail-label {
  margin: 0 0 8px;
  color: var(--warn);
  font-size: 11px;
  font-weight: 760;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.atr-disclaimer .atr-rail-block + .atr-rail-block .atr-rail-label { color: var(--sky); }

.atr-disclaimer .atr-rail-block p:last-child {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
}

.atr-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: end;
  margin-top: 22px;
}

.atr-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1 1 280px;
}

.atr-cat {
  display: inline-flex;
  align-items: center;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: #dff8ff;
  font-size: 13px;
  font-weight: 740;
  text-decoration: none;
}

.atr-cat:hover { border-color: rgba(49, 246, 180, 0.5); }

.atr-search {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 0 1 260px;
}

.atr-search label {
  color: var(--soft);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.atr-search input {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(13, 21, 36, 0.9);
  color: var(--text);
  font-size: 14px;
}

.atr-empty {
  display: none;
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid rgba(247, 198, 107, 0.4);
  border-radius: 14px;
  background: rgba(247, 198, 107, 0.08);
  color: var(--text);
}

.atr-empty.show { display: block; }
.atr-empty a { color: var(--proof); }

.atr-answer {
  margin-top: 22px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
}

.atr-answer h3 {
  margin: 0;
  font-family: ui-serif, Georgia, "Times New Roman", serif;
  font-size: 22px;
  letter-spacing: -0.03em;
  line-height: 1.25;
}

.atr-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin: 10px 0 0;
  font-size: 12.5px;
  letter-spacing: 0.04em;
}

.atr-variants {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 0;
}

.atr-variant {
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--soft);
  font-size: 12px;
}

.atr-body p {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.65;
}

.atr-body strong { color: var(--text); }
.atr-matures { margin: 12px 0 0; color: var(--warn); font-size: 13px; }
.atr-links { margin: 12px 0 0; font-size: 13.5px; }
.atr-links a { color: var(--sky); }

.atr-honeypot {
  display: none;
}

.atr-ask-form textarea {
  flex: 1 1 100%;
  min-height: 96px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 14.5px;
  font-family: inherit;
}

.atr-ask-form textarea::placeholder { color: var(--soft); }
.atr-ask-form a { color: var(--proof); }

@media (max-width: 760px) {
  .atr-toolbar { flex-direction: column; align-items: stretch; gap: 10px; }
  .atr-search { flex: 1 1 100%; width: 100%; }
  .atr-search input { width: 100%; min-height: 42px; }
  .atr-cats { gap: 8px; }
  .atr-cat { min-height: 42px; }
  .atr-answer { padding: 16px 14px; }
  .atr-ask-form { flex-direction: column; align-items: stretch; }
  .atr-ask-form input, .atr-ask-form textarea, .atr-ask-form button { width: 100%; max-width: none; }
}

@media print {
  .site-tabs,
  .atr-toolbar,
  .atr-search,
  .atr-empty,
  .atr-ask-form,
  #ask-us { display: none !important; }
  .panel { box-shadow: none; break-inside: avoid; }
  .atr-answer { break-inside: avoid; }
  .atr-disclaimer .atr-rail-block { border-color: #000; }
  body { background: #fff; color: #111; }
  .atr-body p, .lede, .rail { color: #222; }
}

@media (max-width: 720px) {
  .panel { padding: 30px 22px; }
  .scene { padding: 56px 16px; }

  /* Mobile nav: one slim scrollable row instead of a stacked pill wall,
     and it steps out of the way while reading (see site.js scroll hide). */
  .site-tabs {
    top: 8px;
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 8px;
    gap: 8px;
    transition: transform 0.28s ease, opacity 0.28s ease;
  }
  .site-tabs::-webkit-scrollbar { display: none; }
  .site-tabs a { flex: 0 0 auto; padding: 8px 12px; font-size: 12.5px; }
  .site-tabs.tabs-hidden { transform: translateY(-160%); opacity: 0; pointer-events: none; }
}
