:root {
  --bg: #070b14;
  --bg-2: #0f1729;
  --card: rgba(18, 28, 48, 0.72);
  --card-solid: #121c30;
  --line: rgba(232, 197, 71, 0.18);
  --ink: #f4f1ea;
  --muted: #9aa6bf;
  --gold: #e8c547;
  --gold-2: #c9a227;
  --accent: #5b8cff;
  --radius: 18px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--ink);
  background: radial-gradient(1200px 600px at 10% -10%, #1a2744 0%, transparent 55%),
              radial-gradient(900px 500px at 100% 0%, #2a1f0a 0%, transparent 50%),
              var(--bg);
  line-height: 1.5;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; }

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

.bg { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.orb {
  position: absolute; border-radius: 50%; filter: blur(60px); opacity: 0.45;
  animation: drift 18s ease-in-out infinite alternate;
}
.orb-a { width: 380px; height: 380px; background: #2a4a9a; top: -80px; left: -60px; }
.orb-b { width: 320px; height: 320px; background: #7a5a12; bottom: 10%; right: -80px; animation-delay: -6s; }
.orb-c { width: 240px; height: 240px; background: #1f6b5a; top: 45%; left: 40%; animation-delay: -11s; opacity: 0.28; }
@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(40px, -30px, 0) scale(1.08); }
}

.top, main, .foot { position: relative; z-index: 1; }

.top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px clamp(16px, 4vw, 40px);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
  background: rgba(7, 11, 20, 0.65);
  position: sticky; top: 0; z-index: 20;
}
.brand { display: flex; align-items: center; gap: 12px; }
.mark {
  width: 42px; height: 42px; border-radius: 12px;
  display: grid; place-items: center;
  background: linear-gradient(145deg, var(--gold), var(--gold-2));
  color: #1a1406; font-weight: 800; letter-spacing: 0.02em;
  box-shadow: 0 8px 24px rgba(232, 197, 71, 0.25);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 1rem; }
.brand-text small { color: var(--muted); font-size: 0.78rem; }

.nav { display: flex; gap: 8px; flex-wrap: wrap; }
.nav a {
  padding: 8px 14px; border-radius: 999px; color: var(--muted);
  transition: color .2s, background .2s, transform .2s;
}
.nav a:hover, .nav a.on { color: var(--ink); background: rgba(255,255,255,0.06); }
.nav a.on { box-shadow: inset 0 -2px 0 var(--gold); border-radius: 10px; }

.nav-toggle {
  display: none; width: 44px; height: 44px; border: 1px solid var(--line);
  border-radius: 12px; background: transparent; cursor: pointer;
  flex-direction: column; justify-content: center; align-items: center; gap: 6px;
}
.nav-toggle span { display: block; width: 18px; height: 2px; background: var(--ink); }

main { width: min(1100px, calc(100% - 32px)); margin: 0 auto; padding: 28px 0 64px; }

.hero {
  padding: 36px 28px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(160deg, rgba(24,36,62,0.9), rgba(12,18,32,0.85));
  box-shadow: var(--shadow);
  animation: rise .7s ease both;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}
.eyebrow {
  margin: 0 0 10px; text-transform: uppercase; letter-spacing: 0.16em;
  font-size: 0.72rem; color: var(--gold);
}
.hero h1 {
  margin: 0 0 12px; font-family: var(--serif);
  font-size: clamp(1.8rem, 4vw, 2.7rem); line-height: 1.15; font-weight: 700;
}
.lead { margin: 0 0 22px; color: var(--muted); max-width: 42rem; }

.search {
  display: grid; grid-template-columns: 1fr auto; gap: 10px;
  padding: 8px; border-radius: 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
}
.search input {
  border: 0; outline: 0; background: transparent; color: var(--ink);
  padding: 14px 16px; min-width: 0;
}
.search input::placeholder { color: #7d8aa8; }
.search button {
  border: 0; border-radius: 12px; padding: 14px 22px; cursor: pointer;
  font-weight: 700; color: #1a1406;
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  transition: transform .15s, box-shadow .15s;
}
.search button:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(232,197,71,.28); }

.quick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.quick a {
  padding: 8px 14px; border-radius: 999px; font-size: 0.9rem;
  border: 1px solid var(--line); color: var(--muted);
  background: rgba(255,255,255,0.03);
  transition: border-color .2s, color .2s, background .2s;
}
.quick a:hover { color: var(--ink); border-color: var(--gold); background: rgba(232,197,71,0.08); }

.stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 28px 0;
}
.stat {
  padding: 20px; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--line);
  backdrop-filter: blur(10px);
}
.stat strong {
  display: block; font-size: 2rem; font-family: var(--serif);
  color: var(--gold); line-height: 1.1;
}
.stat span { color: var(--muted); font-size: 0.9rem; }

.block { margin: 40px 0; }
.block-head {
  display: flex; align-items: end; justify-content: space-between; gap: 12px;
  margin-bottom: 16px;
}
.block-head h2 {
  margin: 0; font-family: var(--serif); font-size: 1.55rem; font-weight: 700;
}
.more { color: var(--gold); font-size: 0.92rem; }
.more:hover { text-decoration: underline; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}
.card {
  display: flex; flex-direction: column; gap: 6px;
  padding: 18px; min-height: 140px;
  border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--line);
  transition: transform .2s, border-color .2s, background .2s;
}
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(232,197,71,0.45);
  background: rgba(28, 40, 68, 0.9);
}
.year {
  align-self: flex-start; font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.06em; color: #1a1406;
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  padding: 4px 10px; border-radius: 999px;
}
.card h3 { margin: 8px 0 0; font-size: 1.05rem; line-height: 1.25; }
.card p { margin: 0; color: var(--muted); font-size: 0.9rem; }

.places { display: flex; flex-wrap: wrap; gap: 10px; }
.places a {
  padding: 12px 18px; border-radius: 14px;
  border: 1px solid var(--line); background: var(--card);
  transition: transform .2s, border-color .2s;
}
.places a:hover { transform: translateY(-2px); border-color: var(--gold); }

.sources { display: grid; gap: 12px; }
.source {
  display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: start;
  padding: 18px 20px; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--card);
  transition: border-color .2s, transform .2s;
}
.source:hover { border-color: rgba(91,140,255,0.45); transform: translateX(4px); }
.source-mark {
  width: 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center; font-weight: 800; font-size: 0.85rem;
  color: var(--gold); background: rgba(232,197,71,0.1);
  border: 1px solid var(--line);
}
.source h3 { margin: 0 0 4px; font-size: 1.05rem; }
.source p { margin: 0; color: var(--muted); font-size: 0.92rem; }

.foot {
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: center;
  padding: 28px 16px 40px; color: var(--muted); font-size: 0.9rem;
  border-top: 1px solid var(--line);
}
.foot a:hover { color: var(--gold); }

.reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s var(--d, 0ms), transform .5s var(--d, 0ms); }
.reveal.in { opacity: 1; transform: none; }

@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .nav {
    display: none; position: absolute; right: 16px; top: 72px;
    flex-direction: column; min-width: 180px; padding: 10px;
    border-radius: 16px; border: 1px solid var(--line);
    background: rgba(10, 16, 28, 0.96); box-shadow: var(--shadow);
  }
  .nav.open { display: flex; }
  .stats { grid-template-columns: 1fr; }
  .search { grid-template-columns: 1fr; }
  .hero { padding: 28px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .orb, .hero, .reveal, .card, .source, .places a, .search button { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
