/* Landing-page-specific styles — extends kumulus.css */

/* ===== SECTIONS — global ===== */
.section {
  min-height: 80vh;
  display: grid;
  place-items: center;
  padding: 80px 24px;
  max-width: 1240px;
  margin: 0 auto;
}

/* Scroll reveal */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}
.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--accent-2);
  text-transform: uppercase;
}

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 48px 24px;
  position: relative;
}
.hero-inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  max-width: 720px;
}
.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--ink-3);
  text-transform: uppercase;
  opacity: 0;
}
.hero-icon {
  width: clamp(112px, 12vw, 176px);
  height: auto;
  opacity: 0;
  transform: scale(0.92);
}
.hero-temp {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(80px, 18vw, 240px);
  line-height: 1;
  letter-spacing: -0.045em;
  color: var(--ink);
  margin: -12px 0;
  opacity: 0;
  font-variant-numeric: tabular-nums;
}
.hero-phrase {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(18px, 2.4vw, 24px);
  color: var(--ink-2);
  opacity: 0;
}
.hero-ticker {
  margin-top: 18px;
  padding: 16px 22px;
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  backdrop-filter: blur(22px);
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-3);
  opacity: 0;
  min-width: min(520px, 90vw);
  text-align: left;
}
.hero-ticker .tick { opacity: 0; }
.hero-scroll-affordance {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--ink-4);
  margin-top: 32px;
  opacity: 0;
}
@keyframes hero-pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.9; }
}

/* Arrival animation keyframes — fired by .hero.is-arriving class added via JS in Batch 3 */
.hero.is-arriving .hero-eyebrow { animation: fade-in-up 0.4s 0.2s ease-out forwards; }
.hero.is-arriving .hero-icon { animation: fade-in-scale 0.6s 0.5s ease-out forwards; }
.hero.is-arriving .hero-temp { animation: fade-in-up 0.4s 0.6s ease-out forwards; }
.hero.is-arriving .hero-phrase { animation: fade-in-up 0.5s 1.0s ease-out forwards; }
.hero.is-arriving .hero-ticker { animation: fade-in-up 0.4s 1.6s ease-out forwards; }
.hero.is-arriving .hero-ticker .tick:nth-child(1) { animation: fade-in 0.3s 1.6s ease-out forwards; }
.hero.is-arriving .hero-ticker .tick:nth-child(2) { animation: fade-in 0.3s 1.8s ease-out forwards; }
.hero.is-arriving .hero-ticker .tick:nth-child(3) { animation: fade-in 0.3s 2.0s ease-out forwards; }
.hero.is-arriving .hero-scroll-affordance {
  animation: fade-in 0.4s 2.2s ease-out forwards, hero-pulse 3s 2.6s ease-in-out infinite;
}
@keyframes fade-in {
  to { opacity: 1; }
}
@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fade-in-scale {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

/* ===== AMBIENT — driven by body[data-condition] ===== */

body[data-condition="storm"] .atmosphere::before {
  background:
    radial-gradient(60% 50% at 72% 8%, rgba(255,77,94,0.15), transparent 60%),
    radial-gradient(50% 40% at 18% 0%, rgba(61,139,255,0.10), transparent 60%),
    linear-gradient(180deg, var(--bg-1), var(--bg-0) 60%);
}
body[data-condition="storm"] .blob.b1 { animation-duration: 18s; }
@keyframes storm-flash {
  0%, 96%, 100% { opacity: 0; }
  97%, 98% { opacity: 0.05; }
}
body[data-condition="storm"]::after {
  content: "";
  position: fixed; inset: 0; z-index: -1;
  background: white;
  pointer-events: none;
  animation: storm-flash 25s infinite;
}

.rain-particle {
  display: none;
  position: fixed; top: -10px;
  width: 1px; height: 12px;
  background: linear-gradient(180deg, transparent, rgba(127,178,255,0.4));
  pointer-events: none;
  z-index: -1;
  animation: rain-fall linear infinite;
}
body[data-condition="rain"] .rain-particle,
body[data-condition="storm"] .rain-particle {
  display: block;
}
@keyframes rain-fall {
  to { transform: translateY(110vh); }
}

body[data-condition="clear-night"] {
  --bg-0: #03050C;
  --bg-1: #060A15;
}
body[data-condition="clear-night"] .blob.b2 {
  background: radial-gradient(circle, rgba(180,200,255,0.5), transparent 65%);
  opacity: 0.4;
}

/* ===== SECTION 1 — PROBLEM ===== */
.section-problem { text-align: center; }
.s1-number {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(120px, 22vw, 320px);
  line-height: 0.9;
  letter-spacing: -0.045em;
  color: var(--ink);
}
.s1-body {
  margin-top: 32px;
  font-family: var(--font-body);
  font-size: clamp(18px, 2vw, 24px);
  color: var(--ink-2);
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
  text-wrap: pretty;
}
.s1-body p { margin: 8px 0; }
.s1-body b { color: var(--ink); font-weight: 700; }
.s1-source {
  margin-top: 48px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-4);
  letter-spacing: 0.06em;
}

/* ===== SECTION 2 — INVISIBLES ===== */
.section-invisibles {
  align-items: flex-start;
  padding-left: clamp(24px, 6vw, 80px);
}
.s2-inner { width: 100%; max-width: 1080px; }
.s2-headline {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(80px, 20vw, 280px);
  line-height: 0.9;
  letter-spacing: -0.05em;
  color: transparent;
  -webkit-text-stroke: 2px var(--accent);
  margin: 0 0 32px;
}
.s2-body {
  font-family: var(--font-body);
  font-size: clamp(16px, 1.8vw, 20px);
  color: var(--ink-2);
  max-width: 520px;
  text-wrap: pretty;
}
.s2-body p { margin: 0 0 16px; }
.s2-body b { color: var(--ink); font-weight: 700; }

/* ===== SECTION 3 — DOCTRINE PYRAMID ===== */
.section-doctrine { min-height: 100vh; }
.s3-inner { width: 100%; max-width: 1080px; }
.s3-h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(26px, 3.5vw, 38px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 12px 0 48px;
  color: var(--ink);
  max-width: 640px;
}
.pyramid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.tier {
  width: var(--w);
  padding: 22px 26px;
  background: var(--glass-2);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--r-md);
  backdrop-filter: blur(22px);
}
.tier-1 { box-shadow: var(--sh-glow); }
.tier-2 { border-left-color: var(--warn); box-shadow: 0 0 0 1px rgba(246,166,35,0.10), 0 12px 36px -16px rgba(246,166,35,0.30); }
.tier-3 { border-left-color: var(--accent-2); opacity: 0.95; }
.tier-4 { border-left-color: var(--ink-3); opacity: 0.85; }
.tier-5 { border-left-color: var(--line-2); opacity: 0.75; }
.tier-name {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--accent-2);
  text-transform: uppercase;
}
.tier-2 .tier-name { color: var(--warn); }
.tier-detail {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(16px, 1.8vw, 20px);
  color: var(--ink);
  margin: 6px 0 4px;
}
.tier-tag {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--ink-3);
}
@media (max-width: 720px) {
  .tier { width: 100% !important; }
}

/* ===== SECTION 4 — SCRUBBER (deferred) ===== */
.section-scrubber { min-height: 80vh; }
.s4-inner { width: 100%; max-width: 1080px; }
.s4-h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(26px, 3.5vw, 38px);
  margin: 12px 0 20px;
  color: var(--ink);
}
.s4-body {
  font-family: var(--font-body);
  font-size: 18px;
  color: var(--ink-3);
  max-width: 560px;
  margin-bottom: 40px;
}
.s4-placeholder {
  position: relative;
  padding: 80px 40px;
  background: var(--glass);
  border: 1px dashed var(--line-2);
  border-radius: var(--r-lg);
  text-align: center;
  overflow: hidden;
}
.s4-placeholder-glow {
  position: absolute; inset: 0;
  background: radial-gradient(50% 60% at 50% 100%, var(--accent-soft), transparent 70%);
  opacity: 0.6;
  pointer-events: none;
}
.s4-placeholder-text {
  position: relative;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  color: var(--ink-2);
}
.s4-placeholder-sub {
  position: relative;
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-4);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ===== SECTION 5 — LIVE COUNTER ===== */
.section-counter { min-height: 80vh; }
.s5-inner { width: 100%; max-width: 1080px; }
.s5-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
  align-items: center;
  margin: 32px 0;
}
.s5-left { display: flex; flex-direction: column; gap: 8px; }
.s5-number {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(80px, 12vw, 168px);
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.s5-label {
  font-family: var(--font-body);
  font-size: 18px;
  color: var(--ink-2);
  max-width: 380px;
}
.s5-bump {
  margin-top: 20px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent-2);
  min-height: 18px;
}
.s5-right svg {
  width: 100%;
  height: auto;
  max-height: 320px;
}
.s5-strike-dot {
  fill: white;
  filter: drop-shadow(0 0 6px rgba(255,255,255,0.8));
  animation: strike-fade 4s ease-out forwards;
}
@keyframes strike-fade {
  from { opacity: 1; }
  to { opacity: 0; }
}
.s5-tagline {
  font-family: var(--font-body);
  font-size: clamp(16px, 1.8vw, 20px);
  color: var(--ink-3);
  margin-top: 24px;
  max-width: 640px;
}
@media (max-width: 720px) {
  .s5-grid { grid-template-columns: 1fr; gap: 24px; }
  .s5-right svg { max-height: 200px; }
}

/* ===== SECTION 6 — TAHMO + SCIENCE ===== */
.section-tahmo { min-height: 80vh; }
.s6-inner { width: 100%; max-width: 880px; }
.s6-tahmo {
  display: none;  /* enable when TAHMO partnership is signed: add `has-tahmo` class to body */
  align-items: center;
  gap: 24px;
  padding: 20px 24px;
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  margin: 24px 0;
}
body.has-tahmo .s6-tahmo { display: flex; }
.s6-tahmo-logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 28px;
  color: var(--accent);
}
.s6-tahmo-text {
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--ink-2);
}
.s6-tahmo-text b { color: var(--ink); font-weight: 800; }

.s6-divider {
  height: 1px;
  background: var(--line);
  margin: 32px 0;
}
.s6-citation {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 32px;
  margin: 24px 0;
  align-items: baseline;
}
.s6-cite-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(48px, 7vw, 96px);
  color: var(--ink);
  letter-spacing: -0.03em;
}
.s6-cite-body {
  font-family: var(--font-body);
  font-size: 17px;
  color: var(--ink-2);
}
.s6-cite-sub {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-4);
  margin-top: 6px;
  letter-spacing: 0.04em;
}
.s6-entity {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-3);
}
.s6-entity b { color: var(--ink); }
@media (max-width: 720px) {
  .s6-citation { grid-template-columns: 1fr; gap: 8px; }
}

/* ===== SECTION 7 — ROADMAP ===== */
.section-roadmap { min-height: 80vh; }
.s7-inner { width: 100%; max-width: 1080px; }
.s7-h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(26px, 3.5vw, 44px);
  margin: 12px 0 56px;
  color: var(--ink);
}
.timeline {
  display: grid;
  grid-template-columns: 1fr 40px 1fr 40px 1fr;
  align-items: start;
  gap: 0;
}
.milestone { display: flex; flex-direction: column; gap: 10px; }
.milestone-dot {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--ink-3);
  margin-bottom: 12px;
}
.dot-v1 {
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(61,139,255,0.15), 0 0 20px rgba(61,139,255,0.5);
}
.dot-v2 { background: var(--warn); }
.dot-v3 { background: var(--ink-3); }
.milestone-line {
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--line-2));
  margin-top: 19px;
}
.milestone-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--ink-3);
  text-transform: uppercase;
}
.milestone-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(20px, 2.2vw, 26px);
  color: var(--ink);
}
.milestone-text {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--ink-3);
  margin: 0;
  max-width: 280px;
}
@media (max-width: 720px) {
  .timeline { grid-template-columns: 1fr; }
  .milestone-line { display: none; }
  .milestone { margin-bottom: 32px; padding-left: 20px; border-left: 2px solid var(--line-2); }
}

/* ===== CTA ===== */
.section-cta { min-height: 60vh; text-align: center; }
.cta-inner {
  width: 100%;
  max-width: 720px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}
.cta-headline {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(40px, 6vw, 80px);
  line-height: 1.05;
  letter-spacing: -0.035em;
  color: var(--ink);
  margin: 0;
}
.cta-button {
  display: inline-block;
  padding: 18px 48px;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 17px;
  border-radius: 999px;
  text-decoration: none;
  transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
  box-shadow: 0 12px 32px -8px rgba(61,139,255,0.5);
}
.cta-button:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 18px 40px -8px rgba(61,139,255,0.6);
}
.cta-alt {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-3);
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}
.cta-alt a { color: var(--ink-3); text-decoration: none; }
.cta-alt a:hover { color: var(--accent-2); }

/* ===== NAV (sticky after hero) ===== */
.nav-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  padding: 14px 0;
  background: rgba(6,8,15,0);
  backdrop-filter: blur(0);
  transition: background 0.3s ease, backdrop-filter 0.3s ease;
  opacity: 0;
  pointer-events: none;
}
.nav-bar.is-pinned {
  background: rgba(6,8,15,0.75);
  backdrop-filter: blur(22px);
  border-bottom: 1px solid var(--line);
  opacity: 1;
  pointer-events: auto;
}
.nav-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  color: var(--ink);
  text-decoration: none;
}
.nav-right { display: flex; align-items: center; gap: 20px; }
.lang-switch {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: 999px;
}
.lang-switch button {
  appearance: none;
  background: transparent;
  border: none;
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
}
.lang-switch button.on { background: var(--accent); color: var(--accent-ink); }
.nav-cta {
  padding: 8px 18px;
  background: var(--glass-2);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}
.nav-cta:hover { background: var(--glass-3); }

/* ===== FOOTER ===== */
.footer-bar {
  padding: 32px 24px;
  border-top: 1px solid var(--line);
  margin-top: 80px;
}
.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-3);
}
.footer-inner b { color: var(--ink); }
.footer-right { display: flex; gap: 18px; }
.footer-right a { color: var(--ink-3); text-decoration: none; }
.footer-right a:hover { color: var(--accent-2); }
.footer-copy {
  max-width: 1240px;
  margin: 16px auto 0;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-4);
}
@media (max-width: 640px) {
  .nav-right .nav-cta { display: none; }
  .footer-inner { flex-direction: column; gap: 12px; align-items: flex-start; }
}

/* ===== BRAND LOGO IMAGES (text wordmark only — cleaner at mobile sizes) ===== */
.nav-brand { display: inline-flex; align-items: center; }
.nav-brand img { height: 18px; width: auto; display: block; }
.footer-left { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.footer-logo { height: 18px; width: auto; display: block; }
.footer-meta { color: var(--ink-3); }

/* ===== GLOBAL OVERFLOW SAFETY (prevents horizontal scroll on mobile) ===== */
html, body { overflow-x: hidden; max-width: 100vw; }
.section, .hero-inner, .s1-inner, .s2-inner, .s3-inner, .s4-inner, .s5-inner, .s6-inner, .s7-inner, .cta-inner {
  box-sizing: border-box;
  max-width: 100%;
}

/* ===== INVISIBLES OVERFLOW FIX ===== */
/* The original clamp(80px, 20vw, 280px) blew past the container on wide screens.
   Cap lower and prevent mid-word breaks on desktop. */
.s2-headline {
  font-size: clamp(56px, 14vw, 200px);
  line-height: 0.88;
  letter-spacing: -0.045em;
  white-space: nowrap;
}
@media (max-width: 480px) {
  .s2-headline {
    font-size: clamp(48px, 16vw, 100px);
    white-space: normal;
  }
}

/* ===== MOBILE PASS — 89% of traffic ===== */
@media (max-width: 640px) {
  .section { padding: 56px 20px; }
  .section-invisibles { padding-left: 20px; padding-right: 20px; }
}

/* Hero — tighter spacing + smaller temp on phones */
@media (max-width: 480px) {
  .hero { padding: 32px 20px; min-height: 92vh; }
  .hero-inner { gap: 14px; }
  .hero-icon { width: clamp(80px, 22vw, 120px); }
  .hero-temp { font-size: clamp(72px, 26vw, 140px); margin: -8px 0; }
  .hero-phrase { font-size: 16px; }
  .hero-ticker { font-size: 11.5px; padding: 12px 16px; min-width: auto; width: 100%; }
  .hero-ticker .tick { line-height: 1.45; }
  .hero-eyebrow { font-size: 10px; }
  .hero-scroll-affordance { margin-top: 20px; }
}

@media (max-width: 480px) {
  .s1-number { font-size: clamp(88px, 28vw, 160px); }
  .s1-body { font-size: 17px; }
  .s1-body p { margin: 6px 0; }
}

@media (max-width: 480px) {
  .s3-h2 { margin-bottom: 32px; }
  .tier { padding: 18px 20px; }
  .tier-detail { font-size: 15px; }
  .tier-tag { font-size: 13px; }
}

@media (max-width: 480px) {
  .s4-placeholder { padding: 48px 20px; }
  .s4-placeholder-text { font-size: 17px; }
  .s4-body { font-size: 16px; }
}

@media (max-width: 480px) {
  .s5-number { font-size: clamp(64px, 18vw, 100px); }
  .s5-label { font-size: 16px; }
}

@media (max-width: 480px) {
  .s6-cite-num { font-size: clamp(40px, 12vw, 64px); }
  .s6-cite-body { font-size: 15px; }
  .s6-divider { margin: 24px 0; }
}

@media (max-width: 480px) {
  .s7-h2 { margin-bottom: 32px; }
  .milestone-text { font-size: 13px; }
}

@media (max-width: 480px) {
  .section-cta { padding: 48px 20px 80px; }
  .cta-headline { font-size: clamp(32px, 9vw, 52px); }
  .cta-button { padding: 16px 36px; font-size: 16px; width: 100%; max-width: 320px; text-align: center; }
}

@media (max-width: 480px) {
  .nav-bar.is-pinned { padding: 10px 0; }
  .nav-brand img { height: 14px; }
  .nav-inner { padding: 0 16px; }
  .lang-switch button { padding: 4px 8px; font-size: 10px; }
}

@media (max-width: 480px) {
  .footer-bar { padding: 24px 20px; margin-top: 48px; }
  .footer-logo { height: 14px; }
  .footer-inner { font-size: 12px; }
  .footer-copy { font-size: 10px; }
}

/* Perf on mobile: fewer particles, lighter blur */
@media (max-width: 480px) {
  .rain-particle:nth-child(2n) { display: none; }
  .blob { filter: blur(50px) !important; }
}
