:root {
  --bg: #ecdab5;
  --surface: rgba(255, 255, 255, 0.4);
  --surface2: rgba(255, 255, 255, 0.6);
  --text: #3a0b0b;
  --muted: #5a4a3a;
  --shadow: 0 10px 30px rgba(58, 11, 11, 0.1);
  --radius: 12px;
  --max: 1280px;

  --maroon: #3a0b0b;
  --maroon2: #5a1414;
  --beige: #3a0b0b;
  --beige2: #d9c39c;
  --blue: #1f4f8a;
  --blue2: #163a66;
  --accent: #d24a3a;

  --hfont: "Cinzel", serif;
  --ovofont: "Ovo", serif;
  --bfont: "Inter", system-ui, sans-serif;
}

/* =========================================
   RESET & BASE
========================================= */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--bfont);
  line-height: 1.6;
  overflow-x: hidden;
  background-attachment: fixed;
}

main {
  display: block;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--hfont);
  font-weight: 700;
  line-height: 1.2;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

ul {
  list-style: none;
}

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 18px;
  width: 100%;
}

/* =========================================
   NAVIGATION
========================================= */
.nav {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(236, 218, 181, 0.98);
  border-bottom: 4px solid #5a0d00;
  padding: 0.28rem 0;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.nav__content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.1rem;
  min-height: 82px;
  flex-wrap: nowrap;
  width: 100%;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  flex: 0 0 auto;
  white-space: nowrap;
  min-width: fit-content;
}

.brand__icon {
  background-image: url("assets/logo.png");
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  display: block;
  flex-shrink: 0;
}

.brand__icon--large {
  width: 120px;
  height: 70px;
  transition: transform 0.22s ease;
}

.brand__text {
  font-family: var(--hfont);
  line-height: 1;
}

.brand__text--large {
  display: inline-block;
  font-size: clamp(1.85rem, 2.5vw, 2.75rem);
  font-weight: 700;
  color: #d24a3a;
  white-space: nowrap;
  letter-spacing: 0.01em;
  line-height: 0.95;
  -webkit-text-stroke: 6px #5a0d00;
  paint-order: stroke fill;
  text-shadow: none;
  transition:
    transform 0.22s ease,
    color 0.22s ease;
}

.brand:hover .brand__text--large {
  transform: translateY(-1px);
  color: #e05a45;
  filter: drop-shadow(0 6px 6px rgba(58, 11, 11, 0.35));
}

.brand:hover .brand__icon--large {
  transform: translateY(-1px);
  filter:
    drop-shadow(0 4px 6px rgba(58, 11, 11, 0.35))
    drop-shadow(0 0 6px rgba(210, 74, 58, 0.35));
}

.nav__links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.6rem;
  flex: 1 1 auto;
  min-width: 0;
  overflow: visible;
  flex-wrap: nowrap;
}

.nav__links--boxed li {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  min-width: fit-content;
}

.nav__links--boxed li:not(:last-child)::after {
  content: "|";
  color: #5a0d00;
  font-family: var(--hfont);
  font-size: 2.15rem;
  line-height: 1;
  margin-left: 0.6rem;
  flex: 0 0 auto;
}

.nav__link--boxed {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 1rem;
  border-radius: 16px;
  background: #b55343;
  border: 3px solid #5a0d00;
  color: #ffffff;
  font-family: var(--hfont);
  font-size: clamp(1.2rem, 1vw, 1.28rem);
  font-weight: 550;
  line-height: 1;
  white-space: nowrap;
  text-shadow: none;
  -webkit-text-stroke: 4.8px #5a0d00;
  paint-order: stroke fill;
  box-shadow: 0 2px 0 rgba(90, 13, 0, 0.16);
  transition:
    transform 0.22s ease,
    background 0.22s ease,
    color 0.22s ease,
    box-shadow 0.22s ease;
}

.nav__link--boxed:hover {
  background: #8f2410;
  color: #ecdab5;
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(58, 11, 11, 0.18);
}

.burger {
  display: none;
  background: none;
  border: none;
  color: var(--maroon);
  font-size: 1.6rem;
  cursor: pointer;
  flex: 0 0 auto;
}

/* =========================================
   TOP EXPERIENCE SHELL
========================================= */
.landing-shell {
  min-height: 100vh;
  background: var(--bg);
}

.landing-stage {
  position: relative;
  width: 100%;
  background: var(--bg);
  overflow: hidden;
  padding: 0;
}

.landing-stage__inner {
  max-width: 100%;
  padding: 0;
}

/* =========================================
   HERO SWITCH
========================================= */
.hero-switch {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #ecdab5;
  padding: 48px 0 6px;
}

.hero-switch__stage {
  position: relative;
  width: 100%;
  height: min(43vw, 560px);
  min-height: 455px;
  overflow: visible;
}

/* fundaluri */
.hero-switch__bg {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: auto;
  max-width: none;
  pointer-events: none;
  user-select: none;
  transition:
    transform 900ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 700ms ease;
  will-change: transform, opacity;
}

.hero-switch__bg--back {
  z-index: 1;
  left: -400px;
  top: 0px;
  height: 100%;
  width: auto;
  min-width: 100px;
}

.hero-switch__bg--front {
  z-index: 2;
  left: -57px;
  top: 5px;
  height: calc(97% - 18px);
  width: auto;
  min-width: 900px;
}

/* stanga */
.hero-switch__leftContent {
  position: absolute;
  z-index: 4;
  left: max(18px, calc((100vw - var(--max)) / 2 + 18px));
  top: 56%;
  transform: translateY(-50%);
  width: min(34vw, 520px);
  color: #cf492f;
  transition:
    opacity 380ms ease,
    transform 850ms cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-switch__wordmark {
  display: inline-block;
  font-family: var(--hfont);
  font-size: clamp(2.2rem, 4.7vw, 4.7rem);
  font-weight: 700;
  color: #ac3020;
  white-space: nowrap;
  letter-spacing: 0.01em;
  line-height: 0.95;
  -webkit-text-stroke: 8px #5a0d00;
  paint-order: stroke fill;
  text-shadow: none;
  margin-bottom: 18px;
}

.hero-switch__definition,
.hero-switch__author {
  margin-left: 0;
  padding-left: 0;
}

.hero-switch__definition {
  color: #cf492f;
}

.hero-switch__pronunciation {
  font-family: var(--ovofont);
  font-size: clamp(1.4rem, 1.65vw, 3.45rem);
  font-weight: 550;
  line-height: 0.88;
  -webkit-text-stroke: 3.8px #4a0907;
  paint-order: stroke fill;
  margin-bottom: 10px;
}

.hero-switch__divider {
  width: min(265px, 78%);
  height: 0;
  border-top: 4px solid #560a00;
  margin-bottom: 16px;
}

.hero-switch__desc {
  font-family: var(--ovofont);
  font-size: clamp(1.4rem, 1.65vw, 3.45rem);
  font-weight: 550;
  line-height: 0.88;
  max-width: 4000px;
  width: 100%;
  -webkit-text-stroke: 3.8px #560a00;
  paint-order: stroke fill;
}

.hero-switch__author {
  margin-top: 28px;
}

.hero-switch__authorName {
  font-family: var(--ovofont);
  font-size: clamp(2.4rem, 1.65vw, 3.45rem);
  font-weight: 550;
  line-height: 0.88;
  color: #ac3020;
  -webkit-text-stroke: 4.5px #560a00;
  paint-order: stroke fill;
}

.hero-switch__authorRole {
  font-family: var(--ovofont);
  font-size: clamp(1.4rem, 1.65vw, 3.45rem);
  font-weight: 550;
  line-height: 0.88;
  color: #ac3020;
  -webkit-text-stroke: 4.5px #560a00;
  paint-order: stroke fill;
}

/* click area peste logo-ul inclus in background_fata.png */
.hero-switch__logoTrigger {
  position: absolute;
  z-index: 6;
  top: 54%;
  left: clamp(675px, 62vw, 910px);
  width: clamp(330px, 33vw, 470px);
  height: clamp(250px, 25vw, 360px);
  transform: translate(-50%, -50%);
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  transition:
    left 900ms cubic-bezier(0.22, 1, 0.36, 1),
    top 900ms cubic-bezier(0.22, 1, 0.36, 1),
    width 900ms cubic-bezier(0.22, 1, 0.36, 1),
    height 900ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 900ms cubic-bezier(0.22, 1, 0.36, 1);
}

/* sageata */
.hero-switch__arrow {
  position: absolute;
  z-index: 6;
  top: 52%;
  left: max(16px, calc((100vw - var(--max)) / 2 - 140px));
  transform: translateY(-50%);
  width: clamp(92px, 7.5vw, 112px);
  height: clamp(92px, 7.5vw, 112px);
  border: 0;
  border-radius: 30px;
  background: rgba(91, 10, 7, 0.94);
  cursor: pointer;
  transition:
    left 900ms cubic-bezier(0.22, 1, 0.36, 1),
    top 900ms cubic-bezier(0.22, 1, 0.36, 1),
    background 300ms ease;
}

.hero-switch__arrow:hover {
  background: rgba(112, 15, 10, 0.98);
}

.hero-switch__arrowIcon {
  position: absolute;
  inset: 0;
}

.hero-switch__arrowIcon::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 28%;
  height: 28%;
  border-top: 7px solid #cb543f;
  border-right: 7px solid #cb543f;
  border-radius: 3px;
  transform: translate(-38%, -50%) rotate(-135deg);
  transition: transform 900ms cubic-bezier(0.22, 1, 0.36, 1);
}

/* dreapta */
.hero-switch__rightContent {
  position: absolute;
  z-index: 3;
  right: max(18px, calc((100vw - var(--max)) / 2 + 18px));
  top: 56%;
  transform: translateY(-50%) translateX(44px);
  width: min(39vw, 500px);
  color: #45100d;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 420ms ease 120ms,
    transform 900ms cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-switch__headline {
  font-size: clamp(2rem, 3.35vw, 2.55rem);
  color: var(--maroon);
  line-height: 1.02;
  margin-bottom: 1rem;
}

.hero-switch__text {
  font-size: 1rem;
  color: var(--muted);
  margin-bottom: 1.4rem;
  max-width: 100%;
}

.hero-switch__microcopy {
  margin-top: 0.65rem;
  font-size: 0.66rem;
  color: rgba(90, 74, 58, 0.82);
  line-height: 1.4;
}

/* =========================================
   HERO-LIKE UI ELEMENTS
========================================= */
.kicker {
  display: inline-block;
  background: var(--maroon);
  color: #ecdab5;
  padding: 0.42rem 0.9rem;
  border-radius: 999px;
  letter-spacing: 0.08em;
  font-size: 0.7rem;
  margin-bottom: 1.15rem;
  font-weight: 600;
}

.cta-group {
  display: flex;
  gap: 0.85rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.btn {
  padding: 0.9rem 1.6rem;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn--primary {
  background: linear-gradient(
    90deg,
    rgba(210, 74, 58, 0.85),
    rgba(58, 11, 11, 0.85)
  );
  border: 1px solid rgba(231, 214, 182, 0.18);
  color: #f3f4f6;
  box-shadow: 0 4px 20px rgba(210, 74, 58, 0.3);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(210, 74, 58, 0.4);
}

.btn--ghost {
  background: transparent;
  border: 1px solid var(--maroon);
  color: var(--maroon);
}

.btn--ghost:hover {
  background: rgba(58, 11, 11, 0.05);
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(110px, 1fr));
  gap: 1rem;
}

.stat-card {
  background: rgba(255, 255, 255, 0.48);
  padding: 1rem;
  border-radius: var(--radius);
  border: 1px solid rgba(58, 11, 11, 0.08);
}

.stat-val {
  font-family: var(--hfont);
  font-size: 2rem;
  color: var(--maroon);
  display: block;
  margin-bottom: 0.35rem;
}

.stat-label {
  color: var(--muted);
  font-size: 0.75rem;
}

/* stare collapsed */
.hero-switch.is-collapsed .hero-switch__bg--back {
  transform: translateX(-35%);
}

.hero-switch.is-collapsed .hero-switch__bg--front {
  transform: translateX(-48%);
}

.hero-switch.is-collapsed .hero-switch__leftContent {
  opacity: 0;
  transform: translateY(-50%) translateX(-120px);
  pointer-events: none;
}

.hero-switch.is-collapsed .hero-switch__logoTrigger {
  left: clamp(255px, 23vw, 355px);
  top: 56%;
  width: clamp(280px, 27vw, 380px);
  height: clamp(220px, 21vw, 300px);
  transform: translate(-50%, -50%);
}

.hero-switch.is-collapsed .hero-switch__arrow {
  left: clamp(830px, 39vw, 585px);
  top: 52%;
}

.hero-switch.is-collapsed .hero-switch__arrowIcon::before {
  transform: translate(-62%, -50%) rotate(45deg);
}

.hero-switch.is-collapsed .hero-switch__rightContent {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(-50%) translateX(0);
}

/* =========================================
   GENERIC SECTIONS
========================================= */
section {
  padding: 6rem 0;
  background: #ecdab5;
}

.section-header {
  margin-bottom: 3rem;
}

.section-title {
  font-size: 2.5rem;
  color: var(--maroon);
  margin-bottom: 1rem;
}

.grid2 {
  display: grid;
  grid-template-columns: 1.25fr 0.85fr;
  gap: 3rem;
}

/* =========================================
   PANELS
========================================= */
.panel {
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(58, 11, 11, 0.1);
  padding: 2.5rem;
  border-radius: var(--radius);
}

.panel--accent {
  background: rgba(255, 255, 255, 0.6);
}

.panel h3 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: var(--maroon);
  border-bottom: 1px solid rgba(58, 11, 11, 0.1);
  padding-bottom: 1rem;
}

.panel p {
  color: var(--muted);
  margin-bottom: 1rem;
}

/* =========================================
   STEPS
========================================= */
.steps-grid {
  display: grid;
  gap: 2rem;
}

.step {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  background: rgba(255, 255, 255, 0.4);
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid rgba(58, 11, 11, 0.1);
}

.step__num {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--maroon);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--hfont);
  font-size: 1.5rem;
  font-weight: bold;
  color: #ecdab5;
}

/* =========================================
   RESULTS
========================================= */
.results-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.result-card {
  background: rgba(255, 255, 255, 0.4);
  padding: 2rem;
  border-radius: var(--radius);
  border: 1px solid rgba(58, 11, 11, 0.1);
  text-align: center;
}

.result-card .big-num {
  font-family: var(--hfont);
  font-size: 3.5rem;
  color: var(--maroon);
  margin-bottom: 1rem;
  line-height: 1;
}

/* =========================================
   CONCLUSION
========================================= */
.conclusion-box {
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(58, 11, 11, 0.1);
  padding: 3rem;
  border-radius: var(--radius);
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

/* =========================================
   FOOTER
========================================= */
footer {
  background: rgba(58, 11, 11, 0.05);
  border-top: 1px solid rgba(58, 11, 11, 0.1);
  padding: 3rem 0;
  margin-top: 4rem;
  text-align: center;
  color: var(--muted);
}

/* =========================================
   GENERIC ANIMATIONS
========================================= */
@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================
   CARD COLOR REVERSAL ON HOVER
========================================= */
.stat-card,
.panel,
.panel--accent,
.step,
.result-card,
.conclusion-box {
  background-color: rgba(255, 255, 255, 0.4);
  color: var(--text);
  transition:
    transform 0.3s ease,
    background-color 0.3s ease,
    color 0.3s ease,
    box-shadow 0.3s ease;
  will-change: transform;
}

.stat-card:hover,
.panel:hover,
.panel--accent:hover,
.step:hover,
.result-card:hover,
.conclusion-box:hover {
  background-color: var(--maroon);
  color: #ecdab5;
  transform: scale(1.03);
  box-shadow: 0 14px 40px rgba(58, 11, 11, 0.25);
}

.stat-card:hover *,
.panel:hover *,
.panel--accent:hover *,
.step:hover *,
.step:hover .step__num,
.result-card:hover *,
.conclusion-box:hover * {
  color: #ecdab5 !important;
}

.step:hover .step__num {
  background: #ecdab5;
  color: var(--maroon) !important;
  border-color: var(--maroon);
}

/* =========================================
   ACCURACY CHART SECTION
========================================= */
#accuracy-chart-section {
  width: 100%;
  background: #ecdab5;
  padding: 90px 0 70px;
}

.chart-section-head {
  margin-bottom: 24px;
}

.chart-section-subtitle {
  color: var(--muted);
  max-width: 760px;
  font-size: 1.05rem;
}

.chart-card-wrapper {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  height: 560px;
  background: linear-gradient(180deg, #dfcca8 0%, #d8c39a 100%);
  position: relative;
  overflow: visible;
  border: 1px solid rgba(58, 11, 11, 0.12);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 18px 26px 18px;
}

.accuracy-chart {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

/* =========================================
   CHART TEXT OUTLINE
========================================= */
.outlined-title {
  fill: #ffffff;
  stroke: #5a0d00;
  stroke-width: 7px;
  paint-order: stroke fill;
  stroke-linejoin: round;
  font-family: var(--hfont);
  font-weight: 700;
}

.outlined-small {
  fill: #ffffff;
  stroke: #5a0d00;
  stroke-width: 5px;
  paint-order: stroke fill;
  stroke-linejoin: round;
  font-family: var(--hfont);
  font-weight: 700;
}

.outlined-value {
  fill: #ffffff;
  stroke: #5a0d00;
  stroke-width: 5px;
  paint-order: stroke fill;
  stroke-linejoin: round;
  font-family: var(--hfont);
  font-weight: 700;
}

/* =========================================
   CHART TYPOGRAPHY
========================================= */
.chart-title {
  font-size: 2rem;
  letter-spacing: 0;
}

.legend-text {
  font-size: 0.95rem;
}

.axis-label {
  font-size: 1rem;
}

.x-label {
  font-size: 0.95rem;
}

.value-label {
  font-size: 1rem;
}

.margin-label {
  font-size: 0.95rem;
}

/* =========================================
   GRID & AXES
========================================= */
.grid-line {
  stroke: #6b190c;
  stroke-dasharray: 2 4;
  stroke-width: 1.6;
  opacity: 0.9;
}

.axis-line {
  stroke: #6b190c;
  stroke-width: 2.2;
}

.plot-border {
  display: none;
}

/* =========================================
   AREA FILLS
========================================= */
.area-upper {
  fill: url(#upperFill);
  opacity: 1;
}

.area-lower {
  fill: url(#lowerFill);
  opacity: 1;
}

/* =========================================
   MAIN CHART LINES
========================================= */
.line-acc,
.line-upper,
.line-lower {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.line-acc {
  stroke: #8b1e05;
  stroke-width: 3.5;
}

.line-upper {
  stroke: #6e1400;
  stroke-width: 3.2;
}

.line-lower {
  stroke: #ea8a72;
  stroke-width: 3.2;
}

/* =========================================
   RANGE BARS
========================================= */
.range-up {
  stroke: #6e1400;
  stroke-width: 2.2;
  opacity: 0.95;
}

.range-down {
  stroke: #ea8a72;
  stroke-width: 2.2;
  opacity: 0.95;
}

/* =========================================
   POINTS
========================================= */
.point {
  fill: #ffffff;
  stroke-width: 2.4;
  transition: transform 0.18s ease, r 0.18s ease, opacity 0.18s ease;
  transform-origin: center;
}

.point.acc {
  stroke: #8b1e05;
}

.point.upper {
  stroke: #6e1400;
}

.point.lower {
  stroke: #ea8a72;
}

.point.active {
  filter: url(#chartGlow);
}

/* =========================================
   HOVER GUIDE
========================================= */
.hover-line {
  stroke: #5a0d00;
  stroke-dasharray: 3 4;
  stroke-width: 1.6;
  opacity: 0;
  transition: opacity 0.18s ease;
}

.hover-line.visible {
  opacity: 1;
}

.hover-focus {
  fill: #ffffff;
  stroke-width: 2.8;
  opacity: 0;
  transition: opacity 0.18s ease, r 0.18s ease;
}

.hover-focus.acc {
  stroke: #8b1e05;
}

.hover-focus.upper {
  stroke: #6e1400;
}

.hover-focus.lower {
  stroke: #ea8a72;
}

.hover-focus.visible {
  opacity: 1;
}

/* =========================================
   DOT TRAIL ONLY
========================================= */
.mouse-trail {
  opacity: 0;
  transition: opacity 0.08s linear;
  pointer-events: none;
}

.mouse-trail.visible {
  opacity: 1;
}

.mouse-trail-dot {
  fill: rgba(139, 30, 5, 0.34);
  transition: opacity 0.08s linear, transform 0.08s linear;
  transform-origin: center;
}

.mouse-trail-dot.dot-1 { fill: rgba(139, 30, 5, 0.42); }
.mouse-trail-dot.dot-2 { fill: rgba(139, 30, 5, 0.36); }
.mouse-trail-dot.dot-3 { fill: rgba(139, 30, 5, 0.31); }
.mouse-trail-dot.dot-4 { fill: rgba(139, 30, 5, 0.26); }
.mouse-trail-dot.dot-5 { fill: rgba(139, 30, 5, 0.22); }
.mouse-trail-dot.dot-6 { fill: rgba(139, 30, 5, 0.18); }
.mouse-trail-dot.dot-7 { fill: rgba(139, 30, 5, 0.14); }

/* =========================================
   TOOLTIP
========================================= */
.chart-tooltip {
  position: absolute;
  left: 0;
  top: 0;
  transform: translate(-50%, -110%);
  background: rgba(58, 11, 11, 0.96);
  color: #ecdab5;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(236, 218, 181, 0.22);
  box-shadow: 0 14px 30px rgba(58, 11, 11, 0.25);
  font-size: 13px;
  line-height: 1.5;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.18s ease, transform 0.18s ease;
  min-width: 220px;
  z-index: 50;
  white-space: nowrap;
}

.chart-tooltip.visible {
  opacity: 1;
}

.chart-tooltip__title {
  font-family: var(--hfont);
  color: #fff;
  margin-bottom: 6px;
  font-size: 14px;
}

.chart-tooltip > div:not(.chart-tooltip__title):not(.chart-tooltip__margin) {
  display: flex;
  align-items: center;
  gap: 0;
}

.tooltip-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 8px;
  flex: 0 0 9px;
}

.tooltip-dot--acc {
  background: #8b1e05;
}

.tooltip-dot--upper {
  background: #6e1400;
}

.tooltip-dot--lower {
  background: #ea8a72;
}

.chart-tooltip__margin {
  margin: 8px 0 0;
  padding-top: 8px;
  padding-left: 17px;
  border-top: 1px solid rgba(236, 218, 181, 0.34);
}

/* =========================================
   CHART ANIMATIONS
========================================= */
.chart-draw {
  stroke-dasharray: var(--len);
  stroke-dashoffset: var(--len);
  animation: chartDraw 1.6s ease forwards;
}

.chart-draw.delay-1 {
  animation-delay: 0.15s;
}

.chart-draw.delay-2 {
  animation-delay: 0.35s;
}

.chart-draw.delay-3 {
  animation-delay: 0.55s;
}

.chart-fade {
  opacity: 0;
  transform: translateY(10px);
  animation: chartFade 0.6s ease forwards;
}

@keyframes chartDraw {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes chartFade {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================================
   LANGUAGE BUTTON
========================================= */
.lang-widget {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 9999;
  width: 170px;
}

.lang-current {
  position: relative;
  width: 100%;
  padding: 12px 16px;
  border: 3px solid #5a0d00;
  border-radius: 18px;
  background: #b55343;
  color: #fff7ef;
  font-family: var(--hfont);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
  text-align: center;
  cursor: pointer;
  -webkit-text-stroke: 4px #5a0d00;
  paint-order: stroke fill;
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    background 0.22s ease,
    color 0.22s ease;
}

.lang-current:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(58, 11, 11, 0.28);
}

.lang-current::after {
  content: "";
  position: absolute;
  right: 14px;
  bottom: -12px;
  width: 18px;
  height: 18px;
  background: #b55343;
  border-right: 3px solid #5a0d00;
  border-bottom: 3px solid #5a0d00;
  transform: rotate(45deg);
}

.lang-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 14px);
  width: 100%;
  padding: 8px;
  border: 3px solid #5a0d00;
  border-radius: 18px;
  background: rgba(253, 242, 211, 0.6);
  box-shadow: 0 14px 34px rgba(58, 11, 11, 0.24);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition:
    opacity 0.22s ease,
    transform 0.22s ease;
}

.lang-widget.is-open .lang-menu {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.lang-option {
  width: 100%;
  border: none;
  background: transparent;
  border-radius: 12px;
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
  color: #5a0d00;
  font-family: var(--hfont);
  font-size: 1rem;
  font-weight: 600;
  transition:
    background 0.2s ease,
    color 0.2s ease;
}

.lang-option:hover {
  background: #5a0d00;
  color: #ecdab5;
}

/* =========================================
   HEALTHREGEN CHAT WIDGET
========================================= */
.hr-chat-widget {
  position: fixed;
  right: 22px;
  bottom: 112px;
  z-index: 9998;
  width: 370px;
  max-width: calc(100vw - 28px);
}

.hr-chat-current {
  position: relative;
  width: 100%;
  padding: 12px 16px;
  border: 3px solid #163a66;
  border-radius: 18px;
  background: linear-gradient(135deg, #1f4f8a 0%, #2a6ab5 100%);
  color: #fff7ef;
  font-family: var(--hfont);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
  text-align: center;
  cursor: pointer;
  -webkit-text-stroke: 3px #163a66;
  paint-order: stroke fill;
  box-shadow: 0 12px 28px rgba(31, 79, 138, 0.22);
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    filter 0.22s ease;
}

.hr-chat-current:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(31, 79, 138, 0.28);
  filter: brightness(1.03);
}

.hr-chat-current::after {
  content: "";
  position: absolute;
  right: 14px;
  bottom: -12px;
  width: 18px;
  height: 18px;
  background: #2a6ab5;
  border-right: 3px solid #163a66;
  border-bottom: 3px solid #163a66;
  transform: rotate(45deg);
}

.hr-chat-panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 14px);
  width: 100%;
  height: 560px;
  display: flex;
  flex-direction: column;
  border: 3px solid #163a66;
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(250, 245, 235, 0.96) 0%, rgba(238, 226, 201, 0.97) 100%);
  box-shadow: 0 18px 38px rgba(22, 58, 102, 0.22);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition:
    opacity 0.24s ease,
    transform 0.24s ease;
  overflow: hidden;
}

.hr-chat-widget.is-open .hr-chat-panel {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.hr-chat-header {
  padding: 14px 16px 12px;
  border-bottom: 2px solid rgba(22, 58, 102, 0.18);
  background: linear-gradient(135deg, rgba(31, 79, 138, 0.14), rgba(210, 74, 58, 0.12));
}

.hr-chat-header__title {
  font-family: var(--hfont);
  font-size: 1.05rem;
  color: #163a66;
  margin-bottom: 2px;
}

.hr-chat-header__subtitle {
  font-size: 0.8rem;
  color: #5a4a3a;
}

.hr-chat-messages {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hr-chat-bubble {
  max-width: 88%;
  padding: 11px 13px;
  border-radius: 16px;
  font-size: 0.93rem;
  line-height: 1.45;
  white-space: pre-line;
  box-shadow: 0 6px 16px rgba(58, 11, 11, 0.08);
}

.hr-chat-bubble--bot {
  align-self: flex-start;
  background: rgba(31, 79, 138, 0.10);
  border: 1px solid rgba(31, 79, 138, 0.18);
  color: #163a66;
}

.hr-chat-bubble--user {
  align-self: flex-end;
  background: rgba(210, 74, 58, 0.12);
  border: 1px solid rgba(210, 74, 58, 0.18);
  color: #5a1414;
}

.hr-chat-choices {
  padding: 0 14px 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hr-chat-choice {
  border: 2px solid #1f4f8a;
  background: rgba(31, 79, 138, 0.08);
  color: #163a66;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.82rem;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    background 0.18s ease,
    color 0.18s ease;
}

.hr-chat-choice:hover {
  transform: translateY(-1px);
  background: #1f4f8a;
  color: #ecdab5;
}

.hr-chat-inputbar {
  display: flex;
  gap: 8px;
  padding: 12px 14px;
  border-top: 2px solid rgba(22, 58, 102, 0.14);
  background: rgba(255, 255, 255, 0.55);
}

.hr-chat-input {
  flex: 1 1 auto;
  min-width: 0;
  border: 2px solid rgba(22, 58, 102, 0.26);
  border-radius: 14px;
  padding: 10px 12px;
  font-size: 0.92rem;
  font-family: var(--bfont);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  outline: none;
}

.hr-chat-input:focus {
  border-color: #1f4f8a;
  box-shadow: 0 0 0 3px rgba(31, 79, 138, 0.12);
}

.hr-chat-send {
  flex: 0 0 auto;
  border: 2px solid #163a66;
  border-radius: 14px;
  padding: 10px 14px;
  background: #1f4f8a;
  color: #fff7ef;
  font-family: var(--hfont);
  font-size: 0.9rem;
  cursor: pointer;
  -webkit-text-stroke: 1.5px #163a66;
  paint-order: stroke fill;
  transition:
    transform 0.18s ease,
    filter 0.18s ease;
}

.hr-chat-send:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.hr-chat-footer {
  padding: 0 14px 12px;
  font-size: 0.72rem;
  color: rgba(90, 74, 58, 0.86);
  line-height: 1.35;
}

.hr-chat-result {
  margin-top: 6px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(22, 58, 102, 0.08);
  border: 1px solid rgba(22, 58, 102, 0.16);
}

.hr-chat-result strong {
  color: #163a66;
}

/* =========================================
   MOBILE RESPONSIVE
========================================= */
@media (max-width: 920px) {
  .nav {
    padding: 0.2rem 0;
  }

  .nav__content {
    gap: 0.8rem;
    min-height: 70px;
  }

  .nav__links {
    position: absolute;
    top: 72px;
    right: 18px;
    background: #ecdab5;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 1rem;
    border-radius: 18px;
    border: 3px solid #5a0d00;
    box-shadow: var(--shadow);
    transform: translateY(-20px);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    min-width: 240px;
    z-index: 1001;
  }

  .nav__links.nav--open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav__links--boxed li {
    width: 100%;
  }

  .nav__links--boxed li:not(:last-child)::after {
    display: none;
  }

  .nav__link--boxed {
    width: 100%;
    height: 46px;
    font-size: 1rem;
    -webkit-text-stroke: 1.2px #5a0d00;
  }

  .brand__icon--large {
    width: 54px;
    height: 40px;
  }

  .brand__text--large {
    font-size: 1.2rem;
    -webkit-text-stroke: 2px #5a0d00;
  }

  .burger {
    display: block;
  }

  .hero-switch {
    padding-top: 22px;
  }

  .hero-switch__stage {
    height: 790px;
    min-height: 790px;
    overflow: hidden;
  }

  .hero-switch__stage {
    position: relative;
    width: 100%;
    height: 700px;
    min-height: 700px;
    overflow: visible;
  }

  .hero-switch__bg--back {
    left: clamp(300px, 45vw, 600px);
    top: 50%;
    transform: translate(-50%, -50%);
    min-width: 800px;
  }

  .hero-switch__bg--front {
    z-index: 2;
    left: clamp(675px, 62vw, 910px);
    top: 50%;
    transform: translate(-50%, -50%);
    height: calc(100% - 18px);
    width: auto;
    min-width: 1000px;
  }

  .hero-switch__leftContent {
    left: 42px;
    top: 188px;
    transform: none;
    width: 330px;
  }

  .hero-switch__wordmark {
    font-size: clamp(2.25rem, 7vw, 3.35rem);
    -webkit-text-stroke: 4px #5a0d00;
    white-space: normal;
  }

  .hero-switch__desc {
    max-width: 330px;
  }

  .hero-switch__logoTrigger {
    left: 500px;
    top: 250px;
    width: 300px;
    height: 240px;
    transform: translate(-50%, -50%);
  }

  .hero-switch__arrow {
    left: 26px;
    top: 325px;
    width: 78px;
    height: 78px;
  }

  .hero-switch__arrowIcon::before {
    border-top-width: 6px;
    border-right-width: 6px;
  }

  .hero-switch__rightContent {
    left: 42px;
    right: 42px;
    top: 505px;
    width: auto;
    transform: none;
  }

  .hero-switch.is-collapsed .hero-switch__bg--back {
    transform: translate(-50%, -50%) translateX(-28%);
  }

  .hero-switch.is-collapsed .hero-switch__bg--front {
    transform: translate(-50%, -50%) translateX(-36%);
  }

  .hero-switch.is-collapsed .hero-switch__logoTrigger {
    left: 245px;
    top: 255px;
    width: 250px;
    height: 205px;
  }

  .hero-switch.is-collapsed .hero-switch__arrow {
    left: 420px;
    top: 325px;
  }

  .hero-switch.is-collapsed .hero-switch__rightContent {
    transform: none;
  }

  .stats-row,
  .grid2,
  .results-grid {
    grid-template-columns: 1fr;
  }

  .chart-card-wrapper {
    height: 440px;
  }

  .chart-title {
    font-size: 1.45rem;
  }

  .legend-text {
    font-size: 0.72rem;
  }

  .axis-label,
  .x-label,
  .value-label,
  .margin-label {
    font-size: 0.68rem;
  }

  .chart-tooltip {
    min-width: 180px;
    font-size: 12px;
  }

  .chart-tooltip__margin {
    padding-left: 17px;
  }

  .lang-widget {
    right: 14px;
    bottom: 14px;
    width: 150px;
  }

  .lang-current {
    font-size: 0.9rem;
    -webkit-text-stroke: 3px #5a0d00;
  }

  .lang-option {
    font-size: 0.9rem;
  }

  .hr-chat-widget {
    right: 14px;
    bottom: 92px;
    width: min(360px, calc(100vw - 20px));
  }

  .hr-chat-panel {
    height: 500px;
  }

  .hr-chat-current {
    font-size: 0.92rem;
    -webkit-text-stroke: 2px #163a66;
  }
}

/* =========================================
   REDUCED MOTION
========================================= */
@media (prefers-reduced-motion: reduce) {
  .chart-draw,
  .chart-fade,
  .chart-tooltip,
  .hover-line,
  .hover-focus,
  .point,
  .mouse-trail,
  .hero-switch,
  .hero-switch__stage,
  .hero-switch__bg,
  .hero-switch__leftContent,
  .hero-switch__logoTrigger,
  .hero-switch__arrow,
  .hero-switch__rightContent {
    animation: none !important;
    transition: none !important;
  }
}

/* =========================================
   PATTERNS CHART
   Same visual language as the accuracy chart
========================================= */
.patterns-chart-card-wrapper {
  height: 620px;
}

.patterns-chart .chart-title {
  font-size: 2rem;
  letter-spacing: 0;
}

.patterns-axis-label {
  font-size: 1rem;
}

.patterns-y-label {
  font-size: 0.95rem;
}

.patterns-value-label {
  font-size: 1rem;
}

.patterns-total-label {
  font-size: 0.95rem;
}

.patterns-legend-label {
  font-size: 0.95rem;
}

.patterns-grid-line {
  stroke: #6b190c;
  stroke-dasharray: 2 4;
  stroke-width: 1.6;
  opacity: 0.9;
}

.patterns-axis-line {
  stroke: #6b190c;
  stroke-width: 2.2;
}

.patterns-hover-row {
  fill: rgba(255, 255, 255, 0.06);
  stroke: #5a0d00;
  stroke-dasharray: 3 4;
  stroke-width: 1.4;
  opacity: 0;
  transition: opacity 0.18s ease;
}

.patterns-hover-row.visible {
  opacity: 1;
}

.patterns-bar-segment {
  stroke-width: 2.3;
  transition:
    opacity 0.18s ease,
    filter 0.18s ease,
    transform 0.18s ease;
  transform-origin: center;
}

.patterns-bar-segment.active {
  filter: url(#patternsGlow);
  opacity: 0.96;
}

.patterns-bar-segment.alcohol {
  fill: rgba(234, 138, 114, 0.78);
  stroke: #ea8a72;
}

.patterns-bar-segment.weight {
  fill: rgba(139, 30, 5, 0.78);
  stroke: #8b1e05;
}

.patterns-bar-segment.physical {
  fill: rgba(110, 20, 0, 0.82);
  stroke: #6e1400;
}

.patterns-bar-segment.processed {
  fill: rgba(153, 90, 86, 0.78);
  stroke: #9b5a56;
}

.patterns-bar-segment.lowfiber {
  fill: rgba(207, 127, 134, 0.78);
  stroke: #cf7f86;
}

@media (max-width: 920px) {
  .patterns-chart-card-wrapper {
    height: 520px;
  }

  .patterns-chart .chart-title {
    font-size: 1.45rem;
  }

  .patterns-axis-label,
  .patterns-y-label,
  .patterns-value-label,
  .patterns-total-label,
  .patterns-legend-label {
    font-size: 0.72rem;
  }
}
.intro-results-grid {
  margin-bottom: 1rem;
}

.intro-microcopy {
  margin: 0 0 2rem;
  max-width: 920px;
}

.intro-panels-grid {
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
}

@media (max-width: 920px) {
  .intro-panels-grid {
    grid-template-columns: 1fr;
  }
}
/* =========================================
   PROGRAMS SECTION
========================================= */
#programs {
  padding: 60px 0 40px;
}

.programs-grid {
  width: 100%;
  max-width: var(--max);
  margin-left: auto;
  margin-right: auto;
  gap: 1rem;
}

.programs-grid--top {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 1rem;
}

.programs-grid--bottom {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  max-width: calc((var(--max) - 2rem) * 0.6667);
  margin-left: auto;
  margin-right: auto;
}

.program-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 120px;
  padding: 1rem 1.1rem;
  border-radius: 18px;
  background: #b55343;
  border: 3px solid #5a0d00;
  box-shadow: 0 2px 0 rgba(90, 13, 0, 0.16);
  transition:
    transform 0.22s ease,
    background 0.22s ease,
    box-shadow 0.22s ease,
    filter 0.22s ease;
}

.program-card:hover {
  background: #8f2410;
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(58, 11, 11, 0.18);
}

.program-card__logo {
  width: 78px;
  height: 78px;
  object-fit: contain;
  flex-shrink: 0;
  transition:
    transform 0.22s ease,
    filter 0.22s ease;
}

.program-card:hover .program-card__logo {
  transform: translateY(-1px) scale(1.03);
  filter: drop-shadow(0 4px 8px rgba(58, 11, 11, 0.28));
}

.program-card__text {
  min-width: 0;
}

.program-card__title,
.program-card__desc {
  font-family: var(--ovofont);
  color: #ffffff;
  text-shadow: none;
  paint-order: stroke fill;
}

.program-card__title {
  font-size: 1.15rem;
  line-height: 1.05;
  -webkit-text-stroke: 5px #5a0d00;
  margin-bottom: 0.35rem;
}

.program-card__desc {
  font-size: 0.9rem;
  line-height: 1.2;
  -webkit-text-stroke: 4px #5a0d00;
}

.program-card--wide .program-card__title {
  max-width: 100%;
}

.program-card--wide .program-card__desc {
  max-width: 100%;
}

@media (max-width: 920px) {
  .programs-grid--top,
  .programs-grid--bottom {
    display: grid;
    grid-template-columns: 1fr;
    max-width: 100%;
  }

  .program-card {
    min-height: 110px;
  }

  .program-card__logo {
    width: 66px;
    height: 66px;
  }

  .program-card__title {
    font-size: 1rem;
    -webkit-text-stroke: 2px #5a0d00;
  }

  .program-card__desc {
    font-size: 0.82rem;
    -webkit-text-stroke: 1.6px #5a0d00;
  }
}
/* =========================================================
   ABOUT PAGE / RESEARCH POSTER / GENETICS
========================================================= */

.about-hero-combined {
  min-height: 34vh;
  padding-top: 110px;
  padding-bottom: 3rem;
}

.about-hero-lead {
  max-width: 860px;
}

.about-top-grid {
  margin-top: 2.2rem;
}

.poster-card-wrapper {
  padding: 1rem;
}

.poster-frame {
  width: 100%;
  height: 980px;
  overflow: auto;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(58, 11, 11, 0.12);
  box-shadow: var(--shadow);
  -webkit-overflow-scrolling: touch;
}

.poster-iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: white;
}

.poster-help {
  margin-top: 1rem;
  color: var(--muted);
  text-align: center;
}

.genetics-subtitle {
  color: var(--muted);
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.genetics-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2rem;
  align-items: start;
}

.genetics-left,
.genetics-right {
  display: grid;
  gap: 1.4rem;
}

.formula-panel {
  text-align: center;
}

.formula-stack {
  margin-top: 1rem;
  font-family: "Cinzel", serif;
  font-size: clamp(1.2rem, 2vw, 2rem);
  line-height: 1.45;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.formula-note {
  margin-top: 1rem;
  color: var(--muted);
}

.genetics-table-wrap {
  overflow-x: auto;
  margin-top: 1rem;
  border-radius: 12px;
}

.genetics-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
  font-size: 0.95rem;
}

.genetics-table th,
.genetics-table td {
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgba(58, 11, 11, 0.12);
}

.genetics-table th {
  color: var(--text);
  font-weight: 700;
  background: rgba(58, 11, 11, 0.06);
}

.genetics-table tr:last-child td {
  border-bottom: 0;
}

#research-poster-section,
#accuracy-chart-section,
#genetics-context,
#genetics-note-section {
  padding-top: 2rem;
  padding-bottom: 2rem;
}

/* Better spacing for big content blocks */
#genetics-context .panel,
#research-poster-section .chart-card-wrapper {
  box-sizing: border-box;
}

/* Responsive */
@media (max-width: 980px) {
  .genetics-grid {
    grid-template-columns: 1fr;
  }

  .poster-frame {
    height: 760px;
  }
}

@media (max-width: 768px) {
  .about-hero-combined {
    padding-top: 95px;
    padding-bottom: 2rem;
  }

  .about-top-grid {
    margin-top: 1.6rem;
  }

  .poster-frame {
    height: 620px;
  }

  .genetics-table {
    min-width: 640px;
  }
}

@media (max-width: 560px) {
  .poster-frame {
    height: 520px;
  }

  .formula-stack {
    font-size: 1.15rem;
  }
}