@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;700&family=Fraunces:opsz,wght@9..144,500;9..144,700&display=swap');

/* ── Design tokens ─────────────────────────────────────────── */
:root {
  --irg-bg-soft: linear-gradient(120deg, #f2f5f8 0%, #e8eef2 45%, #fef8f1 100%);
  --irg-panel: #ffffff;
  --irg-ink: #1f2a37;
  --irg-accent: #c2410c;
  --irg-accent-dark: #9a3412;
  --irg-ring: rgba(194, 65, 12, 0.22);
  --irg-nav-h: 56px;
}

/* ── Reset & base ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Space Grotesk', sans-serif;
  background: var(--irg-bg-soft);
  color: var(--irg-ink);
  min-height: 100vh;
}

h1, h2, h3 {
  font-family: 'Fraunces', serif;
  letter-spacing: 0.01em;
}

a { color: var(--irg-accent); }
a:hover { color: var(--irg-accent-dark); }

/* ── Navbar ─────────────────────────────────────────────────── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--irg-nav-h);
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  box-shadow: 0 2px 8px -4px rgba(15, 23, 42, 0.12);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0 1.5rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
}

.nav-links > li:first-child > a {
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--irg-ink);
  padding: 0.4rem 0.8rem;
  margin-right: 0.5rem;
}

.nav-links > li:first-child > a:hover {
  color: var(--irg-accent);
}

.nav-links > li > a {
  display: block;
  padding: 0.45rem 0.75rem;
  border-radius: 6px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--irg-ink);
  text-decoration: none;
  transition: background 150ms ease, color 150ms ease;
  white-space: nowrap;
}

.nav-links > li > a:hover {
  background: #f1f5f9;
  color: var(--irg-accent);
}

/* ── Dropdown ───────────────────────────────────────────────── */
.has-dropdown {
  position: relative;
}

.dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 12px 28px -10px rgba(15, 23, 42, 0.18);
  list-style: none;
  padding: 0.4rem;
  z-index: 200;
  margin-top: 0;
}

.has-dropdown:hover .dropdown {
  display: block;
}

.dropdown li a {
  display: block;
  padding: 0.5rem 0.85rem;
  border-radius: 6px;
  font-size: 0.85rem;
  color: var(--irg-ink);
  text-decoration: none;
  transition: background 120ms ease, color 120ms ease;
}

.dropdown li a:hover {
  background: #fff6eb;
  color: var(--irg-accent);
}

/* ── Page content ───────────────────────────────────────────── */
.page-content {
  padding: 2.5rem 1.5rem;
}

.content-wrapper {
  max-width: 820px;
  margin: 0 auto;
}

/* ── Hero block ─────────────────────────────────────────────── */
.hero-block {
  padding: 1.5rem;
  border-radius: 16px;
  background: linear-gradient(135deg, #fff6eb 0%, #eef5ff 100%);
  border: 1px solid #e2e8f0;
  box-shadow: 0 18px 38px -24px rgba(15,23,42,0.35);
  animation: hero-fade 560ms ease-out;
  margin-bottom: 2rem;
}

.hero-block h2 { margin-top: 0; color: var(--irg-ink); }

.hero-btn {
  display: inline-block;
  margin-top: 0.8rem;
  padding: 0.65rem 1rem;
  border-radius: 999px;
  text-decoration: none;
  color: #fff;
  background: var(--irg-accent);
  font-weight: 700;
  transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.hero-btn:hover {
  background: var(--irg-accent-dark);
  transform: translateY(-1px);
  box-shadow: 0 10px 20px -10px var(--irg-ring);
}

/* ── Prose styles ───────────────────────────────────────────── */
.content-wrapper h1 { font-size: 2rem; margin-bottom: 1rem; }
.content-wrapper h2 { font-size: 1.4rem; margin-top: 2rem; margin-bottom: 0.6rem; }
.content-wrapper h3 { font-size: 1.1rem; margin-top: 1.5rem; margin-bottom: 0.4rem; }
.content-wrapper p  { line-height: 1.75; margin-bottom: 1rem; color: #334155; }
.content-wrapper ul, .content-wrapper ol {
  margin: 0.5rem 0 1rem 1.5rem;
  line-height: 1.75;
  color: #334155;
}
.content-wrapper strong { color: var(--irg-ink); }
.content-wrapper a { color: var(--irg-accent); font-weight: 500; }
.content-wrapper hr { border: none; border-top: 1px solid #e2e8f0; margin: 2rem 0; }

/* ── Animations ─────────────────────────────────────────────── */
@keyframes hero-fade {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Topic cards ───────────────────────────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.8rem;
}

.topic-card {
  display: block;
  padding: 1rem;
  border-radius: 14px;
  border: 1px solid #dbe3ee;
  background: #fff;
  text-decoration: none;
  color: inherit;
  transition: transform 170ms ease, border-color 170ms ease, box-shadow 170ms ease;
  opacity: 0;
  transform: translateY(8px);
  animation: card-rise 500ms ease forwards;
}

.topic-card:nth-child(2) { animation-delay: 80ms; }
.topic-card:nth-child(3) { animation-delay: 160ms; }

.topic-card:hover {
  transform: translateY(-2px);
  border-color: #cbd5e1;
  box-shadow: 0 14px 24px -20px rgba(15,23,42,0.45);
}

.topic-card h3 { margin-top: 0; margin-bottom: 0.35rem; color: #0f172a; }
.topic-card p  { margin: 0; color: #334155; }

@keyframes card-rise {
  to { opacity: 1; transform: translateY(0); }
}
