/* ============================================================
   COSMÉTICA SOMÁTICA™ — El Quinto Elemento
   Sistema visual: verde profundo #1A3D2B · dorado #C9A84C · crema
   ============================================================ */

:root {
  --verde:      #1A3D2B;
  --verde-2:    #122B1E;   /* más profundo */
  --verde-3:    #24503A;   /* card sobre verde */
  --crema:      #F5EFE3;
  --crema-2:    #EDE4D2;
  --dorado:     #C9A84C;
  --dorado-2:   #B3933C;
  --ink:        #1E2B22;   /* texto sobre crema */
  --ink-soft:   #4A5A4E;
  --linea-luz:  rgba(245, 239, 227, 0.14);
  --linea-oscura: rgba(30, 43, 34, 0.14);
  --ease-out:   cubic-bezier(0.22, 1, 0.36, 1);
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", -apple-system, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-weight: 300;
  background: var(--verde);
  color: var(--crema);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

::selection { background: var(--dorado); color: var(--verde-2); }

/* ---------- Tipografía base ---------- */
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; line-height: 1.15; }
h1 em, h2 em, h3 em { font-style: italic; font-weight: 400; color: var(--dorado); }

.kicker {
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--dorado);
  margin-bottom: 1.4rem;
  font-weight: 400;
}
.kicker-dark { color: var(--dorado-2); }

.section-head {
  max-width: 820px;
  margin: 0 auto 4rem;
  text-align: center;
  padding: 0 1.5rem;
}
.section-head h2 { font-size: clamp(2rem, 4.5vw, 3.2rem); margin-bottom: 1.4rem; }
.section-lede { color: var(--ink-soft); font-size: 1.05rem; max-width: 680px; margin: 0 auto; }
.section-lede-light { color: rgba(245, 239, 227, 0.75); }

/* ---------- Botones ---------- */
.btn {
  display: inline-block;
  padding: 0.9rem 2.1rem;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-decoration: none;
  border-radius: 3px;
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out), background 0.35s, color 0.35s;
  will-change: transform;
}
.btn-gold { background: var(--dorado); color: var(--verde-2); }
.btn-gold:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(201, 168, 76, 0.28); background: #D6B65C; }
.btn-ghost { border: 1px solid var(--dorado); color: var(--dorado); }
.btn-ghost:hover { background: rgba(201, 168, 76, 0.1); transform: translateY(-3px); }
.btn-lg { padding: 1.1rem 2.8rem; font-size: 0.95rem; }

.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-actions-center { justify-content: center; }

/* ---------- Splash ---------- */
.splash {
  position: fixed; inset: 0; z-index: 100;
  background: var(--verde-2);
  display: flex; align-items: center; justify-content: center;
  animation: splashOut 0.8s var(--ease-out) 2.2s forwards;
}
.splash.is-done { opacity: 0; pointer-events: none; }
.splash-mark { text-align: center; animation: splashIn 1.1s var(--ease-out) both; }
.splash-mark img { width: 84px; margin: 0 auto 1rem; border-radius: 50%; }
.splash-mark span {
  display: block; font-family: var(--font-display); font-style: italic;
  font-size: 1.05rem; color: var(--dorado); letter-spacing: 0.04em;
}
@keyframes splashIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes splashOut { to { opacity: 0; visibility: hidden; } }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem clamp(1.2rem, 4vw, 3rem);
  transition: background 0.4s, box-shadow 0.4s, padding 0.4s;
}
.nav.is-solid {
  background: rgba(18, 43, 30, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--linea-luz);
  padding-top: 0.7rem; padding-bottom: 0.7rem;
}
.nav-brand { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; }
.nav-logo { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; }
.nav-name {
  font-family: var(--font-display); font-size: 1rem; color: var(--crema);
  letter-spacing: 0.02em;
}
.nav-name sup { font-size: 0.5em; color: var(--dorado); }
.nav-links { display: flex; align-items: center; gap: 2rem; }
.nav-links a {
  color: rgba(245, 239, 227, 0.85); text-decoration: none; font-size: 0.85rem;
  letter-spacing: 0.05em; transition: color 0.3s; position: relative;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -5px; height: 1px; width: 0;
  background: var(--dorado); transition: width 0.35s var(--ease-out);
}
.nav-links a:hover { color: var(--dorado); }
.nav-links a:hover::after { width: 100%; }
.nav-links .nav-cta {
  border: 1px solid var(--dorado); color: var(--dorado);
  padding: 0.5rem 1.2rem; border-radius: 3px;
}
.nav-links .nav-cta::after { display: none; }
.nav-links .nav-cta:hover { background: var(--dorado); color: var(--verde-2); }
.nav-burger { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-burger span { display: block; width: 26px; height: 2px; background: var(--crema); margin: 6px 0; transition: transform 0.3s, opacity 0.3s; }
.nav-burger.is-open span:first-child { transform: translateY(4px) rotate(45deg); }
.nav-burger.is-open span:last-child { transform: translateY(-4px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; position: relative; overflow: hidden;
  padding: 7rem 1.5rem 4rem;
  background: radial-gradient(ellipse at 50% 120%, var(--verde-3) 0%, var(--verde) 55%, var(--verde-2) 100%);
}
.hero-glow {
  position: absolute; width: 720px; height: 720px; border-radius: 50%;
  background: radial-gradient(circle, rgba(201, 168, 76, 0.14) 0%, transparent 62%);
  top: -220px; left: 50%; transform: translateX(-50%);
  animation: glowBreath 7s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes glowBreath { from { opacity: 0.6; transform: translateX(-50%) scale(1); } to { opacity: 1; transform: translateX(-50%) scale(1.12); } }
.hero-inner { max-width: 880px; position: relative; z-index: 2; }
.hero-title { font-size: clamp(2.6rem, 6.5vw, 5rem); margin-bottom: 1.6rem; }
.hero-sub {
  font-size: clamp(1rem, 1.6vw, 1.15rem); color: rgba(245, 239, 227, 0.78);
  max-width: 620px; margin: 0 auto 2.4rem;
}
.hero .hero-actions { justify-content: center; }
.hero-scrollhint {
  position: absolute; bottom: 2.2rem; left: 50%; transform: translateX(-50%);
  width: 1px; height: 56px; overflow: hidden;
}
.hero-scrollhint span {
  display: block; width: 1px; height: 100%;
  background: linear-gradient(to bottom, transparent, var(--dorado));
  animation: scrollHint 2.2s var(--ease-out) infinite;
}
@keyframes scrollHint { from { transform: translateY(-100%); } to { transform: translateY(100%); } }

/* ---------- Marquee ---------- */
.marquee {
  background: var(--verde-2); border-top: 1px solid var(--linea-luz); border-bottom: 1px solid var(--linea-luz);
  overflow: hidden; padding: 1.1rem 0; white-space: nowrap;
}
.marquee-track { display: inline-flex; align-items: center; gap: 2.4rem; will-change: transform; }
.marquee-track span {
  font-family: var(--font-display); font-style: italic; font-size: 1.02rem;
  color: rgba(245, 239, 227, 0.6); letter-spacing: 0.03em;
}
.marquee-track i { color: var(--dorado); font-style: normal; font-size: 0.55rem; opacity: 0.8; }

/* ---------- 5 Estadios (fondo crema) ---------- */
.estadios { background: var(--crema); color: var(--ink); padding: clamp(4.5rem, 9vw, 8rem) clamp(1.2rem, 5vw, 4rem); }
.estadios h2, .estadios h3 { color: var(--ink); }
.estadios h2 em { color: var(--dorado-2); }
.estadios-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1.2rem; max-width: 1240px; margin: 0 auto;
  align-items: end;
}
.estadio {
  background: #fff; border: 1px solid var(--linea-oscura); border-radius: 6px;
  padding: 1.8rem 1.5rem;
  transition: transform 0.45s var(--ease-out), box-shadow 0.45s var(--ease-out);
}
.estadio:hover { transform: translateY(-6px); box-shadow: 0 18px 44px rgba(30, 43, 34, 0.12); }
.estadio-num {
  font-family: var(--font-display); font-size: 0.85rem; color: var(--dorado-2);
  letter-spacing: 0.16em; display: block; margin-bottom: 0.9rem;
}
.estadio h3 { font-size: 1.12rem; margin-bottom: 0.7rem; }
.estadio p { font-size: 0.88rem; color: var(--ink-soft); line-height: 1.65; }
.estadio:nth-child(1) { min-height: 210px; }
.estadio:nth-child(2) { min-height: 235px; }
.estadio:nth-child(3) { min-height: 260px; }
.estadio:nth-child(4) { min-height: 285px; }
.estadio-cs {
  background: var(--verde); color: var(--crema); min-height: 330px;
  border-color: var(--verde);
}
.estadio-cs h3 { color: var(--crema); }
.estadio-cs h3 em { color: var(--dorado); font-size: 0.85em; }
.estadio-cs p { color: rgba(245, 239, 227, 0.8); }
.estadio-cs .estadio-num { color: var(--dorado); }
.estadio-cs:hover { box-shadow: 0 22px 54px rgba(26, 61, 43, 0.35); }

/* ---------- El método (fondo verde) ---------- */
.metodo { background: var(--verde); padding: clamp(4.5rem, 9vw, 8rem) clamp(1.2rem, 5vw, 4rem); }
.metodo h2 { color: var(--crema); }
.metodo-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.4rem; max-width: 980px; margin: 0 auto 1.4rem;
}
.metodo-card {
  background: var(--verde-3); border: 1px solid var(--linea-luz); border-radius: 8px;
  padding: 2.2rem 2rem;
  transform-style: preserve-3d; will-change: transform;
  transition: box-shadow 0.4s;
}
.metodo-card:hover { box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28); }
.metodo-tag {
  font-size: 0.7rem; letter-spacing: 0.26em; text-transform: uppercase;
  color: var(--dorado); margin-bottom: 1.5rem; font-weight: 400;
}
.metodo-list { list-style: none; }
.metodo-list li {
  padding: 0.95rem 0; border-bottom: 1px solid var(--linea-luz);
  display: flex; flex-direction: column; gap: 0.15rem;
}
.metodo-list li:last-child { border-bottom: none; padding-bottom: 0; }
.metodo-list strong { font-family: var(--font-display); font-weight: 500; font-size: 1.05rem; color: var(--crema); }
.metodo-list span { font-size: 0.85rem; color: rgba(245, 239, 227, 0.65); }

.quinto { max-width: 980px; margin: 0 auto; }
.quinto-inner {
  background: linear-gradient(135deg, var(--dorado) 0%, #B99539 100%);
  color: var(--verde-2); border-radius: 8px; text-align: center;
  padding: 3rem 2rem; position: relative; overflow: hidden;
}
.quinto-mark {
  width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 1.2rem;
  object-fit: cover; border: 2px solid rgba(18, 43, 30, 0.25);
}
.quinto-inner h3 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin-bottom: 0.9rem; color: var(--verde-2); }
.quinto-inner p { max-width: 640px; margin: 0 auto; font-size: 0.98rem; color: rgba(18, 43, 30, 0.85); }

/* ---------- Clara (fondo crema) ---------- */
.clara { background: var(--crema-2); color: var(--ink); padding: clamp(4.5rem, 9vw, 8rem) clamp(1.2rem, 5vw, 4rem); }
.clara-grid {
  display: grid; grid-template-columns: minmax(280px, 420px) 1fr;
  gap: clamp(2rem, 6vw, 5rem); max-width: 1140px; margin: 0 auto; align-items: center;
}
.clara-photo { position: relative; }
.clara-photo img {
  border-radius: 8px; width: 100%; aspect-ratio: 4 / 5; object-fit: cover;
  box-shadow: 0 30px 70px rgba(30, 43, 34, 0.22);
}
.clara-photo::before {
  content: ""; position: absolute; inset: -14px 14px 14px -14px;
  border: 1px solid var(--dorado-2); border-radius: 8px; z-index: -1;
}
.clara-photo figcaption {
  font-size: 0.78rem; color: var(--ink-soft); margin-top: 1rem;
  font-style: italic; text-align: center;
}
.clara-bio h2 { color: var(--ink); font-size: clamp(1.9rem, 3.8vw, 2.8rem); margin-bottom: 1.4rem; }
.clara-bio h2 em { color: var(--dorado-2); }
.clara-bio p { color: var(--ink-soft); margin-bottom: 1.1rem; font-size: 0.98rem; }
.clara-bio strong { color: var(--ink); font-weight: 500; }
.clara-creds { list-style: none; margin-top: 1.6rem; }
.clara-creds li {
  padding: 0.6rem 0 0.6rem 1.6rem; position: relative;
  font-size: 0.92rem; color: var(--ink); border-bottom: 1px solid var(--linea-oscura);
}
.clara-creds li:last-child { border-bottom: none; }
.clara-creds li::before {
  content: "◆"; position: absolute; left: 0; color: var(--dorado-2); font-size: 0.55rem; top: 0.95rem;
}

/* ---------- Cita ---------- */
.cita {
  background: var(--verde-2); text-align: center;
  padding: clamp(4.5rem, 9vw, 7.5rem) clamp(1.5rem, 6vw, 4rem);
}
.cita blockquote {
  font-family: var(--font-display); font-style: italic; font-weight: 300;
  font-size: clamp(1.5rem, 3.4vw, 2.5rem); line-height: 1.4;
  color: var(--crema); max-width: 900px; margin: 0 auto 1.6rem;
}
.cita-autor { color: var(--dorado); font-size: 0.88rem; letter-spacing: 0.04em; }

/* ---------- Libro (fondo crema) ---------- */
.libro { background: var(--crema); color: var(--ink); padding: clamp(4.5rem, 9vw, 8rem) clamp(1.2rem, 5vw, 4rem); }
.libro-grid {
  display: grid; grid-template-columns: 1fr minmax(260px, 380px);
  gap: clamp(2rem, 6vw, 5rem); max-width: 1080px; margin: 0 auto; align-items: center;
}
.libro-copy h2 { color: var(--ink); font-size: clamp(1.9rem, 3.8vw, 2.8rem); margin-bottom: 1.4rem; }
.libro-copy h2 em { color: var(--dorado-2); }
.libro-copy p { color: var(--ink-soft); margin-bottom: 1.1rem; font-size: 0.98rem; }
.libro-copy strong { color: var(--ink); font-weight: 500; }
.libro-copy .hero-actions { margin-top: 1.8rem; }
.libro-cover { will-change: transform; transform-style: preserve-3d; }
.libro-cover img {
  border-radius: 4px; width: 100%;
  box-shadow: 0 36px 80px rgba(30, 43, 34, 0.3);
}

/* ---------- Formación (fondo verde) ---------- */
.formacion {
  background:
    radial-gradient(ellipse at 50% -30%, rgba(201, 168, 76, 0.12) 0%, transparent 55%),
    var(--verde);
  text-align: center;
  padding: clamp(4.5rem, 9vw, 8.5rem) clamp(1.2rem, 5vw, 4rem);
}
.formacion-inner { max-width: 880px; margin: 0 auto; }
.formacion h2 { color: var(--crema); font-size: clamp(2rem, 4.5vw, 3.1rem); margin-bottom: 1.4rem; }
.formacion .section-lede { color: rgba(245, 239, 227, 0.75); }
.formacion .kicker-dark { color: var(--dorado); }
.formacion-feats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem; margin: 3rem auto 2.4rem; max-width: 760px;
}
.feat {
  border: 1px solid var(--linea-luz); border-radius: 6px; padding: 1.6rem 1rem;
  transition: border-color 0.35s, transform 0.35s var(--ease-out);
}
.feat:hover { border-color: rgba(201, 168, 76, 0.5); transform: translateY(-4px); }
.feat-num {
  display: block; font-family: var(--font-display); font-size: 2.6rem;
  color: var(--dorado); line-height: 1;
}
.feat-num::after { content: "+"; font-size: 0.55em; vertical-align: super; opacity: 0; }
.feat-num.has-plus::after { opacity: 1; }
.feat-label { display: block; font-size: 0.8rem; color: rgba(245, 239, 227, 0.7); margin-top: 0.5rem; }
.formacion-note { font-size: 0.85rem; font-style: italic; color: rgba(245, 239, 227, 0.6); margin-bottom: 2.2rem; }

/* ---------- Footer ---------- */
.footer { background: var(--verde-2); border-top: 1px solid var(--linea-luz); padding: 4rem clamp(1.2rem, 5vw, 4rem) 2rem; }
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2.5rem;
  max-width: 1080px; margin: 0 auto 3rem;
}
.footer-logo { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; margin-bottom: 1rem; }
.footer-name { font-family: var(--font-display); font-size: 1.05rem; color: var(--crema); }
.footer-tag { font-size: 0.82rem; color: rgba(245, 239, 227, 0.55); font-style: italic; margin-top: 0.2rem; }
.footer-head {
  font-size: 0.7rem; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--dorado); margin-bottom: 1rem;
}
.footer-contact a, .footer-nav a {
  display: block; color: rgba(245, 239, 227, 0.75); text-decoration: none;
  font-size: 0.88rem; padding: 0.3rem 0; transition: color 0.3s;
}
.footer-contact a:hover, .footer-nav a:hover { color: var(--dorado); }
.footer-legal {
  border-top: 1px solid var(--linea-luz); padding-top: 1.6rem;
  text-align: center; max-width: 1080px; margin: 0 auto;
}
.footer-legal p { font-size: 0.75rem; color: rgba(245, 239, 227, 0.45); letter-spacing: 0.03em; }

/* ---------- Reveal system ---------- */
.reveal { opacity: 0; transform: translateY(36px); transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out); }
.reveal.is-visible { opacity: 1; transform: none; }
/* Defensa: elementos con split nunca quedan ocultos por .reveal */
.reveal[data-split] { opacity: 1; transform: none; }
.split-line { display: block; overflow: hidden; }
.split-line > span { display: block; transform: translateY(110%); transition: transform 1s var(--ease-out); }
.split-line.is-in > span { transform: none; }

/* ---------- Reduced motion: solo lo intrusivo ---------- */
@media (prefers-reduced-motion: reduce) {
  .hero-glow { animation: none; }
  .hero-scrollhint { display: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .clara-grid, .libro-grid { grid-template-columns: 1fr; }
  .libro-cover { order: -1; max-width: 300px; margin: 0 auto; }
  .clara-photo { max-width: 380px; margin: 0 auto; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
}

@media (max-width: 760px) {
  .nav-burger { display: block; }
  .nav-links {
    position: fixed; top: 0; right: 0; bottom: 0; width: min(78vw, 320px);
    background: var(--verde-2); flex-direction: column; justify-content: center;
    gap: 2.2rem; transform: translateX(100%); transition: transform 0.45s var(--ease-out);
    box-shadow: -20px 0 60px rgba(0, 0, 0, 0.35); z-index: 49;
  }
  .nav-links.is-open { transform: none; }
  .nav-links a { font-size: 1.05rem; }
  .estadios-steps { align-items: stretch; }
  .estadio { min-height: unset !important; }
}

/* ---------- Modal calendario ---------- */
.modal { position: fixed; inset: 0; z-index: 90; display: none; }
.modal.is-open { display: block; }
.modal-backdrop {
  position: absolute; inset: 0; background: rgba(10, 22, 15, 0.78);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  animation: modalFade 0.35s var(--ease-out);
}
.modal-box {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: min(94vw, 720px); max-height: 92svh; overflow-y: auto;
  background: var(--crema); border-radius: 10px; padding: 2.2rem 1.6rem 1.6rem;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.5);
  animation: modalUp 0.45s var(--ease-out);
}
@keyframes modalFade { from { opacity: 0; } }
@keyframes modalUp { from { opacity: 0; transform: translate(-50%, -46%); } }
.modal-close {
  position: absolute; top: 0.7rem; right: 0.9rem;
  background: none; border: none; font-size: 1.9rem; line-height: 1;
  color: var(--ink-soft); cursor: pointer; transition: color 0.3s, transform 0.3s;
}
.modal-close:hover { color: var(--ink); transform: rotate(90deg); }
.modal-title {
  font-family: var(--font-display); font-size: 1.25rem; color: var(--ink);
  text-align: center; margin-bottom: 1.2rem;
}
.modal-frame iframe { border-radius: 6px; background: #fff; }
body.modal-lock { overflow: hidden; }
