@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,600;9..144,700&family=Inter:wght@400;600&family=JetBrains+Mono:wght@500&display=swap');

:root {
  --ink-indigo: #101326;
  --slate-indigo: #1B2140;
  --paper: #EEEFEA;
  --leap-lime: #C6F24E;
  --warm-coral: #FF6A5A;
  --slate-grey: #808AA0;
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --max-width: 1200px;
  --section-pad: clamp(3rem, 8vw, 8rem);
  --hairline: 1px solid rgba(238, 239, 234, 0.15);
  --hairline-dark: 1px solid rgba(16, 19, 38, 0.12);
  --shadow-deep: 0 24px 64px rgba(0, 0, 0, 0.35);
  --transition: 0.3s ease;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: currentColor; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; margin-top: 0; }
ul, ol { padding-left: 1.25rem; }
button, input, select, textarea { font: inherit; }

.surface-indigo { background: var(--ink-indigo); color: var(--paper); }
.surface-paper { background: var(--paper); color: var(--ink-indigo); }
.surface-slate { background: var(--slate-indigo); color: var(--paper); }
.surface-lime { background: var(--leap-lime); color: var(--ink-indigo); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--leap-lime);
}
.surface-paper .eyebrow { color: var(--slate-indigo); }

.container { width: min(100% - 2rem, var(--max-width)); margin-inline: auto; }

/* Header */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  transition: background var(--transition), box-shadow var(--transition);
}
.site-header.is-scrolled {
  background: var(--paper);
  color: var(--ink-indigo);
  box-shadow: 0 1px 0 rgba(16, 19, 38, 0.08);
}
.site-header.is-scrolled .eyebrow { color: var(--slate-indigo); }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  gap: 1rem;
}
.wordmark {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  text-decoration: none;
}
.nav-main {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.9rem;
  font-weight: 600;
}
.nav-main a { text-decoration: none; }
.nav-main a:hover { text-decoration: underline; }

/* Ticker */
.ticker {
  border-bottom: var(--hairline);
  overflow: hidden;
}
.ticker-inner {
  display: flex;
  gap: 2rem;
  padding: 0.5rem 0;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
  animation: ticker-scroll 40s linear infinite;
}
.ticker.is-paused .ticker-inner { animation-play-state: paused; }
@keyframes ticker-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.chip-live {
  display: inline-block;
  background: var(--leap-lime);
  color: var(--ink-indigo);
  padding: 0.15rem 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Hero — The Leap */
.hero-leap {
  position: relative;
  min-height: 96vh;
  display: flex;
  flex-direction: column;
  padding-top: 4rem;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}
.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(16,19,38,0.92) 0%, rgba(16,19,38,0.55) 50%, rgba(16,19,38,0.85) 100%);
}
.js .hero-bg img { animation: ken-burns 24s ease-in-out infinite alternate; }
@keyframes ken-burns {
  from { transform: scale(1); }
  to { transform: scale(1.04); }
}
.hero-content { position: relative; z-index: 1; flex: 1; display: flex; flex-direction: column; }
.masthead-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 1.5rem 0 1rem;
  border-bottom: 1px solid rgba(238,239,234,0.25);
}
.masthead-title { font-family: var(--font-display); font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 700; margin: 0; }
.dateline-live { font-family: var(--font-mono); font-size: 0.75rem; color: var(--leap-lime); letter-spacing: 0.08em; }
.section-rail {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  padding: 1rem 0;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-bottom: var(--hairline);
}
.section-rail a { text-decoration: none; opacity: 0.75; }
.section-rail a.is-active, .section-rail a:hover { opacity: 1; color: var(--leap-lime); }
.hero-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 3rem;
  padding: 3rem 0;
  flex: 1;
  align-items: end;
}
@media (max-width: 900px) {
  .hero-leap { min-height: 82vh; }
  .hero-grid { grid-template-columns: 1fr; gap: 2rem; }
}
.lead-headline {
  font-size: clamp(2.5rem, 6vw, 5.5rem);
  font-weight: 700;
  margin: 0.75rem 0;
  max-width: 14ch;
}
.lead-headline .leap-underline {
  position: relative;
  display: inline;
}
.leap-arc {
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 8px;
  stroke: var(--leap-lime);
  stroke-width: 2;
  fill: none;
  stroke-dasharray: 200;
  stroke-dashoffset: 200;
}
.js .leap-arc.is-drawn { stroke-dashoffset: 0; transition: stroke-dashoffset 1.2s ease; }
.standfirst { font-size: 1.125rem; opacity: 0.85; max-width: 35rem; margin-bottom: 1rem; }
.byline { font-size: 0.875rem; opacity: 0.7; }
.secondary-rail { display: flex; flex-direction: column; gap: 1.5rem; }
.secondary-item {
  padding-bottom: 1.5rem;
  border-bottom: var(--hairline);
}
.secondary-item h3 { font-size: 1.125rem; margin: 0.5rem 0; }
.section-chip {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  background: rgba(198,242,78,0.15);
  color: var(--leap-lime);
}
.hero-ctas { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1.5rem; }
.btn {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: filter var(--transition), box-shadow var(--transition);
}
.btn-primary { background: var(--leap-lime); color: var(--ink-indigo); }
.btn-secondary {
  background: transparent;
  color: inherit;
  border: 1px solid currentColor;
}
.btn:hover { filter: brightness(1.08); box-shadow: 0 4px 16px rgba(0,0,0,0.15); }
.hero-strip {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--slate-grey);
  padding: 1rem 0;
  border-top: var(--hairline);
  margin-top: auto;
}

/* Cards grid */
.section-pad { padding: var(--section-pad) 0; }
.section-title { font-size: clamp(1.75rem, 3vw, 2.25rem); margin-bottom: 2rem; }
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}
.story-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  border-right: var(--hairline-dark);
  padding-right: 1.5rem;
}
.story-card img {
  aspect-ratio: 16/10;
  object-fit: cover;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-deep);
}
.story-card h3 { font-size: 1.25rem; margin: 0.5rem 0; }
.story-card .standfirst { font-size: 0.95rem; }
.timestamp { font-family: var(--font-mono); font-size: 0.7rem; opacity: 0.6; }

/* Article page */
.article-header { padding: 6rem 0 3rem; }
.article-header h1 { font-size: clamp(2rem, 5vw, 3.5rem); max-width: 18ch; }
.article-meta { display: flex; flex-wrap: wrap; gap: 1rem; margin: 1.5rem 0; font-size: 0.875rem; }
.article-hero-img { width: 100%; max-height: 480px; object-fit: cover; margin: 2rem 0; }
.article-body { max-width: 42rem; }
.article-body h2 { font-size: 1.5rem; margin: 2.5rem 0 1rem; }
.article-body p { margin: 0 0 1.25rem; }
.pull-quote {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  border-left: 3px solid var(--leap-lime);
  padding: 1rem 0 1rem 1.5rem;
  margin: 2rem 0;
  font-style: italic;
}
.know-box {
  background: var(--slate-indigo);
  color: var(--paper);
  padding: 1.5rem;
  margin: 2rem 0;
  border-left: 3px solid var(--leap-lime);
}
.know-box h3 { font-size: 1rem; margin-bottom: 0.75rem; color: var(--leap-lime); }
.more-links { margin-top: 3rem; padding-top: 2rem; border-top: var(--hairline-dark); }
.more-links ul { list-style: none; padding: 0; }
.more-links li { margin-bottom: 0.5rem; }

/* Forms */
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-weight: 600; margin-bottom: 0.35rem; font-size: 0.9rem; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid rgba(16,19,38,0.2);
  background: #fff;
  color: var(--ink-indigo);
}
.form-check { display: flex; gap: 0.5rem; align-items: flex-start; font-size: 0.9rem; }
.form-check input { width: auto; margin-top: 0.25rem; }
.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

/* Footer */
.site-footer {
  padding: 3rem 0 2rem;
  font-size: 0.875rem;
  border-top: var(--hairline);
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}
.footer-grid h4 { font-size: 0.8rem; font-family: var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 0.75rem; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 0.35rem; }
.footer-standards { font-size: 0.8rem; opacity: 0.85; max-width: 48rem; margin-bottom: 1.5rem; line-height: 1.6; }
.footer-bottom { font-size: 0.75rem; opacity: 0.6; }

/* Cookie banner */
.cookie-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 200;
  padding: 1.25rem;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.2);
  transform: translateY(0);
}
.cookie-banner[hidden] { display: none; }
.cookie-inner { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; max-width: var(--max-width); margin: 0 auto; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.cookie-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(16,19,38,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.cookie-modal[hidden] { display: none; }
.cookie-modal-panel {
  max-width: 480px;
  width: 100%;
  padding: 2rem;
  max-height: 90vh;
  overflow-y: auto;
}
.cookie-option { display: flex; justify-content: space-between; align-items: center; padding: 0.75rem 0; border-bottom: var(--hairline-dark); }

/* Reveal */
.js .reveal { opacity: 1; transform: translateY(0); transition: opacity 0.6s ease, transform 0.6s ease; }
.js .reveal:not(.is-visible) { opacity: 0.01; transform: translateY(16px); }

/* FAQ */
.faq-item { margin-bottom: 2rem; padding-bottom: 2rem; border-bottom: var(--hairline-dark); }
.faq-item h3 { font-size: 1.125rem; margin-bottom: 0.75rem; }

/* Legal prose */
.legal-prose { max-width: 42rem; }
.legal-prose h2 { font-size: 1.35rem; margin: 2rem 0 0.75rem; }

/* 404 */
.error-page { min-height: 70vh; display: flex; align-items: center; justify-content: center; text-align: center; padding: 6rem 1rem; }
.error-page h1 { font-size: clamp(2rem, 5vw, 3rem); }

/* Band sections */
.band-analysis { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
@media (max-width: 768px) { .band-analysis { grid-template-columns: 1fr; } }
.membership-band { text-align: center; padding: 3rem; }
.mini-faq { display: grid; gap: 1.5rem; }
.faint-num {
  position: absolute;
  font-family: var(--font-display);
  font-size: 12rem;
  font-weight: 700;
  opacity: 0.04;
  line-height: 1;
  pointer-events: none;
  z-index: 0;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ticker-inner, .js .hero-bg img { animation: none; }
  .js .reveal:not(.is-visible) { opacity: 1; transform: none; }
  .leap-arc { stroke-dashoffset: 0; }
}
