/* ============================================
   Cuban Oregano (Kalabo) Deep Dive
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700;900&family=Inter:wght@300;400;500;600;700&family=Crimson+Pro:ital,wght@0,400;0,600;1,400&display=swap');

:root {
  --green-deep: #1a3a2a;
  --green-primary: #2d5a3f;
  --green-light: #4a8c6b;
  --green-pale: #e8f5ee;
  --green-mist: #f0f7f3;
  --gold: #c9a84c;
  --gold-light: #f0e4b8;
  --cream: #faf8f0;
  --text-dark: #1a1a1a;
  --text-mid: #3d3d3d;
  --text-light: #6b6b6b;
  --border-light: #e0ddd4;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --shadow-xl: 0 20px 60px rgba(0,0,0,0.15);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 30px;
}

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-dark);
  background: var(--cream);
  line-height: 1.7;
  overflow-x: hidden;
}

/* ---- Typography ---- */
h1, h2, h3, h4 {
  font-family: 'Playfair Display', Georgia, serif;
  line-height: 1.2;
  color: var(--green-deep);
}

h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); font-weight: 900; }
h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 700; }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); font-weight: 600; }
h4 { font-size: 1.15rem; font-weight: 600; }

p {
  font-size: 1.05rem;
  color: var(--text-mid);
  max-width: 72ch;
}

.lead {
  font-family: 'Crimson Pro', Georgia, serif;
  font-size: 1.3rem;
  font-style: italic;
  color: var(--text-light);
}

/* ---- Layout ---- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 80px 0;
}

.section-sm {
  padding: 48px 0;
}

/* ---- Navigation ---- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(250, 248, 240, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-light);
  transition: box-shadow 0.3s ease;
}

.nav.scrolled {
  box-shadow: var(--shadow-md);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--green-deep);
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  font-weight: 700;
}

.nav-logo .leaf-icon {
  font-size: 1.5rem;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 6px;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-mid);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--green-primary);
  background: var(--green-pale);
}

/* ---- Dropdown Menus ---- */
.nav-item {
  position: relative;
}

.nav-item-trigger {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-mid);
  font-size: 0.9rem;
  font-weight: 500;
  background: none;
  border: none;
  font-family: 'Inter', sans-serif;
  transition: all 0.2s ease;
}

.nav-item-trigger:hover {
  color: var(--green-primary);
  background: var(--green-pale);
}

.nav-item-trigger .dropdown-arrow {
  font-size: 0.6rem;
  transition: transform 0.3s ease;
  opacity: 0.6;
}

.nav-item:hover .dropdown-arrow {
  transform: rotate(180deg);
}

.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: white;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 8px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.25s ease;
  z-index: 100;
}

.nav-item:hover .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  text-decoration: none;
  color: var(--text-mid);
  font-size: 0.88rem;
  font-weight: 500;
  transition: all 0.15s ease;
}

.nav-dropdown a:hover,
.nav-dropdown a.active {
  color: var(--green-primary);
  background: var(--green-pale);
}

.nav-dropdown a.active {
  font-weight: 700;
  position: relative;
}

.nav-dropdown a.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 3px;
  background: var(--green-primary);
  border-radius: 2px;
}

/* When a child link is active, highlight parent trigger */
.nav-item:has(.nav-dropdown a.active) .nav-item-trigger {
  color: var(--green-primary);
  background: var(--green-pale);
}

.nav-dropdown .nav-dd-icon {
  font-size: 1rem;
  width: 22px;
  text-align: center;
  flex-shrink: 0;
}

.nav-dropdown-label {
  padding: 8px 20px 4px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-light);
  pointer-events: none;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border-light);
  background: var(--green-pale);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: all 0.3s ease;
}

.theme-toggle:hover {
  background: var(--green-light);
  border-color: var(--green-light);
  transform: scale(1.08);
}

.theme-icon-dark {
  display: none;
}

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  border: none;
  background: none;
}

.nav-hamburger span {
  width: 24px;
  height: 2px;
  background: var(--green-deep);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* ---- Hero ---- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: linear-gradient(135deg, var(--green-deep) 0%, #1e4a33 40%, #2d6a4f 100%);
  color: white;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 80%, rgba(201, 168, 76, 0.15) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(74, 140, 107, 0.2) 0%, transparent 60%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 680px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 40px;
  padding: 8px 20px;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 28px;
  backdrop-filter: blur(8px);
}

.hero h1 {
  color: white;
  margin-bottom: 8px;
}

.hero .subtitle {
  font-family: 'Crimson Pro', serif;
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  font-style: italic;
  color: var(--gold-light);
  margin-bottom: 24px;
  font-weight: 400;
}

.hero p {
  color: rgba(255,255,255,0.85);
  font-size: 1.1rem;
  margin-bottom: 36px;
  line-height: 1.8;
}

.hero-cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 50px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  font-family: 'Inter', sans-serif;
}

.btn-primary {
  background: var(--gold);
  color: var(--green-deep);
}

.btn-primary:hover {
  background: #d4b35a;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(201, 168, 76, 0.35);
}

.btn-outline {
  background: transparent;
  color: white;
  border: 2px solid rgba(255,255,255,0.3);
}

.btn-outline:hover {
  border-color: rgba(255,255,255,0.6);
  background: rgba(255,255,255,0.08);
}

.hero-visual {
  position: absolute;
  right: -5%;
  top: 50%;
  transform: translateY(-50%);
  width: 500px;
  height: 500px;
  z-index: 1;
}

.hero-plant {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, #5aaa7b, #2d6a4f);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14rem;
  opacity: 0.35;
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(-50%) translateX(0); }
  50% { transform: translateY(-52%) translateX(-8px); }
}

/* ---- Table of Contents ---- */
.toc {
  background: white;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-md);
  position: relative;
  margin-top: -60px;
  z-index: 10;
}

.toc h3 {
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.toc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

.toc-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text-mid);
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.toc-item:hover {
  background: var(--green-pale);
  color: var(--green-primary);
  transform: translateX(4px);
}

.toc-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--green-pale);
  color: var(--green-primary);
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
}

/* ---- Section Headers ---- */
.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-header .section-label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold);
  background: var(--gold-light);
  padding: 6px 18px;
  border-radius: 40px;
  margin-bottom: 16px;
}

.section-header h2 {
  margin-bottom: 16px;
}

.section-header p {
  margin: 0 auto;
  font-size: 1.1rem;
  color: var(--text-light);
}

/* ---- Info Cards ---- */
.card {
  background: white;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 32px;
  transition: all 0.3s ease;
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.card-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: var(--green-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 20px;
}

.card h4 {
  margin-bottom: 10px;
}

.card p {
  font-size: 0.95rem;
}

/* ---- Taxonomy / Classification ---- */
.taxonomy-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.taxonomy-table tr {
  border-bottom: 1px solid var(--border-light);
}

.taxonomy-table tr:last-child {
  border-bottom: none;
}

.taxonomy-table th {
  text-align: left;
  padding: 14px 16px;
  font-weight: 600;
  color: var(--green-deep);
  width: 160px;
  vertical-align: top;
}

.taxonomy-table td {
  padding: 14px 16px;
  color: var(--text-mid);
}

.taxonomy-table .sci-name {
  font-family: 'Crimson Pro', serif;
  font-style: italic;
  color: var(--green-primary);
  font-size: 1.05rem;
}

/* ---- Key Facts Grid ---- */
.facts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

.fact-card {
  background: white;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 28px;
  text-align: center;
  transition: all 0.3s ease;
}

.fact-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--green-light);
}

.fact-icon {
  font-size: 2rem;
  margin-bottom: 12px;
}

.fact-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-light);
  margin-bottom: 4px;
}

.fact-value {
  font-size: 1rem;
  font-weight: 600;
  color: var(--green-deep);
}

/* ---- Grid Layouts ---- */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

/* ---- Image Placeholder ---- */
.img-placeholder {
  width: 100%;
  aspect-ratio: 4/3;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
}

.img-placeholder .img-inner {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
}

.img-placeholder .img-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px 16px;
  background: linear-gradient(transparent, rgba(0,0,0,0.6));
  color: white;
  font-size: 0.85rem;
  font-style: italic;
}

/* ---- Compound / Chemical Section ---- */
.compound-card {
  background: white;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
  transition: all 0.3s ease;
}

.compound-card:hover {
  box-shadow: var(--shadow-md);
}

.compound-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green-light), var(--green-deep));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
  font-weight: 700;
  flex-shrink: 0;
}

.compound-info h4 {
  margin-bottom: 4px;
  font-size: 1.05rem;
}

.compound-info .compound-role {
  font-size: 0.85rem;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 6px;
}

.compound-info p {
  font-size: 0.9rem;
}

/* ---- Timeline ---- */
.timeline {
  position: relative;
  padding-left: 40px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--green-pale);
}

.timeline-item {
  position: relative;
  margin-bottom: 40px;
  padding-left: 24px;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -32px;
  top: 6px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--green-primary);
  border: 3px solid var(--cream);
  z-index: 1;
}

.timeline-era {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold);
  margin-bottom: 6px;
}

.timeline-item h4 {
  margin-bottom: 8px;
}

.timeline-item p {
  font-size: 0.95rem;
}

/* ---- Growing Conditions ---- */
.condition-bar {
  margin-bottom: 20px;
}

.condition-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 0.9rem;
  font-weight: 500;
}

.condition-bar .bar {
  height: 8px;
  border-radius: 4px;
  background: var(--border-light);
  overflow: hidden;
}

.condition-bar .bar-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--green-light), var(--green-deep));
  transition: width 1s ease;
}

/* ---- Recipe Section ---- */
.recipe-card {
  background: white;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all 0.3s ease;
}

.recipe-card:hover {
  box-shadow: var(--shadow-md);
}

.recipe-header {
  padding: 24px 28px 16px;
  border-bottom: 1px solid var(--border-light);
}

.recipe-header h4 {
  margin-bottom: 4px;
}

.recipe-header .recipe-origin {
  font-size: 0.85rem;
  color: var(--gold);
  font-weight: 500;
}

.recipe-body {
  padding: 20px 28px 28px;
}

.recipe-body h5 {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-light);
  margin-bottom: 10px;
  margin-top: 16px;
}

.recipe-body h5:first-child {
  margin-top: 0;
}

.recipe-body ul {
  list-style: none;
  padding: 0;
}

.recipe-body li {
  padding: 4px 0;
  font-size: 0.95rem;
  color: var(--text-mid);
  position: relative;
  padding-left: 18px;
}

.recipe-body li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--green-light);
  font-weight: bold;
}

/* ---- Medicinal / Research Section ---- */
.research-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.research-card {
  background: white;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 28px;
  position: relative;
  overflow: hidden;
}

.research-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--green-light), var(--gold));
}

.research-card h4 {
  margin-bottom: 6px;
}

.research-card .research-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--green-primary);
  background: var(--green-pale);
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 12px;
}

.research-card p {
  font-size: 0.93rem;
}

/* ---- Folk Names Section ---- */
.names-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.name-tag {
  background: white;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.2s ease;
}

.name-tag:hover {
  border-color: var(--green-light);
  box-shadow: var(--shadow-sm);
}

.name-flag {
  font-size: 1.5rem;
}

.name-text {
  display: flex;
  flex-direction: column;
}

.name-local {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--green-deep);
}

.name-lang {
  font-size: 0.8rem;
  color: var(--text-light);
}

/* ---- Warning / Callout Boxes ---- */
.callout {
  border-radius: var(--radius-md);
  padding: 24px 28px;
  margin: 24px 0;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.callout-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.callout-content h4 {
  margin-bottom: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
}

.callout-content p {
  font-size: 0.93rem;
  margin: 0;
}

.callout-warning {
  background: #fef9e7;
  border: 1px solid #f0d060;
}

.callout-info {
  background: var(--green-mist);
  border: 1px solid var(--green-light);
}

.callout-tip {
  background: #f0f0ff;
  border: 1px solid #b0b0e0;
}

/* ---- FAQ ---- */
.faq-item {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  overflow: hidden;
  background: white;
}

.faq-question {
  width: 100%;
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  border: none;
  background: none;
  font-family: 'Inter', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-dark);
  text-align: left;
}

.faq-question:hover {
  color: var(--green-primary);
}

.faq-toggle {
  font-size: 1.2rem;
  transition: transform 0.3s ease;
  color: var(--text-light);
}

.faq-item.open .faq-toggle {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s ease;
}

.faq-item.open .faq-answer {
  max-height: 500px;
  padding: 0 24px 20px;
}

.faq-answer p {
  font-size: 0.95rem;
}

/* ---- Ecology / Pollinators ---- */
.eco-card {
  background: white;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
}

.eco-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.eco-card h4 {
  margin-bottom: 8px;
  font-size: 1rem;
}

.eco-card p {
  font-size: 0.9rem;
  margin: 0 auto;
}

/* ---- Footer ---- */
.footer {
  background: var(--green-deep);
  color: rgba(255,255,255,0.8);
  padding: 60px 0 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 40px;
}

.footer h3 {
  color: white;
  font-size: 1.3rem;
  margin-bottom: 16px;
}

.footer p {
  color: rgba(255,255,255,0.7);
  font-size: 0.95rem;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 8px;
}

.footer-links a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--gold-light);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
}

/* ---- Scroll Reveal ---- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .hero-visual {
    display: none;
  }

  .grid-2 {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .grid-3 {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .toc-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: rgba(250, 248, 240, 0.98);
    backdrop-filter: blur(16px);
    flex-direction: column;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-light);
    box-shadow: var(--shadow-md);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-hamburger {
    display: flex;
  }

  /* Mobile dropdowns: stack vertically */
  .nav-item-trigger {
    width: 100%;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.95rem;
    color: var(--green-deep);
    font-weight: 600;
  }

  .nav-dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    background: none;
    padding: 0 0 0 16px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .nav-item.open .nav-dropdown {
    max-height: 500px;
  }

  .nav-item.open .nav-item-trigger .dropdown-arrow {
    transform: rotate(180deg);
  }

  .nav-dropdown a {
    padding: 10px 0;
    font-size: 0.9rem;
  }

  .nav-dropdown a:hover,
  .nav-dropdown a.active {
    background: none;
    color: var(--green-primary);
  }

  .section {
    padding: 56px 0;
  }

  .hero {
    min-height: auto;
    padding: 120px 0 80px;
  }

  .toc {
    padding: 28px;
  }

  .card {
    padding: 24px;
  }

  .research-grid {
    grid-template-columns: 1fr;
  }
}

/* ---- Divider ---- */
.section-divider {
  width: 60px;
  height: 3px;
  background: var(--gold);
  border-radius: 2px;
  margin: 0 auto 40px;
}

/* ---- Back to Top ---- */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--green-primary);
  color: white;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  z-index: 999;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: all;
}

.back-to-top:hover {
  background: var(--green-deep);
  transform: translateY(-3px);
}

/* ---- Tag/Badge ---- */
.tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.tag-green {
  background: var(--green-pale);
  color: var(--green-primary);
}

.tag-gold {
  background: var(--gold-light);
  color: #8a6f20;
}

/* ---- Comparison Table ---- */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-light);
  font-size: 0.93rem;
}

.comparison-table th {
  background: var(--green-deep);
  color: white;
  padding: 14px 20px;
  text-align: left;
  font-weight: 600;
}

.comparison-table td {
  padding: 12px 20px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-mid);
}

.comparison-table tr:last-child td {
  border-bottom: none;
}

.comparison-table tr:nth-child(even) {
  background: var(--green-mist);
}

/* ---- History list ---- */
.history-list {
  list-style: none;
  padding: 0;
}

.history-list li {
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.history-list li:last-child {
  border-bottom: none;
}

.history-year {
  font-weight: 700;
  color: var(--gold);
  min-width: 50px;
}

/* ---- Page Navigation ---- */
.page-nav {
  display: flex;
  justify-content: space-between;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px 40px;
  gap: 16px;
}

.page-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  background: white;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  color: var(--green-deep);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.page-nav-link:hover {
  border-color: var(--green-light);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.page-nav-next {
  margin-left: auto;
}

body.dark .page-nav-link {
  background: #141e18;
  border-color: var(--border-light);
  color: var(--green-deep);
}

/* ---- Dark Mode ---- */
body.dark {
  --green-deep: #a8d5ba;
  --green-primary: #7bc4a0;
  --green-light: #5ba882;
  --green-pale: #1a2e24;
  --green-mist: #142219;
  --gold: #e0c068;
  --gold-light: #3a3218;
  --cream: #0f1a14;
  --text-dark: #e8e8e8;
  --text-mid: #c8c8c8;
  --text-light: #9a9a9a;
  --border-light: #2a3a30;
}

body.dark .nav {
  background: rgba(15, 26, 20, 0.92);
  border-bottom-color: var(--border-light);
}

body.dark .nav-links a:hover,
body.dark .nav-links a.active {
  background: var(--green-pale);
  color: var(--green-primary);
}

body.dark .nav-item-trigger {
  color: var(--text-mid);
}

body.dark .nav-item-trigger:hover {
  background: var(--green-pale);
  color: var(--green-primary);
}

body.dark .nav-dropdown {
  background: #141e18;
  border-color: var(--border-light);
}

body.dark .nav-dropdown a {
  color: var(--text-mid);
}

body.dark .nav-dropdown a:hover,
body.dark .nav-dropdown a.active {
  background: var(--green-pale);
  color: var(--green-primary);
}

body.dark .nav-item:has(.nav-dropdown a.active) .nav-item-trigger {
  background: var(--green-pale);
  color: var(--green-primary);
}

body.dark .theme-toggle {
  background: var(--green-pale);
  border-color: var(--border-light);
}

body.dark .theme-toggle:hover {
  background: var(--green-deep);
}

body.dark .theme-icon-light { display: none; }
body.dark .theme-icon-dark { display: inline; }

body.dark .nav-logo {
  color: var(--green-deep);
}

body.dark .nav-hamburger span {
  background: var(--green-deep);
}

body.dark .toc {
  background: #141e18;
  border-color: var(--border-light);
}

body.dark .card,
body.dark .fact-card,
body.dark .compound-card,
body.dark .research-card,
body.dark .recipe-card,
body.dark .eco-card,
body.dark .faq-item,
body.dark .name-tag {
  background: #141e18;
  border-color: var(--border-light);
}

body.dark .card:hover,
body.dark .fact-card:hover,
body.dark .compound-card:hover,
body.dark .research-card:hover,
body.dark .name-tag:hover {
  border-color: var(--green-deep);
}

body.dark .taxonomy-table tr {
  border-bottom-color: var(--border-light);
}

body.dark .taxonomy-table td {
  color: var(--text-mid);
}

body.dark .callout-info {
  background: #1a2e24;
  border-color: var(--green-deep);
}

body.dark .callout-warning {
  background: #2e2a14;
  border-color: var(--gold);
}

body.dark .callout-tip {
  background: #1a1a2e;
  border-color: #6060a0;
}

body.dark .bar-fill {
  background: linear-gradient(90deg, var(--green-deep), var(--green-primary));
}

body.dark .comparison-table {
  border-color: var(--border-light);
}

body.dark .comparison-table th {
  background: var(--green-pale);
  color: var(--green-deep);
}

body.dark .comparison-table td {
  border-bottom-color: var(--border-light);
  color: var(--text-mid);
}

body.dark .comparison-table tr:nth-child(even) {
  background: var(--green-mist);
}

body.dark .faq-question {
  color: var(--text-dark);
}

body.dark .faq-answer p {
  color: var(--text-mid);
}

body.dark .bar {
  background: #2a3a30;
}

body.dark .hero {
  background: linear-gradient(135deg, #0a1510 0%, #0f2218 40%, #152e20 100%);
}

body.dark .hero-plant {
  background: radial-gradient(circle at 40% 40%, #2d5a3f, #1a3a2a);
}

body.dark .footer {
  background: #0a1510;
}

body.dark .condition-label span:last-child {
  color: var(--text-light);
}

body.dark .toc-num {
  background: var(--green-pale);
  color: var(--green-deep);
}

body.dark .toc-item:hover {
  background: var(--green-pale);
  color: var(--green-primary);
}

body.dark .back-to-top {
  background: var(--green-deep);
  color: #0f1a14;
}

body.dark .card-icon {
  background: var(--green-pale);
}

body.dark .btn-primary {
  color: #0f1a14;
}

body.dark .recipe-body li::before {
  color: var(--green-deep);
}

body.dark .tag-green {
  background: var(--green-pale);
  color: var(--green-deep);
}

body.dark .tag-gold {
  background: var(--gold-light);
  color: var(--gold);
}

/* ---- Comparison Infographic ---- */
.compare-hero {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-bottom: 56px;
  flex-wrap: wrap;
}

.compare-card {
  background: white;
  border: 2px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 32px 36px;
  text-align: center;
  flex: 1;
  min-width: 260px;
  max-width: 340px;
  transition: all 0.3s ease;
}

.compare-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.compare-card--cuban {
  border-color: var(--green-light);
}

.compare-card--cuban:hover {
  border-color: var(--green-primary);
}

.compare-card--true {
  border-color: var(--gold);
}

.compare-card--true:hover {
  border-color: var(--gold);
}

.compare-emoji {
  font-size: 3rem;
  margin-bottom: 12px;
}

.compare-card-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--green-deep);
  margin-bottom: 4px;
}

.compare-card-latin {
  font-family: 'Crimson Pro', serif;
  font-size: 1rem;
  font-style: italic;
  color: var(--text-light);
  margin-bottom: 14px;
}

.compare-card-tags {
  display: flex;
  gap: 6px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.compare-card-family {
  font-size: 0.8rem;
  color: var(--text-light);
  font-weight: 500;
}

.compare-vs {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--gold);
  background: var(--gold-light);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Radar Chart */
.compare-radar-section {
  margin-bottom: 48px;
}

.compare-radar-wrap {
  display: flex;
  justify-content: center;
}

.compare-radar-wrap canvas {
  max-width: 100%;
  height: auto;
}

/* Tabs */
.compare-tabs {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.compare-tab {
  padding: 10px 20px;
  border: 2px solid var(--border-light);
  border-radius: 40px;
  background: white;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-mid);
  transition: all 0.2s ease;
}

.compare-tab:hover {
  border-color: var(--green-light);
  color: var(--green-primary);
}

.compare-tab.active {
  background: var(--green-primary);
  border-color: var(--green-primary);
  color: white;
}

/* Panels */
.compare-panels {
  margin-bottom: 48px;
}

.compare-panel {
  display: none;
  animation: panelFadeIn 0.3s ease;
}

.compare-panel.active {
  display: block;
}

@keyframes panelFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.compare-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.compare-split-col {
  background: white;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 28px;
}

.compare-split-col--cuban {
  border-left: 4px solid var(--green-light);
}

.compare-split-col--true {
  border-left: 4px solid var(--gold);
}

.compare-split-col h4 {
  margin-bottom: 14px;
  font-size: 1.1rem;
}

.compare-split-col ul {
  list-style: none;
  padding: 0;
}

.compare-split-col li {
  padding: 6px 0;
  font-size: 0.93rem;
  color: var(--text-mid);
  border-bottom: 1px solid var(--border-light);
}

.compare-split-col li:last-child {
  border-bottom: none;
}

/* Winners */
.compare-winners {
  margin-top: 24px;
}

.winners-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.winner-card {
  background: white;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 20px;
  transition: all 0.3s ease;
}

.winner-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.winner-use-case {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--green-deep);
  margin-bottom: 8px;
}

.winner-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.winner-badge--cuban {
  background: var(--green-pale);
  color: var(--green-primary);
}

.winner-badge--true {
  background: var(--gold-light);
  color: #8a6f20;
}

.winner-badge--tie {
  background: #f0f0f0;
  color: var(--text-mid);
}

.winner-reason {
  font-size: 0.85rem;
  color: var(--text-light);
  line-height: 1.5;
}

/* Compare responsive */
@media (max-width: 768px) {
  .compare-hero {
    flex-direction: column;
  }

  .compare-vs {
    transform: rotate(90deg);
  }

  .compare-split {
    grid-template-columns: 1fr;
  }

  .winners-grid {
    grid-template-columns: 1fr;
  }

  .compare-tabs {
    gap: 4px;
  }

  .compare-tab {
    padding: 8px 14px;
    font-size: 0.8rem;
  }
}

body.dark .compare-card {
  background: #141e18;
  border-color: var(--border-light);
}

body.dark .compare-vs {
  background: var(--gold-light);
  color: var(--gold);
}

body.dark .compare-split-col {
  background: #141e18;
  border-color: var(--border-light);
}

body.dark .compare-tab {
  background: #141e18;
  border-color: var(--border-light);
  color: var(--text-mid);
}

body.dark .compare-tab.active {
  background: var(--green-deep);
  border-color: var(--green-deep);
  color: #0f1a14;
}

body.dark .winner-card {
  background: #141e18;
  border-color: var(--border-light);
}

body.dark .winner-badge--tie {
  background: #2a3a30;
  color: var(--text-mid);
}

/* ---- Dark mode responsive ---- */
@media (max-width: 768px) {
  body.dark .nav-links {
    background: rgba(15, 26, 20, 0.98);
    border-bottom-color: var(--border-light);
  }
}

/* ---- Botanical Illustration ---- */
.botany-hero-visual {
  margin-bottom: 48px;
}

.botany-svg-wrap {
  background: white;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

body.dark .botany-svg-wrap {
  background: #141e18;
}

.botany-illustration {
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
  display: block;
}

/* ---- Leaf Cross-Section ---- */
.leaf-section-wrap {
  background: white;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-top: 32px;
  box-shadow: var(--shadow-sm);
}

body.dark .leaf-section-wrap {
  background: #141e18;
}

.leaf-section-svg {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  display: block;
}

/* ---- Flavor Wheel ---- */
.flavor-wheel-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 40px;
}

.flavor-wheel {
  width: 320px;
  height: 320px;
  border-radius: 50%;
  position: relative;
  background: conic-gradient(
    #2d5a3f 0deg 72deg,
    #4a8c6b 72deg 144deg,
    #6ab88a 144deg 216deg,
    #c9a84c 216deg 288deg,
    #8a6f20 288deg 360deg
  );
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
}

.flavor-wheel::before {
  content: '';
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: white;
  position: absolute;
}

body.dark .flavor-wheel::before,
body.dark .compound-visual-card svg circle[fill="white"] {
  background: #141e18;
}

body.dark [fill="white"] {
  fill: #141e18;
}

.flavor-wheel-center {
  position: relative;
  z-index: 1;
  text-align: center;
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  color: var(--green-deep);
  font-size: 0.9rem;
  line-height: 1.3;
}

.flavor-labels {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
}

.flavor-label {
  position: absolute;
  font-size: 0.75rem;
  font-weight: 600;
  color: white;
  text-shadow: 0 1px 3px rgba(0,0,0,0.4);
  white-space: nowrap;
}

/* ---- Medicinal Bar Chart ---- */
.med-chart-wrap {
  background: white;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 40px;
}

body.dark .med-chart-wrap {
  background: #141e18;
}

.med-bar-row {
  display: flex;
  align-items: center;
  margin-bottom: 14px;
  gap: 12px;
}

.med-bar-label {
  width: 160px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-mid);
  text-align: right;
  flex-shrink: 0;
}

.med-bar-track {
  flex: 1;
  height: 28px;
  background: var(--border-light);
  border-radius: 14px;
  overflow: hidden;
  position: relative;
}

body.dark .med-bar-track {
  background: #2a3a30;
}

.med-bar-fill {
  height: 100%;
  border-radius: 14px;
  display: flex;
  align-items: center;
  padding-right: 12px;
  justify-content: flex-end;
  font-size: 0.75rem;
  font-weight: 700;
  color: white;
  transition: width 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.med-bar-fill.green { background: linear-gradient(90deg, #4a8c6b, #2d5a3f); }
.med-bar-fill.gold { background: linear-gradient(90deg, #c9a84c, #8a6f20); }
.med-bar-fill.teal { background: linear-gradient(90deg, #3a9d8f, #1a6a5f); }
.med-bar-fill.sage { background: linear-gradient(90deg, #7ab88a, #4a8c6b); }

/* ---- Compound Cards ---- */
.compound-visual-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.compound-visual-card {
  background: white;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
  transition: all 0.3s ease;
}

.compound-visual-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

body.dark .compound-visual-card {
  background: #141e18;
  border-color: var(--border-light);
}

.compound-visual-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: 700;
  color: white;
}

.compound-visual-icon.cv-green { background: linear-gradient(135deg, #2d5a3f, #4a8c6b); }
.compound-visual-icon.cv-gold { background: linear-gradient(135deg, #8a6f20, #c9a84c); }
.compound-visual-icon.cv-teal { background: linear-gradient(135deg, #1a6a5f, #3a9d8f); }
.compound-visual-icon.cv-sage { background: linear-gradient(135deg, #4a8c6b, #7ab88a); }

.compound-visual-card h4 {
  font-size: 1rem;
  margin-bottom: 4px;
}

.compound-visual-card .cv-pct {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--green-primary);
  margin-bottom: 6px;
}

.compound-visual-card .cv-desc {
  font-size: 0.82rem;
  color: var(--text-light);
  line-height: 1.5;
}

/* ---- Distribution Map ---- */
.map-wrap {
  background: white;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 40px;
}

body.dark .map-wrap {
  background: #141e18;
}

.map-svg {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  display: block;
}

/* ---- Hero Plant SVG ---- */
.hero-plant-svg {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-plant-svg svg {
  width: 80%;
  height: 80%;
  opacity: 0.25;
}

/* ---- Section Visual Divider ---- */
.visual-divider {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin: 48px 0;
}

.visual-divider-line {
  width: 80px;
  height: 2px;
  background: var(--border-light);
  border-radius: 1px;
}

.visual-divider-icon {
  font-size: 1.5rem;
}

/* ---- History Timeline Visual ---- */
.history-visual {
  background: white;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 32px;
}

body.dark .history-visual {
  background: #141e18;
}

.history-visual svg {
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
  display: block;
}

/* ---- Ecology Icons Grid ---- */
.eco-icons-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 40px;
}

.eco-icon-card {
  background: white;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  transition: all 0.3s ease;
}

.eco-icon-card:hover {
  box-shadow: var(--shadow-md);
}

body.dark .eco-icon-card {
  background: #141e18;
}

.eco-icon-emoji {
  font-size: 2.5rem;
  margin-bottom: 8px;
}

.eco-icon-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-mid);
}

@media (max-width: 768px) {
  .eco-icons-grid { grid-template-columns: repeat(2, 1fr); }
  .flavor-wheel { width: 260px; height: 260px; }
  .flavor-wheel::before { width: 110px; height: 110px; }
  .med-bar-label { width: 120px; font-size: 0.75rem; }
  .compound-visual-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---- Print ---- */
@media print {
  .nav, .back-to-top, .hero-cta { display: none !important; }
  .hero { min-height: auto; padding: 40px 0; }
  .section { padding: 32px 0; }
}
