/* ==========================================================================
       DESIGN TOKENS & RESET
       ========================================================================== */
:root {
  /* Base Colors (Light Theme) */
  --bg: #FAFAFA;
  --surface: #FFFFFF;
  --surface-alt: #F3F4F6;
  --text: #111827;
  --text-muted: #6B7280;
  --border: #E5E7EB;

  /* Brand Accents (EndoPeak: Orange/Red/Black theme from PDF) */
  --a1: #E04E22;
  /* Vibrant Orange/Red */
  --a2: #1A1A1A;
  /* Deep Black/Grey */
  --a3: #FF8A00;
  /* Bright Orange */

  /* Modern Pastels for Depth */
  --p1: #FFF5F2;
  /* Soft Peach */
  --p2: #FFF8E7;
  /* Warm Vanilla */

  /* Gradients */
  --g1: radial-gradient(circle at top right, var(--p1) 0%, var(--bg) 60%);
  --ctaGrad: linear-gradient(135deg, var(--a1) 0%, var(--a3) 100%);

  /* Layout & Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-glow: 0 0 20px rgba(224, 78, 34, 0.4);
  --radius-md: 12px;
  --radius-lg: 24px;

  /* Typography */
  --font-display: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);

  /* RGB aliases (used for translucent surfaces) */
  --bg-rgb: 250, 250, 250;
}

/* Dark Theme */
[data-theme="dark"] {
  --bg: #0B0F19;
  --surface: #111827;
  --surface-alt: #1F2937;
  --text: #F9FAFB;
  --text-muted: #9CA3AF;
  --border: #374151;
  --p1: #2A1711;
  --p2: #1A1710;
  --g1: radial-gradient(circle at top right, rgba(224, 78, 34, 0.15) 0%, var(--bg) 60%);
  --shadow-glow: 0 0 30px rgba(224, 78, 34, 0.2);

  /* RGB aliases (used for translucent surfaces) */
  --bg-rgb: 11, 15, 25;
}

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

/* INVARIANT: NO OVERFLOW-X */
html,
body {
  overflow-x: hidden;
  overflow-x: clip;
  /* Modern fallback */
  width: 100%;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--text);
  background-color: var(--bg);
  background-image: var(--g1);
  line-height: 1.6;
  scroll-behavior: smooth;
}

/* Accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Typography */
h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  line-height: 1.2;
  font-weight: 800;
  color: var(--text);
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 1.5rem;
}

h3 {
  font-size: clamp(1.25rem, 2vw, 1.75rem);
}

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

.text-gradient {
  background: var(--ctaGrad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ==========================================================================
       LAYOUT INVARIANTS
       ========================================================================== */
.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 24px;
}

section {
  padding-top: clamp(60px, 8vh, 120px);
  padding-bottom: clamp(60px, 8vh, 120px);
  position: relative;
}

section>.container>h2,
section>.container>h3 {
  text-align: left;
}

@media (max-width: 900px) {

  section>.container>h2,
  section>.container>h3,
  section>.container>p {
    text-align: center;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2rem;
  border-radius: 50px;
  font-weight: 700;
  font-family: var(--font-display);
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
  border: none;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btn-primary {
  background: var(--ctaGrad);
  color: white;
  box-shadow: var(--shadow-glow);
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--a3) 0%, var(--a1) 100%);
  opacity: 0;
  z-index: -1;
  transition: var(--transition);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 25px rgba(224, 78, 34, 0.3);
}

.btn-primary:hover::before {
  opacity: 1;
}

/* ==========================================================================
       HEADER & NAVIGATION
       ========================================================================== */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(var(--bg-rgb), 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
}

.logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.8rem;
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Desktop Nav */
.desktop-nav {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.desktop-nav a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
}

.desktop-nav a:hover {
  color: var(--a1);
}

/* Controls */
.header-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.icon-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.icon-btn:hover {
  background: var(--surface-alt);
}

/* Lang Switcher Popover */
.lang-switcher {
  position: relative;
}

.lang-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 120px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: var(--transition);
  z-index: 60;
}

.lang-switcher.active .lang-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-btn {
  background: none;
  border: none;
  padding: 0.5rem 1rem;
  width: 100%;
  text-align: left;
  border-radius: 6px;
  cursor: pointer;
  color: var(--text);
  transition: var(--transition);
}

.lang-btn:hover {
  background: var(--surface-alt);
  color: var(--a1);
}

/* Hamburger (Mobile) */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 100;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: var(--transition);
}

/* Progress Bar */
.scroll-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  background: var(--ctaGrad);
  width: 0%;
  transition: width 0.1s;
}

/* Drawer (Mobile) INVARIANT */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  justify-content: flex-end;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s;
}

.drawer.open {
  opacity: 1;
  visibility: visible;
}

.drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.drawer-content {
  position: relative;
  width: 80%;
  max-width: 300px;
  height: 100%;
  background: var(--surface);
  box-shadow: -10px 0 20px rgba(0, 0, 0, 0.1);
  padding: 100px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.drawer.open .drawer-content {
  transform: translateX(0);
}

.drawer nav {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.drawer nav a {
  font-size: 1.25rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
}

.drawer nav a:hover {
  color: var(--a1);
}

@media (max-width: 900px) {

  .desktop-nav,
  .header-cta {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  header {
    text-align: center;
  }
}

/* ==========================================================================
       SECTIONS
       ========================================================================== */

/* Hero */
.hero {
  padding-top: 140px;
  min-height: 100svh;
  display: flex;
  align-items: center;
  position: relative;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 4rem;
  align-items: center;
}

.hero__content h1 {
  margin-bottom: 1.5rem;
}

.hero__content p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  max-width: 600px;
}

.hero__bullets {
  list-style: none;
  margin-bottom: 2.5rem;
}

.hero__bullets li {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 1rem;
  font-weight: 500;
  font-size: 1.1rem;
}

.hero__bullets svg {
  width: 24px;
  height: 24px;
  color: var(--a1);
  flex-shrink: 0;
}

.hero__visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero__image {
  width: 100%;
  max-width: 400px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.2));
  animation: float 6s ease-in-out infinite;
  border-radius: 20px;
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-20px);
  }

  100% {
    transform: translateY(0px);
  }
}

/* Floating elements */
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.5;
  z-index: -1;
}

.blob-1 {
  top: -10%;
  left: -10%;
  width: 40vw;
  height: 40vw;
  background: var(--p1);
}

.blob-2 {
  bottom: -20%;
  right: -10%;
  width: 50vw;
  height: 50vw;
  background: rgba(224, 78, 34, 0.1);
}

@media (max-width: 900px) {
  .hero__grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }

  .hero__content p {
    margin-inline: auto;
  }

  .hero__bullets li {
    justify-content: center;
  }

  .hero {
    padding-top: 100px;
  }
}

/* Experience (Sticky Reveal) */
.experience {
  background: var(--surface-alt);
}

.exp__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  position: relative;
}

.exp__sticky {
  position: sticky;
  top: 120px;
  height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.exp__media-box {
  width: 100%;
  height: 100%;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid var(--border);
  padding: 2rem;
}

.exp__media-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.exp__steps {
  display: flex;
  flex-direction: column;
  gap: 40vh;
  padding-top: 10vh;
  padding-bottom: 20vh;
}

.step-card {
  background: var(--surface);
  padding: 2.5rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: var(--transition);
  opacity: 0.4;
  transform: translateX(20px);
}

.step-card.active {
  opacity: 1;
  transform: translateX(0);
  box-shadow: var(--shadow-lg);
  border-color: var(--a1);
}

@media (max-width: 900px) {
  .exp__grid {
    grid-template-columns: 1fr;
  }

  .exp__sticky {
    position: relative;
    top: 0;
    height: 300px;
    margin-bottom: 2rem;
  }

  .exp__steps {
    gap: 2rem;
    padding: 0;
  }

  .step-card {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Benefits Grid */
.benefits__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.benefit-card {
  background: var(--surface);
  padding: 2rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-align: left;
}

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

.benefit-icon {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  background: var(--p1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--a1);
  margin-bottom: 1rem;
}

.benefit-icon svg {
  width: 32px;
  height: 32px;
}

/* Ingredients Grid */
.ingredients {
  background: var(--surface-alt);
}

.ingredients__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}

.ingredient-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: var(--transition);
}

.ingredient-card:hover {
  border-color: var(--a1);
}

.ing-img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--p2);
  overflow: hidden;
}

.ing-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  mix-blend-mode: multiply;
}

[data-theme="dark"] .ing-img img {
  mix-blend-mode: normal;
}

.ing-info h4 {
  font-size: 1.1rem;
  margin-bottom: 0.2rem;
}

.ing-info p {
  font-size: 0.9rem;
  margin: 0;
}

/* Testimonials Grid */
.testimonials {
  background: var(--surface);
}

.testimonials__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.testimonial-card {
  background: var(--surface-alt);
  padding: 2rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

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

.test-img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 0.5rem;
  border: 2px solid var(--a1);
}

.stars {
  color: #F59E0B;
  font-size: 1.2rem;
  letter-spacing: 2px;
}

.verified {
  font-size: 0.8rem;
  color: #10B981;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: auto;
}

/* Pricing Invariants */
.pricing {
  text-align: center;
  background: var(--surface-alt);
}

.pricing__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin-top: 4rem;
  align-items: stretch;
}

.plan-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: var(--transition);
  z-index: 1;
  text-align: left;
}

.plan-card.popular {
  border-color: var(--a1);
  border-width: 2px;
  transform: scale(1.05);
  box-shadow: var(--shadow-lg);
}

.plan-img {
  width: 100%;
  height: 200px;
  object-fit: contain;
  margin-bottom: 1.5rem;
  border-radius: 8px;
}

.badge {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--a1);
  color: white;
  padding: 5px 15px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.plan-card h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  text-align: center;
}

.plan-card>p {
  text-align: center;
}

.price-box {
  margin: 1.5rem 0;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 5px;
}

.price {
  font-size: 3.5rem;
  font-weight: 800;
  font-family: var(--font-display);
  color: var(--text);
  line-height: 1;
}

.price-sub {
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: 500;
}

.plan-features {
  list-style: none;
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.plan-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
}

.plan-features svg {
  color: #10B981;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* INVARIANT: CTA BOTTOM ALIGN */
.plan__cta {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.plan__cta .btn {
  width: 100%;
}

.plan__cta .note {
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  margin: 0;
}

.free-shipping {
  color: #10B981;
}

@media (max-width: 900px) {
  .plan-card.popular {
    transform: none;
  }

  .pricing__grid {
    gap: 3rem;
  }
}

/* Guarantee & Bonuses */
.guarantee {
  background: var(--a2);
  color: white;
  text-align: center;
}

.guarantee h2,
.guarantee p {
  color: white;
}

.guarantee-box {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.guarantee-icon svg {
  width: 100px;
  height: 100px;
  color: var(--a3);
}

.bonuses__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.bonus-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.bonus-img {
  width: 100%;
  height: 350px;
  background: var(--a2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.bonus-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bonus-content {
  padding: 2rem;
}

/* FAQ */
.faq {
  max-width: 800px;
  margin-inline: auto;
}

.accordion {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.acc-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  overflow: hidden;
}

.acc-header {
  width: 100%;
  text-align: left;
  padding: 1.5rem;
  background: none;
  border: none;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-display);
}

.acc-icon {
  width: 24px;
  height: 24px;
  transition: transform 0.3s;
}

.acc-header[aria-expanded="true"] .acc-icon {
  transform: rotate(180deg);
  color: var(--a1);
}

.acc-content {
  padding: 0 1.5rem;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out, padding 0.3s ease;
}

.acc-header[aria-expanded="true"]+.acc-content {
  padding-bottom: 1.5rem;
}

/* Footer */
footer {
  background: var(--surface-alt);
  padding: 4rem 0 2rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
}

.footer-links a:hover {
  color: var(--text);
}

.disclaimer {
  font-size: 0.85rem;
  color: var(--text-muted);
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.8;
}

/* Language Banner */
.lang-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  z-index: 100;
  box-shadow: 0 -4px 6px -1px rgb(0 0 0 / 0.1);
  transform: translateY(100%);
  transition: transform 0.5s;
}

.lang-banner.show {
  transform: translateY(0);
}

.lang-banner-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 5px;
}

/* Utility / Animations */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: 0.8s cubic-bezier(0.5, 0, 0, 1);
}

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

/* Floating Mobile CTA */
.floating-cta {
  display: none;
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 40;
  width: 90%;
  max-width: 400px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  border-radius: 50px;
}

@media (max-width: 900px) {
  .floating-cta {
    display: block;
  }
}