/* ============================================================
   MANARIA — Salud Mental y Conexión Natural
   Sistema de diseño: verde bosque + crema, calma y naturaleza
   ============================================================ */

:root {
  /* Paleta oficial Manaria (derivada del logo del trébol) */
  --forest: #3e8e4b;        /* verde trébol */
  --forest-deep: #445426;   /* verde oliva del logotipo */
  --forest-soft: #4ca85a;   /* verde trébol claro */
  --sage: #8fbc74;
  --mint: #ddedd6;
  --mint-soft: #eef5e9;
  --cream: #f4f6ef;         /* blanco verdoso del fondo del logo */
  --sand: #e4e8d9;
  --ink: #2d3524;
  --ink-soft: #58644a;
  --gold: #f2c94c;          /* amarillo del destello */
  --white: #fdfefb;
  --danger: #b4562f;
  --radius: 22px;
  --shadow-sm: 0 2px 10px rgba(68, 84, 38, 0.08);
  --shadow-md: 0 10px 34px rgba(68, 84, 38, 0.14);
  --shadow-lg: 0 24px 60px rgba(68, 84, 38, 0.18);
  --font-display: "Quicksand", "Trebuchet MS", sans-serif;
  --font-body: "Inter", -apple-system, "Segoe UI", sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

h1, h2, h3, .display { font-family: var(--font-display); font-weight: 700; color: var(--forest-deep); line-height: 1.15; }

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

.container { width: min(1120px, 92vw); margin-inline: auto; }

/* ---------- Bienvenida inmersiva ---------- */
#splash {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-items: center; text-align: center;
  background: linear-gradient(160deg, #16281c 0%, #1c3527 55%, #2e5240 100%);
  transition: opacity .9s ease; overflow: hidden;
}
#splash.fuera { opacity: 0; pointer-events: none; }
#splash video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.splash-velo { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(22,40,28,.55), rgba(22,40,28,.25) 45%, rgba(22,40,28,.65)); }
.splash-contenido { position: relative; padding: 24px; color: #f4f6ef; max-width: 40rem; }
.splash-trebol { width: 74px; height: 74px; margin-bottom: 18px; animation: fadeRiseSplash .9s ease both; }
.splash-eslogan { font-size: .8rem; font-weight: 700; letter-spacing: .32em; color: #f2c94c; margin-bottom: 18px; animation: fadeRiseSplash .9s ease .15s both; }
.splash-titulo { font-family: var(--font-display); font-weight: 700; font-size: clamp(2.4rem, 7vw, 4rem); line-height: 1.08; color: #f4f6ef; animation: fadeRiseSplash .9s ease .3s both; }
.splash-sub { margin-top: 16px; font-size: 1.05rem; color: rgba(244,246,239,.85); animation: fadeRiseSplash .9s ease .45s both; }
.splash-entrar {
  margin-top: 34px; padding: 16px 46px; border-radius: 999px; border: none; cursor: pointer;
  font-family: var(--font-body); font-size: 1.05rem; font-weight: 700;
  background: #f4f6ef; color: #1c3527; box-shadow: 0 14px 40px rgba(0,0,0,.35);
  transition: transform .25s ease; animation: fadeRiseSplash .9s ease .6s both;
}
.splash-entrar:hover { transform: translateY(-3px) scale(1.03); }
.splash-saltar {
  display: block; margin: 18px auto 0; background: none; border: none; cursor: pointer;
  font-family: var(--font-body); font-size: .8rem; color: rgba(244,246,239,.6);
  text-decoration: underline; animation: fadeRiseSplash .9s ease .75s both;
}
.splash-saltar:hover { color: #f4f6ef; }
@keyframes fadeRiseSplash { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { #splash video { display: none; } }

/* ---------- Navegación ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(244, 240, 230, 0.82);
  border-bottom: 1px solid rgba(31, 90, 61, 0.08);
  transition: box-shadow .3s ease;
}
.nav.scrolled { box-shadow: var(--shadow-sm); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; }
.nav-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.nav-logo img { height: 46px; width: auto; }
.nav-logo span { font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; color: var(--forest-deep); letter-spacing: .06em; }
.nav-links { display: flex; gap: 26px; align-items: center; list-style: none; }
.nav-links a { text-decoration: none; font-size: .95rem; font-weight: 500; color: var(--ink-soft); transition: color .2s; }
.nav-links a:hover { color: var(--forest); }
.nav-links a.cta { background: var(--forest); color: var(--white); padding: 10px 20px; border-radius: 999px; box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s; }
.nav-links a.cta:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); color: var(--white); }
.nav-burger { display: none; background: none; border: none; font-size: 1.6rem; color: var(--forest-deep); cursor: pointer; }
.lang-btn {
  background: var(--mint); border: 1px solid rgba(31,90,61,.15); border-radius: 999px;
  padding: 7px 14px; font-family: var(--font-body); font-size: .8rem; font-weight: 700;
  color: var(--forest-deep); cursor: pointer; letter-spacing: .06em; transition: background .2s;
}
.lang-btn:hover { background: var(--sand); }
.lang-tip {
  position: fixed; top: 76px; right: 4vw; z-index: 70;
  background: var(--forest-deep); color: var(--cream); border-radius: 12px;
  padding: 12px 18px; font-size: .85rem; box-shadow: var(--shadow-md);
  animation: rise .3s ease;
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 30px; border-radius: 999px; border: none; cursor: pointer;
  font-family: var(--font-body); font-size: 1rem; font-weight: 600; text-decoration: none;
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
}
.btn-primary { background: var(--forest); color: var(--white); box-shadow: var(--shadow-md); }
.btn-primary:hover { transform: translateY(-3px) scale(1.02); box-shadow: var(--shadow-lg); background: var(--forest-soft); }
.btn-ghost { background: transparent; color: var(--forest); border: 2px solid var(--forest); }
.btn-ghost:hover { background: var(--mint); transform: translateY(-3px); }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100svh;
  display: grid; place-items: center; text-align: center;
  padding: 120px 0 80px; overflow: hidden;
}
.hero-logo { width: min(340px, 66vw); margin-inline: auto; }
.hero-logo-svg { width: 110px; height: 110px; margin-inline: auto; display: block; }
.hero-tagline {
  margin-top: 26px; font-family: var(--font-display); font-weight: 600;
  font-size: clamp(.95rem, 2vw, 1.15rem); letter-spacing: .34em; text-transform: uppercase;
  color: var(--forest-deep); text-indent: 0;
}
.hero-tagline .d { color: var(--gold); letter-spacing: 0; margin: 0 10px; }
.hero-tagline ~ h1 { margin-top: 10px; }
.hero h1 { font-size: clamp(2.1rem, 5.4vw, 3.6rem); margin: 34px 0 14px; }
.hero p.lead { font-size: clamp(1.05rem, 2.3vw, 1.3rem); color: var(--ink-soft); max-width: 34ch; margin-inline: auto; }
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-top: 38px; }
.hero-scroll { position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%); color: var(--sage); font-size: 1.6rem; animation: bob 2.2s ease-in-out infinite; text-decoration: none; }

/* Martín, la mascota */
.martin-card {
  display: inline-flex; align-items: center; gap: 14px; margin-top: 34px;
  background: var(--white); border-radius: 999px; padding: 10px 22px 10px 12px;
  box-shadow: var(--shadow-md); text-decoration: none; color: var(--ink);
  border: 1px solid rgba(31, 90, 61, 0.08);
  transition: transform .25s ease, box-shadow .25s ease;
}
@media (min-width: 901px) {
  .hero .martin-card { position: absolute; right: 6%; bottom: 12%; max-width: 300px; margin-top: 0; }
}
.martin-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.martin { width: 64px; height: 64px; animation: bob 3s ease-in-out infinite; }
.martin-bubble { font-size: .9rem; max-width: 30ch; text-align: left; line-height: 1.4; }
.martin-bubble strong { color: var(--forest-deep); }
@keyframes bob { 0%,100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 10px); } }

/* Blobs orgánicos animados */
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; pointer-events: none; z-index: -1; }
.blob-1 { width: 46vw; height: 46vw; background: var(--mint); top: -12vw; left: -14vw; animation: drift 16s ease-in-out infinite alternate; }
.blob-2 { width: 36vw; height: 36vw; background: #e9f0e2; bottom: -10vw; right: -10vw; animation: drift 20s ease-in-out infinite alternate-reverse; }
.blob-3 { width: 24vw; height: 24vw; background: rgba(217, 164, 65, 0.18); top: 30%; right: 6vw; animation: drift 24s ease-in-out infinite alternate; }
@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(4vw, 3vw) scale(1.12); }
}

/* Hojas flotantes */
.leaf { position: absolute; width: 26px; opacity: 0; z-index: -1; animation: fall linear infinite; }
@keyframes fall {
  0%   { opacity: 0; transform: translateY(-8vh) rotate(0deg); }
  12%  { opacity: .5; }
  88%  { opacity: .4; }
  100% { opacity: 0; transform: translateY(105vh) rotate(320deg); }
}

/* ---------- Secciones ---------- */
section { padding: 96px 0; position: relative; }
.section-head { text-align: center; max-width: 60ch; margin: 0 auto 56px; }
.section-head .eyebrow { display: inline-block; font-size: .82rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--sage); margin-bottom: 12px; }
.section-head h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); margin-bottom: 14px; }
.section-head p { color: var(--ink-soft); }

/* Tarjetas */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 26px; }
.card {
  background: var(--white); border-radius: var(--radius); padding: 38px 30px;
  box-shadow: var(--shadow-sm); border: 1px solid rgba(31, 90, 61, 0.06);
  transition: transform .3s ease, box-shadow .3s ease;
}
.card:hover { transform: translateY(-8px); box-shadow: var(--shadow-md); }
.card .icon {
  width: 62px; height: 62px; border-radius: 18px; display: grid; place-items: center;
  background: var(--mint); font-size: 1.7rem; margin-bottom: 20px;
}
.card h3 { font-size: 1.22rem; margin-bottom: 10px; }
.card p { font-size: .95rem; color: var(--ink-soft); }

/* Banda de datos */
.stats { background: var(--forest-deep); color: var(--cream); border-radius: var(--radius); padding: 64px 8vw; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 44px; text-align: center; }
.stat .num { font-family: var(--font-display); font-size: clamp(2.4rem, 5vw, 3.4rem); font-weight: 700; color: var(--gold); }
.stat .label { font-size: .92rem; opacity: .85; max-width: 30ch; margin: 8px auto 0; }
.stat .src { display: block; font-size: .72rem; opacity: .55; margin-top: 10px; font-style: italic; }

/* Respiración guiada */
.breath-wrap { display: grid; place-items: center; gap: 26px; text-align: center; }
.breath-circle {
  width: 210px; height: 210px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--mint), var(--sage));
  box-shadow: 0 0 0 26px rgba(127, 169, 141, .15), 0 0 0 52px rgba(127, 169, 141, .07), var(--shadow-md);
  display: grid; place-items: center;
  transition: transform 4s cubic-bezier(.4, 0, .2, 1);
  cursor: pointer;
}
.breath-circle span { font-family: var(--font-display); font-size: 1.15rem; color: var(--forest-deep); font-weight: 600; }
.breath-circle.in  { transform: scale(1.35); }
.breath-circle.hold { transform: scale(1.35); }
.breath-circle.out { transform: scale(1); transition-duration: 6s; }

/* CTA banner */
.banner {
  background: linear-gradient(120deg, var(--forest) 0%, var(--forest-soft) 100%);
  border-radius: var(--radius); color: var(--cream);
  padding: 70px 8vw; text-align: center; box-shadow: var(--shadow-lg);
  position: relative; overflow: hidden;
}
.banner h2 { color: var(--cream); font-size: clamp(1.6rem, 3.4vw, 2.3rem); margin-bottom: 14px; }
.banner p { opacity: .88; max-width: 50ch; margin: 0 auto 30px; }
.banner .btn-primary { background: var(--cream); color: var(--forest-deep); }
.banner .btn-primary:hover { background: var(--white); }
.banner::before, .banner::after {
  content: ""; position: absolute; border-radius: 50%; background: rgba(255,255,255,.07);
}
.banner::before { width: 300px; height: 300px; top: -140px; right: -80px; }
.banner::after { width: 220px; height: 220px; bottom: -110px; left: -60px; }

/* ---------- Quiz ---------- */
.quiz-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.quiz-card {
  background: var(--white); border-radius: var(--radius); padding: 30px;
  border: 1px solid rgba(31, 90, 61, 0.07); box-shadow: var(--shadow-sm);
  transition: transform .3s, box-shadow .3s; cursor: pointer; text-align: left;
  font-family: var(--font-body); width: 100%;
}
.quiz-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.quiz-card .q-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.quiz-card .icon { width: 54px; height: 54px; border-radius: 16px; background: var(--mint); display: grid; place-items: center; font-size: 1.5rem; }
.quiz-card .q-meta { font-size: .78rem; color: var(--sage); font-weight: 700; letter-spacing: .04em; }
.quiz-card h3 { font-size: 1.15rem; margin-bottom: 8px; }
.quiz-card p { font-size: .9rem; color: var(--ink-soft); }
.quiz-card.done { border-color: var(--sage); background: var(--mint-soft); }

/* Modal del quiz */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 90; background: rgba(18, 48, 32, .45);
  backdrop-filter: blur(6px); display: none; place-items: center; padding: 4vh 4vw;
}
.modal-backdrop.open { display: grid; animation: fadeIn .25s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--white); border-radius: var(--radius); width: min(680px, 100%);
  max-height: 88vh; overflow-y: auto; padding: 42px; box-shadow: var(--shadow-lg);
  animation: rise .35s cubic-bezier(.2, .9, .3, 1.2);
}
@keyframes rise { from { transform: translateY(34px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal h3 { font-size: 1.5rem; margin-bottom: 6px; }
.modal .m-sub { color: var(--ink-soft); font-size: .92rem; margin-bottom: 26px; }
.modal .close { float: right; background: var(--mint); border: none; width: 38px; height: 38px; border-radius: 50%; font-size: 1.1rem; cursor: pointer; color: var(--forest-deep); }
.q-item { margin-bottom: 26px; }
.q-item .q-text { font-weight: 600; margin-bottom: 12px; }
.q-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.q-opts label {
  flex: 1 1 auto; text-align: center; padding: 10px 14px; border-radius: 12px;
  background: var(--mint-soft); border: 2px solid transparent; cursor: pointer;
  font-size: .85rem; transition: all .2s; user-select: none;
}
.q-opts label:hover { border-color: var(--sage); }
.q-opts input { display: none; }
.q-opts input:checked + span { font-weight: 700; }
.q-opts label:has(input:checked) { background: var(--forest); color: var(--white); border-color: var(--forest); }
.q-result {
  border-radius: 16px; padding: 24px; margin-top: 10px;
  background: var(--mint-soft); border-left: 6px solid var(--sage);
}
.q-result.alto { border-left-color: var(--danger); background: #f7ece5; }
.q-result.medio { border-left-color: var(--gold); background: #f8f2e2; }
.q-result h4 { font-family: var(--font-display); margin-bottom: 8px; color: var(--forest-deep); }
.q-result p { font-size: .92rem; }
.q-cite { font-size: .76rem; color: var(--ink-soft); font-style: italic; margin-top: 18px; border-top: 1px dashed var(--sand); padding-top: 12px; }

/* ---------- Classroom ---------- */
.module {
  background: var(--white); border-radius: var(--radius); overflow: hidden;
  border: 1px solid rgba(31,90,61,.07); box-shadow: var(--shadow-sm); margin-bottom: 22px;
}
.module-head {
  display: flex; align-items: center; gap: 18px; padding: 26px 30px; cursor: pointer;
  transition: background .2s; border: none; width: 100%; background: transparent; text-align: left;
  font-family: var(--font-body);
}
.module-head:hover { background: var(--mint-soft); }
.module-head .icon { width: 56px; height: 56px; min-width: 56px; border-radius: 16px; background: var(--mint); display: grid; place-items: center; font-size: 1.5rem; }
.module-head h3 { font-size: 1.2rem; }
.module-head p { font-size: .88rem; color: var(--ink-soft); }
.module-head .chev { margin-left: auto; font-size: 1.2rem; color: var(--sage); transition: transform .3s; }
.module.open .chev { transform: rotate(180deg); }
.module-body { max-height: 0; overflow: hidden; transition: max-height .5s ease; }
.module.open .module-body { max-height: 1200px; }
.module-body-inner { padding: 6px 30px 30px 104px; }
.lesson { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px dashed var(--sand); font-size: .94rem; }
.lesson:last-of-type { border-bottom: none; }
.lesson .dot { color: var(--gold); font-size: 1.05rem; line-height: 1.5; }
.practice { background: var(--mint-soft); border-radius: 14px; padding: 18px 20px; margin-top: 16px; font-size: .9rem; }
.practice strong { color: var(--forest-deep); }

/* ---------- WhatsApp flotante ---------- */
.wsp-fab {
  position: fixed; right: 22px; bottom: 22px; z-index: 60;
  width: 62px; height: 62px; border-radius: 50%;
  background: #25d366; color: #fff; display: none; place-items: center;
  font-size: 1.9rem; text-decoration: none; box-shadow: var(--shadow-lg);
  animation: pulse 2.6s ease-in-out infinite;
}
.wsp-fab.visible { display: grid; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 8px 26px rgba(37, 211, 102, .45), 0 0 0 0 rgba(37, 211, 102, .4); }
  50% { box-shadow: 0 8px 26px rgba(37, 211, 102, .45), 0 0 0 16px rgba(37, 211, 102, 0); }
}

/* ---------- Footer ---------- */
footer { background: var(--forest-deep); color: rgba(244, 240, 230, .85); padding: 70px 0 40px; margin-top: 60px; }
footer .foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 44px; }
footer h4 { font-family: var(--font-display); color: var(--cream); margin-bottom: 14px; font-size: 1.05rem; }
.foot-slogan { color: var(--gold) !important; letter-spacing: .22em; text-transform: uppercase; font-size: .74rem !important; font-weight: 700; margin: -8px 0 10px; }
footer p, footer li { font-size: .88rem; line-height: 1.7; }
footer ul { list-style: none; }
footer a { color: var(--mint); text-decoration: none; }
footer a:hover { text-decoration: underline; }
.disclaimer {
  background: rgba(255, 255, 255, .07); border-radius: 14px; padding: 18px 22px;
  font-size: .82rem; margin-top: 30px; border-left: 4px solid var(--gold);
}
.foot-bottom { text-align: center; font-size: .78rem; opacity: .6; margin-top: 44px; }

/* ---------- Animaciones on-scroll ---------- */
.reveal { opacity: 0; transform: translateY(34px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: .12s; }
.reveal-d2 { transition-delay: .24s; }
.reveal-d3 { transition-delay: .36s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .nav-links {
    position: fixed; inset: 72px 0 auto 0; flex-direction: column; gap: 4px;
    background: var(--cream); padding: 18px 6vw 26px; box-shadow: var(--shadow-md);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: 12px 4px; font-size: 1.05rem; }
  .nav-burger { display: block; }
  footer .foot-grid { grid-template-columns: 1fr; }
  .module-body-inner { padding-left: 30px; }
  section { padding: 70px 0; }
}

/* ---------- Redes sociales en el pie ---------- */
.redes-sociales { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 34px; }
.redes-sociales a {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(244,246,239,.18);
  color: var(--cream); text-decoration: none; font-size: .84rem; font-weight: 600;
  padding: 9px 16px; border-radius: 999px; transition: background .2s, transform .2s;
}
.redes-sociales a:hover { background: rgba(255,255,255,.16); transform: translateY(-2px); text-decoration: none; }
