/* =========================================================================
   ESPE Barruguer · Landing "Mechas Balayage"
   Sistema kinetic-landing adaptado a beauty premium / editorial.
   Capas tonales (no bordes divisores) · tipografía editorial · asimetría ·
   glassmorphism en flotantes · sombras ambientales · espaciado generoso.
   ========================================================================= */

:root {
  /* === Paleta de marca ESPE Barruguer ===
     Negro carbón #1A1A1A · Dorado champaña #B8A17F · Crema suave #F5F5DC · Gris perla #CCCCCC */

  /* Superficies (canvas crema) */
  --surface:                #F5F5DC; /* crema suave */
  --surface-container-low:  #ECEBD6; /* crema más profunda para bloques */
  --surface-container:      #FFFFFF; /* cards */
  --surface-container-high: #FBFBF1;
  --surface-bright:         #FFFFFF; /* elementos flotantes (form) */

  /* Carbón (secciones oscuras / mármol) */
  --carbon:                 #1A1A1A;
  --carbon-soft:            #232220;

  /* Acentos dorados */
  --primary:                #B8A17F; /* dorado champaña */
  --primary-container:      #CDB994; /* champaña claro (gradientes) */
  --gold-deep:              #A2854F; /* dorado profundo para CTA/realces */
  --on-primary:             #1A1A1A;
  --secondary:              #9A9488; /* greige discreto */
  --secondary-container:    #CCCCCC; /* gris perla */
  --tertiary:               #A2854F; /* dorado conversión: realces y CTA */

  /* Texto */
  --on-surface:             #1A1A1A; /* negro carbón */
  --on-surface-variant:     #5C564B; /* gris cálido (AA sobre crema) */
  --outline:                #CCCCCC; /* gris perla, hairlines sutiles */

  /* Sombras ambientales (difusas, nunca duras) */
  --shadow-soft:   0 18px 50px -24px rgba(26, 26, 26, .26);
  --shadow-card:   0 40px 90px -40px rgba(26, 26, 26, .38), 0 8px 24px -16px rgba(26, 26, 26, .22);
  --shadow-float:  0 60px 120px -50px rgba(120, 100, 64, .40), 0 12px 30px -18px rgba(26, 26, 26, .28);

  --ff-display: "Fraunces", "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --ff-body:    "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;

  --maxw: 1200px;
  --gap-section: clamp(80px, 12vw, 160px);
  --radius: 22px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--surface);
  color: var(--on-surface);
  font-family: var(--ff-body);
  font-size: 17px;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: var(--primary); }

:focus-visible {
  outline: 2px solid var(--tertiary);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ------------------------------- Layout helpers ------------------------- */
.wrap { width: min(100% - 44px, var(--maxw)); margin-inline: auto; position: relative; }
.wrap--center { text-align: center; }

.section { padding-block: var(--gap-section); position: relative; }
.section--low    { background: var(--surface-container-low); }

/* Secciones oscuras con textura de mármol carbón + vetas doradas */
.section--accent,
.section--cierre {
  background-color: var(--carbon);
  background-image: url(img/marble-dark.svg?v=20260616b);
  background-size: cover;
  background-position: center;
  color: #F5F5DC;
}
.section--accent::after,
.section--cierre::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(26,26,26,.30), rgba(26,26,26,.12) 40%, rgba(26,26,26,.45));
  pointer-events: none;
}
.section--accent > .wrap,
.section--cierre > .wrap { position: relative; z-index: 1; }

/* Texto claro en secciones oscuras (cierre no usa modificadores --light) */
.section--cierre .h2 { color: #F5F5DC; }
.section--cierre .lead { color: #E4E2CC; }
.section--cierre .formcard__micro { color: #C9C6AE; }

/* ------------------------------- Tipografía ----------------------------- */
.kicker {
  font-family: var(--ff-body);
  font-weight: 600;
  font-size: .8rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--primary);
  margin: 0 0 14px;
}
.kicker--light { color: var(--primary-container); }

.h2 {
  font-family: var(--ff-display);
  font-weight: 500;
  font-size: clamp(1.8rem, 4.2vw, 2.85rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin: 0 0 28px;
  max-width: 20ch;
}
.h2--light { color: #F5F5DC; }
.h2--big { font-size: clamp(2rem, 5vw, 3.6rem); max-width: 18ch; margin-inline: auto; }
.wrap--center .h2 { margin-inline: auto; }

.lead {
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  color: var(--on-surface-variant);
  max-width: 56ch;
  margin: 0 0 32px;
}
.lead--light { color: #E4E2CC; }
.lead--center { margin-inline: auto; }

/* Número decorativo gigante que rompe el grid */
.bignum {
  position: absolute;
  top: clamp(-30px, -4vw, -10px);
  right: 0;
  font-family: var(--ff-display);
  font-size: clamp(5.5rem, 14vw, 11rem);
  line-height: .8;
  color: var(--primary);
  opacity: .08;
  pointer-events: none;
  font-weight: 600;
  z-index: 0;
}
.bignum--light { color: var(--primary-container); opacity: .14; }

/* ============================= TOPBAR ================================== */
.topbar {
  position: relative;
  z-index: 3;
  padding: 22px 0 0;
}
.topbar__inner {
  width: min(100% - 44px, var(--maxw));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand { display: inline-flex; align-items: center; }
.brand__logo { height: 26px; width: auto; }
.brand__wordmark {
  font-family: var(--ff-display);
  font-weight: 600;
  font-size: 1.35rem;
  letter-spacing: .04em;
  color: var(--on-surface);
}
.topbar__trust {
  font-size: .78rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--on-surface-variant);
}

/* ============================== HERO ================================== */
.hero {
  position: relative;
  padding: clamp(28px, 5vw, 64px) 0 var(--gap-section);
  overflow: hidden;
  background: var(--surface) url(img/marble-light.svg?v=20260616b) center / cover no-repeat;
}
/* Capa de foto de balayage con parallax (app.js la desplaza al hacer scroll).
   Sustituye hero-balayage.jpg por tu foto real y se actualiza solo.
   Si la foto no existe, el navegador la omite y queda el mármol de fondo. */
.hero__bg {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 142%;
  background: url(img/hero-balayage.jpg) 62% center / cover no-repeat;
  z-index: 0;
  will-change: transform;
  transform: translate3d(0, 0, 0);
}
/* Velo crema para legibilidad del texto sobre la foto */
.hero__veil {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(100deg,
    rgba(245,245,220,.94) 0%,
    rgba(245,245,220,.78) 30%,
    rgba(245,245,220,.42) 58%,
    rgba(245,245,220,.20) 100%);
}
.hero__grid {
  position: relative;
  z-index: 1;
  width: min(100% - 44px, var(--maxw));
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 26px;
}
.hero__head { max-width: 22ch; }

.eyebrow {
  font-weight: 700;
  font-size: .78rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--tertiary);
  margin: 0 0 18px;
}
.hero__title {
  font-family: var(--ff-display);
  font-weight: 500;
  font-size: clamp(2.5rem, 8.4vw, 3.9rem);
  line-height: 1.07;
  letter-spacing: -0.025em;
  margin: 0;
  text-wrap: balance;
}
.hero__title em {
  font-style: italic;
  color: var(--primary);
}
.hero__sub {
  font-size: clamp(1.05rem, 1.7vw, 1.25rem);
  color: var(--on-surface-variant);
  max-width: 46ch;
  margin: 0 0 26px;
}
.bullets { list-style: none; margin: 0 0 26px; padding: 0; display: grid; gap: 14px; }
.bullets li {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 12px;
  align-items: start;
  font-size: 1.02rem;
  color: var(--on-surface);
}
.bullets__mark { color: var(--tertiary); font-size: .9rem; line-height: 1.7; }

.seal {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: .92rem;
  color: var(--on-surface);
  background: var(--surface-container);
  border-radius: 999px;
  padding: 10px 18px;
  box-shadow: var(--shadow-soft);
  margin: 0;
}
.seal span { color: var(--tertiary); }

/* -------- Form card (flotante, glassmorphism sutil) -------- */
.formcard {
  position: relative;
  z-index: 2;
}
.formcard__inner {
  position: relative;
  background:
    linear-gradient(180deg, rgba(255,255,255,.93), rgba(250,249,242,.90)),
    url(img/marble-light.svg?v=20260616b);
  background-size: cover;
  background-position: center;
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  border-radius: var(--radius);
  padding: clamp(24px, 4vw, 38px);
  box-shadow: var(--shadow-card), inset 0 0 0 1px rgba(184,161,127,.42);
}
.formcard__title {
  font-family: var(--ff-display);
  font-weight: 600;
  font-size: clamp(1.55rem, 3vw, 1.9rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
}
.formcard__sub { margin: 0 0 22px; color: var(--on-surface-variant); font-size: .98rem; }
.formcard__micro { margin: 12px 0 0; text-align: center; font-size: .82rem; color: var(--on-surface-variant); }

.lead-form { display: grid; gap: 16px; }

.field { display: grid; gap: 6px; position: relative; }
.field label {
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--on-surface-variant);
}
.field input[type="text"],
.field input[type="tel"],
.field input[type="email"] {
  font-family: var(--ff-body);
  font-size: 1.02rem;
  color: var(--on-surface);
  background: var(--surface-container-low);
  border: none;
  border-bottom: 2px solid var(--outline);
  border-radius: 10px 10px 4px 4px;
  padding: 13px 14px;
  transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}
.field input::placeholder { color: #A99B8B; }
.field input:focus {
  outline: none;
  border-bottom-color: var(--primary);
  background: var(--surface-container-high);
  box-shadow: 0 6px 18px -12px rgba(176,135,91,.6);
}
.field input[aria-invalid="true"] { border-bottom-color: #B3261E; }

.field--check { margin-top: 4px; }
.check {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  align-items: start;
  font-size: .9rem;
  color: var(--on-surface-variant);
  cursor: pointer;
}
.check input {
  width: 20px; height: 20px;
  margin-top: 1px;
  accent-color: var(--primary);
  cursor: pointer;
}
.check a { color: var(--primary); font-weight: 600; }

.field__error {
  color: #B3261E;
  font-size: .8rem;
  min-height: 0;
}
.field__error--form { text-align: center; margin: 0; }

/* Honeypot oculto */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ----------------------------- CTA (gradiente) ------------------------- */
.cta {
  appearance: none;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  font-family: var(--ff-body);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: .01em;
  color: var(--on-primary);
  background: linear-gradient(135deg, var(--primary-container) 0%, var(--primary) 48%, var(--gold-deep) 100%);
  padding: 16px 26px;
  border-radius: 14px;
  box-shadow: 0 18px 40px -18px rgba(162,133,79,.6), inset 0 1px 0 rgba(255,255,255,.35);
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
  text-decoration: none;
}
.cta:hover { transform: translateY(-2px); box-shadow: 0 26px 54px -20px rgba(162,133,79,.75), inset 0 1px 0 rgba(255,255,255,.4); filter: saturate(106%) brightness(1.02); }
.cta:active { transform: translateY(0); }
.cta[disabled] { opacity: .7; cursor: progress; }
.cta--scroll, .cta--big { width: auto; margin-top: 14px; }
.cta--big { font-size: 1.15rem; padding: 18px 36px; }
.section--accent .cta { box-shadow: 0 22px 50px -18px rgba(0,0,0,.6); }

/* ----------------------------- Pantalla gracias ------------------------ */
.thanks { text-align: center; padding: 14px 4px; animation: fadeIn .4s ease both; }
.thanks__mark { display: block; font-size: 2.6rem; color: var(--tertiary); margin-bottom: 8px; }
.thanks__title {
  font-family: var(--ff-display);
  font-weight: 600;
  font-size: clamp(1.9rem, 4.5vw, 2.5rem);
  margin: 0 0 12px;
}
.thanks__text { color: var(--on-surface-variant); margin: 0; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ====================== ANTES / DESPUÉS (comparador) =================== */
.ba {
  position: relative;
  width: 100%;
  max-width: 760px;
  aspect-ratio: 4 / 3;
  margin: 8px 0 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  user-select: none;
  touch-action: pan-y;
}
.ba__img { position: absolute; inset: 0; }
.ba__img img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.ba__img--before { clip-path: inset(0 50% 0 0); will-change: clip-path; }
.ba__tag {
  position: absolute;
  bottom: 14px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(26,23,20,.55);
  backdrop-filter: blur(4px);
  padding: 6px 12px;
  border-radius: 999px;
}
.ba__tag--before { left: 14px; }
.ba__tag--after  { right: 14px; }
.ba__range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
  z-index: 3;
}
.ba__handle {
  position: absolute;
  top: 0; bottom: 0;
  left: 50%;
  width: 2px;
  margin-left: -1px;
  background: rgba(255,255,255,.9);
  box-shadow: 0 0 0 1px rgba(26,23,20,.15);
  z-index: 2;
  pointer-events: none;
}
.ba__handle-grip {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--surface-bright);
  color: var(--primary);
  font-weight: 700;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-soft);
  letter-spacing: -1px;
}

.gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 26px;
}
.gallery__item { margin: 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-soft); }
.gallery__item img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }

/* ======================= QUÉ ES (split) =============================== */
.wrap--split { display: grid; gap: 36px; }
.split__media { position: relative; }
.split__media img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  position: relative;
  z-index: 1;
}
.organic {
  position: absolute;
  inset: -8% -10% auto -12%;
  width: 60%;
  aspect-ratio: 1;
  background: radial-gradient(closest-side, var(--primary-container), transparent 70%);
  opacity: .5;
  filter: blur(6px);
  z-index: 0;
}
.beneficios { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 14px; }
.beneficios li {
  display: grid; grid-template-columns: 20px 1fr; gap: 12px;
  font-size: 1.05rem; align-items: center;
}
.beneficios span { color: var(--primary); }

/* ============================ OFERTA ================================== */
.section--accent .kicker { color: var(--primary-container); }
.oferta__cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin: 36px 0 8px;
}
.ocard {
  background: rgba(255,255,255,.06);
  backdrop-filter: blur(8px);
  border-radius: var(--radius);
  padding: 26px 24px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}
.ocard__mark { color: var(--primary-container); font-size: 1.3rem; }
.ocard h3 {
  font-family: var(--ff-display);
  font-weight: 600;
  font-size: 1.28rem;
  margin: 10px 0 8px;
  color: #F7F3EE;
}
.ocard p { margin: 0; color: #D9CDBC; font-size: .98rem; }

/* ============================ CÓMO FUNCIONA =========================== */
.pasos {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  counter-reset: paso;
}
.paso { position: relative; padding-top: 10px; }
.paso__n {
  font-family: var(--ff-display);
  font-size: 2.7rem;
  line-height: 1;
  color: var(--primary);
  opacity: .85;
  display: block;
  margin-bottom: 8px;
}
.paso h3 { font-family: var(--ff-display); font-weight: 600; font-size: 1.3rem; margin: 0 0 6px; }
.paso p { margin: 0; color: var(--on-surface-variant); }

/* ============================ TESTIMONIOS ============================= */
.testis { display: grid; grid-template-columns: 1fr; gap: 18px; margin-top: 8px; }
.testi {
  margin: 0;
  background: linear-gradient(180deg, rgba(255,255,255,.9), rgba(255,255,255,.7));
  backdrop-filter: blur(10px);
  border-radius: var(--radius);
  padding: 28px 26px;
  box-shadow: var(--shadow-soft);
}
.testi__quote { font-family: var(--ff-display); font-style: italic; font-size: 1.15rem; line-height: 1.45; margin: 0 0 14px; color: var(--on-surface); }
.testi__by { color: var(--primary); font-weight: 600; font-size: .9rem; }

/* ============================ CIERRE ================================= */
.section--cierre { text-align: center; }

/* ============================ FOOTER ================================= */
.footer {
  background: var(--surface-container-low);
  padding: clamp(48px, 7vw, 80px) 0;
  text-align: center;
}
.footer__logo { height: 56px; width: auto; margin: 0 auto 22px; }
.footer__wordmark {
  font-family: var(--ff-display);
  font-weight: 600;
  font-size: 1.4rem;
  letter-spacing: .04em;
  display: block;
  margin-bottom: 20px;
}
.footer__data { color: var(--on-surface-variant); font-size: .95rem; margin: 0 0 18px; line-height: 1.8; }
.footer__data a { color: var(--primary); text-decoration: none; }
.footer__legal { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: center; }
.footer__legal a { color: var(--on-surface-variant); font-size: .85rem; text-decoration: none; }
.footer__legal a:hover { color: var(--primary); }

/* ===================================================================== */
/*  DESKTOP / TABLET                                                      */
/* ===================================================================== */
@media (min-width: 880px) {
  .hero__grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    grid-template-areas:
      "head form"
      "rest form";
    column-gap: clamp(40px, 6vw, 88px);
    row-gap: 22px;
    align-items: start;
  }
  .hero__head { grid-area: head; max-width: none; }
  .formcard   { grid-area: form; align-self: start; position: sticky; top: 24px; }
  .hero__rest { grid-area: rest; }

  .gallery { grid-template-columns: repeat(3, 1fr); }
  .wrap--split { grid-template-columns: 1fr 1.05fr; align-items: center; }
  .oferta__cards { grid-template-columns: repeat(3, 1fr); }
  .pasos { grid-template-columns: repeat(3, 1fr); gap: 36px; }
  .testis { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1100px) {
  body { font-size: 18px; }
}

/* Imagen del split: en desktop la dejamos "sangrar" un poco */
@media (min-width: 880px) {
  .split__media img { transform: translateY(-6%); }
}

/* ===================================================================== */
/*  Accesibilidad / motion                                               */
/* ===================================================================== */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
