/* ===========================================================================
   Anomaly (ANM) — Advertorial LP
   Design tokens + custom component styles.
   Tailwind (CDN) handles utilities; this file holds tokens, @font-face bridge,
   and the pieces Tailwind utilities can't express cleanly.
   =========================================================================== */

:root {
  /* Brand colors (from Figma "NEW COLORS") */
  --anm-ink:   #231f20; /* dark hero / dark sections */
  --anm-black: #1d1d1d;
  --anm-cream: #f5f1eb;
  --anm-lilac: #ccc3ff; /* primary accent, badges, CTA */
  --anm-lilac-dark: #b3a8f5; /* CTA hover */
  --anm-white: #f1f1f1;
  --anm-line:  rgba(29, 29, 29, 0.12); /* dividers on cream */
  --anm-line-dark: rgba(241, 241, 241, 0.16); /* dividers on dark */

  /* Type families */
  --font-serif: "Besley", Georgia, "Times New Roman", serif;
  --font-sans:  "Lexend", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-mono-ui: "Söhne", "Lexend", system-ui, sans-serif;

  /* Layout */
  --container: 1200px;
  --radius-sm: 8px;
  --radius-md: 12px;
}

/* ---- Base ---------------------------------------------------------------- */
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  color: var(--anm-black);
  background: var(--anm-cream);
  letter-spacing: 0.02em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

/* Visible, on-brand focus ring for keyboard users */
:focus-visible {
  outline: 3px solid var(--anm-lilac);
  outline-offset: 3px;
  border-radius: 4px;
}

.font-serif { font-family: var(--font-serif); }
.font-sans  { font-family: var(--font-sans); }
.font-sohne { font-family: var(--font-mono-ui); }

/* Visually hidden SVG symbol sprite (icons referenced via <use>) */
.icon-sprite { position: absolute; }

/* Type-specific tracking overrides pulled from Figma (kept out of inline style) */
.tracking-wide-sohne { letter-spacing: 0.03em; }
.hero-heading-tracking { letter-spacing: 0.02em; }

/* ---- Skip link ----------------------------------------------------------- */
.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 1000;
  background: var(--anm-lilac);
  color: #000;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono-ui);
  font-size: 14px;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 12px; }

/* ---- Reveal animation base state ----------------------------------------
   JS adds .is-in to trigger. Without JS or with reduced-motion, content is
   fully visible (progressive enhancement — see .reveal reset below).        */
.reveal { opacity: 0; transform: translateY(24px); }
.reveal.is-in { opacity: 1; transform: none; transition: opacity .6s ease, transform .6s ease; }

/* If JS is off, never hide content */
.no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal.is-in { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* ---- Rating stars -------------------------------------------------------- */
.stars { display: inline-flex; gap: 2px; }
.stars svg { width: 1em; height: 1em; }

/* ---- Badge (lilac pill) -------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--anm-lilac);
  color: #000;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono-ui);
  font-size: 12px;
  line-height: 1.4;
  letter-spacing: 0.03em;
}
.badge svg { width: 12px; height: 12px; flex: none; }

/* ---- CTA button ---------------------------------------------------------- */
.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 12px 24px;
  background: var(--anm-lilac);
  color: #000;
  font-family: var(--font-mono-ui);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  transition: background-color .18s ease, transform .12s ease;
  cursor: pointer;
  text-decoration: none;
}
.cta:hover { background: var(--anm-lilac-dark); }
.cta:active { transform: scale(0.98); }

/* Dark CTA variant (pricing cards' "Start ... Protocol" buttons) — needs its
   own hover/active since Tailwind's !bg-[#323232] utility outranks .cta:hover
   in specificity and would otherwise silence the base hover state.          */
.cta--dark {
  background: #323232;
  color: #fff;
  transition: background-color .18s ease, transform .12s ease, box-shadow .18s ease;
}
.cta--dark:hover {
  background: #46433f;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
}
.cta--dark:active { transform: scale(0.97); }

/* ---- Numbered article section (1-4) ------------------------------------- */
.numbered__index {
  font-family: var(--font-serif);
  font-size: 24px;
  line-height: 1.2;
  color: var(--anm-black);
}

/* ---- Timeline (dot + connector) ----------------------------------------- */
.timeline-dot {
  width: 14px; height: 14px; border-radius: 999px;
  background: var(--anm-lilac); flex: none;
}
.timeline-line {
  width: 2px; flex: 1 1 auto; min-height: 24px;
  background: var(--anm-line-dark);
  margin: 4px auto 0;
}

/* ---- FAQ accordion ------------------------------------------------------- */
.accordion__item { border-bottom: 1px solid var(--anm-line); }
.accordion__trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 0;
  min-height: 44px;
  background: none;
  border: none;
  text-align: left;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 18px;
  color: var(--anm-black);
  cursor: pointer;
}
.accordion__icon {
  flex: none;
  width: 20px; height: 20px;
  transition: transform .25s ease;
}
.accordion__trigger[aria-expanded="true"] .accordion__icon { transform: rotate(180deg); }
.accordion__panel {
  overflow: hidden;
  max-height: 0;
  transition: max-height .3s ease;
}
.accordion__panel-inner {
  padding: 0 0 24px;
  font-size: 16px;
  line-height: 1.6;
  color: rgba(29, 29, 29, 0.78);
  max-width: 60ch;
}
@media (prefers-reduced-motion: reduce) {
  .accordion__panel, .accordion__icon { transition: none; }
}

/* ---- Stat card (70% ... / 95% ...) -------------------------------------- */
.stat-card {
  display: flex; align-items: center; gap: 12px;
  background: #F2F0FF;
  color: var(--anm-black);
  padding: 20px 24px;
  border-radius: var(--radius-sm);
}
.stat-card__num { font-family: var(--font-serif); font-size: 36px; line-height: 1.2; }
.stat-card--soft { background: #F2F0FF; }

/* ---- Utility: full-bleed inside a centered container --------------------- */
.full-bleed {
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
}

/* ---- Story block (section 2) --------------------------------------------
   bg-story.jpeg (cream fade → jars) covers the FULL-WIDTH wrapper, edge to
   edge of the viewport. The lilac text block sits on top within the
   centered content container.                                              */
.section-story-wrap {
  background-image: url("../assets/images/bg-story.jpeg");
  background-size: cover;
  background-position: right bottom;
  background-repeat: no-repeat;
}

/* Mobile: dedicated portrait crop (cream top for the text, jars faded in as
   a bottom band) — avoids stretching/cropping the wide desktop photo.      */
@media (max-width: 1023px) {
  .section-story-wrap {
    background-image: url("../assets/images/mobile-bg-story.png");
    background-position: center bottom;
    background-size: cover;
    padding-bottom: 220px;
  }
}

/* ---- Promo card (single image, desktop/mobile crop) ---------------------
   The image itself carries all the copy/pricing/CTA artwork; .promo-card__cta
   is an accessible, invisible link stretched over the "Shop the sale" button
   drawn in the image, positioned by percentage so it scales with the image.  */
.promo-card__img { border-radius: var(--radius-md); }

.promo-card__cta {
  position: absolute;
  /* Mobile crop (product-promo-mobile.png, 368x451): button measured at
     x 29.1-70.7%, y 66.3-73.4% — see assets/images note in README. */
  left: 29%;
  width: 42%;
  top: 66.3%;
  height: 7.1%;
  min-height: 44px;
}

@media (min-width: 1024px) {
  .promo-card__cta {
    /* Desktop crop (product-promo-desktop.png, 368x603): button measured at
       x 29.1-70.7%, y 73.8-79.1%. */
    top: 73.8%;
    height: 5.3%;
  }
}

/* ---- Guarantee banner ("Try it for 60 days") ----------------------------- */
.guarantee-banner {
  background-image: url("../assets/images/top-Card.png");
  background-size: cover;
  background-position: center bottom;
  height: 379px;
}
.guarantee-banner__scrim {
  background-image: linear-gradient(to bottom,
    #231f20 0%,
    #231f20 45%,
    rgba(35, 31, 32, 0.6) 65%,
    rgba(35, 31, 32, 0) 100%);
}
@media (min-width: 1024px) {
  .guarantee-banner {
    background-image: url("../assets/images/desktop-top-Card.png");
    background-position: right center;
    height: auto;
    min-height: 210px;
    justify-content: center;
  }
  .guarantee-banner__scrim {
    background-image: linear-gradient(86deg,
      #231f20 1%,
      #231f20 52%,
      rgba(35, 31, 32, 0.24) 69%,
      rgba(35, 31, 32, 0) 83%);
  }
}

/* ---- Pricing card -------------------------------------------------------- */
.plan-card {
  background: var(--anm-ink);
  border: 1px solid var(--anm-lilac);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease;
}
.plan-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(204, 195, 255, 0.18);
}
.plan-card--featured {
  box-shadow: 0 8px 32px rgba(204, 195, 255, 0.28);
}

@media (prefers-reduced-motion: reduce) {
  .plan-card, .plan-card:hover { transition: none; transform: none; }
}
.plan-badge {
  font-family: var(--font-mono-ui);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--anm-white);
}
.plan-badge--discount {
  font-weight: 500;
  font-size: 12px;
  color: var(--anm-ink);
  padding: 6px 8px;
}
.price-old {
  text-decoration: line-through;
  color: #acacac;
}

/* Blue CTA variant (pricing cards) */
.cta--lilac {
  background: #7eb8d8;
  color: #fff;
  transition: background-color .18s ease, transform .12s ease, box-shadow .18s ease;
}
.cta--lilac:hover {
  background: #6ba7c9;
  box-shadow: 0 4px 14px rgba(126, 184, 216, 0.4);
}
.cta--lilac:active { transform: scale(0.97); }

/* Horizontal scroll-snap for pricing on small screens */
@media (max-width: 1023px) {
  .plans-scroll {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
    scrollbar-width: thin;
  }
  .plans-scroll > * {
    scroll-snap-align: center;
    flex: 0 0 88%;
    max-width: 340px;
  }
}

/* ---- Pricing card v2 (horizontal, cream) --------------------------------- */
.plans-grid-v2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 1024px) {
  .plans-grid-v2 {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
}

.plan-card-v2 {
  background: #fbf8f4;
  border: 1px solid var(--anm-lilac);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 24px 12px;
  transition: transform .2s ease, box-shadow .2s ease;
}
.plan-card-v2:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(204, 195, 255, 0.18);
}
@media (min-width: 1024px) {
  .plan-card-v2 {
    flex-direction: row;
    justify-content: center;
    align-items: center;
  }
}
@media (prefers-reduced-motion: reduce) {
  .plan-card-v2, .plan-card-v2:hover { transition: none; transform: none; }
}

.plan-card-v2__media,
.plan-card-v2__buy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
}
@media (min-width: 1024px) {
  .plan-card-v2__media { width: 266px; }
  .plan-card-v2__buy { width: auto; min-width: 220px; }
}

.plan-badge-v2 {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--anm-white);
  background: #ab9ef7;
}
.plan-badge-v2--discount {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 12px;
  text-transform: uppercase;
  color: var(--anm-black);
  background: var(--anm-tan, #f2e5d5);
  padding: 6px 24px;
  border-radius: 999px;
}

.plan-card-v2__image {
  position: relative;
  width: 100%;
  max-width: 266px;
  aspect-ratio: 512 / 274;
  border-radius: var(--radius-md);
  overflow: hidden;
}
.plan-card-v2__image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.price-old-v2 {
  text-decoration: line-through;
  color: #acacac;
}

/* Magenta CTA variant (pricing v2) — redeclares :hover/:active because
   Tailwind arbitrary-value utilities outrank .cta:hover in specificity. */
.cta--magenta {
  background: #9f1b59;
  color: #fff;
  border-radius: var(--radius-md);
  white-space: nowrap;
  transition: background-color .18s ease, transform .12s ease, box-shadow .18s ease;
}
.cta--magenta:hover {
  background: #8a1750;
  box-shadow: 0 4px 14px rgba(159, 27, 89, 0.32);
}
.cta--magenta:active { transform: scale(0.97); }

.gifts-box {
  border: 0.4px solid #ab9ef7;
  border-radius: var(--radius-md);
  padding: 6px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 290px;
}
.gifts-box__pill {
  background: var(--anm-tan, #f2e5d5);
  border-radius: 999px;
  padding: 2px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
}
.gifts-box__items {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
}
.gift-chip {
  display: flex;
  align-items: center;
  gap: 8px;
}
.gift-chip__icon {
  width: 32px;
  height: 32px;
  border: 0.4px solid #ab9ef7;
  border-radius: 999px;
  background: #fff;
  object-fit: contain;
  flex-shrink: 0;
}
.gift-chip__label {
  font-family: var(--font-mono-ui);
  font-weight: 600;
  font-size: 10px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--anm-black);
}
