@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;1,400&family=DM+Sans:wght@300;400;500&display=swap');

:root {
  --amber:     #c8860a;
  --amber-lt:  #f4c050;
  --warm-bg:   #fdf8ef;
  --card-bg:   #fffdf7;
  --text:      #2b1f0e;
  --muted:     #7a6650;
  --border:    #e8d8b8;
  --accent:    #8b3a0f;
  --tag-bg:    #fef3d6;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--warm-bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.75;
}

/* ── NOISE TEXTURE OVERLAY ── */
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='.03'/%3E%3C/svg%3E");
  pointer-events: none; z-index: 0;
}

/* ── HEADER ── */
.site-header {
  background: linear-gradient(135deg, #3d1f05 0%, #7a3810 50%, #c8860a 100%);
  color: #fff;
  padding: 0;
  overflow: hidden;
  position: relative;
}

.header-inner {
  max-width: 1000px;
  margin: auto;
  padding: 60px 40px 50px;
  position: relative;
  z-index: 1;
}

.header-eyebrow {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--amber-lt);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.header-eyebrow::before {
  content: '';
  width: 30px; height: 1px;
  background: var(--amber-lt);
}

.header-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(52px, 8vw, 88px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -2px;
  margin-bottom: 20px;
}

.header-subtitle {
  font-size: 17px;
  font-weight: 300;
  color: rgba(255,255,255,.75);
  max-width: 520px;
  line-height: 1.65;
}

/* Decorative strands SVG */
.header-deco {
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 340px;
  opacity: .18;
}

/* ── NAV PILLS ── */
.topic-nav {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
}
.topic-nav-inner {
  max-width: 1000px;
  margin: auto;
  padding: 0 40px;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.topic-nav-inner::-webkit-scrollbar { display: none; }
.nav-pill {
  flex-shrink: 0;
  padding: 14px 18px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all .2s;
  white-space: nowrap;
  background: none; border-top: none; border-left: none; border-right: none;
}
.nav-pill:hover, .nav-pill.active {
  color: var(--amber);
  border-bottom-color: var(--amber);
}

/* ── LAYOUT ── */
.main { max-width: 1000px; margin: auto; padding: 50px 40px 80px; }

/* ── SECTION ── */
.section { margin-bottom: 60px; opacity: 0; transform: translateY(24px); transition: opacity .6s, transform .6s; }
.section.visible { opacity: 1; transform: none; }

.section-label {
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.section-title {
  font-family: 'Playfair Display', serif;
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text);
}

p { color: #4a3828; margin-bottom: 14px; }

/* ── CARDS GRID ── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  transition: transform .25s, box-shadow .25s;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(200,134,10,.12);
}

.card-icon {
  width: 44px; height: 44px;
  background: var(--tag-bg);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  margin-bottom: 14px;
}

.card-title {
  font-family: 'Playfair Display', serif;
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
}
.card-body { font-size: 14px; color: var(--muted); line-height: 1.65; }

/* ── CYCLE STEPS ── */
.cycle { display: flex; gap: 0; margin-top: 24px; overflow-x: auto; padding-bottom: 8px; }
.cycle-step {
  flex: 1; min-width: 160px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 22px 18px;
  position: relative;
  text-align: center;
}
.cycle-step:first-child { border-radius: 14px 0 0 14px; }
.cycle-step:last-child  { border-radius: 0 14px 14px 0; }

.cycle-step::after {
  content: '→';
  position: absolute;
  right: -14px; top: 50%; transform: translateY(-50%);
  font-size: 18px; color: var(--amber); z-index: 1;
}
.cycle-step:last-child::after { display: none; }

.cycle-num {
  font-size: 11px; font-weight: 600;
  letter-spacing: 2px; text-transform: uppercase;
  color: var(--amber); margin-bottom: 6px;
}
.cycle-name {
  font-family: 'Playfair Display', serif;
  font-size: 16px; font-weight: 700;
  margin-bottom: 6px;
}
.cycle-detail { font-size: 12.5px; color: var(--muted); }

.cycle-bar {
  height: 6px;
  border-radius: 3px;
  margin-top: 12px;
  background: var(--border);
}
.cycle-bar-fill {
  height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, var(--amber), var(--amber-lt));
  transition: width 1.2s cubic-bezier(.22,1,.36,1);
  width: 0;
}
.section.visible .cycle-bar-fill { /* triggered by JS */ }

/* ── PATHOLOGIES TABLE ── */
.patho-table { width: 100%; border-collapse: collapse; margin-top: 20px; }
.patho-table th {
  text-align: left; padding: 12px 16px;
  font-size: 11px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--muted); border-bottom: 2px solid var(--border);
  font-weight: 500;
}
.patho-table td {
  padding: 14px 16px; border-bottom: 1px solid var(--border);
  font-size: 14px; vertical-align: top;
}
.patho-table tr:last-child td { border-bottom: none; }
.patho-table tr:hover td { background: var(--tag-bg); }

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 500;
}
.badge-red   { background: #fee2e2; color: #991b1b; }
.badge-amber { background: var(--tag-bg); color: var(--accent); }
.badge-green { background: #dcfce7; color: #166534; }

/* ── HIGHLIGHT BOX ── */
.highlight-box {
  background: linear-gradient(135deg, #fff8e8, #fef3d6);
  border-left: 4px solid var(--amber);
  border-radius: 0 12px 12px 0;
  padding: 20px 24px;
  margin: 24px 0;
}
.highlight-box strong { color: var(--accent); }

/* ── STAT PILLS ── */
.stats-row {
  display: flex; flex-wrap: wrap;
  gap: 14px; margin-top: 24px;
}
.stat-pill {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 10px 22px;
  display: flex; align-items: center; gap: 10px;
}
.stat-num {
  font-family: 'Playfair Display', serif;
  font-size: 22px; font-weight: 700;
  color: var(--amber);
}
.stat-label { font-size: 12.5px; color: var(--muted); }

/* ── FOOTER ── */
footer {
  text-align: center;
  padding: 30px;
  font-size: 12px;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
  .header-inner { padding: 40px 20px; }
  .main { padding: 30px 20px 60px; }
  .topic-nav-inner { padding: 0 20px; }
  .cycle { flex-direction: column; }
  .cycle-step { border-radius: 12px !important; }
  .cycle-step::after { display: none; }
}
