@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400;1,500&family=Outfit:wght@300;400;500;600&display=swap');

/* ═══════════════════════════════════════
   SCENTHOARDERS — DESIGN SYSTEM
   Elegant Burgundy Palette (WCAG AA Accessible)
   Dark Mode Ready for Reader Comfort
   ═══════════════════════════════════════ */

:root {
  /* Core Palette — Sophisticated Burgundy + Cream (Optimized for Readability) */
  --bg-primary: #FAF7F3;
  --bg-secondary: #f0ede9;
  --bg-dark: #1a1410;
  --bg-card: #ffffff;

  --accent-primary: #8B2E3F;
  --accent-primary-hover: #A94258;
  --accent-secondary: #A94258;
  --accent-rose: #C17888;
  --accent-muted: #D4A4AD;

  --text-primary: #0D0908;
  --text-secondary: #4A3F44;
  --text-muted: #7A6F74;
  --text-on-dark: #f8f5f1;
  --text-on-accent: #fdfbf7;

  --border-light: rgba(139, 46, 63, 0.15);
  --border-medium: rgba(139, 46, 63, 0.28);
  --border-hover: rgba(139, 46, 63, 0.5);

  --shadow-sm: 0 2px 8px rgba(26, 20, 16, 0.06);
  --shadow-md: 0 8px 24px rgba(26, 20, 16, 0.08);
  --shadow-lg: 0 16px 48px rgba(26, 20, 16, 0.1);

  /* Typography Scale */
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Outfit', system-ui, sans-serif;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1.0625rem;
  --text-lg: 1.1875rem;
  --text-xl: 1.35rem;
  --text-2xl: 1.75rem;
  --text-3xl: 2.25rem;
  --text-4xl: 3rem;
  --text-5xl: 3.75rem;
  --text-hero: clamp(2.8rem, 5.5vw, 4.5rem);

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2.5rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;
  --space-section: clamp(4rem, 8vw, 7rem);

  /* Layout */
  --max-width: 1320px;
  --max-content: 780px;
  --nav-height: 72px;
}

/* ─── DARK MODE THEME ──────────────────────── */
[data-theme="dark"] {
  /* Dark Mode Backgrounds */
  --bg-primary: #1a1614;
  --bg-secondary: #231f1d;
  --bg-dark: #0f0d0c;
  --bg-card: #2a2421;

  /* Burgundy adjustments for dark mode (lightened for contrast) */
  --accent-primary: #D4697B;
  --accent-primary-hover: #E88799;
  --accent-secondary: #C17888;
  --accent-rose: #A94258;
  --accent-muted: #8B2E3F;

  /* Dark mode text (optimized for readability) */
  --text-primary: #F8F4F0;
  --text-secondary: #D4CCC6;
  --text-muted: #A69C96;
  --text-on-dark: #F8F4F0;
  --text-on-accent: #1a1614;

  /* Dark mode borders */
  --border-light: rgba(212, 105, 123, 0.15);
  --border-medium: rgba(212, 105, 123, 0.25);
  --border-hover: rgba(212, 105, 123, 0.45);

  /* Dark mode shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
}

/* Smooth transitions when switching themes */
body,
.nav,
.card,
.note-card,
.article-card,
.btn,
.filter-btn {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* ─── RESET ────────────────────────── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--text-base);
  line-height: 1.75;
  color: var(--text-primary);
  background: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* ─── UTILITY ──────────────────────── */

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 clamp(1.25rem, 4vw, 3.5rem); }
.container--narrow { max-width: var(--max-content); margin: 0 auto; padding: 0 clamp(1.25rem, 4vw, 3.5rem); }
.label { font-family: var(--font-body); font-size: var(--text-xs); font-weight: 500; letter-spacing: 0.15em; text-transform: uppercase; color: var(--text-muted); }
.label--accent { color: var(--accent-secondary); }

/* ─── NAVIGATION ───────────────────── */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(253, 251, 247, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-light);
  height: var(--nav-height);
}

[data-theme="dark"] .nav {
  background: rgba(26, 22, 20, 0.92);
}

.nav__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 3.5rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav__logo {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--accent-primary);
}

.nav__links {
  display: flex;
  gap: clamp(1.5rem, 3vw, 2.8rem);
  align-items: center;
}

.nav__links a {
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-secondary);
  transition: color 0.25s;
  position: relative;
}

.nav__links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent-primary);
  transition: width 0.3s;
}

.nav__links a:hover { color: var(--accent-primary); }
.nav__links a:hover::after { width: 100%; }
.nav__links a.active { color: var(--accent-primary); }
.nav__links a.active::after { width: 100%; }

.nav__hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 28px;
  height: 20px;
  position: relative;
  flex-direction: column;
  justify-content: space-between;
}

.nav__hamburger span {
  display: block;
  width: 100%;
  height: 1.5px;
  background: var(--text-primary);
  transition: 0.3s;
}

/* ─── HERO (HOME) ──────────────────── */

.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(3rem, 6vw, 5rem);
  align-items: center;
  padding: var(--space-section) 0;
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: clamp(1.25rem, 4vw, 3.5rem);
  padding-right: clamp(1.25rem, 4vw, 3.5rem);
}

.hero__badge {
  display: inline-block;
  border: 1px solid var(--accent-secondary);
  color: var(--accent-secondary);
  padding: 6px 18px;
  font-size: var(--text-xs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 500;
  margin-bottom: var(--space-lg);
}

.hero__title {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: 400;
  line-height: 1.08;
  margin-bottom: var(--space-lg);
  color: var(--text-primary);
}

.hero__title em {
  color: var(--accent-primary);
  font-style: italic;
  display: block;
}

.hero__desc {
  font-size: var(--text-lg);
  line-height: 1.8;
  color: var(--text-secondary);
  font-weight: 300;
  margin-bottom: var(--space-xl);
  max-width: 540px;
}

.hero__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  padding: var(--space-xl) 0;
  margin-bottom: var(--space-xl);
  border-top: 1px solid var(--border-medium);
  border-bottom: 1px solid var(--border-medium);
}

.hero__stat-number {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  color: var(--accent-primary);
  display: block;
  line-height: 1.1;
  margin-bottom: 4px;
}

.hero__stat-label {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  font-weight: 500;
}

.hero__visual {
  position: relative;
  height: clamp(380px, 45vw, 560px);
}

.hero__bottle {
  position: absolute;
  background: linear-gradient(135deg, rgba(212, 165, 165, 0.07), rgba(201, 169, 97, 0.04));
  border: 1px solid var(--border-medium);
}

.hero__bottle--main {
  width: 260px; height: 360px;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  display: flex; align-items: center; justify-content: center;
  font-size: 5.5rem;
}

.hero__bottle--accent1 {
  width: 190px; height: 280px;
  top: 40px; right: 20px;
  z-index: 2; opacity: 0.5;
}

.hero__bottle--accent2 {
  width: 150px; height: 220px;
  bottom: 60px; left: 20px;
  z-index: 1; opacity: 0.3;
}

.hero__float {
  position: absolute;
  top: 20px; right: 20px;
  background: var(--bg-card);
  border: 1px solid var(--accent-secondary);
  padding: 16px 20px;
  text-align: center;
  z-index: 5;
  box-shadow: var(--shadow-md);
}

.hero__float-number {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  color: var(--accent-primary);
  display: block;
  line-height: 1.1;
}

.hero__float-label {
  font-size: var(--text-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ─── BUTTONS ──────────────────────── */

.btn {
  display: inline-block;
  padding: 14px 36px;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s;
  border: none;
}

.btn--primary {
  background: var(--accent-primary);
  color: var(--text-on-accent);
}

.btn--primary:hover {
  background: var(--accent-primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn--outline {
  background: transparent;
  color: var(--accent-primary);
  border: 1px solid var(--accent-primary);
}

.btn--outline:hover {
  background: var(--accent-primary);
  color: var(--text-on-accent);
}

.btn--dark {
  background: var(--bg-dark);
  color: var(--text-on-dark);
}

.btn--dark:hover {
  background: #2a2018;
  transform: translateY(-2px);
}

/* ─── SECTIONS ─────────────────────── */

.section { padding: var(--space-section) 0; }
.section--alt { background: var(--bg-secondary); }
.section--dark { background: var(--bg-dark); color: var(--text-on-dark); }
.section--accent { background: linear-gradient(135deg, #8B2E3F, #A94258); color: var(--text-on-accent); }

[data-theme="dark"] .section--accent {
  background: linear-gradient(135deg, #6D1A2B, #8B2E3F);
}

.section__header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto var(--space-2xl);
}

.section__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
  margin-bottom: var(--space-md);
  line-height: 1.15;
}

.section__subtitle {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  font-weight: 300;
  line-height: 1.7;
}

.section--dark .section__subtitle,
.section--accent .section__subtitle { color: rgba(243, 239, 233, 0.8); }

/* ─── CARDS ────────────────────────── */

.card-grid {
  display: grid;
  gap: clamp(1.25rem, 2.5vw, 2rem);
}

.card-grid--3 { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.card-grid--2 { grid-template-columns: repeat(auto-fill, minmax(400px, 1fr)); }
.card-grid--4 { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  padding: clamp(1.75rem, 3vw, 2.5rem);
  transition: all 0.35s;
  position: relative;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
}

.card__icon { font-size: 2.5rem; margin-bottom: var(--space-lg); display: block; }

.card__title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 500;
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
}

.card__text {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: var(--space-lg);
}

.card__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-secondary);
  transition: gap 0.3s;
}

.card__link:hover { gap: 10px; }

/* ─── ENCYCLOPEDIA NOTE CARDS ──────── */

.note-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  transition: all 0.35s;
  overflow: hidden;
}

.note-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-hover);
}

.note-card__header {
  padding: clamp(1.5rem, 3vw, 2rem);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--border-light);
}

.note-card__family {
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-secondary);
  margin-bottom: 6px;
}

.note-card__name {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 400;
}

.note-card__latin {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--text-muted);
  font-size: var(--text-sm);
}

.note-card__body {
  padding: clamp(1.5rem, 3vw, 2rem);
}

.note-card__desc {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: var(--space-md);
}

.note-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: var(--space-md);
}

.tag {
  display: inline-block;
  padding: 4px 12px;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid var(--border-medium);
  color: var(--text-muted);
  transition: all 0.25s;
}

.tag--mood { border-color: rgba(139, 46, 63, 0.3); color: var(--accent-primary); }
.tag--formality { border-color: rgba(169, 66, 88, 0.3); color: var(--accent-secondary); }
.tag--season { border-color: rgba(193, 120, 136, 0.3); }

/* ─── RATING BARS ──────────────────── */

.rating {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.rating__label {
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  width: 80px;
  flex-shrink: 0;
}

.rating__bar {
  flex: 1;
  height: 4px;
  background: var(--border-light);
  position: relative;
  max-width: 120px;
}

.rating__fill {
  position: absolute;
  top: 0; left: 0;
  height: 100%;
  background: var(--accent-primary);
  transition: width 0.6s ease;
}

/* ─── ARTICLE CARDS ────────────────── */

.article-card {
  display: grid;
  grid-template-columns: 1fr;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  overflow: hidden;
  transition: all 0.35s;
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-hover);
}

.article-card__img {
  height: 200px;
  background: linear-gradient(135deg, rgba(139, 46, 63, 0.12), rgba(169, 66, 88, 0.08));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
}

.article-card__body {
  padding: clamp(1.5rem, 3vw, 2rem);
}

.article-card__category {
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-secondary);
  margin-bottom: 8px;
}

.article-card__title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 500;
  line-height: 1.25;
  margin-bottom: var(--space-sm);
}

.article-card__excerpt {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: var(--space-lg);
}

.article-card__meta {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* ─── ARTICLE PAGE ─────────────────── */

.article-hero {
  padding: var(--space-3xl) 0 var(--space-2xl);
  text-align: center;
  border-bottom: 1px solid var(--border-light);
}

.article-hero__category {
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-secondary);
  margin-bottom: var(--space-md);
}

.article-hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4.5vw, 3.5rem);
  font-weight: 400;
  line-height: 1.12;
  max-width: 800px;
  margin: 0 auto var(--space-lg);
}

.article-hero__subtitle {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  font-weight: 300;
  max-width: 600px;
  margin: 0 auto var(--space-lg);
  line-height: 1.7;
}

.article-hero__meta {
  font-size: var(--text-xs);
  color: var(--text-muted);
  letter-spacing: 0.08em;
}

/* Article body prose (optimized for long-form reading) */
.prose { max-width: var(--max-content); margin: 0 auto; padding: var(--space-2xl) clamp(1.25rem, 4vw, 3.5rem); }
.prose h2 { font-family: var(--font-display); font-size: var(--text-2xl); font-weight: 500; margin: var(--space-2xl) 0 var(--space-lg); color: var(--text-primary); line-height: 1.3; }
.prose h3 { font-family: var(--font-display); font-size: var(--text-xl); font-weight: 500; margin: var(--space-xl) 0 var(--space-md); color: var(--accent-primary); line-height: 1.35; }
.prose p { margin-bottom: var(--space-lg); font-size: 1.0625rem; line-height: 1.8; color: var(--text-primary); }
.prose p:first-of-type { font-size: 1.1875rem; line-height: 1.75; }
.prose strong { color: var(--text-primary); font-weight: 600; }
.prose ul, .prose ol { margin: var(--space-lg) 0; padding-left: 1.5rem; }
.prose li { margin-bottom: var(--space-sm); line-height: 1.8; color: var(--text-primary); list-style: disc; }
.prose ol li { list-style: decimal; }
.prose blockquote {
  border-left: 3px solid var(--accent-primary);
  padding: var(--space-lg) var(--space-xl);
  margin: var(--space-xl) 0;
  background: var(--bg-secondary);
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-style: italic;
  color: var(--text-primary);
  line-height: 1.6;
}

.prose .callout {
  background: linear-gradient(135deg, rgba(139, 46, 63, 0.06), rgba(169, 66, 88, 0.04));
  border-left: 3px solid var(--accent-secondary);
  padding: var(--space-lg) var(--space-xl);
  margin: var(--space-xl) 0;
}

.prose .callout strong { display: block; margin-bottom: var(--space-xs); color: var(--accent-primary); font-size: var(--text-sm); letter-spacing: 0.08em; text-transform: uppercase; }

/* ─── NOTE DETAIL PAGE ─────────────── */

.note-hero {
  padding: var(--space-3xl) 0 var(--space-2xl);
  border-bottom: 1px solid var(--border-light);
}

.note-hero__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
  align-items: center;
}

.note-hero__family {
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-secondary);
  margin-bottom: var(--space-sm);
}

.note-hero__name {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 400;
  line-height: 1.08;
  margin-bottom: 4px;
}

.note-hero__latin {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--text-lg);
  color: var(--text-muted);
  margin-bottom: var(--space-xl);
}

.note-hero__desc {
  font-size: var(--text-base);
  line-height: 1.85;
  color: var(--text-secondary);
  margin-bottom: var(--space-xl);
}

.note-hero__visual {
  height: clamp(280px, 30vw, 400px);
  background: linear-gradient(135deg, rgba(139, 46, 63, 0.08), rgba(169, 66, 88, 0.05));
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 6rem;
}

.note-section { padding: var(--space-2xl) 0; border-bottom: 1px solid var(--border-light); }
.note-section:last-child { border-bottom: none; }

.note-section__title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 500;
  margin-bottom: var(--space-lg);
  color: var(--text-primary);
}

.note-section__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
}

.note-list { list-style: none; }
.note-list li {
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-primary);
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.note-list li:last-child { border-bottom: none; }

.note-list .check { color: #5a8a5a; }
.note-list .cross { color: #a06050; }

/* ─── NEWSLETTER ───────────────────── */

.newsletter {
  text-align: center;
  padding: var(--space-section) 0;
}

.newsletter__title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 400;
  margin-bottom: var(--space-md);
}

.newsletter__text {
  font-size: var(--text-base);
  margin-bottom: var(--space-xl);
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}

.section--accent .newsletter__text { opacity: 0.9; }
.section--dark .newsletter__text { color: rgba(243, 239, 233, 0.75); }

.newsletter__form {
  display: flex;
  gap: 12px;
  max-width: 520px;
  margin: 0 auto;
}

.newsletter__input {
  flex: 1;
  padding: 14px 20px;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  border: 1px solid var(--border-medium);
  background: var(--bg-card);
  color: var(--text-primary);
}

.newsletter__input::placeholder { color: var(--text-muted); }

.section--accent .newsletter__input { background: rgba(255,255,255,0.15); border-color: rgba(255,255,255,0.3); color: var(--text-on-accent); }
.section--accent .newsletter__input::placeholder { color: rgba(255,255,255,0.6); }
.section--dark .newsletter__input { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.15); color: var(--text-on-dark); }
.section--dark .newsletter__input::placeholder { color: rgba(255,255,255,0.4); }

/* ─── FILTER BAR ───────────────────── */

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: var(--space-xl);
  justify-content: center;
}

.filter-btn {
  padding: 8px 18px;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.25s;
}

.filter-btn:hover { border-color: var(--accent-primary); color: var(--accent-primary); }
.filter-btn.active { background: var(--accent-primary); color: var(--text-on-accent); border-color: var(--accent-primary); }

/* ─── COMING SOON CARD ─────────────── */

.coming-soon-card {
  background: var(--bg-secondary);
  border: 1px dashed var(--border-medium);
  padding: clamp(2rem, 4vw, 3rem);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}

.coming-soon-card__icon { font-size: 2rem; margin-bottom: var(--space-md); opacity: 0.5; }
.coming-soon-card__text { font-family: var(--font-display); font-size: var(--text-xl); color: var(--text-muted); font-style: italic; }
.coming-soon-card__sub { font-size: var(--text-sm); color: var(--text-muted); margin-top: var(--space-xs); }

/* ─── FOOTER ───────────────────────── */

.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-light);
  padding: var(--space-2xl) 0;
  text-align: center;
}

.footer__logo {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--accent-primary);
  margin-bottom: var(--space-lg);
}

.footer__links {
  display: flex;
  justify-content: center;
  gap: var(--space-xl);
  margin-bottom: var(--space-lg);
  flex-wrap: wrap;
}

.footer__links a {
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
  transition: color 0.25s;
}

.footer__links a:hover { color: var(--accent-primary); }

.footer__copy {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* ─── BREADCRUMB ───────────────────── */

.breadcrumb {
  padding: var(--space-md) 0;
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.breadcrumb a { color: var(--text-secondary); transition: color 0.2s; }
.breadcrumb a:hover { color: var(--accent-primary); }
.breadcrumb span { margin: 0 6px; }

/* ─── THEME TOGGLE BUTTON ──────────────────── */

.theme-toggle {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  width: 56px;
  height: 28px;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.theme-toggle:hover {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(139, 46, 63, 0.1);
}

[data-theme="dark"] .theme-toggle:hover {
  box-shadow: 0 0 0 3px rgba(212, 105, 123, 0.15);
}

.theme-toggle__slider {
  position: absolute;
  width: 22px;
  height: 22px;
  background: var(--accent-primary);
  border-radius: 50%;
  left: 3px;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

[data-theme="dark"] .theme-toggle__slider {
  transform: translateX(28px);
}

.theme-toggle__icon {
  display: block;
  font-size: 12px;
  line-height: 1;
}

.theme-toggle__icon--sun {
  display: block;
}

.theme-toggle__icon--moon {
  display: none;
}

[data-theme="dark"] .theme-toggle__icon--sun {
  display: none;
}

[data-theme="dark"] .theme-toggle__icon--moon {
  display: block;
}

/* Theme toggle label for accessibility */
.theme-toggle-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ─── RESPONSIVE ───────────────────── */

@media (max-width: 1024px) {
  .hero { grid-template-columns: 1fr; }
  .hero__visual { display: none; }
  .note-hero__inner { grid-template-columns: 1fr; }
  .note-hero__visual { display: none; }
  .note-section__grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .nav__links { display: none; }
  .nav__hamburger { display: flex; }

  .hero__stats { grid-template-columns: repeat(3, 1fr); gap: var(--space-md); }
  .card-grid--3, .card-grid--2, .card-grid--4 { grid-template-columns: 1fr; }

  .newsletter__form { flex-direction: column; }

  .filter-bar { gap: 6px; }
  .filter-btn { font-size: 0.6rem; padding: 6px 12px; }
}

/* ─── AFFILIATE COMPONENTS ───────────────────── */

.affiliate-disclosure {
  background: rgba(139, 46, 63, 0.06);
  border-left: 3px solid var(--accent-primary);
  padding: 12px 16px;
  margin-bottom: var(--space-lg);
  font-size: 13px;
  color: var(--text-secondary);
  border-radius: 4px;
  line-height: 1.6;
}

.affiliate-box {
  background: linear-gradient(135deg, rgba(139, 46, 63, 0.08) 0%, rgba(169, 66, 88, 0.05) 100%);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: var(--space-lg);
  margin-bottom: var(--space-md);
  transition: all 0.3s ease;
}

.affiliate-box:hover {
  border-color: var(--border-medium);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.affiliate-box-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.affiliate-box-title {
  color: var(--accent-primary);
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
}

.affiliate-btn-primary {
  display: inline-block;
  background: var(--accent-primary);
  color: white;
  padding: 10px 20px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
}

.affiliate-btn-primary:hover {
  background: var(--accent-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(139, 46, 63, 0.2);
}

.affiliate-btn-outline {
  display: inline-block;
  border: 2px solid var(--accent-primary);
  color: var(--accent-primary);
  padding: 8px 18px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s;
  background: transparent;
}

.affiliate-btn-outline:hover {
  background: var(--accent-primary);
  color: white;
  transform: translateY(-1px);
}

.affiliate-link {
  color: var(--accent-primary);
  text-decoration: none;
  border-bottom: 1px solid rgba(139, 46, 63, 0.3);
  transition: all 0.2s;
}

.affiliate-link:hover {
  color: var(--accent-primary-hover);
  border-bottom-color: var(--accent-primary);
}

.affiliate-link::after {
  content: " ↗";
  opacity: 0.6;
  font-size: 0.9em;
}
