/* ------------------------------------------------------------------ *
 * SAGE — Sovereign AI Governance Engine
 * Branded to Intelligent Internet · Founding Councils (council.ii.inc).
 * Deep-navy ground, warm ivory type, Cormorant Garamond display +
 * Source Serif 4 body, cobalt/sky accents, gold for moments of status.
 * ------------------------------------------------------------------ */

:root {
  --navy: #092859;
  --navy-deep: #071f47;
  --masthead: #0f233f;
  --ivory: #f2eee2;
  --ivory-bright: #f7f4ed;
  --periwinkle-bold: #607fe2;
  --periwinkle: #9db4f5;
  --sky: #bae9f4;
  --gold: #bf9243;
  --gold-warm: #d7b794;
  --cobalt: #0751fd;
  --azure: #3d8afe;

  --ink: var(--ivory);
  --muted: rgba(242, 238, 226, 0.6);
  --rule: rgba(247, 244, 237, 0.14);
  --rule-soft: rgba(247, 244, 237, 0.08);

  --font-display: 'Cormorant Garamond', Garamond, Georgia, serif;
  --font-body: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --font-sans: 'Montserrat', system-ui, -apple-system, sans-serif;

  --max: 1040px;
  --radius: 2px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--navy);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--ivory-bright);
  margin: 0;
  letter-spacing: -0.012em;
  line-height: 1.08;
}

p { margin: 0; }
a { color: var(--sky); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

.eyebrow {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--periwinkle);
}

/* ---------- background ---------- */

.terrain {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  background:
    radial-gradient(120% 80% at 50% -10%, #123566 0%, var(--navy) 46%, var(--navy-deep) 100%);
}
.terrain::after {
  /* a faint periwinkle horizon glow, echoing council's ring motifs */
  content: '';
  position: absolute;
  left: 50%;
  bottom: -34vh;
  width: 150vw;
  height: 90vh;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(96, 127, 226, 0.16), transparent 70%);
  pointer-events: none;
}
/* ---------- masthead ---------- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 30;
  background: color-mix(in srgb, var(--masthead) 82%, transparent);
  backdrop-filter: saturate(1.3) blur(10px);
  -webkit-backdrop-filter: saturate(1.3) blur(10px);
  border-bottom: 1px solid var(--rule);
}
.masthead-inner {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 40px);
  height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.masthead .brand { display: inline-flex; align-items: center; gap: 16px; }
.masthead .brand img { height: 26px; width: auto; display: block; }
.brand-label {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(242, 238, 226, 0.72);
}
.brand-label::before {
  content: '';
  width: 1px;
  height: 1rem;
  background: currentColor;
  opacity: 0.4;
}
@media (max-width: 620px) { .brand-label { display: none; } }

.enter {
  font-family: var(--font-sans);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ivory);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 8px 18px;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.enter:hover {
  text-decoration: none;
  background: var(--gold-warm);
  border-color: var(--gold-warm);
  color: var(--navy);
}

/* ---------- hero ---------- */

.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(56px, 12vw, 116px) clamp(20px, 4vw, 40px) 40px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hero .logo {
  height: clamp(64px, 12vw, 96px);
  width: auto;
  margin-bottom: 26px;
}
.hero .tagline {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 5.2vw, 3.2rem);
  font-weight: 500;
  color: var(--ivory-bright);
  letter-spacing: -0.015em;
  line-height: 1.05;
  max-width: 20ch;
}
.hero .dek {
  margin-top: 20px;
  max-width: 52ch;
  color: rgba(242, 238, 226, 0.78);
  font-size: 1.06rem;
  line-height: 1.6;
}
.hero .hero-eyebrow { margin-bottom: 20px; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 12px 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary {
  background: var(--gold-warm);
  color: var(--navy);
  border-color: var(--gold-warm);
}
.btn-primary:hover { background: #e4cbac; border-color: #e4cbac; }
.btn-ghost {
  background: transparent;
  color: var(--ivory);
  border-color: var(--rule);
}
.btn-ghost:hover { border-color: var(--ivory); background: rgba(247, 244, 237, 0.06); }

.cta-row {
  margin-top: 34px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
}

/* ---------- video sections ---------- */

.section {
  max-width: 940px;
  margin: 0 auto;
  padding: clamp(30px, 6vw, 56px) clamp(20px, 4vw, 40px);
}
.section-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 18px;
}
.section-head .num {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--gold);
}
.section-head h2 {
  font-size: clamp(1.5rem, 3.4vw, 2.1rem);
}
.section-rule { border: 0; border-top: 1px solid var(--rule-soft); margin: 0 0 26px; }

.video-card {
  position: relative;
  border: 1px solid var(--rule);
  background: #05122b;
  overflow: hidden;
  box-shadow: 0 24px 60px -30px rgba(0, 0, 0, 0.7);
}
.video-aspect { position: relative; aspect-ratio: 16 / 9; }
.video-layer { position: absolute; inset: 0; }
.video-wrapper video { width: 100%; height: 100%; object-fit: cover; display: block; }

.video-overlay {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background:
    radial-gradient(60% 60% at 50% 45%, rgba(9, 40, 89, 0.15), rgba(5, 18, 43, 0.72));
  cursor: pointer;
  z-index: 2;
  transition: opacity 0.35s ease;
}
.video-overlay--hidden { opacity: 0; pointer-events: none; }
.play-button {
  width: 74px;
  height: 74px;
  border: 2px solid var(--sky);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--sky);
  background: rgba(186, 233, 244, 0.06);
  transition: background 0.2s ease, transform 0.2s ease;
}
.video-overlay:hover .play-button { background: rgba(186, 233, 244, 0.14); transform: scale(1.04); }
.play-icon { width: 30px; height: 30px; fill: currentColor; margin-left: 4px; }

/* ---------- footer ---------- */

.foot {
  max-width: var(--max);
  margin: 40px auto 0;
  padding: 26px clamp(20px, 4vw, 40px) 48px;
  border-top: 1px solid var(--rule-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.84rem;
}
.foot a { color: var(--muted); }
.foot a:hover { color: var(--ivory); text-decoration: none; }
.foot .foot-links { display: flex; gap: 20px; flex-wrap: wrap; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

@media (max-width: 620px) {
  .section-head { flex-direction: column; gap: 4px; align-items: flex-start; }
}
