/* ==========================================================================
   Denver · base.css
   Tokens, reset, tipografia, utilitários, vidro, botões, revelações.
   ========================================================================== */

/* ---------- Fontes self-hosted ---------- */
@font-face {
  font-family: "Cormorant Garamond";
  src: url("../fonts/CormorantGaramond-var.woff2") format("woff2-variations"),
       url("../fonts/CormorantGaramond-var.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("../fonts/CormorantGaramond-var-italic.woff2") format("woff2");
  font-weight: 300 700;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Jost";
  src: url("../fonts/Jost-var.woff2") format("woff2-variations"),
       url("../fonts/Jost-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  /* superfície */
  --paper: #F7F2EA;
  --paper-2: #F0E7D6;
  --paper-3: #E8DCC4;

  /* tinta */
  --ink: #1C1917;
  --ink-80: #3B3531;
  --ink-55: #6B625B;
  --ink-35: #948A82;

  /* dourado */
  --gold: #C9A24C;
  --gold-deep: #A8842F;
  --gold-text: #7D6120;

  /* linhas */
  --line: rgba(28, 25, 23, .10);
  --line-soft: rgba(28, 25, 23, .06);
  --line-light: rgba(255, 255, 255, .55);
  --line-dark: rgba(247, 242, 234, .14);

  --grad-gold: linear-gradient(135deg, #E2C374 0%, #C9A24C 45%, #A8842F 100%);

  /* sombras tingidas de dourado, nunca cinza puro */
  --shadow-card: 0 1px 2px rgba(168, 132, 47, .08), 0 8px 24px rgba(168, 132, 47, .10), 0 24px 64px rgba(28, 25, 23, .08);
  --shadow-card-hover: 0 2px 4px rgba(168, 132, 47, .12), 0 14px 34px rgba(168, 132, 47, .14), 0 34px 84px rgba(28, 25, 23, .10);
  --shadow-soft: 0 1px 2px rgba(168, 132, 47, .07), 0 10px 30px rgba(28, 25, 23, .06);
  --shadow-btn: 0 1px 2px rgba(28, 25, 23, .14), 0 8px 20px rgba(28, 25, 23, .16);
  --shadow-gold: 0 1px 2px rgba(168, 132, 47, .20), 0 10px 26px rgba(168, 132, 47, .26);

  /* tipografia fluida */
  --fs-display: clamp(2.6rem, 7vw, 6rem);
  --fs-h2: clamp(1.9rem, 4.2vw, 3.5rem);
  --fs-h3: clamp(1.25rem, 2vw, 1.6rem);
  --fs-lead: clamp(1.05rem, 1.5vw, 1.3rem);
  --fs-body: clamp(1rem, 1.1vw, 1.0625rem);
  --fs-small: .875rem;
  --fs-fine: .8rem;

  --font-display: "Cormorant Garamond", "Times New Roman", Georgia, serif;
  --font-ui: "Jost", "Trebuchet MS", "Avenir Next", sans-serif;

  /* forma */
  --r-sm: 14px;
  --r-md: 22px;
  --r-lg: 30px;
  --r-pill: 999px;

  /* movimento */
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --d1: 240ms;
  --d2: 480ms;
  --d3: 900ms;

  /* ritmo */
  --section-y: clamp(4.5rem, 10vw, 9rem);
  --maxw: 1200px;
  --gutter: clamp(1.25rem, 5vw, 2.5rem);
  --nav-h: 76px;

  /* cores de rótulo por SKU */
  --c-d3-k2: #25247b;
  --c-nac: #4ea392;
  --c-magnesio-bisglicinato: #0095da;
  --c-colageno-tipo-2: #81806f;
  --c-cabelo-pele-unhas: #7670b3;
  --c-coenzima-q10: #a94022;
  --c-5-magnesios: #006d3a;
  --c-6-magnesios: #003951;
  --c-hmb: #403f41;
  --c-magnesio-inositol: #3d386f;

  /* grão SVG inline */
  --grain-url: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200' viewBox='0 0 200 200'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23g)'/%3E%3C/svg%3E");
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
  /* a goteira fica reservada sempre: quando o painel da vitrine trava a
     rolagem, a barra some sem empurrar o layout um pixel */
  scrollbar-gutter: stable;
}
/* trava de rolagem enquanto o painel lateral está aberto */
html.is-locked, html.is-locked body { overflow: hidden; }
/* overflow-x: hidden transformava o body em contêiner de rolagem e matava o
   position: sticky da coluna do FAQ. clip corta igual sem criar o contêiner;
   a declaração hidden fica antes como fallback de navegador antigo. */
html, body { max-width: 100%; overflow-x: hidden; overflow-x: clip; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-80);
  font-family: var(--font-ui);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: 1.55;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, p, figure, blockquote, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, picture, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; }
table { border-collapse: collapse; }
:focus-visible {
  outline: 2px solid var(--gold-deep);
  outline-offset: 3px;
  border-radius: 4px;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -.02em;
  /* 1.02 não cabia no acento da Cormorant (acute a .731em, descendente a
     -.281em): 1.08 dá folga real entre o acento da segunda linha e o
     descendente da primeira, sem soltar as headlines de uma linha só. */
  line-height: 1.08;
  color: var(--ink);
  /* o algarismo é parte do nome impresso no rótulo (D3, K2, Q10, 5, 6):
     oldstyle rebaixaria o número e viraria fórmula química */
  font-variant-numeric: lining-nums;
  font-feature-settings: "lnum" 1;
}
h1 { font-size: var(--fs-display); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); line-height: 1.1; }
strong, b { font-weight: 600; }
em { font-style: italic; }

::selection { background: rgba(201, 162, 76, .28); color: var(--ink); }

/* ---------- Layout ---------- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-block: var(--section-y); position: relative; }
.section--tight { padding-block: calc(var(--section-y) * .62); }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link {
  position: absolute;
  top: -100px; left: var(--gutter);
  z-index: 200;
  background: var(--ink); color: var(--paper);
  padding: .75rem 1.15rem;
  border-radius: var(--r-pill);
  font-size: var(--fs-small);
}
.skip-link:focus { top: 12px; }

/* ---------- Tipografia utilitária ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: .75rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold-text);
  margin: 0 0 1.1rem;
}
.eyebrow::before {
  content: "";
  width: 1.75rem;
  height: 1px;
  background: var(--gold-deep);
  flex: none;
}
.eyebrow--light { color: #E2C374; }
.eyebrow--light::before { background: #C9A24C; }

.lead {
  font-size: var(--fs-lead);
  line-height: 1.5;
  color: var(--ink-55);
  max-width: 54ch;
}
.lead--light { color: rgba(247, 242, 234, .72); }

.h-italic-gold {
  font-style: italic;
  font-weight: 500;
  background: var(--grad-gold);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-right: .08em;
}

.fine {
  font-size: var(--fs-fine);
  line-height: 1.5;
  color: var(--ink-55);
}
.small { font-size: var(--fs-small); color: var(--ink-55); }

.hairline {
  border: 0;
  height: 1px;
  background: var(--line);
}

/* ---------- Vidro ---------- */
.glass {
  background: rgba(255, 255, 255, .55);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .55), var(--shadow-soft);
}
.glass--dark {
  background: rgba(247, 242, 234, .07);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
  box-shadow: inset 0 0 0 1px rgba(247, 242, 234, .14);
  color: var(--paper);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass { background: rgba(255, 255, 255, .90); }
  .glass--dark { background: #2A2623; }
}

/* ---------- Grão ---------- */
.grain { position: relative; isolation: isolate; }
.grain::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--grain-url);
  background-size: 200px 200px;
  opacity: .05;
  pointer-events: none;
  z-index: 0;
}

/* ---------- Botões ---------- */
.btn {
  --btn-h: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  min-height: var(--btn-h);
  padding: 0 1.5rem;
  border-radius: var(--r-pill);
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: .9375rem;
  letter-spacing: .01em;
  line-height: 1;
  cursor: pointer;
  text-align: center;
  transition: transform var(--d1) var(--ease-out),
              box-shadow var(--d1) var(--ease-out),
              background-color var(--d1) var(--ease-out),
              color var(--d1) var(--ease-out);
}
.btn:hover, .btn:active { will-change: transform; }
.btn svg { flex: none; width: 17px; height: 17px; }
.btn:active { transform: scale(.98); }

.btn--primary {
  background: var(--ink);
  color: var(--paper);
  box-shadow: var(--shadow-btn);
}
.btn--primary:hover { background: #2A2623; box-shadow: 0 2px 4px rgba(28,25,23,.16), 0 14px 30px rgba(28,25,23,.22); }

.btn--gold {
  background-image: var(--grad-gold);
  color: var(--ink);
  font-weight: 600;
  box-shadow: var(--shadow-gold);
}
.btn--gold:hover { box-shadow: 0 2px 5px rgba(168,132,47,.26), 0 16px 34px rgba(168,132,47,.34); }

.btn--glass {
  background: rgba(255, 255, 255, .55);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .6), var(--shadow-soft);
  color: var(--ink);
}
.btn--glass:hover { background: rgba(255, 255, 255, .74); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .btn--glass { background: rgba(255, 255, 255, .90); }
}
.btn--glass-dark {
  background: rgba(247, 242, 234, .08);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
  box-shadow: inset 0 0 0 1px rgba(247, 242, 234, .22);
  color: var(--paper);
}
.btn--glass-dark:hover { background: rgba(247, 242, 234, .14); }

.btn--ghost {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line);
}
.btn--ghost:hover { box-shadow: inset 0 0 0 1px rgba(168, 132, 47, .45); background: rgba(255, 255, 255, .45); }

.btn--sm { --btn-h: 44px; padding: 0 1.1rem; font-size: .875rem; }
.btn--block { width: 100%; }

/* ---------- Chips ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  min-height: 40px;
  padding: .4rem 1rem;
  border-radius: var(--r-pill);
  font-size: .875rem;
  font-weight: 500;
  color: var(--ink-80);
  background: rgba(255, 255, 255, .55);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .6), 0 1px 2px rgba(168, 132, 47, .08);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .chip { background: rgba(255, 255, 255, .90); }
}
.chip__dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--dot, var(--gold));
  flex: none;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .5);
}
.chip--plain {
  background: var(--paper-2);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: inset 0 0 0 1px var(--line-soft);
  color: var(--ink-55);
  font-size: .8125rem;
  min-height: 32px;
  padding: .25rem .8rem;
}

/* ---------- Revelações ----------
   Só escondem quando o JS assumiu (html.js). Sem JS, ou se o motion.js
   não carregar, a página inteira continua visível. */
.js [data-reveal] {
  opacity: 0;
  transform: translate3d(0, 24px, 0);
}
.js [data-reveal-stagger] > * {
  opacity: 0;
  transform: translate3d(0, 24px, 0);
}
[data-reveal],
[data-reveal-stagger] > * {
  transition: opacity var(--d2) var(--ease-out), transform var(--d2) var(--ease-out);
}
[data-reveal].is-in { opacity: 1; transform: none; }
[data-reveal-stagger].is-in > * { opacity: 1; transform: none; }
[data-reveal-stagger].is-in > *:nth-child(1) { transition-delay: 0ms; }
[data-reveal-stagger].is-in > *:nth-child(2) { transition-delay: 60ms; }
[data-reveal-stagger].is-in > *:nth-child(3) { transition-delay: 120ms; }
[data-reveal-stagger].is-in > *:nth-child(4) { transition-delay: 180ms; }
[data-reveal-stagger].is-in > *:nth-child(5) { transition-delay: 240ms; }
[data-reveal-stagger].is-in > *:nth-child(6) { transition-delay: 300ms; }
[data-reveal-stagger].is-in > *:nth-child(n + 7) { transition-delay: 360ms; }

/* Entrada do hero em CSS puro: nenhum JS no caminho de pintura.
   O primeiro quadro já traz o texto e os frascos, sem esperar biblioteca. */
@keyframes heroIn {
  from { opacity: 0; transform: translate3d(0, 20px, 0); }
  to   { opacity: 1; transform: none; }
}
/* O frasco do meio é o candidato a LCP. Ele sobe e só isso: nem opacidade,
   nem clip-path. Opacidade zero o tiraria da lista de candidatos até o fim
   da animação, e o clip-path cortava a área contada pela métrica (e junto a
   sombra projetada), jogando o LCP para um dos frascos laterais. Com só
   transform, ele já nasce inteiro no primeiro quadro em que a imagem pinta. */
@keyframes frascoEmerge {
  from { transform: translate3d(0, 30px, 0); }
  to   { transform: none; }
}
/* Os quatro frascos laterais sobem e aparecem, escalonados a partir do meio */
@keyframes frascoSobe {
  from { opacity: 0; transform: translate3d(0, 26px, 0); }
  to   { opacity: 1; transform: none; }
}
[data-hero] { animation: heroIn var(--d3) var(--ease-out) var(--hero-delay, 0ms) both; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  [data-reveal],
  [data-reveal-stagger] > *,
  [data-hero] { opacity: 1 !important; transform: none !important; }
  [data-hero] { animation: none !important; }
  .family__anim { animation: none !important; clip-path: none !important; opacity: 1 !important; transform: none !important; }
}


/* ============================================================
   LIQUID GLASS · V4 (kit da casa)
   .glass          vidro claro sobre o bege, 4 camadas: tint, blur, hairline, brilho
   .glass--dark    sobre a seção escura
   .glass--lens    refração real com feDisplacementMap (#dv-lens), no máximo 3 na página, fora da dobra
   .glass-sheen    brilho líquido que atravessa no hover (só transform e opacity)
   Regra: nunca vidro sobre vidro. Fallback opaco em @supports not.
   ============================================================ */
.glass {
  --g-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .62),
    inset 1.5px 2.5px 0 -1.5px rgba(255, 255, 255, .95),
    inset -1.5px -2px 0 -1.5px rgba(255, 255, 255, .65),
    inset -2px -7px 1px -6px rgba(255, 255, 255, .5),
    inset 0 1px 4px -1px rgba(168, 132, 47, .10),
    0 1px 2px rgba(168, 132, 47, .06),
    0 10px 28px -10px rgba(168, 132, 47, .16),
    0 26px 60px -26px rgba(28, 25, 23, .14);
  background: linear-gradient(150deg, rgba(255, 255, 255, .66), rgba(255, 255, 255, .38));
  box-shadow: var(--g-shadow);
  -webkit-backdrop-filter: blur(20px) saturate(170%) brightness(1.03);
  backdrop-filter: blur(20px) saturate(170%) brightness(1.03);
  isolation: isolate;
}
.glass--dark {
  background: linear-gradient(150deg, rgba(247, 242, 234, .11), rgba(247, 242, 234, .05));
  box-shadow:
    inset 0 0 0 1px rgba(247, 242, 234, .16),
    inset 1.5px 2px 0 -1.5px rgba(247, 242, 234, .38),
    inset -2px -7px 1px -6px rgba(247, 242, 234, .18),
    0 18px 40px -18px rgba(0, 0, 0, .5);
}
/* A refração vive numa camada própria, maior que o cartão e recortada por
   ele: o filtro deslocava também a borda e o fio de luz do próprio cartão, e
   no canto arredondado sobrava um segundo contorno deslocado (o "bugzinho"). */
.glass--lens { position: relative; overflow: hidden; background: transparent; }
.glass--lens::before {
  content: "";
  position: absolute;
  inset: -32px;
  z-index: -1;
  background: linear-gradient(150deg, rgba(255, 255, 255, .60), rgba(255, 255, 255, .32));
  filter: url(#dv-lens);
  pointer-events: none;
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass--lens::before { background: rgba(255, 253, 250, .94); filter: none; }
}
.glass .glass { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(255,255,255,.08); box-shadow: none; }
.glass-sheen { position: relative; overflow: hidden; }
.glass-sheen::after {
  content: "";
  position: absolute;
  inset: -40% -60%;
  background: linear-gradient(115deg, rgba(255,255,255,0) 38%, rgba(255,255,255,.55) 50%, rgba(255,255,255,0) 62%);
  transform: translate3d(-70%, 0, 0);
  opacity: 0;
  pointer-events: none;
  transition: transform .9s var(--ease-out), opacity .35s var(--ease-out);
}
.glass-sheen:hover::after, .glass-sheen:focus-visible::after { transform: translate3d(70%, 0, 0); opacity: 1; }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass { background: rgba(255, 253, 250, .94); }
  .glass--dark { background: #2A2623; }
}
@media (prefers-reduced-motion: reduce) {
  .glass-sheen::after { transition: none; }
}
