/* ============================================================
   Jeunesse Anion – shared foundations
   Tokens, reset, nav, buttons, marquee, footer, utilities.
   Built from docs/jeunesse-design-system.html. Variant-specific
   layout lives in each index-*.html <style> block.
   ============================================================ */

:root {
  /* Core brand */
  --magenta: #b2208b;
  --magenta-deep: #8d1670;
  --purple: #8053a2;
  --white: #ffffff;

  /* Magenta tints */
  --magenta-80: #c14da2;
  --magenta-60: #d079ba;
  --magenta-40: #e0a6d1;
  --magenta-20: #efd2e8;

  /* Purple tints */
  --purple-80: #9975b5;
  --purple-60: #b398c8;
  --purple-40: #ccbadc;
  --purple-20: #e6ddef;

  /* Neutrals – the canvas */
  --ink: #1a1320;
  --slate: #5b5260;
  --mist: #8a8290;
  --line: #ece8ef;
  --paper: #faf8fb;
  --cloud: #f3eff6;
  /* Warm tone that matches the product photography backdrop */
  --blush: #f8e8dc;
  --blush-deep: #f1d7c6;

  /* Type */
  --display: "Poetsen One", system-ui, sans-serif;
  --body: "Inter", system-ui, -apple-system, sans-serif;

  /* Spacing (8pt base, 1.5 rhythm) */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px;
  --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px; --s-10: 128px;
  --s-12: 192px;

  /* Radius */
  --r-sm: 8px; --r-md: 14px; --r-lg: 24px; --r-xl: 36px; --r-pill: 999px;

  /* Elevation – soft only (hygiene reads as light) */
  --shadow-sm: 0 2px 8px rgba(26,19,32,.05);
  --shadow-md: 0 12px 32px rgba(178,32,139,.08);
  --shadow-lg: 0 30px 70px rgba(112,49,120,.14);

  /* Motion */
  --dur: .3s;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  --maxw: 1280px;
  --maxw-narrow: 1120px;

  /* Section architecture — inline gutter, section vertical spacing scale,
     and the gaps used for grids and grouped text blocks. */
  --gutter: var(--s-5);                          /* section padding-inline */
  --section-space-s: clamp(48px, 7vw, 88px);
  --section-space-m: clamp(56px, 8vw, 112px);
  --section-space-l: clamp(64px, 9vw, 128px);
  --grid-gap: clamp(24px, 4vw, 64px);            /* between grid items */
  --content-gap: var(--s-6);                     /* between text blocks */
  --title-gap: var(--s-4);                       /* accent → heading (tight) */
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  text-wrap: pretty;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition: none !important; }
}

/* ---------- Layout helpers ---------- */
/* Layer 1 = the <section>/<header> (full-bleed, owns padding-inline gutter +
   padding-block spacing). Layer 2 = this inner container (max-width only, no
   padding) per the section-architecture model. */
.wrap, .container { max-width: var(--maxw); margin-inline: auto; }
.wrap-narrow { max-width: var(--maxw-narrow); margin-inline: auto; }
.measure { max-width: 60ch; }

/* Inline gutter lives on the section, not the container. */
main > section, main > header { padding-inline: var(--gutter); }

/* Grouped text: spacing via gap, not margins. */
.stack { display: flex; flex-direction: column; gap: var(--content-gap); }
.title-group { display: flex; flex-direction: column; gap: var(--title-gap); }
.stack > .cta, .title-group + .cta { margin-top: var(--s-2); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: var(--s-4); top: -100px; z-index: 200;
  background: var(--ink); color: #fff; padding: 10px 18px; border-radius: var(--r-pill);
  text-decoration: none; font-size: 14px; font-weight: 600;
  transition: top .2s ease;
}
.skip-link:focus { top: var(--s-4); }

.eyebrow {
  font-size: 12px; font-weight: 700; letter-spacing: .18em; line-height: 1;
  text-transform: uppercase; color: var(--magenta);
  display: inline-flex; align-items: center; gap: var(--s-3);
}
.eyebrow.with-rule::before {
  content: ""; width: 26px; height: 2px; background: var(--magenta); display: inline-block;
}
.eyebrow.on-dark { color: #fff; }
.eyebrow.on-dark.with-rule::before { background: rgba(255,255,255,.7); }

/* ---------- Navigation (identical across variants) ---------- */
.site-nav {
  position: sticky; top: 0; z-index: 100;
  padding-inline: var(--gutter);
  background: rgba(255,255,255,.82);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: var(--maxw); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  height: 82px;
}
.nav-logo { display: inline-flex; align-items: center; }
.nav-logo img { height: 54px; width: auto; }
.nav-links { display: flex; gap: var(--s-6); align-items: center; list-style: none; }
.nav-links a:not(.btn) {
  text-decoration: none; color: var(--slate); font-size: 15px; font-weight: 500;
  position: relative; padding: 6px 0; transition: color .2s ease;
}
.nav-links a:not(.btn):hover { color: var(--magenta); }
.nav-links a.active { color: var(--ink); }
.nav-links a.active::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 100%; height: 2px; background: var(--magenta); border-radius: 2px;
}
.nav-links a:not(.btn):focus-visible {
  outline: 3px solid var(--purple); outline-offset: 4px; border-radius: var(--r-sm);
}

.menu-toggle {
  display: none; background: none; border: none; cursor: pointer;
  width: 44px; height: 44px; position: relative;
}
.menu-toggle span {
  display: block; width: 24px; height: 2px; background: var(--ink);
  position: absolute; left: 10px; border-radius: 2px; transition: all .25s ease;
}
.menu-toggle span:nth-child(1) { top: 15px; }
.menu-toggle span:nth-child(2) { top: 21px; }
.menu-toggle span:nth-child(3) { top: 27px; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { top: 21px; transform: rotate(-45deg); }

@media (max-width: 860px) {
  .menu-toggle { display: block; }
  .nav-links {
    display: none; flex-direction: column; align-items: flex-start; position: absolute;
    top: 82px; left: 0; right: 0; background: var(--white);
    border-bottom: 1px solid var(--line); padding: var(--s-5);
    gap: var(--s-4); box-shadow: var(--shadow-md);
  }
  .nav-links.open { display: flex; }
  .nav-links .btn { width: 100%; justify-content: center; }
}

/* ---------- Buttons ---------- */
.btn {
  font-family: var(--body); font-weight: 600; font-size: 15px;
  border: none; cursor: pointer; border-radius: var(--r-pill);
  padding: 15px 30px; display: inline-flex; align-items: center; gap: var(--s-2);
  text-decoration: none; white-space: nowrap;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .2s ease, color .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible { outline: 3px solid var(--purple); outline-offset: 3px; }
.btn-primary { background: var(--magenta); color: #fff; box-shadow: var(--shadow-md); }
.btn-primary:hover { background: var(--magenta-deep); box-shadow: 0 16px 38px rgba(178,32,139,.22); }
.btn-secondary { background: transparent; color: var(--magenta); border: 1.5px solid var(--magenta); }
.btn-secondary:hover { background: var(--magenta); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); padding: 15px 12px; }
.btn-ghost:hover { color: var(--magenta); }
.btn-on-dark { background: #fff; color: var(--magenta); }
.btn-on-dark:hover { background: var(--magenta-20); }
.btn-outline-dark { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.55); }
.btn-outline-dark:hover { background: #fff; color: var(--magenta); border-color: #fff; }
.btn-sm { padding: 10px 20px; font-size: 13px; }
.btn .arrow { transition: transform .25s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

.text-link {
  font-size: 15px; font-weight: 600; color: var(--magenta);
  text-decoration: none; display: inline-flex; align-items: center; gap: 7px;
  border-bottom: 1.5px solid transparent; padding-bottom: 2px;
  transition: border-color .2s ease, gap .25s var(--ease);
}
.text-link:hover { border-color: var(--magenta-40); gap: 11px; }
.text-link:focus-visible { outline: 3px solid var(--purple); outline-offset: 4px; border-radius: 4px; }
.text-link .arrow { transition: transform .25s var(--ease); }
.text-link:hover .arrow { transform: translateX(3px); }

/* ---------- Marquee (shared accent motif) ---------- */
.marquee {
  overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: var(--paper); padding: var(--s-4) 0;
}
.marquee-track {
  display: inline-flex; gap: var(--s-6); white-space: nowrap; align-items: center;
  will-change: transform; animation: marquee 32s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-item {
  font-family: var(--display); font-size: clamp(20px, 3vw, 34px);
  color: var(--ink); display: inline-flex; align-items: center; gap: var(--s-6);
}
.marquee-item::after {
  content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--magenta);
  display: inline-block;
}
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; flex-wrap: wrap; white-space: normal; }
}

/* ---------- Retailer badges ---------- */
.retailers { display: flex; gap: var(--s-4); flex-wrap: wrap; }
.retailer {
  display: inline-flex; align-items: center; gap: var(--s-3);
  padding: 16px 28px; border: 1.5px solid var(--line); border-radius: var(--r-pill);
  background: var(--white); font-size: 15px; font-weight: 600; color: var(--ink);
  text-decoration: none; transition: border-color .2s ease, transform .25s var(--ease), box-shadow .25s var(--ease);
}
.retailer:hover { border-color: var(--magenta-40); transform: translateY(-3px); box-shadow: var(--shadow-md); }
.retailer:focus-visible { outline: 3px solid var(--purple); outline-offset: 3px; }
.retailer .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--magenta); }

/* ---------- Newsletter ---------- */
.newsletter-form { display: flex; gap: var(--s-3); max-width: 480px; flex-wrap: wrap; }
.newsletter-form input {
  flex: 1; min-width: 220px; font-family: var(--body); font-size: 15px;
  padding: 15px 22px; border: 1.5px solid var(--line);
  border-radius: var(--r-pill); background: var(--white); color: var(--ink);
  transition: border-color .2s ease;
}
.newsletter-form input::placeholder { color: var(--mist); }
.newsletter-form input:focus { outline: none; border-color: var(--magenta); }
.newsletter-note { font-size: 13px; color: var(--mist); margin-top: var(--s-3); }

/* ---------- Footer (identical across variants) ---------- */
.site-footer { background: linear-gradient(135deg, var(--magenta) 0%, var(--purple) 100%); color: rgba(255,255,255,.8); overflow: hidden; }
.footer-top {
  max-width: var(--maxw); margin: 0 auto; padding: var(--s-10) var(--s-5) var(--s-8);
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.3fr; gap: var(--s-7);
}
.footer-brand img { height: 66px; width: auto; margin-bottom: var(--s-5); }
.footer-desc { font-size: 14px; line-height: 1.7; max-width: 30ch; color: rgba(255,255,255,.62); }
.footer-heading {
  font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: #fff; margin-bottom: var(--s-5);
}
.footer-links { list-style: none; }
.footer-links li { margin-bottom: var(--s-3); }
.footer-links a {
  font-size: 14px; color: rgba(255,255,255,.7); text-decoration: none; transition: color .2s ease;
}
.footer-links a:hover { color: #fff; }
.footer-news p { font-size: 14px; line-height: 1.6; color: rgba(255,255,255,.72); margin-bottom: var(--s-4); }
.footer-news .newsletter-form input { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.28); color: #fff; }
.footer-news .newsletter-form input::placeholder { color: rgba(255,255,255,.6); }
.footer-news .newsletter-form .btn { background: #fff; color: var(--magenta); box-shadow: none; }
.footer-news .newsletter-form .btn:hover { background: var(--magenta-20); color: var(--magenta-deep); }
.footer-socials { display: flex; gap: var(--s-3); margin-top: var(--s-5); }
.footer-socials a {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255,255,255,.18);
  display: inline-flex; align-items: center; justify-content: center; color: #fff;
  transition: background .2s ease, border-color .2s ease, transform .25s var(--ease);
}
.footer-socials a:hover { background: #fff; color: var(--magenta); border-color: #fff; transform: translateY(-2px); }
.footer-socials svg { width: 18px; height: 18px; }

/* Oversized wordmark – the editorial "big footer" moment */
.footer-wordmark {
  text-align: center; line-height: .82; padding: 0 var(--s-4);
  font-family: var(--display); font-weight: 400;
  font-size: clamp(72px, 19vw, 320px);
  color: transparent;
  -webkit-text-stroke: 1px rgba(255,255,255,.16);
  letter-spacing: -.01em; user-select: none; margin-top: var(--s-4);
}
.footer-bottom {
  max-width: var(--maxw); margin: 0 auto; padding: var(--s-5);
  display: flex; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap;
  font-size: 13px; color: rgba(255,255,255,.5);
}
.footer-bottom a { color: rgba(255,255,255,.6); text-decoration: none; }
.footer-bottom a:hover { color: #fff; }
.footer-bottom .fda-note { max-width: 62ch; }

@media (max-width: 900px) {
  .footer-top { grid-template-columns: 1fr 1fr; gap: var(--s-7); }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .footer-top { grid-template-columns: 1fr; }
}

/* ---------- Scroll reveal (shared) ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal.d1 { transition-delay: .08s; }
.reveal.d2 { transition-delay: .16s; }
.reveal.d3 { transition-delay: .24s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Scroll to top ---------- */
.to-top {
  position: fixed; right: clamp(16px, 3vw, 32px); bottom: clamp(16px, 3vw, 32px); z-index: 90;
  width: 48px; height: 48px; border-radius: var(--r-pill);
  background: var(--magenta); color: #fff; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-md);
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity .3s var(--ease), transform .3s var(--ease), background .2s ease, visibility .3s;
}
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--magenta-deep); transform: translateY(-3px); }
.to-top:focus-visible { outline: 3px solid var(--purple); outline-offset: 3px; }
.to-top svg { width: 20px; height: 20px; }
