/* ==========================================================================
   Ålloscale — Minimalistic Landing Page Styles
   Built directly on official Cherenkov Ice tokens (./assets/tokens.css)
   ========================================================================== */

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

html {
  background-color: var(--allo-bg);
  color: var(--allo-fg);
  font-family: var(--allo-font-sans);
  font-size: 16px;
  line-height: 1.6;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
  background-color: var(--allo-bg);
  color: var(--allo-fg);
  overflow-x: hidden;
  position: relative;
}

/* Signature 48px hairline grid & subtle Cherenkov zenith glow */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(ellipse 68% 42% at 50% -6%, rgba(29, 78, 216, 0.17), rgba(14, 165, 233, 0.04) 48%, transparent 72%),
    linear-gradient(to right, rgba(17, 24, 39, 0.52) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(17, 24, 39, 0.52) 1px, transparent 1px);
  background-size: 100% 100%, 48px 48px, 48px 48px;
}

::selection {
  background: rgba(56, 189, 248, 0.25);
  color: var(--allo-fg);
}

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

button {
  font-family: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

/* ==========================================================================
   Centered Architectural Frame
   ========================================================================== */

.page-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--allo-border-subtle);
  border-right: 1px solid var(--allo-border-subtle);
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(2px);
}

/* ==========================================================================
   Header & Prominent Official Wordmark
   ========================================================================== */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px clamp(24px, 4.5vw, 52px);
  border-bottom: 1px solid var(--allo-border);
}

.brand-link {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.brand-wordmark-svg {
  height: clamp(36px, 4vw, 46px);
  width: auto;
  display: block;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 18px;
}

.header-link {
  font-size: 13.5px;
  color: var(--allo-fg-muted);
  transition: color 160ms ease;
}

.header-link:hover {
  color: var(--allo-fg);
}

.header-link-mono {
  font-family: var(--allo-font-mono);
  font-size: 12px;
  color: var(--allo-fg-muted);
  padding: 6px 11px;
  border: 1px solid var(--allo-border);
  border-radius: 6px;
  background: rgba(11, 17, 32, 0.55);
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease;
}

.header-link-mono:hover {
  border-color: rgba(56, 189, 248, 0.42);
  color: var(--allo-fg);
  background: var(--allo-surface);
}

/* ==========================================================================
   Main Stage & Short Hero
   ========================================================================== */

.main-stage {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.hero {
  padding: clamp(44px, 6.5vh, 76px) clamp(24px, 4.5vw, 52px) clamp(34px, 4.5vh, 50px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--allo-font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--allo-fg-subtle);
  margin-bottom: 22px;
}

.eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--allo-cherenkov);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.65);
}

.hero-title {
  font-size: clamp(36px, 5.4vw, 58px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.038em;
  color: var(--allo-fg);
  max-width: 720px;
}

.hero-title .cherenkov-accent {
  background: var(--allo-beam);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  margin-top: 20px;
  font-size: clamp(16px, 1.45vw, 18px);
  line-height: 1.65;
  color: var(--allo-fg-muted);
  max-width: 620px;
  font-weight: 400;
}

.hero-desc strong {
  color: var(--allo-fg);
  font-weight: 500;
}

.hero-actions {
  margin-top: 30px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 39px;
  padding: 0 17px;
  border-radius: 7px;
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: -0.01em;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease, color 160ms ease;
}

.btn-cta {
  background: var(--allo-cta);
  color: #FFFFFF;
  border: 1px solid rgba(186, 230, 253, 0.22);
}

.btn-cta:hover {
  background: var(--allo-cta-hover);
  transform: translateY(-1px);
}

.btn-ghost {
  background: rgba(11, 17, 32, 0.65);
  color: var(--allo-fg);
  border: 1px solid var(--allo-border);
}

.btn-ghost:hover {
  background: var(--allo-surface-elevated);
  border-color: rgba(148, 163, 184, 0.32);
  transform: translateY(-1px);
}

.btn-copy {
  font-family: var(--allo-font-mono);
  font-size: 12px;
  color: var(--allo-fg-muted);
  background: transparent;
  border: 1px solid var(--allo-border-subtle);
}

.btn-copy:hover {
  color: var(--allo-fg);
  border-color: var(--allo-border);
}

.btn-copy .ok {
  color: var(--allo-verified);
}

/* Whisper-quiet Cherenkov Potential Wave Band */
.wave-strip {
  position: relative;
  height: clamp(92px, 11vh, 116px);
  border-top: 1px solid var(--allo-border);
  border-bottom: 1px solid var(--allo-border);
  background: linear-gradient(180deg, rgba(11, 17, 32, 0.35), rgba(0, 0, 0, 0.85));
  overflow: hidden;
}

#cherenkov-wave {
  display: block;
  width: 100%;
  height: 100%;
}

.wave-caption {
  position: absolute;
  bottom: 12px;
  left: clamp(24px, 4.5vw, 52px);
  right: clamp(24px, 4.5vw, 52px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--allo-font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--allo-fg-subtle);
  pointer-events: none;
}

.wave-caption span:last-child {
  color: var(--allo-cherenkov);
}

/* ==========================================================================
   Experimental Results Section
   ========================================================================== */

.results-section {
  min-width: 0;
  padding: clamp(48px, 6.5vh, 72px) clamp(24px, 4.5vw, 52px) clamp(44px, 6vh, 64px);
  border-bottom: 1px solid var(--allo-border);
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.section-intro {
  max-width: 720px;
}

.section-kicker {
  font-family: var(--allo-font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--allo-cherenkov);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(24px, 3vw, 33px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--allo-fg);
}

.section-desc {
  margin-top: 12px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--allo-fg-muted);
}

.section-desc strong {
  color: var(--allo-fg);
  font-weight: 500;
}

/* 4-Column KPI Metric Strip */
.metric-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--allo-border);
  border-radius: 10px;
  background: rgba(11, 17, 32, 0.56);
  overflow: hidden;
}

.metric-cell {
  padding: 16px 18px;
  border-right: 1px solid var(--allo-border);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.metric-cell:last-child {
  border-right: none;
}

.metric-value {
  font-family: var(--allo-font-mono);
  font-size: clamp(16px, 1.8vw, 19px);
  font-weight: 500;
  letter-spacing: -0.025em;
  color: var(--allo-fg);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.metric-value .from {
  color: var(--allo-fg-subtle);
  font-weight: 400;
  font-size: 0.85em;
}

.metric-value .arrow {
  color: var(--allo-fg-subtle);
  margin: 0 3px;
  font-size: 0.82em;
}

.metric-value .accent {
  color: var(--allo-cherenkov);
}

.metric-value .verified {
  color: var(--allo-verified);
}

.metric-label {
  font-size: 12px;
  line-height: 1.4;
  color: var(--allo-fg-muted);
}

/* Result Cards */
.result-card {
  min-width: 0;
  border: 1px solid var(--allo-border);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(11, 17, 32, 0.64), rgba(6, 10, 20, 0.82));
  overflow: hidden;
}

.result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 18px 22px 16px;
  border-bottom: 1px solid var(--allo-border);
}

.result-heading {
  flex: 1 1 320px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.result-title-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.result-index {
  font-family: var(--allo-font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--allo-cherenkov);
}

.result-title {
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--allo-fg);
}

.result-subtitle {
  font-size: 12.5px;
  color: var(--allo-fg-muted);
  line-height: 1.5;
}

/* Split Toggle Pill */
.split-toggle {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border-radius: 8px;
  border: 1px solid var(--allo-border);
  background: rgba(0, 0, 0, 0.55);
  gap: 2px;
}

.split-btn {
  font-family: var(--allo-font-mono);
  font-size: 11px;
  padding: 5px 10px;
  border-radius: 5px;
  color: var(--allo-fg-muted);
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
  border: 1px solid transparent;
}

.split-btn:hover {
  color: var(--allo-fg);
}

.split-btn.is-active {
  background: var(--allo-surface-elevated);
  color: var(--allo-ice);
  border-color: rgba(56, 189, 248, 0.35);
}

/* Legend Strip */
.chart-legend {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 11px 22px;
  border-bottom: 1px solid var(--allo-border-subtle);
  background: rgba(0, 0, 0, 0.25);
}

.legend-items {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--allo-font-mono);
  font-size: 11px;
  color: var(--allo-fg-muted);
}

.swatch {
  display: inline-block;
  flex-shrink: 0;
}

.swatch-pre {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1.6px solid #94A3B8;
  background: rgba(15, 23, 42, 0.9);
}

.swatch-rl {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--allo-cherenkov);
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.55);
}

.swatch-band {
  width: 14px;
  height: 9px;
  border-radius: 2px;
  background: rgba(45, 212, 191, 0.14);
  border: 1px solid rgba(45, 212, 191, 0.42);
}

.swatch-exp {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: #E2E8F0;
}

.swatch-pre-bar {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: #475569;
}

.swatch-rl-bar {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: var(--allo-cherenkov);
}

.swatch-p1k-bar {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: var(--allo-verified);
}

.legend-summary {
  font-family: var(--allo-font-mono);
  font-size: 11px;
  color: var(--allo-fg-subtle);
  font-variant-numeric: tabular-nums;
}

.legend-summary strong {
  color: var(--allo-cherenkov);
  font-weight: 500;
}

/* Primary 26-Liquid Chart Canvas */
.chart-body {
  min-width: 0;
  padding: 14px 20px 10px;
}

.chart-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.chart-scroll-hint {
  display: none;
  font-family: var(--allo-font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--allo-fg-subtle);
  text-align: right;
  margin-bottom: 6px;
}

.chart-svg {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
}

.chart-svg-26 {
  min-width: 680px;
}

.liquid-row {
  cursor: pointer;
}

.liquid-row .row-bg {
  fill: transparent;
  transition: fill 120ms ease;
}

.liquid-row:hover .row-bg,
.liquid-row.is-active .row-bg,
.liquid-row:focus .row-bg {
  fill: rgba(56, 189, 248, 0.08);
}

.liquid-row:focus {
  outline: none;
}

.liquid-row .row-label {
  transition: fill 120ms ease;
}

.liquid-row:hover .row-label,
.liquid-row.is-active .row-label,
.liquid-row:focus .row-label {
  fill: #FFFFFF;
}

/* Precision Inspector Footer Bar */
.inspector-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  flex-wrap: wrap;
  padding: 10px 22px;
  border-top: 1px solid var(--allo-border);
  background: rgba(0, 0, 0, 0.42);
  font-family: var(--allo-font-mono);
  font-size: 11px;
  line-height: 1.5;
  color: var(--allo-fg-muted);
  font-variant-numeric: tabular-nums;
  min-height: 40px;
}

.inspector-bar .insp-name {
  color: var(--allo-fg);
  font-weight: 500;
}

.inspector-bar .insp-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.inspector-bar .insp-tag-unseen {
  color: var(--allo-cherenkov);
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.inspector-bar .insp-tag-train {
  color: var(--allo-fg-muted);
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.inspector-bar .insp-val {
  color: var(--allo-cherenkov);
}

.inspector-bar .insp-exp {
  color: var(--allo-fg);
}

.inspector-bar .insp-dim {
  color: var(--allo-fg-subtle);
}

/* Result 02 Two-Panel OOD Grid */
.ood-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ood-panel {
  padding: 18px 22px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ood-panel:first-child {
  border-right: 1px solid var(--allo-border);
}

.panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.panel-title {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--allo-fg);
  letter-spacing: -0.01em;
}

.panel-badge {
  font-family: var(--allo-font-mono);
  font-size: 10.5px;
  color: var(--allo-cherenkov);
  white-space: nowrap;
}

.panel-badge.is-verified {
  color: var(--allo-verified);
}

.panel-note {
  font-size: 12px;
  line-height: 1.55;
  color: var(--allo-fg-muted);
}

.panel-note strong {
  color: var(--allo-fg);
  font-weight: 500;
}

/* Compact Proof Strip at Bottom of Result 02 */
.proof-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--allo-border);
  background: rgba(0, 0, 0, 0.34);
}

.proof-cell {
  padding: 14px 22px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.proof-cell:first-child {
  border-right: 1px solid var(--allo-border);
}

.proof-kicker {
  font-family: var(--allo-font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--allo-fg-subtle);
}

.proof-metrics {
  font-family: var(--allo-font-mono);
  font-size: 11.5px;
  color: var(--allo-fg);
  font-variant-numeric: tabular-nums;
  line-height: 1.65;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.proof-metrics .accent {
  color: var(--allo-cherenkov);
}

.proof-metrics .verified {
  color: var(--allo-verified);
}

.proof-metrics .dim {
  color: var(--allo-fg-subtle);
}

.proof-detail {
  font-size: 12px;
  line-height: 1.5;
  color: var(--allo-fg-muted);
}

/* Architectural Takeaway & Provenance Footer inside Results */
.results-takeaway {
  padding-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.takeaway-copy {
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--allo-fg-muted);
  max-width: 740px;
}

.takeaway-copy strong {
  color: var(--allo-fg);
  font-weight: 500;
}

.provenance-line {
  font-family: var(--allo-font-mono);
  font-size: 11px;
  color: var(--allo-fg-subtle);
  line-height: 1.5;
}

/* ==========================================================================
   Minimal Footer
   ========================================================================== */

.site-footer {
  padding: 22px clamp(24px, 4.5vw, 52px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--allo-fg-subtle);
}

.footer-left {
  font-family: var(--allo-font-mono);
  font-size: 11.5px;
}

.footer-links {
  display: inline-flex;
  align-items: center;
  gap: 20px;
}

.footer-links a {
  color: var(--allo-fg-muted);
  transition: color 150ms ease;
}

.footer-links a:hover {
  color: var(--allo-fg);
}

/* ==========================================================================
   Responsive Refinements
   ========================================================================== */

@media (max-width: 780px) {
  .metric-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric-cell:nth-child(2) {
    border-right: none;
  }

  .metric-cell:nth-child(1),
  .metric-cell:nth-child(2) {
    border-bottom: 1px solid var(--allo-border);
  }

  .ood-grid,
  .proof-strip {
    grid-template-columns: 1fr;
  }

  .ood-panel:first-child,
  .proof-cell:first-child {
    border-right: none;
    border-bottom: 1px solid var(--allo-border);
  }
}

@media (max-width: 640px) {
  .header-link-mono {
    display: none;
  }

  .result-header,
  .chart-legend,
  .inspector-bar,
  .ood-panel,
  .proof-cell {
    padding-left: 16px;
    padding-right: 16px;
  }

  .chart-body {
    padding: 12px 12px 8px;
  }

  .chart-scroll-hint {
    display: block;
  }
}
