/* ==========================================================================
   GALLETICAS MARÍA — "El tamaño de un recuerdo"
   Brand kit vivo · Chaguaramal, Estado Miranda
   ========================================================================== */

/* ---------- Tokens de marca ---------- */
:root {
  --cacao: #3B2314;        /* Cacao Finca J.I.R. — texto y base */
  --cacao-deep: #2A1810;   /* sombra del cacao, secciones oscuras */
  --masa: #D9A25F;         /* Masa Horneada — acentos */
  --masa-soft: #E8C795;    /* masa clara para detalles sobre oscuro */
  --crema: #F9F6F0;        /* Papel de Historia — fondo */
  --crema-warm: #F3ECDF;   /* crema tostada para tarjetas */
  --hoja: #2C402E;         /* Hoja de Chaguaramal — origen y sellos */
  --noche: #1B120C;        /* la noche del 24J — sección La causa */
  --penumbra: #45291A;     /* la vigilia de María, entre anochecer y noche */
  --masa-ink: #8A5A24;     /* masa oscurecida: texto/kickers sobre fondos claros (AA) */

  /* Sistema de profundidad único: sombras pigmentadas con --noche, nunca negro */
  --elev-media: 0 24px 60px -28px color-mix(in srgb, var(--noche) 45%, transparent);
  --elev-alta:  0 36px 80px -30px color-mix(in srgb, var(--noche) 60%, transparent);

  /* Regla de tintas: sobre claros → texto --cacao, acentos --hoja/--masa-ink
     (--masa solo decorativo); sobre penumbra/oscuros → texto --crema,
     acento único --masa-soft; --hoja NUNCA como texto sobre oscuros. */

  --serif: "Fraunces", "Bookman Old Style", Georgia, serif;
  --sans: "Plus Jakarta Sans", "Helvetica Neue", sans-serif;
  --script: "Caveat", cursive;

  --measure: 34rem;
  --pad-x: clamp(1.25rem, 5vw, 4rem);
  --ease-out: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- Reset breve ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html:not(.lenis) { scroll-behavior: smooth; }

/* Lenis (smooth scroll) */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }
img { display: block; max-width: 100%; height: auto; }
ul[role="list"], ol[role="list"] { list-style: none; }

body {
  font-family: var(--sans);
  font-weight: 400;
  font-size: clamp(1rem, .95rem + .3vw, 1.125rem);
  line-height: 1.7;
  color: var(--cacao);
  background-color: var(--crema);
  overflow-x: hidden;
}

/* Grano de papel sutil sobre toda la página */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection { background: var(--masa); color: var(--cacao-deep); }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 20;
  background: var(--cacao);
  color: var(--crema);
  padding: .6rem 1.2rem;
  border-radius: 0 0 .5rem 0;
}
.skip-link:focus { left: 0; }

/* Anillo de foco: --hoja (9.5:1 sobre crema) en fondos claros;
   --masa (7.5:1 sobre --noche/--cacao-deep) en secciones oscuras.
   WCAG 1.4.11 exige ≥3:1 contra el fondo adyacente. */
a:focus-visible, .sello:focus-visible {
  outline: 2px solid var(--hoja);
  outline-offset: 4px;
}
.secreto a:focus-visible, .causa a:focus-visible, .cierre a:focus-visible,
.secreto .sello:focus-visible, .causa .sello:focus-visible {
  outline-color: var(--masa);
}

strong { font-weight: 600; }

/* ==========================================================================
   Cabecera
   ========================================================================== */
.site-head {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 1.6rem var(--pad-x);
}

.wordmark {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: .01em;
}
.wordmark em {
  font-style: italic;
  font-weight: 600;
  color: var(--hoja);
}

.head-origin {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--hoja);
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(6rem, 12vh, 8rem) var(--pad-x) 5rem;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: center;
  max-width: 72rem;
  margin-inline: auto;
  width: 100%;
}

.eyebrow {
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--hoja);
  margin-bottom: 1.4rem;
  display: flex;
  align-items: center;
  gap: .8rem;
}
.eyebrow::before {
  content: "";
  width: 2.2rem;
  height: 1px;
  background: var(--masa);
}

.hero h1 {
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-size: clamp(2.9rem, 8.5vw, 5.6rem);
  font-weight: 380;
  line-height: 1.02;
  letter-spacing: -.015em;
  margin-bottom: 1.6rem;
}

.accent-it {
  font-style: italic;
  font-weight: 500;
  color: var(--hoja);
}

.hero-lead {
  max-width: 30rem;
  font-weight: 400;
  color: color-mix(in srgb, var(--cacao) 84%, transparent);
  margin-bottom: 1.8rem;
}

.tagline {
  font-family: var(--script);
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  font-weight: 600;
  color: var(--hoja);
  transform: rotate(-2deg);
  transform-origin: left center;
  width: fit-content;
}

/* --- Figura del hero --- */
.hero-figure {
  position: relative;
  margin-inline: auto;
  width: min(100%, 24rem);
}

.blob-frame {
  border-radius: 58% 42% 55% 45% / 52% 48% 55% 45%;
  overflow: hidden;
  background: var(--crema-warm);
  box-shadow: var(--elev-media);
}
.blob-frame img { width: 100%; height: 100%; object-fit: cover; }

/* variaciones orgánicas para que ninguna imagen tenga el mismo contorno */
.blob-b { border-radius: 45% 55% 48% 52% / 55% 45% 58% 42%; }
.blob-c { border-radius: 52% 48% 58% 42% / 45% 55% 45% 55%; }
.blob-d { border-radius: 50% 50% 45% 55% / 58% 48% 52% 42%; }

/* ---------- Sellos circulares ---------- */
.sello {
  width: clamp(7rem, 12vw, 9.5rem);
  aspect-ratio: 1;
  color: var(--hoja);
}
.sello svg { width: 100%; height: 100%; overflow: visible; }

.sello-float {
  position: absolute;
  right: -2.2rem;
  bottom: -1.4rem;
  filter: drop-shadow(0 8px 18px rgba(42, 24, 16, .25));
}

.ring-text {
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .25em;
  fill: currentColor;
}
.ring-spin {
  transform-origin: 100px 100px;
  animation: spin 60s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.sello-num {
  font-family: var(--serif);
  font-style: italic;
  font-size: 34px;
  font-weight: 500;
  fill: currentColor;
  text-anchor: middle;
}

.sello-30 { color: var(--cacao); }
.sello-finca { color: var(--masa-soft); }
.secreto .sello-float { right: auto; left: -2rem; bottom: -1.8rem; }

/* ---------- Chispas flotantes ---------- */
.chip {
  position: absolute;
  width: .85rem;
  height: .85rem;
  border-radius: 38% 62% 55% 45% / 55% 40% 60% 45%;
  background: var(--cacao);
  opacity: .55;
  animation: float 7s ease-in-out infinite alternate;
}
.chip-a { top: -1.6rem; left: 12%; }
.chip-b { top: 22%; left: -2rem; width: .6rem; height: .6rem; animation-duration: 9s; animation-delay: -3s; }
.chip-c { bottom: 14%; right: -2.6rem; width: .7rem; height: .7rem; animation-duration: 8s; animation-delay: -5s; }

@keyframes float {
  from { transform: translateY(-7px) rotate(-8deg); }
  to   { transform: translateY(7px) rotate(14deg); }
}

/* ---------- Indicador de scroll ---------- */
.scroll-cue {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
  color: var(--cacao);
}
.cue-word {
  font-family: var(--script);
  font-size: 1.25rem;
  font-weight: 600;
}
.cue-line {
  width: 1px;
  height: 3rem;
  background: linear-gradient(var(--cacao), transparent);
  animation: cue 2.4s var(--ease-out) infinite;
  transform-origin: top;
}
@keyframes cue {
  0% { transform: scaleY(0); }
  45% { transform: scaleY(1); }
  100% { transform: scaleY(1); opacity: 0; }
}

/* ==========================================================================
   Secciones — base
   ========================================================================== */
.section { padding: clamp(4.5rem, 11vw, 8.5rem) var(--pad-x); }

.section-grid {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: clamp(2.5rem, 7vw, 6.5rem);
  align-items: center;
  max-width: 68rem;
  margin-inline: auto;
}
.grid-flip { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); }

.media { position: relative; }
.media .blob-frame { max-width: 26rem; margin-inline: auto; }

.media-note {
  font-family: var(--script);
  font-size: 1.2rem;
  color: var(--hoja);
  text-align: center;
  margin-top: 1.1rem;
  transform: rotate(-1.5deg);
}

.kicker {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--masa-ink);
  margin-bottom: 1.1rem;
  display: flex;
  align-items: center;
  gap: .8rem;
}
.kicker::before {
  content: "";
  width: 2.2rem;
  height: 1px;
  background: var(--masa);
}
.kicker-hoja { color: var(--masa-soft); }
.kicker-hoja::before { background: currentColor; opacity: .7; }

.section h2, .marca h2 {
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-size: clamp(2rem, 4.6vw, 3.2rem);
  font-weight: 420;
  line-height: 1.1;
  letter-spacing: -.01em;
  margin-bottom: 1.5rem;
}

.copy p { max-width: var(--measure); }
.copy p + p { margin-top: 1.1rem; }

.dropcap::first-letter {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 3.4em;
  float: left;
  line-height: .82;
  padding: .06em .12em 0 0;
  color: var(--hoja);
}

.firma-mini {
  font-family: var(--script);
  font-size: 1.35rem;
  color: var(--hoja);
  margin-top: 1.6rem;
  transform: rotate(-1.5deg);
}

/* ==========================================================================
   Interludio — Finca
   ========================================================================== */
.finca-band {
  position: relative;
  margin-block: 0; /* la banda ES la transición: sin bordes flotantes */
}
.finca-band img {
  width: 100%;
  aspect-ratio: 21 / 9;
  object-fit: cover;
}
.finca-band figcaption {
  position: absolute;
  right: var(--pad-x);
  bottom: 1.2rem;
  font-family: var(--script);
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  color: var(--crema);
  text-shadow: 0 2px 14px rgba(42, 24, 16, .6);
  transform: rotate(-1deg);
}

/* ==========================================================================
   La medida
   ========================================================================== */
.medida { text-align: center; }
.medida .kicker { justify-content: center; }
.medida .kicker::after {
  content: "";
  width: 2.2rem;
  height: 1px;
  background: currentColor;
  opacity: .7;
}

.medida-stage {
  position: relative;
  max-width: 46rem;
  margin: clamp(1rem, 3vw, 2rem) auto 0;
}

.medida-num {
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-size: clamp(6.5rem, 20vw, 13rem);
  font-weight: 320;
  line-height: .9;
  letter-spacing: -.04em;
  color: var(--cacao);
  opacity: .09;
  user-select: none;
  margin-bottom: -2.4rem;
}
.medida-num .num-g { font-style: italic; font-size: .55em; }

.sketch {
  position: relative;
  z-index: 1;
  max-width: 32rem;
  margin-inline: auto;
}
.sketch svg { width: 100%; height: auto; }

.sketch-dash {
  fill: none;
  stroke: var(--hoja);
  stroke-width: 2;
  stroke-dasharray: 3 9;
  stroke-linecap: round;
}
.sketch-cookie {
  fill: var(--masa);
  fill-opacity: .28;
  stroke: var(--cacao);
  stroke-width: 2.5;
}
.sketch-chip { fill: var(--cacao); }
.sketch-note {
  font-family: var(--script);
  font-size: 27px;
  font-weight: 600;
  fill: var(--hoja);
}
.sketch-arrow {
  fill: none;
  stroke: var(--hoja);
  stroke-width: 1.6;
  stroke-dasharray: 1 6;
  stroke-linecap: round;
}

.medida-copy {
  position: relative;
  z-index: 1;
  max-width: 33rem;
  margin: 2rem auto 0;
}

/* ==========================================================================
   El secreto — sección oscura
   ========================================================================== */
.secreto {
  background-color: var(--cacao-deep);
  background-image: radial-gradient(120% 90% at 85% 10%, rgba(44, 64, 46, .5), transparent 55%);
  color: var(--crema);
  padding-top: clamp(9rem, 18vh, 14rem);
}
/* Apron medida→secreto: la tarde se funde en el anochecer */
.secreto::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: clamp(7rem, 16vh, 12rem);
  pointer-events: none;
  background: linear-gradient(180deg, #F3ECDF 0%, rgba(243, 236, 223, .55) 35%, rgba(42, 24, 16, 0) 100%);
}
.secreto h2 { color: var(--crema); }
.secreto .copy p { color: color-mix(in srgb, var(--crema) 86%, transparent); }
.secreto strong { color: var(--masa-soft); font-weight: 600; }
.secreto .blob-frame { box-shadow: var(--elev-alta); background: var(--cacao); }

/* ==========================================================================
   La marca — brand kit vivo
   ========================================================================== */
.marca {
  max-width: 68rem;
  margin-inline: auto;
}
.marca .kicker { color: var(--hoja); }

.marca-lead {
  max-width: var(--measure);
  color: color-mix(in srgb, var(--cacao) 84%, transparent);
  margin-bottom: clamp(2.5rem, 6vw, 4rem);
}

/* --- Paleta --- */
.paleta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1.2rem, 3vw, 2.4rem);
  margin-bottom: clamp(3rem, 7vw, 5rem);
}
.paleta li {
  display: flex;
  flex-direction: column;
  gap: .15rem;
}
.swatch {
  width: 100%;
  aspect-ratio: 1;
  background: var(--sw);
  border-radius: 58% 42% 55% 45% / 52% 48% 55% 45%;
  margin-bottom: .8rem;
  transition: border-radius .6s var(--ease-out), transform .6s var(--ease-out);
}
.paleta li:nth-child(2) .swatch { border-radius: 45% 55% 48% 52% / 55% 45% 58% 42%; }
.paleta li:nth-child(3) .swatch { border-radius: 52% 48% 58% 42% / 45% 55% 45% 55%; }
.paleta li:nth-child(4) .swatch { border-radius: 50% 50% 45% 55% / 58% 48% 52% 42%; }
.paleta li:hover .swatch { border-radius: 50%; transform: rotate(6deg) scale(1.04); }
.swatch-line { border: 1.5px solid color-mix(in srgb, var(--cacao) 25%, transparent); }

.sw-name { font-family: var(--serif); font-weight: 500; font-size: 1.05rem; }
.sw-hex {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .18em;
  color: var(--hoja);
}
.sw-note { font-family: var(--script); font-size: 1.15rem; color: color-mix(in srgb, var(--cacao) 70%, transparent); }

/* --- Tipografías --- */
.tipos {
  border-block: 1px solid color-mix(in srgb, var(--cacao) 18%, transparent);
  margin-bottom: clamp(3rem, 7vw, 5rem);
}
.tipo {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: .4rem 2rem;
  padding: 1.6rem 0;
}
.tipo + .tipo { border-top: 1px dashed color-mix(in srgb, var(--cacao) 22%, transparent); }

.tipo-sample { font-size: clamp(1.6rem, 4vw, 2.6rem); line-height: 1.2; }
.tipo-serif { font-family: var(--serif); font-weight: 420; }
.tipo-sans { font-family: var(--sans); font-weight: 400; font-size: clamp(1.15rem, 2.6vw, 1.7rem); }
.tipo-script { font-family: var(--script); font-weight: 600; color: var(--hoja); }
.tipo-meta {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--cacao) 55%, transparent);
}

/* --- Sellos duo --- */
.sellos-duo {
  display: flex;
  justify-content: center;
  gap: clamp(2.5rem, 8vw, 6rem);
}
.sellos-duo .sello { width: clamp(9rem, 18vw, 12rem); }
.sellos-duo .sello-finca { color: var(--hoja); }

/* ==========================================================================
   Cierre
   ========================================================================== */
.cierre {
  position: relative;
  background-color: var(--cacao-deep);
  background-image: radial-gradient(110% 80% at 12% 8%, rgba(44, 64, 46, .45), transparent 50%);
  color: var(--crema);
  padding: clamp(10rem, 22vh, 16rem) var(--pad-x) 0;
}
/* Apron promesa→final: el día cae en el atardecer de despedida (cierra el ciclo) */
.cierre::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: clamp(12rem, 30vh, 22rem);
  pointer-events: none;
  background: linear-gradient(180deg, #F9F6F0 0%, #F3E3C4 22%, #E8C795 42%, #C98F53 62%, #6C4526 82%, rgba(42, 24, 16, 0) 100%);
}

.cierre-grid {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: clamp(2.5rem, 7vw, 6rem);
  align-items: center;
  max-width: 64rem;
  margin-inline: auto;
}
.cierre .blob-frame { max-width: 21rem; box-shadow: var(--elev-alta); background: var(--cacao); }

.cierre blockquote p {
  font-family: var(--serif);
  font-size: clamp(1.3rem, 2.6vw, 1.75rem);
  font-weight: 350;
  font-style: italic;
  line-height: 1.5;
  max-width: 36rem;
  color: color-mix(in srgb, var(--crema) 92%, transparent);
}

.tagline-cierre {
  color: var(--masa-soft);
  margin-top: 1.8rem;
}

.firma {
  font-family: var(--script);
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 600;
  color: var(--crema);
  margin-top: 1.6rem;
  transform: rotate(-2deg);
  width: fit-content;
}
.firma::after {
  content: "";
  display: block;
  height: 2px;
  margin-top: .1rem;
  background: linear-gradient(90deg, var(--masa) 0%, transparent 90%);
  opacity: .7;
}

.pie {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: .5rem 2rem;
  max-width: 64rem;
  margin: clamp(3.5rem, 8vw, 6rem) auto 0;
  padding-block: 1.8rem;
  border-top: 1px solid color-mix(in srgb, var(--crema) 18%, transparent);
  font-size: .8rem;
  letter-spacing: .06em;
  color: color-mix(in srgb, var(--crema) 65%, transparent);
}
.wordmark-pie { font-size: 1.15rem; color: var(--crema); }
.wordmark-pie em { color: var(--masa-soft); }

/* ==========================================================================
   Animaciones de aparición (reveal)
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity .9s var(--ease-out) var(--d, 0s),
    transform .9s var(--ease-out) var(--d, 0s);
}
.reveal.in-view {
  opacity: 1;
  transform: none;
}

/* Cuando GSAP toma el control, la transición CSS no debe competir */
html.gsap-on .reveal { transition: none; }

/* Sin JS, todo visible */
.no-js .reveal { opacity: 1; transform: none; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 860px) {
  .hero { padding-top: 7rem; }
  .hero-inner,
  .section-grid,
  .grid-flip,
  .cierre-grid {
    grid-template-columns: 1fr;
  }
  .hero-figure { width: min(100%, 19rem); margin-top: 1rem; }
  .grid-flip .copy { order: 1; }
  .grid-flip .media { order: 2; }
  .sello-float { right: -.6rem; bottom: -1.2rem; }
  .secreto .sello-float { left: -.4rem; }
  .paleta { grid-template-columns: repeat(2, 1fr); }
  .finca-band img { aspect-ratio: 16 / 10; }
  .scroll-cue { display: none; }
}

@media (max-width: 480px) {
  .head-origin { display: none; }
  .sellos-duo { gap: 2rem; }
}

/* ==========================================================================
   Movimiento reducido
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ring-spin, .chip, .cue-line { animation: none; }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .paleta li:hover .swatch { transform: none; }
}

/* ==========================================================================
   CAMPAÑA — "Compra una, regala una"
   ========================================================================== */

/* --- Badge 1x1 en el hero --- */
.badge-1x1 {
  display: inline-flex;
  align-items: baseline;
  gap: .8rem;
  margin-top: 1.5rem;
  padding: .55rem 1.2rem;
  border: 1.5px dashed var(--hoja);
  border-radius: 999px;
  color: var(--hoja);
  text-decoration: none;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  transition: background-color .3s ease, transform .3s ease;
}
.badge-1x1:hover { background: color-mix(in srgb, var(--masa) 18%, transparent); transform: translateY(-2px); }
.badge-nota {
  font-family: var(--script);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: color-mix(in srgb, var(--hoja) 75%, transparent);
}

/* --- La medida: galleta 3D + compactado para pin --- */
.sketch { position: relative; }
.galleta3d {
  position: absolute;
  left: 26%;
  top: 24%;
  width: 48%;
  aspect-ratio: 1;
  pointer-events: none;
  display: none;
}
.galleta3d canvas { width: 100%; height: 100%; display: block; }
.sketch.has-3d .galleta3d { display: block; }
.sketch.has-3d .sketch-galleta { visibility: hidden; }

/* --- El secreto --- */
.secreto { position: relative; }

/* --- María --- */
.maria-lema {
  margin-top: clamp(3.5rem, 9vw, 6rem);
  text-align: center;
}
.lema-linea {
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-style: italic;
  font-weight: 380;
  font-size: clamp(1.7rem, 4vw, 3rem);
  line-height: 1.35;
  color: var(--cacao);
  max-width: 24ch;
  margin-inline: auto;
}
.lema-word { display: inline-block; }

/* --- La causa (oscura) --- */
.causa {
  position: relative;
  overflow: hidden;
  background-color: var(--noche);
  background-image: radial-gradient(110% 80% at 50% 110%, rgba(44, 64, 46, .35), transparent 55%);
  color: var(--crema);
  padding: clamp(8rem, 18vh, 13rem) var(--pad-x) clamp(4.5rem, 11vw, 8.5rem);
}
/* Apron maria→causa: la penumbra se hunde en la noche */
.causa::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: clamp(8rem, 18vh, 13rem);
  pointer-events: none;
  background: linear-gradient(180deg, var(--penumbra), rgba(27, 18, 12, 0));
}
.causa-stage {
  position: relative;
  max-width: 46rem;
  margin-inline: auto;
  text-align: center;
}
.causa .kicker { justify-content: center; }
.causa .kicker::after {
  content: "";
  width: 2.2rem;
  height: 1px;
  background: currentColor;
  opacity: .7;
}
.causa-fecha {
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-weight: 320;
  font-size: clamp(2.4rem, 7vw, 5rem);
  letter-spacing: .12em;
  color: var(--masa-soft);
  opacity: .4;
  margin-block: .8rem 2.2rem;
  user-select: none;
}
.causa h2 {
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-size: clamp(2rem, 4.6vw, 3.1rem);
  font-weight: 420;
  line-height: 1.1;
  letter-spacing: -.01em;
  color: var(--crema);
  margin-bottom: 1.3rem;
}
.causa-beat { max-width: 36rem; margin-inline: auto; }
.causa-beat + .causa-beat, .causa-beat:first-of-type { margin-top: 2.6rem; }
.causa-beat p {
  color: color-mix(in srgb, var(--crema) 86%, transparent);
  max-width: 34rem;
  margin-inline: auto;
}
.causa-cifra strong {
  display: block;
  font-family: var(--serif);
  font-weight: 380;
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  line-height: 1.1;
  color: var(--masa-soft);
  margin-bottom: .4rem;
}
.causa-fuente {
  display: block;
  margin-top: .9rem;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--crema) 55%, transparent);
}
.causa-media .blob-frame {
  max-width: 19rem;
  margin: 0 auto 1.6rem;
  background: var(--cacao);
  box-shadow: var(--elev-alta);
}
.causa-esperanza { max-width: 30rem; margin-inline: auto; }
.causa-esperanza strong { color: var(--masa-soft); }
/* El alba dentro de #causa: gradiente real, no velo plano */
.amanecer-velo {
  position: absolute;
  inset: 0;
  z-index: 0;
  /* El alba asoma como resplandor bajo-central y vuelve a noche en el borde:
     así la frontera con la banda siguiente es noche-sobre-noche (sin costura) */
  background: linear-gradient(180deg, rgba(27, 18, 12, 0) 0%, rgba(217, 162, 95, .3) 60%, rgba(232, 199, 149, .18) 80%, rgba(27, 18, 12, 0) 100%);
  opacity: 0;
  pointer-events: none;
}
.causa-stage { z-index: 1; }

/* --- La promesa --- */
.promesa {
  max-width: 68rem;
  margin-inline: auto;
  /* Pista libre de texto antes del atardecer final: el fundido de color
     nunca ocurre detrás del copy */
  padding-bottom: clamp(9rem, 20vh, 15rem);
}
.promesa .kicker { color: var(--hoja); }
.promesa-lead {
  max-width: var(--measure);
  color: color-mix(in srgb, var(--cacao) 84%, transparent);
}
.promesa-flujo {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: clamp(.6rem, 2vw, 1.4rem);
  align-items: start;
  margin-block: clamp(2.5rem, 6vw, 4rem);
}
.flujo-paso { text-align: center; }
.paso-icono {
  display: grid;
  place-content: center;
  width: 4.6rem;
  aspect-ratio: 1;
  margin: 0 auto .9rem;
  border: 1.5px dashed var(--hoja);
  border-radius: 58% 42% 55% 45% / 52% 48% 55% 45%;
  color: var(--hoja);
}
.paso-icono svg { width: 2.3rem; height: 2.3rem; }
.flujo-paso h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.2rem;
  margin-bottom: .35rem;
}
.flujo-paso p {
  font-size: .95rem;
  color: color-mix(in srgb, var(--cacao) 78%, transparent);
  max-width: 17rem;
  margin-inline: auto;
}
.flujo-arrow {
  align-self: start;
  margin-top: 1.6rem;
  width: clamp(2.6rem, 5vw, 4rem);
  color: var(--masa);
}
.flujo-arrow svg { width: 100%; height: auto; }
.promesa-media-row {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  margin-top: clamp(2rem, 5vw, 3rem);
}
.promesa-media-row .blob-frame { max-width: 17rem; }
.promesa-transparencia {
  max-width: 28rem;
  font-weight: 500;
}
.promesa-notas .firma-mini { margin-top: 1rem; }

/* --- Apoya (CTA) --- */
.apoya {
  position: relative;
  text-align: center;
  background: var(--crema-warm);
}
.apoya-lead {
  max-width: 32rem;
  margin: 0 auto;
  color: color-mix(in srgb, var(--cacao) 84%, transparent);
}
.apoya-acciones {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin: 2.2rem auto 1.4rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: .95rem 2.3rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  transition: transform .25s ease, box-shadow .25s ease, background-color .25s ease, color .25s ease;
}
.btn-wa {
  background: var(--hoja);
  color: var(--crema);
}
.btn-wa:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 14px 30px -12px rgba(44, 64, 46, .5); }
.btn-ig {
  border: 2px solid var(--cacao);
  color: var(--cacao);
}
.btn-ig:hover { background: var(--cacao); color: var(--crema); transform: translateY(-3px) scale(1.02); }
.apoya-nota {
  font-family: var(--script);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--hoja);
}
.apoya .chip { animation: none; }
.chip-cta-a { top: 16%; left: 22%; }
.chip-cta-b { top: 24%; right: 20%; width: .6rem; height: .6rem; }
.chip-cta-c { bottom: 20%; left: 32%; width: .7rem; height: .7rem; }

/* --- Cierre: línea de campaña + enlaces del pie --- */
.cierre-causa {
  margin-top: 1.6rem;
  padding-left: 1rem;
  border-left: 2px solid var(--masa);
  max-width: 32rem;
  color: color-mix(in srgb, var(--crema) 82%, transparent);
}
.pie-links a {
  color: var(--masa-soft);
  text-decoration: none;
}
.pie-links a:hover { text-decoration: underline; }

/* ==========================================================================
   Escenario pinneado (solo desktop + GSAP activo)
   ========================================================================== */
@media (min-width: 861px) {
  html.gsap-on .medida {
    display: grid;
    place-content: center;
    min-height: 100svh;
    padding-block: 2rem;
  }
  html.gsap-on .medida h2 { font-size: clamp(1.8rem, 3.2vw, 2.5rem); }
  html.gsap-on .medida-num { font-size: clamp(5rem, 14vh, 9.5rem); margin-bottom: -1.6rem; }
  html.gsap-on .medida .sketch { max-width: min(24rem, 52vh); margin-inline: auto; }
  html.gsap-on .medida-copy { margin-top: 1.2rem; max-width: 30rem; }

  html.gsap-on .causa { padding-block: 0; }
  html.gsap-on .causa-stage { min-height: 100svh; }
  html.gsap-on .causa .kicker {
    position: absolute;
    top: 12%;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
  }
  html.gsap-on .causa-fecha {
    position: absolute;
    top: 17%;
    left: 0;
    right: 0;
    margin: 0;
  }
  html.gsap-on .causa-beat {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding-top: 8vh;
    margin: 0;
    max-width: none;
  }
}

/* ==========================================================================
   Responsive — campaña
   ========================================================================== */
@media (max-width: 860px) {
  .promesa-flujo { grid-template-columns: 1fr; gap: 2.2rem; }
  .flujo-arrow { display: none; }
  .promesa-media-row { grid-template-columns: 1fr; }
  .promesa-media-row .blob-frame { max-width: 14rem; }
  .apoya-acciones { flex-direction: column; align-items: stretch; max-width: 22rem; margin-inline: auto; }
  .causa-beat + .causa-beat { margin-top: 3.2rem; }
  .badge-1x1 { gap: .5rem; flex-wrap: wrap; }
}

/* ==========================================================================
   Movimiento reducido — campaña
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  .badge-1x1, .btn { transition: none; }
  .badge-1x1:hover, .btn-wa:hover, .btn-ig:hover { transform: none; }
  .apoya-final .chip { opacity: .4; }
  .amanecer-velo { opacity: .5; }
}

/* ==========================================================================
   V3 — UN SOLO LIENZO CONTINUO
   El color base vive en el body; con GSAP activo las secciones se vuelven
   transparentes y el fondo fluye con el scroll. Sin GSAP quedan los fondos
   estáticos + aprons de degradado (nunca hay un corte recto).
   ========================================================================== */

/* Capa B: el body carga el color; las secciones solo aportan su veladura */
html.gsap-on .medida,
html.gsap-on .secreto,
html.gsap-on .maria,
html.gsap-on .causa,
html.gsap-on .cierre { background-color: transparent; }

/* Contenido por encima de la atmósfera global (chispas z1 / brasa z0).
   Descendiente y no hijo directo: las secciones pinneadas quedan envueltas
   en .pin-spacer y un selector con > las dejaría fuera. */
main section, main footer, main .finca-band { position: relative; z-index: 2; }

/* --- La medida: tarde --- */
.medida { background-color: var(--crema-warm); }

/* --- María: vigilia en penumbra --- */
.maria {
  position: relative;
  background-color: var(--penumbra);
  color: var(--crema);
  padding-top: clamp(8rem, 16vh, 12rem);
}
/* Apron secreto→maria: mismo linaje de marrones */
.maria::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: clamp(6rem, 14vh, 10rem);
  pointer-events: none;
  background: linear-gradient(180deg, var(--cacao-deep), transparent);
}
.maria h2 { color: var(--crema); }
.maria .copy p { color: color-mix(in srgb, var(--crema) 88%, transparent); }
.maria strong { color: var(--masa-soft); }
.maria .dropcap::first-letter { color: var(--masa-soft); }
.maria .media-note { color: var(--masa-soft); }
.maria .blob-frame { box-shadow: var(--elev-alta); background: var(--cacao); }
.maria .lema-linea { color: var(--crema); }
.lema-cite {
  display: block;
  margin-top: .8rem;
  font-family: var(--sans);
  font-style: normal;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--masa-soft);
}

/* --- Sombra de contacto bajo cada blob (mismo papel, misma luz) --- */
.media { isolation: isolate; }
.media::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -1.1rem;
  translate: -50% 0;
  width: 60%;
  height: 1.5rem;
  border-radius: 50%;
  filter: blur(6px);
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse, color-mix(in srgb, var(--noche) 28%, transparent), transparent 70%);
}

/* --- Banda del alba: puerta cromática noche→día --- */
.amanecer-band::before,
.amanecer-band::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  pointer-events: none;
  z-index: 1;
}
.amanecer-band::before {
  top: 0;
  height: 32%;
  background: linear-gradient(180deg, #1B120C, rgba(27, 18, 12, 0));
}
.amanecer-band::after {
  bottom: 0;
  height: 38%;
  background: linear-gradient(0deg, #F9F6F0, rgba(249, 246, 240, 0));
}
.amanecer-band figcaption {
  z-index: 2;
  bottom: clamp(3rem, 9vw, 5.5rem);
  color: var(--cacao);
  text-shadow: 0 2px 14px rgba(249, 246, 240, .55);
}

/* --- Atmósfera global: chispas viajeras --- */
.chispas-viaje {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
.gchip {
  position: absolute;
  width: var(--s);
  height: var(--s);
}
.gchip::before {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 38% 62% 55% 45% / 55% 40% 60% 45%;
  background: var(--masa);
  opacity: .55;
  animation: float 7s ease-in-out infinite alternate;
}

/* --- Atmósfera global: la brasa viajera (tostado → horno → vela → sol) --- */
.brasa-viajera {
  position: fixed;
  left: 50%;
  top: 60%;
  translate: -50% -50%;
  width: 60vmin;
  aspect-ratio: 1;
  border-radius: 50%;
  z-index: 0;
  opacity: 0;
  pointer-events: none;
  background: radial-gradient(circle, rgba(232, 199, 149, .4), rgba(217, 162, 95, .12) 45%, transparent 72%);
}

/* --- Final único: bloque de acción sobre el atardecer de despedida --- */
.apoya-final {
  position: relative;
  text-align: center;
  max-width: 64rem;
  margin: clamp(3.5rem, 9vw, 6rem) auto 0;
  padding-top: clamp(2.5rem, 6vw, 4rem);
  border-top: 1px dashed color-mix(in srgb, var(--crema) 25%, transparent);
}
.apoya-final h2 { color: var(--crema); }
.apoya-final .apoya-lead { color: color-mix(in srgb, var(--crema) 82%, transparent); }
.apoya-final .apoya-nota { color: var(--masa-soft); }
.apoya-final .chip { animation: none; background: var(--masa-soft); opacity: .5; }
.apoya-final .chip-cta-a { top: 14%; left: 20%; }
.apoya-final .chip-cta-b { top: 30%; right: 18%; }
.apoya-final .chip-cta-c { bottom: 16%; left: 30%; }

/* --- CTA persistente flotante --- */
.wa-flotante {
  position: fixed;
  right: 1.2rem;
  bottom: 1.2rem;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  min-height: 48px;
  padding: .8rem 1.4rem;
  border-radius: 999px;
  background: var(--hoja);
  color: var(--crema);
  font-weight: 700;
  font-size: .95rem;
  text-decoration: none;
  box-shadow: var(--elev-media);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity .35s ease, transform .35s ease;
}
.wa-flotante svg { width: 1.3rem; height: 1.3rem; }
.wa-flotante.visible {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.wa-flotante:hover { transform: translateY(-2px); }

/* --- marca.html --- */
.site-head-marca { position: static; }
.site-head-marca .wordmark a { color: inherit; text-decoration: none; }
.marca-volver { margin-top: clamp(3rem, 7vw, 5rem); }
.marca-volver a {
  color: var(--hoja);
  font-weight: 600;
  text-decoration: none;
}
.marca-volver a:hover { text-decoration: underline; }

/* --- Enlace de Instagram dentro de la transparencia --- */
.promesa-transparencia a {
  color: var(--hoja);
  font-weight: 600;
  text-underline-offset: 3px;
}
.promesa-notas {
  max-width: 30rem;
  margin-top: clamp(1.5rem, 4vw, 2.5rem);
}

/* --- Responsive v3 --- */
@media (max-width: 860px) {
  .chispas-viaje { display: none; }
  .wa-flotante { right: .9rem; bottom: .9rem; padding: .7rem 1.1rem; }
}

/* --- Reduced motion v3 --- */
@media (prefers-reduced-motion: reduce) {
  .chispas-viaje { display: none; }
  .brasa-viajera { display: none; }
  .gchip::before { animation: none; }
  .wa-flotante {
    opacity: 1;
    transform: none;
    pointer-events: auto;
    transition: none;
  }
  .wa-flotante:hover { transform: none; }
}
