/* ==========================================================================
   Reset mínimo
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, h4, p, figure, ul { margin: 0; }
img, picture, video { display: block; max-width: 100%; height: auto; }
button, input, textarea, select { font: inherit; }
ul { padding: 0; list-style: none; }

/* ==========================================================================
   Design tokens — The Cyclic Woman (garnet / terracotta / gold / plum)
   ========================================================================== */
:root {
  --garnet: hsl(350 49% 33%);
  --garnet-soft: hsl(350 49% 33% / 0.1);
  --terracotta: hsl(24 52% 55%);
  --gold: hsl(42 40% 48%);
  --plum: hsl(280 12% 44%);
  --parchment: hsl(20 43% 96%);
  --paper-sunk: hsl(24 40% 92%);

  --color-bg: var(--parchment);
  --color-card: #ffffff;
  --color-text: hsl(355 24% 15%);
  --color-muted: hsl(20 12% 42%);
  --color-border: hsl(20 25% 87%);
  --color-primary: var(--garnet);

  --font-display: 'Cormorant Garamond', ui-serif, Georgia, serif;
  --font-body: 'Albert Sans', ui-sans-serif, system-ui, sans-serif;

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: clamp(3rem, 2rem + 4vw, 6rem);
  --space-xl: clamp(4rem, 3rem + 6vw, 9rem);

  --content-width: 72rem;
  --radius: 1rem;
  --logo-glow: hsl(350 49% 33% / 0.16);

  /* Fundo dinâmico por fase do ciclo (Menstrual→Follicular→Ovulation→Luteal),
     ver .flower-field e a interpolação de --phase-hue em animations.js.
     Só o hue é animado via scroll; saturação/luminosidade ficam claras o
     bastante para nunca comprometer o contraste do texto por cima. */
  --phase-hue: 350;
  --phase-sat: 42%;
  --phase-light: 95%;
  --phase-wash: hsl(var(--phase-hue) var(--phase-sat) var(--phase-light));
  --glass-bg: hsl(0 0% 100% / 0.55);
}

@media (prefers-color-scheme: dark) {
  :root {
    --garnet: hsl(350 55% 66%);
    --garnet-soft: hsl(350 55% 66% / 0.14);
    --terracotta: hsl(24 60% 66%);
    --gold: hsl(42 50% 62%);
    --plum: hsl(280 20% 66%);
    --parchment: hsl(350 20% 9%);
    --paper-sunk: hsl(350 16% 14%);
    --logo-glow: hsl(350 55% 66% / 0.22);
    --phase-sat: 28%;
    --phase-light: 13%;
    --glass-bg: hsl(350 20% 9% / 0.6);

    --color-bg: var(--parchment);
    --color-card: hsl(350 18% 13%);
    --color-text: hsl(20 30% 94%);
    --color-muted: hsl(20 14% 65%);
    --color-border: hsl(350 14% 22%);
  }
}

/* ==========================================================================
   Base
   ========================================================================== */
body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--phase-wash);
  transition: background 0.6s ease;
  line-height: 1.6;
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.0625rem);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Header, conteúdo e rodapé ficam acima do campo de flores fixo. */
.site-header, main, .site-footer {
  position: relative;
  z-index: 1;
}
body.has-intro-fx .site-header { opacity: 0; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  line-height: 1.1;
}
h1 { font-size: clamp(2.4rem, 1.9rem + 2.5vw, 4.5rem); }
h2 { font-size: clamp(1.7rem, 1.4rem + 1.5vw, 2.5rem); }
h3 { font-size: clamp(1.15rem, 1rem + 0.5vw, 1.35rem); }

p { max-width: 65ch; }

a { color: var(--color-primary); }

:focus-visible {
  outline: 3px solid var(--garnet);
  outline-offset: 2px;
}

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

/* ==========================================================================
   Acessibilidade — skip link
   ========================================================================== */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--garnet);
  color: #fff;
  padding: var(--space-xs) var(--space-sm);
  z-index: 100;
  border-radius: 0 0 0.5rem 0;
}
.skip-link:focus {
  left: 0;
  top: 0;
}

/* ==========================================================================
   Layout geral
   ========================================================================== */
.site-header, .site-footer, main > section {
  padding-inline: var(--space-md);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--content-width);
  margin-inline: auto;
  padding-block: var(--space-sm);
}

.logo {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
}

.nav-tag {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-muted);
}
@media (max-width: 640px) {
  .nav-tag { display: none; }
}

.brand-mark {
  display: flex;
  justify-content: center;
  padding-block: var(--space-sm) 0;
}
.brand-mark img {
  height: clamp(21rem, 15rem + 22vw, 32rem);
  width: auto;
  filter: drop-shadow(0 10px 50px var(--logo-glow));
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--garnet);
}
.eyebrow-line {
  width: 1.25rem;
  height: 1px;
  background: var(--garnet);
  display: inline-block;
}
.eyebrow-solo { margin-bottom: var(--space-sm); }

/* ==========================================================================
   Intro — a logo sozinha na tela, respirando, antes de rolar
   ========================================================================== */
.intro {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
}

/* Halo — clarão da cor do fundo entre a logo e o emaranhado de flores.
   Sem ele, com o campo denso, as flores encostam no anel da marca e roubam
   o contraste das palavras das fases (MENSTRUAL, FOLLICULAR…). z-index -1
   o mantém atrás da logo mas ainda à frente do canvas, que está fora deste
   contexto de empilhamento. */
.intro::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  translate: -50% -50%;
  width: min(155vw, 68rem);
  aspect-ratio: 1;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(circle, var(--phase-wash) 30%, transparent 66%);
}
.intro-logo {
  width: min(78vw, 30rem);
  height: auto;
  filter: drop-shadow(0 10px 60px var(--logo-glow));
  transform-origin: 50% 50%;
  will-change: transform, opacity;
}
@media (prefers-reduced-motion: no-preference) {
  .intro-logo {
    animation: intro-breathe 3.6s ease-in-out infinite;
  }
}
@keyframes intro-breathe {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 10px 60px var(--logo-glow)); }
  50%      { transform: scale(1.09); filter: drop-shadow(0 16px 80px var(--logo-glow)); }
}
.intro-cue {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--color-muted);
  opacity: 0;
  animation: intro-cue-in 0.8s ease-out 1.1s forwards;
}
.intro-cue svg {
  width: 1.1rem;
  height: 1.1rem;
  animation: intro-cue-bounce 1.6s ease-in-out infinite;
}
@keyframes intro-cue-in { to { opacity: 1; } }
@keyframes intro-cue-bounce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(6px); }
}
@media (prefers-reduced-motion: reduce) {
  .intro-cue { opacity: 1; animation: none; }
  .intro-cue svg { animation: none; }
}

/* ==========================================================================
   Campo de flores — cena WebGL (Three.js, ver initFlowerScene em
   animations.js): as flores são planos texturizados com sombra real,
   dispostos como uma moldura densa nas bordas, deixando o centro da tela
   livre pra logo. Fica sempre atrás do conteúdo e da logo (z-index 0 contra
   o 10 da .intro) — nunca há imagem sobreposta à marca.
   ========================================================================== */
.flower-scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  max-width: var(--content-width);
  margin-inline: auto;
  padding-block: var(--space-lg) var(--space-xl);
}
.hero-inner {
  max-width: 46rem;
}
.hero h1 {
  margin-top: var(--space-sm);
  text-wrap: balance;
}
.subheadline {
  margin-top: 1.75rem;
  font-size: 1.125rem;
  color: var(--color-muted);
  max-width: 38rem;
}

/* ==========================================================================
   Formulário de waitlist
   ========================================================================== */
.waitlist-form {
  margin-top: 2.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  max-width: 28rem;
}
.waitlist-form input[type="email"] {
  flex: 1 1 14rem;
  height: 3rem;
  border-radius: 999px;
  padding-inline: 1.25rem;
  border: 1px solid var(--color-border);
  background: var(--color-card);
  color: var(--color-text);
}
.waitlist-form button {
  height: 3rem;
  border-radius: 999px;
  padding-inline: 1.5rem;
  border: none;
  background: var(--garnet);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.15s ease;
}
.waitlist-form button:hover { opacity: 0.9; }
.waitlist-form button:disabled { opacity: 0.6; cursor: default; }

.form-note {
  margin-top: 0.75rem;
  font-size: 0.75rem;
  color: var(--color-muted);
}

.form-success {
  display: none;
  align-items: center;
  gap: 0.5rem;
  color: var(--garnet);
  font-weight: 600;
  margin-top: 2.25rem;
}
.form-success svg { width: 1.25rem; height: 1.25rem; }

.form-error {
  display: none;
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--terracotta);
}

/* ==========================================================================
   Manifesto
   ========================================================================== */
.manifesto {
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(1.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
}
.manifesto-inner {
  max-width: 46rem;
  margin-inline: auto;
  padding-block: var(--space-xl);
  text-align: center;
}
.manifesto-quote {
  font-size: clamp(1.4rem, 1.2rem + 1vw, 2rem);
  color: var(--garnet);
  text-wrap: balance;
}
.manifesto-sub {
  margin-top: 1.25rem;
  margin-inline: auto;
  font-size: 0.9rem;
  color: var(--color-muted);
}

/* ==========================================================================
   The Cyclic Method
   ========================================================================== */
.method {
  max-width: var(--content-width);
  margin-inline: auto;
  padding-block: var(--space-xl);
}
.method-intro {
  max-width: 34rem;
  margin-bottom: var(--space-lg);
}
.method-grid {
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
}
.method-card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: 1.5rem;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.method-icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 1rem;
  background: var(--garnet-soft);
  color: var(--garnet);
  display: flex;
  align-items: center;
  justify-content: center;
}
.method-icon svg { width: 1.25rem; height: 1.25rem; }
.method-card h3 { display: flex; flex-direction: column; gap: 0.15rem; }
.method-card p {
  font-size: 0.9rem;
  color: var(--color-muted);
}

/* ==========================================================================
   Success Pillars
   ========================================================================== */
.pillars {
  position: relative;
  overflow: hidden;
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(1.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
}
.pillars-inner {
  position: relative;
  max-width: var(--content-width);
  margin-inline: auto;
  padding-block: var(--space-xl);
  display: grid;
  gap: var(--space-md);
  align-items: center;
}
.pillars-content {
  display: grid;
  gap: var(--space-md);
}
.pillars-text p {
  margin-top: 1.25rem;
  color: var(--color-muted);
  max-width: 30rem;
}
.pillars-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}
.pillars-list li {
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  font-size: 0.9rem;
  font-weight: 500;
}

/* Colunas ornamentadas — moldura literal para os "Success Pillars" */
.pillars-column {
  display: none;
  pointer-events: none;
  user-select: none;
}
@media (min-width: 48rem) {
  .pillars-content { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 64rem) {
  .pillars-inner {
    --pillars-col-w: clamp(7rem, 4rem + 6vw, 10rem);
    padding-inline: calc(var(--pillars-col-w) + var(--space-md));
  }

  .pillars-column {
    display: block;
    position: absolute;
    top: 50%;
    width: var(--pillars-col-w);
    height: auto;
    opacity: 0.85;
    filter: drop-shadow(0 1.5rem 2rem hsl(20 30% 10% / 0.16));
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 12%, black 88%, transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0%, black 12%, black 88%, transparent 100%);
  }
  .pillars-column--left {
    left: 0.75rem;
    transform: translateY(-50%);
  }
  .pillars-column--right {
    right: 0.75rem;
    transform: translateY(-50%) scaleX(-1);
  }
}

/* ==========================================================================
   CTA final
   ========================================================================== */
.final-cta {
  max-width: 40rem;
  margin-inline: auto;
  padding-block: var(--space-xl);
  text-align: center;
}
.final-cta h2 { text-wrap: balance; }
.final-cta p {
  margin-top: 1rem;
  margin-inline: auto;
  color: var(--color-muted);
}
.waitlist-form-footer {
  margin-inline: auto;
  justify-content: center;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding-block: var(--space-md);
  max-width: var(--content-width);
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--color-muted);
}

