/* ============================================
   THE STORY OF AI — Editorial Design
   ============================================ */

:root {
  /* Color tokens */
  --ink: #0a1628;
  --ink-soft: #1a2942;
  --parchment: #ece6d6;
  --parchment-deep: #ddd5c0;
  --cream: #faf6ec;
  --accent: #2563eb;
  --accent-deep: #1e40af;
  --gold: #b8893f;
  --gold-soft: #d4ae6b;
  --slate: #475569;
  --line: rgba(10, 22, 40, 0.12);

  /* Type */
  --font-display: "Playfair Display", "Times New Roman", Georgia, serif;
  --font-serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", Menlo, monospace;
  --font-script: "Caveat", "Brush Script MT", cursive;

  /* Layout */
  --measure: 68ch;
  --container: 1240px;
  --radius: 4px;
  --shadow-md: 0 8px 30px rgba(10, 22, 40, 0.08);
  --shadow-lg: 0 24px 60px rgba(10, 22, 40, 0.18);
}

/* Reset + base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  font-size: 18px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

/* ============================================
   NAV
   ============================================ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 246, 236, 0.92);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.3s;
}
.topbar.scrolled { box-shadow: 0 6px 30px rgba(10, 22, 40, 0.07); }
.topbar-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 18px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.01em;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-mark {
  width: 32px; height: 32px;
  background: var(--ink);
  color: var(--gold-soft);
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-weight: 900;
  border-radius: 50%;
  font-size: 14px;
  letter-spacing: 0;
}
.nav-links {
  display: flex;
  gap: 24px;
  align-items: center;
  list-style: none;
  flex-wrap: wrap;
}
.nav-links a {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  position: relative;
  padding: 6px 0;
  transition: color 0.2s;
  white-space: nowrap;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%; bottom: 0;
  height: 2px;
  background: var(--accent);
  transition: right 0.3s ease;
}
.nav-links a:hover, .nav-links a.active { color: var(--ink); }
.nav-links a:hover::after, .nav-links a.active::after { right: 0; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  width: 40px; height: 40px;
}
.nav-toggle span {
  display: block;
  width: 22px; height: 2px;
  background: var(--ink);
  margin: 4px auto;
  transition: all 0.3s;
}

@media (max-width: 1100px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed;
    inset: 71px 0 auto 0;
    flex-direction: column;
    background: var(--cream);
    padding: 30px;
    gap: 18px;
    border-bottom: 1px solid var(--line);
    transform: translateY(-120%);
    transition: transform 0.3s;
    align-items: flex-start;
    max-height: calc(100vh - 71px);
    overflow-y: auto;
  }
  .nav-links.open { transform: translateY(0); }
}

/* ============================================
   HERO
   ============================================ */
.hero {
  position: relative;
  min-height: 88vh;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--cream);
  padding: 120px 32px;
  overflow: hidden;
  background: var(--ink);
}
.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 25% 30%, rgba(37, 99, 235, 0.28) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 70%, rgba(184, 137, 63, 0.20) 0%, transparent 55%),
    linear-gradient(180deg, #0a1628 0%, #1a2942 50%, #0a1628 100%);
  z-index: 1;
}
.hero-bg::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(212, 174, 107, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(212, 174, 107, 0.05) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.7;
}
.hero-bg::after {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 18% 22%, rgba(37,99,235,0.7) 0, transparent 2px),
    radial-gradient(circle at 72% 18%, rgba(212,174,107,0.7) 0, transparent 2px),
    radial-gradient(circle at 28% 78%, rgba(212,174,107,0.55) 0, transparent 2px),
    radial-gradient(circle at 82% 82%, rgba(37,99,235,0.6) 0, transparent 2px),
    radial-gradient(circle at 50% 48%, rgba(212,174,107,0.5) 0, transparent 1.5px);
  opacity: 0.55;
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
}
.eyebrow {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin-bottom: 28px;
  display: inline-flex;
  align-items: center;
  gap: 14px;
}
.eyebrow::before, .eyebrow::after {
  content: "";
  width: 30px; height: 1px;
  background: var(--gold-soft);
}
.hero h1 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(48px, 9vw, 124px);
  line-height: 0.96;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}
.hero h1 .ornament {
  display: inline-block;
  font-style: italic;
  font-weight: 400;
  color: var(--gold-soft);
}
.hero-tagline {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(18px, 2.4vw, 26px);
  color: rgba(250, 246, 236, 0.85);
  max-width: 660px;
  margin: 0 auto 40px;
  line-height: 1.5;
}
.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  background: var(--accent);
  color: var(--cream);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid var(--accent);
  border-radius: 2px;
  transition: all 0.3s;
}
.hero-cta:hover {
  background: transparent;
  color: var(--gold-soft);
  border-color: var(--gold-soft);
  transform: translateY(-2px);
}
.scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(250, 246, 236, 0.6);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  animation: float 3s ease-in-out infinite;
}
.scroll-hint::after {
  content: "";
  width: 1px; height: 40px;
  background: linear-gradient(to bottom, var(--gold-soft), transparent);
}
@keyframes float {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* Page hero (smaller, for subpages) */
.page-hero {
  min-height: 56vh;
  padding: 100px 32px 80px;
}
.page-hero h1 {
  font-size: clamp(40px, 7vw, 88px);
}

/* ============================================
   CONTAINERS / SECTIONS
   ============================================ */
.section {
  padding: 100px 32px;
}
.section-tight { padding: 60px 32px; }
.section-parchment { background: var(--parchment); }
.section-ink { background: var(--ink); color: var(--cream); }
.section-ink .section-title, .section-ink .prose p { color: var(--cream); }
.section-ink .section-intro { color: rgba(250, 246, 236, 0.75); }
.section-ink .section-label { color: var(--gold-soft); }
.container {
  max-width: var(--container);
  margin: 0 auto;
}
.prose {
  max-width: var(--measure);
  margin: 0 auto;
}
.prose p {
  font-family: var(--font-serif);
  font-size: 21px;
  line-height: 1.65;
  color: var(--ink);
  margin-bottom: 1.4em;
}
.prose p.lead {
  font-size: 26px;
  line-height: 1.5;
  color: var(--ink);
}
.prose p.lead::first-letter {
  font-family: var(--font-display);
  font-size: 76px;
  font-weight: 700;
  float: left;
  line-height: 0.85;
  margin: 8px 14px 0 0;
  color: var(--accent);
}
.prose h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 30px;
  line-height: 1.2;
  margin: 1.8em 0 0.6em;
  color: var(--ink);
}
.prose ul {
  font-family: var(--font-serif);
  font-size: 20px;
  line-height: 1.6;
  margin-bottom: 1.4em;
  padding-left: 24px;
}
.prose ul li { margin-bottom: 0.5em; }
.prose ul li::marker { color: var(--accent); }
.prose strong { color: var(--ink); font-weight: 700; }
.prose em { color: var(--accent-deep); }

.section-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
  display: block;
}
.section-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin-bottom: 24px;
  color: var(--ink);
}
.section-intro {
  font-family: var(--font-serif);
  font-size: 22px;
  line-height: 1.55;
  color: var(--slate);
  font-style: italic;
  max-width: 720px;
  margin-bottom: 60px;
}

/* ============================================
   TIMELINE
   ============================================ */
.timeline {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px 0;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, transparent, var(--gold-soft) 8%, var(--gold-soft) 92%, transparent);
  transform: translateX(-50%);
}
.timeline-item {
  position: relative;
  width: 50%;
  padding: 30px 50px;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.timeline-item.in { opacity: 1; transform: translateY(0); }
.timeline-item:nth-child(odd) { left: 0; text-align: right; }
.timeline-item:nth-child(even) { left: 50%; }
.timeline-item::before {
  content: "";
  position: absolute;
  top: 38px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--cream);
  border: 3px solid var(--accent);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}
.timeline-item:nth-child(odd)::before { right: -7px; }
.timeline-item:nth-child(even)::before { left: -7px; }
.timeline-year {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 42px;
  color: var(--accent);
  line-height: 1;
  letter-spacing: -0.02em;
}
.timeline-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 22px;
  margin-top: 6px;
  color: var(--ink);
}
.timeline-side {
  font-size: 14px;
  font-family: var(--font-serif);
  font-style: italic;
  margin-top: 8px;
  color: var(--slate);
  line-height: 1.5;
}
@media (max-width: 720px) {
  .timeline::before { left: 12px; }
  .timeline-item, .timeline-item:nth-child(even) { width: 100%; left: 0; padding: 20px 20px 20px 40px; text-align: left; }
  .timeline-item::before, .timeline-item:nth-child(even)::before { left: 5px; right: auto; }
}

/* ============================================
   PULL QUOTE
   ============================================ */
.pull-quote {
  max-width: 900px;
  margin: 80px auto;
  padding: 60px 32px;
  text-align: center;
  position: relative;
}
.pull-quote::before {
  content: "\201C";
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-display);
  font-size: 140px;
  line-height: 1;
  color: var(--gold-soft);
  opacity: 0.4;
}
.pull-quote blockquote {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(28px, 3.8vw, 44px);
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--ink);
  position: relative;
  z-index: 2;
}
.pull-quote cite {
  display: block;
  margin-top: 28px;
  font-family: var(--font-sans);
  font-style: normal;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ============================================
   CARD GRID
   ============================================ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
  max-width: var(--container);
  margin: 0 auto;
}
.card {
  background: var(--parchment);
  border: 1px solid var(--line);
  padding: 36px 30px;
  position: relative;
  transition: all 0.4s ease;
  cursor: default;
  display: block;
}
a.card { cursor: pointer; }
.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--gold-soft);
}
.card-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 64px;
  color: var(--gold-soft);
  line-height: 1;
  display: block;
  margin-bottom: 16px;
}
.card h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  margin-bottom: 12px;
  color: var(--ink);
  line-height: 1.3;
}
.card p {
  font-family: var(--font-serif);
  font-size: 18px;
  color: var(--slate);
  line-height: 1.55;
}
.card-arrow {
  display: block;
  margin-top: 20px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ============================================
   STATS
   ============================================ */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  max-width: var(--container);
  margin: 0 auto;
  padding: 60px 32px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stat { text-align: center; }
.stat-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(48px, 6vw, 76px);
  line-height: 1;
  color: var(--accent);
  letter-spacing: -0.02em;
}
.stat-label {
  font-size: 13px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--slate);
  margin-top: 12px;
  font-weight: 600;
}

/* ============================================
   CHAT SAMPLE (for ELIZA conversation, etc.)
   ============================================ */
.chat-sample {
  max-width: 600px;
  margin: 40px auto;
  background: var(--ink);
  color: var(--cream);
  border-radius: 6px;
  padding: 28px 30px;
  font-family: var(--font-mono), monospace;
  font-size: 15px;
  line-height: 1.7;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(212, 174, 107, 0.2);
}
.chat-sample .who {
  display: inline-block;
  width: 64px;
  font-weight: 700;
  letter-spacing: 0.05em;
}
.chat-sample .who.user { color: var(--gold-soft); }
.chat-sample .who.bot { color: #8bb3f5; }
.chat-sample .line { margin-bottom: 6px; }

/* ============================================
   BIG-NUMBER LIST (for predictions, examples)
   ============================================ */
.big-list {
  max-width: 820px;
  margin: 0 auto;
  list-style: none;
}
.big-list li {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 24px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
}
.big-list li:last-child { border-bottom: none; }
.big-list .num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 36px;
  color: var(--gold-soft);
  line-height: 1;
}
.big-list .body {
  font-family: var(--font-serif);
  font-size: 19px;
  line-height: 1.55;
  color: var(--ink);
}
.big-list .body strong {
  font-family: var(--font-display);
  font-weight: 700;
  display: block;
  font-size: 22px;
  margin-bottom: 6px;
  color: var(--ink);
}

/* ============================================
   ILLUSTRATIONS & CHARTS (SVG)
   ============================================ */
.illustration {
  max-width: 720px;
  margin: 60px auto;
  padding: 40px 32px;
  background: var(--parchment);
  border: 1px solid var(--line);
  border-radius: 4px;
  text-align: center;
  box-shadow: var(--shadow-md);
}
.illustration svg { max-width: 100%; height: auto; display: block; margin: 0 auto; }
.illustration figcaption {
  margin-top: 20px;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 16px;
  color: var(--slate);
}
.illustration.dark { background: var(--ink); border-color: var(--ink-soft); }
.illustration.dark figcaption { color: var(--gold-soft); }

.chart-figure {
  max-width: 800px;
  margin: 60px auto;
  padding: 40px 32px;
  text-align: center;
}
.chart-figure h4 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 24px;
  margin-bottom: 8px;
  color: var(--ink);
}
.chart-figure .chart-sub {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--slate);
  font-size: 16px;
  margin-bottom: 28px;
}
.chart-figure svg { max-width: 100%; height: auto; }
.chart-figure figcaption {
  margin-top: 18px;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 14px;
  color: var(--slate);
}

/* ============================================
   ORNAMENT (decorative divider)
   ============================================ */
.ornament-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin: 60px 0;
  color: var(--gold);
}
.ornament-divider::before, .ornament-divider::after {
  content: "";
  flex: 0 1 80px;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold-soft), transparent);
}
.ornament-divider span {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 0.2em;
}

/* ============================================
   PROS / CONS GRID
   ============================================ */
.pros-cons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  max-width: 1000px;
  margin: 0 auto;
}
.pros-cons > div {
  background: var(--parchment);
  padding: 40px 36px;
  border-top: 4px solid;
}
.pros-cons .pros { border-color: var(--accent); }
.pros-cons .cons { border-color: var(--gold); }
.pros-cons h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 26px;
  margin-bottom: 20px;
  color: var(--ink);
}
.pros-cons ol {
  font-family: var(--font-serif);
  font-size: 18px;
  line-height: 1.6;
  padding-left: 22px;
}
.pros-cons ol li { margin-bottom: 0.7em; }
.pros-cons .pros ol li::marker { color: var(--accent); font-weight: 700; }
.pros-cons .cons ol li::marker { color: var(--gold); font-weight: 700; }
@media (max-width: 800px) {
  .pros-cons { grid-template-columns: 1fr; gap: 28px; }
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--ink);
  color: rgba(250, 246, 236, 0.7);
  padding: 80px 32px 40px;
  text-align: center;
}
.footer-mark {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--cream);
  margin-bottom: 16px;
}
.footer-tag {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 18px;
  margin-bottom: 32px;
  color: var(--gold-soft);
}
.footer-links {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin-bottom: 40px;
  flex-wrap: wrap;
  list-style: none;
}
.footer-links a {
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(250, 246, 236, 0.7);
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--gold-soft); }
.footer-credit {
  font-family: var(--font-script);
  font-size: 24px;
  color: var(--gold-soft);
  max-width: 800px;
  margin: 0 auto;
}

/* ============================================
   ANIMATIONS
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* Selection */
::selection { background: var(--accent); color: var(--cream); }
