/* ─── RESET ───────────────────────────────────────────────────────────────── */
* { margin: 0; padding: 0; box-sizing: border-box; }

/* @import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;1,300;1,400&display=swap'); */
@import url('https://use.typekit.net/tmv3byi.css');
/* ─── BASE ────────────────────────────────────────────────────────────────── */
body {
  background: #f5f0ee;
  font-family: "redaction", sans-serif;
  font-weight: 400;
  font-style: normal;
  color: #1a1a1a;
  overflow-x: hidden;
  min-height: 100vh;
}
/* ─── NAV ─────────────────────────────────────────────────────────────────── */
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 40px;
  border-bottom: 0.5px solid rgba(20,20,20,0.10);
  background: rgba(245,240,238,0.90);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  position: sticky; top: 0; z-index: 100;
}
.nav-logo a {
  font-family: 'Cormorant Garamond', serif;
    font-size: 11px; font-weight: 400; letter-spacing: 0.10em;
  color: rgba(20,20,20,0.40); text-decoration: none; transition: color 0.2s;
  text-transform: uppercase;
}
.nav-links { display: flex; gap: 40px; }
.nav-link {
  font-size: 11px; font-weight: 400; letter-spacing: 0.10em;
  color: rgba(20,20,20,0.40); text-decoration: none; transition: color 0.2s;
  text-transform: uppercase;
}
.nav-link:hover, .nav-link.active { color: #1a1a1a; }

/* ─── HERO ────────────────────────────────────────────────────────────────── */
.hero {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; min-height: calc(100vh - 73px);
  gap: 32px; text-align: center; padding: 40px;
}
.hero-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(48px, 7vw, 88px); font-weight: 300; font-style: italic;
  line-height: 1.08; color: #1a1a1a; letter-spacing: -0.02em;
}
.hero-tagline {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(15px, 1.4vw, 18px); font-weight: 300; font-style: italic;
  color: rgba(20,20,20,0.48); max-width: 600px; line-height: 1.7;
}
.enter-btn {
  display: inline-block;
  border: 1px solid rgba(20,20,20,0.30);
  border-radius: 40px; padding: 13px 36px;
  font-family: 'Cormorant Garamond', serif;
  font-size: 13px; font-weight: 400; letter-spacing: 0.14em;
  color: #1a1a1a; text-decoration: none; transition: all 0.22s;
}
.enter-btn:hover {
  background: #1a1a1a; color: #f5f0ee; border-color: #1a1a1a;
}

/* ─── PAIR SELECTOR ───────────────────────────────────────────────────────── */
#controls {
  display: flex; justify-content: flex-start; gap: 8px;
  padding: 20px 40px 0; flex-wrap: wrap;
}
.pb {
  background: rgba(255,255,255,0.55);
  border: 0.5px solid rgba(20,20,20,0.12);
  color: rgba(20,20,20,0.48); padding: 6px 14px; border-radius: 20px;
  font-family: 'Cormorant Garamond', serif;
  font-size: 12px; font-weight: 400; letter-spacing: 0.04em;
  cursor: pointer; transition: all 0.2s;
}
.pb:hover { border-color: rgba(20,20,20,0.25); color: #1a1a1a; }
.pb.active {
  background: #1a1a1a; color: #f5f0ee; border-color: #1a1a1a;
}

/* ─── STAGE ───────────────────────────────────────────────────────────────── */
#stage {
  display: flex;
  margin: 20px 40px;
  background: #0e0e0e;
  border-radius: 16px;
  overflow: hidden;
  border: 0.5px solid rgba(255,255,255,0.07);
  box-shadow: 0 8px 40px rgba(0,0,0,0.18), 0 2px 8px rgba(0,0,0,0.10);
}
.panel { flex: 1; position: relative; background: #0e0e0e; }
canvas { display: block; width: 100% !important; }
.vdivider { width: 0.5px; background: rgba(255,255,255,0.07); flex-shrink: 0; }

/* ─── PRODUCT LABEL ───────────────────────────────────────────────────────── */
.info {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 20px 24px;
  background: linear-gradient(transparent, rgba(8,8,8,0.94));
}
.brand-name {
  font-size: 10px; color: rgba(255,255,255,0.35);
  text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 4px;
}
.prod-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 17px; font-weight: 300; font-style: italic;
  margin: 0 0 10px; line-height: 1.2; color: rgba(255,255,255,0.88);
}
.grade-pill {
  display: inline-block; font-size: 10px; font-weight: 700;
  padding: 2px 9px; border-radius: 10px; margin-left: 6px; vertical-align: middle;
  font-style: normal;
}
.stats { display: flex; gap: 20px; flex-wrap: wrap; }
.st { font-size: 10px; color: rgba(255,255,255,0.32); letter-spacing: 0.06em; text-transform: uppercase; }
.st b { color: rgba(255,255,255,0.82); font-weight: 600; }

/* ─── LEGEND ──────────────────────────────────────────────────────────────── */
.legend {
  display: flex; gap: 20px; justify-content: flex-start;
  padding: 12px 40px 20px; flex-wrap: wrap;
}
.leg { display: flex; align-items: center; gap: 6px; font-size: 11px; color: rgba(20,20,20,0.40); letter-spacing: 0.06em; }
.dot { width: 14px; height: 10px; border-radius: 4px; }

/* ─── ABOUT ───────────────────────────────────────────────────────────────── */
.about-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 60px; padding: 60px 40px; max-width: 1200px; margin: 0 auto;
}
.about-section { margin-bottom: 48px; }
.about-eyebrow {
  font-size: 10px; font-weight: 400; letter-spacing: 0.14em;
  color: rgba(20,20,20,0.38); margin-bottom: 14px; text-transform: uppercase;
}
.about-heading {
  font-family: 'Cormorant Garamond', serif;
  font-size: 28px; font-weight: 300; font-style: italic;
  line-height: 1.2; color: #1a1a1a; margin-bottom: 14px; letter-spacing: -0.01em;
}
.about-body { font-size: 14px; color: rgba(20,20,20,0.55); line-height: 1.75; }
.formula-block {
  background: rgba(255,255,255,0.60); border: 0.5px solid rgba(20,20,20,0.10);
  border-radius: 8px; padding: 16px 20px; font-family: monospace;
  font-size: 12px; color: rgba(20,20,20,0.60); line-height: 1.9;
}
.grade-rows { display: flex; flex-direction: column; }
.grade-row { display: flex; align-items: center; gap: 14px; padding: 10px 0; border-bottom: 0.5px solid rgba(20,20,20,0.06); }
.grade-row:last-child { border-bottom: none; }
.gpill { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; flex-shrink: 0; }
.grade-range { font-size: 12px; color: rgba(20,20,20,0.50); min-width: 60px; }
.grade-desc { font-size: 12px; color: rgba(20,20,20,0.38); }
.ing-rows { display: flex; flex-direction: column; }
.ing-row { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-bottom: 0.5px solid rgba(20,20,20,0.06); }
.ing-row:last-child { border-bottom: none; }
.ing-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; margin-top: 4px; }
.ing-name { font-size: 12px; font-weight: 600; color: #1a1a1a; margin-bottom: 4px; letter-spacing: 0.02em; }
.ing-desc { font-size: 12px; color: rgba(20,20,20,0.42); line-height: 1.6; }

/* ─── ANALYSIS SECTION ────────────────────────────────────────────────────── */
#analysis {
  padding: 48px 40px 80px;
  border-top: 0.5px solid rgba(20,20,20,0.08);
}
.analysis-eyebrow {
  font-size: 10px; font-weight: 400; letter-spacing: 0.14em;
  color: rgba(20,20,20,0.38); margin-bottom: 6px; text-transform: uppercase;
}
.analysis-sub { font-size: 14px; color: rgba(20,20,20,0.50); margin-bottom: 28px; }
.analysis-chart-wrap { margin-bottom: 8px; }

.chart-container { width: 100%; height: 140px; position: relative; }
.chart-container canvas { width: 100% !important; height: 140px !important; }

.hdivider { border: none; border-top: 0.5px solid rgba(20,20,20,0.08); margin: 48px 0; }

/* ─── INGREDIENT HIGHLIGHTS ───────────────────────────────────────────────── */
.ingredient-highlights { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-bottom: 8px; }
.highlight-col { display: flex; flex-direction: column; gap: 32px; }
.highlight-product-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 13px; font-weight: 300; font-style: italic;
  color: rgba(20,20,20,0.55);
  padding-bottom: 12px; border-bottom: 0.5px solid rgba(20,20,20,0.08); margin-bottom: 4px;
}

/* ─── HIGHLIGHT CARDS ─────────────────────────────────────────────────────── */
.highlight-card {
  background: rgba(255,255,255,0.55);
  border: 0.5px solid rgba(20,20,20,0.09);
  border-radius: 12px; padding: 20px 20px 16px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.highlight-card:hover { border-color: rgba(20,20,20,0.18); box-shadow: 0 4px 20px rgba(0,0,0,0.06); }

.highlight-card-header { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.highlight-card-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.highlight-card-title { font-size: 10px; font-weight: 600; letter-spacing: 0.10em; text-transform: uppercase; }
.highlight-card-count { margin-left: auto; font-size: 10px; color: rgba(20,20,20,0.28); letter-spacing: 0.04em; }

.highlight-card-superstar { border-color: rgba(255,16,240,0.35); background: rgba(255,16,240,0.05); }
.highlight-card-superstar:hover { border-color: #C98E4B; }
.highlight-card-superstar .highlight-card-title { color: #FF10F0; }

.highlight-card-goodie    { border-color: rgba(57,255,20,0.35);  background: rgba(57,255,20,0.05);  }
.highlight-card-goodie:hover { border-color: rgba(230,55,30,0.62); }
.highlight-card-goodie .highlight-card-title { color: #148700; }

.highlight-card-icky      { border-color: rgba(255,0,0,0.35);    background: rgba(255,0,0,0.05);    }
.highlight-card-icky:hover { border-color: rgba(210,30,90,0.62); }
.highlight-card-icky .highlight-card-title { color: #FF0000; }
.highlight-card-icky-bg   { background: rgba(255,0,0,0.06); }

/* ─── INGREDIENT TAGS ─────────────────────────────────────────────────────── */
.ing-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.ing-tag { font-size: 11px; padding: 4px 10px; border-radius: 20px; border: 0.5px solid; letter-spacing: 0.02em; cursor: default; transition: opacity 0.15s; }
.ing-tag:hover { opacity: 0.70; }
.ing-tag-superstar { color: #451B43; border-color: #451B43; background: rgba(255,16,240,0.10); }
.ing-tag-goodie    { color: #22471C; border-color: #22471C;  background: rgba(57,255,20,0.10);  }
.ing-tag-icky      { color: #421A1A; border-color:#421A1A;    background: rgba(255,0,0,0.10);    }
.ing-tag-neutral   { color: #2C4A5A; border-color: #2C4A5A; background: rgba(137,207,240,0.10); }
.ing-empty         { font-size: 11px; color: rgba(20,20,20,0.30); font-style: italic; }

/* ─── FULL INGREDIENT LISTS ───────────────────────────────────────────────── */
.analysis-lists { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.ing-list-col { display: flex; flex-direction: column; gap: 28px; }
.ing-list-product-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 13px; font-weight: 300; font-style: italic;
  color: rgba(20,20,20,0.55); margin-bottom: 20px; padding-bottom: 10px;
  border-bottom: 0.5px solid rgba(20,20,20,0.08);
}
.ing-name-clickable { cursor: pointer; transition: color 0.2s; display: inline-flex; align-items: center; gap: 6px; }
.ing-name-clickable:hover { color: #1a1a1a; }
.ing-name-clickable:hover .prod-name-hint { color: rgba(20,20,20,0.45); }
.ing-category { margin-bottom: 4px; }
.ing-category-label {
  display: flex; align-items: center; gap: 8px; font-size: 10px;
  font-weight: 500; letter-spacing: 0.10em; text-transform: uppercase;
  color: rgba(20,20,20,0.38); margin-bottom: 10px;
}
.ing-category-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }

/* ─── RESPONSIVE ──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  nav { padding: 18px 20px; }
  .nav-links { gap: 20px; }
  .hero-title { font-size: 40px; }
  #controls { padding: 16px 20px 0; }
  .info { padding: 16px 20px; }
  .legend { padding: 10px 20px 16px; }
  #stage { margin: 14px 20px; border-radius: 12px; }
  .about-grid { grid-template-columns: 1fr; gap: 0; padding: 40px 20px; }
  #analysis { padding: 32px 20px 60px; }
  .ingredient-highlights { grid-template-columns: 1fr; gap: 32px; }
  .analysis-lists { grid-template-columns: 1fr; }
}

/* ─── PRODUCT NAME CLICKABLE ──────────────────────────────────────────────── */
.prod-name-clickable { cursor: pointer; transition: opacity 0.2s; display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.prod-name-clickable:hover { opacity: 0.65; }
.prod-name-hint { font-size: 11px; color: rgba(255,255,255,0.28); font-weight: 400; letter-spacing: 0; font-style: normal; }

/* ─── MODAL ───────────────────────────────────────────────────────────────── */
#product-modal { display: none; position: fixed; inset: 0; z-index: 1000; align-items: center; justify-content: center; }
#product-modal.modal-open { display: flex; }

.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(190,178,172,0.45);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.modal-panel {
  position: relative; z-index: 1;
  background: rgba(252,248,246,0.97);
  border: 0.5px solid rgba(20,20,20,0.10);
  border-radius: 16px;
  width: min(680px, 94vw);
  max-height: 88vh; overflow-y: auto;
  padding: 36px 36px 40px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.12);
  animation: modalIn 0.22s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-close {
  position: absolute; top: 18px; right: 20px;
  background: rgba(20,20,20,0.05); border: 0.5px solid rgba(20,20,20,0.10);
  color: rgba(20,20,20,0.45); font-size: 13px;
  width: 30px; height: 30px; border-radius: 50%;
  cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s;
}
.modal-close:hover { background: rgba(20,20,20,0.08); color: #1a1a1a; }

.modal-header { margin-bottom: 28px; }
.modal-tier { font-size: 10px; font-weight: 400; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(20,20,20,0.38); margin-bottom: 8px; }
.modal-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px; font-weight: 300; font-style: italic;
  line-height: 1.2; letter-spacing: -0.01em; margin-bottom: 12px; color: #1a1a1a;
}
.modal-meta { display: flex; gap: 20px; flex-wrap: wrap; font-size: 11px; color: rgba(20,20,20,0.42); text-transform: uppercase; letter-spacing: 0.05em; }
.modal-meta b { color: #1a1a1a; font-weight: 600; }
.modal-meta span { display: flex; gap: 5px; }

.modal-chart-wrap {
  width: 100%; height: 100px; position: relative; margin-bottom: 32px;
  background: rgba(255,255,255,0.65); border: 0.5px solid rgba(20,20,20,0.08);
  border-radius: 8px; padding: 12px;
}
.modal-chart-wrap canvas { width: 100% !important; height: 76px !important; }

.modal-ing-section { display: flex; flex-direction: column; gap: 20px; }
.modal-ing-label {
  display: flex; align-items: center; gap: 8px;
  font-size: 10px; font-weight: 500; letter-spacing: 0.10em;
  text-transform: uppercase; color: rgba(20,20,20,0.38); margin-bottom: 10px;
}
.modal-ing-count { margin-left: auto; font-size: 10px; color: rgba(20,20,20,0.25); }

@media (max-width: 768px) {
  .modal-panel { padding: 24px 20px 32px; }
  .modal-title { font-size: 18px; }
}

 .about-page { max-width: 860px; margin: 0 auto; padding: 60px 40px 100px; }
    .about-page .section { margin-bottom: 64px; }
    .about-page .eyebrow {
      font-size: 10px; font-weight: 400; letter-spacing: 0.16em;
      text-transform: uppercase; color: rgba(20,20,20,0.38); margin-bottom: 10px;
    }
    .about-page h2 {
      font-family: 'Cormorant Garamond', serif;
      font-size: clamp(26px, 3.5vw, 36px); font-weight: 300; font-style: italic;
      line-height: 1.15; letter-spacing: -0.01em; color: #1a1a1a; margin-bottom: 20px;
    }
    .about-page h3 {
      font-family: 'Cormorant Garamond', serif;
      font-size: 18px; font-weight: 400; font-style: italic;
      color: #1a1a1a; margin: 32px 0 10px;
    }
    .about-page p {
      font-size: 15px; color: rgba(20,20,20,0.62); line-height: 1.80; margin-bottom: 14px;
    }
    .about-page p b { color: #1a1a1a; font-weight: 600; }

    .formula {
      background: rgba(255,255,255,0.75);
      border: 0.5px solid rgba(20,20,20,0.10);
      border-radius: 10px; padding: 20px 24px;
      font-family: 'Cormorant Garamond', Georgia, serif;
      font-size: 15px; font-style: italic;
      color: rgba(20,20,20,0.75); line-height: 2.2; margin: 16px 0;
    }
    .formula .frac {
      display: inline-flex; flex-direction: column;
      align-items: center; vertical-align: middle; margin: 0 4px;
    }
    .formula .frac .num { border-bottom: 1px solid rgba(20,20,20,0.40); padding: 0 4px 2px; }
    .formula .frac .den { padding: 2px 4px 0; }

    .about-table {
      width: 100%; border-collapse: collapse; font-size: 13px; margin: 16px 0 24px;
    }
    .about-table th {
      font-size: 10px; font-weight: 500; letter-spacing: 0.10em;
      text-transform: uppercase; color: rgba(20,20,20,0.40);
      border-bottom: 0.5px solid rgba(20,20,20,0.12);
      padding: 8px 12px; text-align: left;
    }
    .about-table td {
      padding: 10px 12px; border-bottom: 0.5px solid rgba(20,20,20,0.06);
      color: rgba(20,20,20,0.65); vertical-align: top; line-height: 1.55;
    }
    .about-table td:first-child { font-weight: 500; color: #1a1a1a; }
    .about-table tr:last-child td { border-bottom: none; }
    .cat-cell { display: flex; align-items: center; gap: 8px; }
    .cat-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

    .callout {
      background: rgba(255,255,255,0.60);
      border: 0.5px solid rgba(20,20,20,0.10);
      border-left: 3px solid rgba(20,20,20,0.18);
      border-radius: 0 8px 8px 0;
      padding: 16px 20px; margin: 20px 0;
      font-size: 14px; color: rgba(20,20,20,0.60); line-height: 1.75;
    }
    .callout b { color: #1a1a1a; }

    .grade-rows { display: flex; flex-direction: column; margin: 16px 0; }
    .grade-row  { display: flex; align-items: center; gap: 14px; padding: 10px 0; border-bottom: 0.5px solid rgba(20,20,20,0.06); }
    .grade-row:last-child { border-bottom: none; }
    .gpill { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; flex-shrink: 0; }
    .grade-range { font-size: 12px; color: rgba(20,20,20,0.45); min-width: 68px; }
    .grade-desc  { font-size: 13px; color: rgba(20,20,20,0.55); }

    .sdivider { border: none; border-top: 0.5px solid rgba(20,20,20,0.08); margin: 56px 0; }

    @media (max-width: 640px) {
      .about-page { padding: 40px 20px 80px; }
      .about-table { font-size: 12px; }
      .about-table th, .about-table td { padding: 8px 8px; }
    }