/* ==========================================================
   Diseña y Crea con Resina — Landing
   Paleta: crema, tinta verde azulada, coral rosado, dorado
   ========================================================== */

:root {
  --cream: #FBF5EC;
  --paper: #FFFDF9;
  --sand: #F1E5D3;
  --ink: #14292B;
  --ink-soft: #3E5254;
  --teal: #12474D;
  --teal-deep: #0D3A3F;
  --coral: #C93752;
  --coral-hover: #B02B45;
  --rose: #F7CDD3;
  --gold: #C69A45;
  --line: rgba(20, 41, 43, .14);

  --serif: "Fraunces", Georgia, serif;
  --sans: "DM Sans", system-ui, sans-serif;

  --r-s: 14px;
  --r-m: 22px;
  --r-l: 34px;
  --shadow: 0 1px 2px rgba(20,41,43,.06), 0 12px 32px -12px rgba(20,41,43,.22);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --wrap: 1180px;
  --gut: clamp(20px, 5vw, 48px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 400 17px/1.6 var(--sans);
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; }

.wrap { width: min(100% - var(--gut) * 2, var(--wrap)); margin-inline: auto; }
.center { text-align: center; margin-top: clamp(32px, 5vw, 56px); }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px;
}
.skip:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; border-radius: 6px; }

/* ---------- Tipografía ---------- */
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -.015em; line-height: 1.08; text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 5.6vw, 4.6rem); }
h2 { font-size: clamp(2rem, 4vw, 3.2rem); }
h3 { font-size: 1.28rem; line-height: 1.2; letter-spacing: -.01em; }
h1 em, h2 em { font-style: italic; font-weight: 500; color: var(--coral); }
.lead { font-size: clamp(1.05rem, 1.4vw, 1.2rem); color: var(--ink-soft); max-width: 56ch; text-wrap: pretty; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--coral); margin-bottom: 18px;
}
.eyebrow::before { content: ""; width: 28px; height: 2px; background: currentColor; border-radius: 2px; }
.eyebrow--light { color: var(--rose); }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 28px;
  font-weight: 700; font-size: 1rem; text-decoration: none;
  color: #fff; background: var(--coral);
  border: 2px solid var(--coral); border-radius: 999px;
  box-shadow: 0 10px 24px -10px rgba(201,55,82,.7);
  transition: transform .25s var(--ease), background .25s, box-shadow .25s, color .25s;
  cursor: pointer;
}
.btn:hover { background: var(--coral-hover); border-color: var(--coral-hover); transform: translateY(-2px); box-shadow: 0 16px 28px -12px rgba(201,55,82,.75); }
.btn:active { transform: translateY(0) scale(.98); }
.btn--sm { min-height: 44px; padding: 0 20px; font-size: .95rem; }
.btn--lg { min-height: 60px; padding: 0 36px; font-size: 1.1rem; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); box-shadow: none; }
.btn--ghost:hover { background: var(--ink); border-color: var(--ink); color: #fff; box-shadow: none; }
.btn--light { background: var(--paper); color: var(--teal-deep); border-color: var(--paper); box-shadow: none; }
.btn--light:hover { background: var(--rose); border-color: var(--rose); color: var(--teal-deep); box-shadow: none; }

/* ---------- Fotos con marco ---------- */
/* El rótulo de marca viene incrustado al pie de las fotos originales:
   la imagen se estira un 10% hacia abajo y el marco recorta ese borde. */
.ph { position: relative; overflow: hidden; background: var(--sand); border-radius: var(--r-m); }
.ph img {
  position: absolute; inset: 0 auto auto 0;
  width: 100%; height: 112%;
  object-fit: cover; object-position: top center;
  transition: transform .7s var(--ease);
}
.ph:hover img { transform: scale(1.03); }
.ph--arch { border-radius: 999px 999px var(--r-m) var(--r-m); }
.ph--round { border-radius: var(--r-l); }

/* ---------- Navegación ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--cream) 88%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, box-shadow .3s;
}
.nav.is-stuck { border-color: var(--line); }
.nav__in { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand__mark {
  width: 34px; height: 34px; border-radius: 50% 50% 50% 8px;
  background: conic-gradient(from 200deg, var(--coral), var(--gold), #7CC4C8, var(--coral));
  box-shadow: inset 0 0 0 3px var(--cream);
}
.brand__txt { font: 600 .98rem/1.05 var(--serif); letter-spacing: -.01em; }
.brand__txt em { color: var(--coral); font-weight: 500; }
.nav__links { display: flex; gap: 30px; }
.nav__links a {
  font-weight: 500; font-size: .96rem; text-decoration: none; padding: 6px 0;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat;
  transition: background-size .3s var(--ease);
}
.nav__links a:hover { background-size: 100% 2px; }

/* ---------- Hero ---------- */
.hero { padding: clamp(36px, 6vw, 72px) 0 clamp(44px, 6vw, 80px); position: relative; overflow: clip; }
.hero::before {
  content: ""; position: absolute; width: 640px; height: 640px; right: -160px; top: -200px;
  background: radial-gradient(closest-side, rgba(247,205,211,.9), transparent);
  pointer-events: none;
}
.hero__grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 5vw, 72px); align-items: center; position: relative; }
.hero__copy .lead { margin-top: 24px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.facts { display: flex; gap: clamp(22px, 4vw, 44px); margin-top: 44px; padding-top: 26px; border-top: 1px solid var(--line); }
.facts dt { font: 600 clamp(1.9rem, 3vw, 2.5rem)/1 var(--serif); color: var(--teal); }
.facts dd { font-size: .9rem; color: var(--ink-soft); margin-top: 6px; }

.hero__art { position: relative; aspect-ratio: 1 / 1.12; max-width: 540px; width: 100%; margin-inline: auto; }
.ring {
  position: absolute; inset: 6% 2% 0 8%; border: 2px solid var(--gold); border-radius: 999px 999px 40px 40px;
  transform: translate(14px, 14px); opacity: .7;
}
.hero__main { position: absolute; inset: 0 0 6% 12%; box-shadow: var(--shadow); }
.hero__card { position: absolute; box-shadow: var(--shadow); border: 5px solid var(--cream); }
.hero__card--a { width: 38%; aspect-ratio: 1 / 1.2; left: 0; bottom: 0; }
.hero__card--b { width: 29%; aspect-ratio: 1 / 1.25; right: -3%; top: 12%; border-radius: var(--r-m); }
.badge {
  position: absolute; right: 4%; bottom: 0; z-index: 3;
  display: grid; gap: 2px; padding: 14px 20px;
  background: var(--teal-deep); color: var(--paper); border-radius: var(--r-s);
  box-shadow: var(--shadow);
}
.badge strong { font: 600 1.05rem/1.1 var(--serif); }
.badge span { font-size: .82rem; color: var(--rose); }

/* Entrada del hero (una vez, al cargar) */
[data-enter] { animation: enter .9s var(--ease) both; animation-delay: var(--d, 0s); }
@keyframes enter { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }

/* ---------- Tira ---------- */
.strip { background: var(--teal-deep); color: var(--paper); overflow: hidden; padding: 18px 0; }
.strip__track { display: flex; width: max-content; animation: slide 46s linear infinite; }
.strip:hover .strip__track { animation-play-state: paused; }
.strip ul { display: flex; flex-shrink: 0; }
.strip li { font: italic 500 1.35rem/1 var(--serif); padding: 0 26px; display: inline-flex; align-items: center; gap: 52px; white-space: nowrap; }
.strip li::after { content: "✦"; color: var(--gold); font-style: normal; font-size: .9rem; }
@keyframes slide { to { transform: translateX(-50%); } }

/* ---------- Secciones ---------- */
.sec { padding: clamp(64px, 9vw, 120px) 0; }
.sec--sand { background: var(--sand); }
.sec--dark { background: var(--ink); color: var(--paper); }
.sec--teal { background: var(--teal); color: var(--paper); overflow: clip; }
.sec--dark .lead, .sec--teal .lead { color: rgba(255,253,249,.8); }
.sec--dark h2 em, .sec--teal h2 em { color: var(--rose); }
.sec__head { margin-bottom: clamp(36px, 5vw, 60px); max-width: 760px; }
.sec__head .lead { margin-top: 20px; }
.sec__head--center { text-align: center; margin-inline: auto; }
.sec__head--center .lead { margin-inline: auto; }
.sec__head--row { display: grid; grid-template-columns: 1.2fr .8fr; gap: 40px; align-items: end; max-width: none; }
.sec__side p { color: var(--ink-soft); font-size: .98rem; }
.link {
  margin-top: 14px; padding: 0; background: none; border: 0; cursor: pointer;
  font-weight: 700; color: var(--coral); text-decoration: underline; text-underline-offset: 4px;
}
.link:hover { color: var(--coral-hover); }

/* ---------- Dudas ---------- */
.doubts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-m);
  padding: 28px 26px 30px;
  transition: transform .3s var(--ease), box-shadow .3s;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.card h3 { color: var(--teal); margin-bottom: 12px; }
.card p { color: var(--ink-soft); font-size: .98rem; }

/* ---------- Split ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(36px, 6vw, 88px); align-items: center; }
.split__copy .lead { margin-top: 20px; }
.split__media { position: relative; display: grid; grid-template-columns: 1.15fr .85fr; gap: 16px; align-items: end; }
.split__media .ph--round { aspect-ratio: .62; }
.split__media .ph--small { aspect-ratio: .62; margin-bottom: 14%; }
.split__media--duo { align-items: start; grid-template-columns: 1fr 1fr; }
.split__media--duo .ph { aspect-ratio: .7; box-shadow: 0 20px 40px -18px rgba(0,0,0,.5); }
.split__media--duo .ph--lower { margin-top: 18%; }
.split--rev .split__media { order: 2; }

.steps { margin-top: 36px; display: grid; gap: 4px; }
.steps li { display: grid; grid-template-columns: 56px 1fr; gap: 18px; padding: 22px 0; border-top: 1px solid var(--line); }
.steps__n { font: italic 500 1.9rem/1 var(--serif); color: var(--gold); }
.steps h3 { margin-bottom: 6px; }
.steps p { color: var(--ink-soft); font-size: .98rem; }

/* ---------- Galería ---------- */
.gallery { columns: 4; column-gap: 16px; }
.gallery .ph { aspect-ratio: var(--r); break-inside: avoid; margin-bottom: 16px; width: 100%; }

/* ---------- Beneficios ---------- */
.benefits { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: rgba(255,253,249,.14); border: 1px solid rgba(255,253,249,.14); border-radius: var(--r-m); overflow: hidden; }
.benefits article { background: var(--ink); padding: 34px 30px 36px; transition: background .3s; }
.benefits article:hover { background: #1A3639; }
.benefits h3 { color: var(--paper); margin-bottom: 12px; }
.benefits h3::before { content: "✦"; display: block; color: var(--gold); font-size: 1rem; margin-bottom: 14px; }
.benefits p { color: rgba(255,253,249,.74); font-size: .98rem; }

/* ---------- Temario ---------- */
.modules { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 20px; align-items: start; }
.mod { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-s); transition: border-color .25s, box-shadow .25s; }
.mod:hover { border-color: rgba(20,41,43,.32); }
.mod[open] { box-shadow: var(--shadow); border-color: var(--teal); }
.mod summary {
  display: flex; gap: 14px; align-items: center;
  padding: 18px 20px; cursor: pointer; list-style: none;
}
.mod summary::-webkit-details-marker { display: none; }
.mod summary::after { content: "+"; font: 400 1.5rem/1 var(--sans); color: var(--coral); text-align: center; transition: transform .3s var(--ease); }
.mod summary::after { width: 20px; flex-shrink: 0; }
.mod[open] summary::after { transform: rotate(45deg); }
.mod__n { font: italic 500 1.3rem/1 var(--serif); color: var(--gold); }
.mod__t { font-weight: 700; line-height: 1.3; flex: 1; }
.mod__n { min-width: 26px; }
.mod__c { font-size: .78rem; color: var(--ink-soft); background: var(--cream); border-radius: 999px; padding: 4px 10px; white-space: nowrap; }
.mod--later .mod__c { background: var(--rose); color: var(--teal-deep); }
.mod ul { padding: 2px 22px 22px 72px; display: grid; gap: 8px; }
.mod li { position: relative; font-size: .95rem; color: var(--ink-soft); padding-left: 16px; }
.mod li::before { content: ""; position: absolute; left: 0; top: .62em; width: 6px; height: 6px; border-radius: 50%; background: var(--coral); }
.note { margin-top: 28px; text-align: center; color: var(--ink-soft); font-size: .95rem; }

/* ---------- Emprender ---------- */
.ticks { margin: 30px 0 38px; display: grid; gap: 14px; }
.ticks li { position: relative; padding-left: 34px; font-weight: 500; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: .28em; width: 20px; height: 20px; border-radius: 50%;
  background: var(--gold) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-6.5' fill='none' stroke='%230D3A3F' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat;
}

/* ---------- Certificado y extras ---------- */
.cert { border-radius: var(--r-m); overflow: hidden; box-shadow: var(--shadow); border: 8px solid var(--paper); transition: transform .4s var(--ease); }
.cert:hover { transform: translateY(-2px); }
.cert img { width: 100%; height: auto; }
.split__media:has(.cert) { display: block; }
.extras { margin-top: 30px; display: grid; gap: 18px; }
.extras li { padding: 0 0 18px; border-bottom: 1px solid var(--line); color: var(--ink-soft); }
.extras strong { color: var(--ink); display: block; font-size: 1.05rem; }

/* ---------- Oferta ---------- */
.offer { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.offer__copy .lead { margin: 20px 0 32px; }
.fine { margin-top: 16px; font-size: .88rem; color: var(--ink-soft); }
.offer__card {
  background: var(--paper); border-radius: var(--r-l); padding: clamp(28px, 4vw, 44px);
  box-shadow: var(--shadow); border: 1px solid var(--line); position: relative;
}
.offer__card::before { content: ""; position: absolute; inset: -10px 10px 10px -10px; border: 2px solid var(--gold); border-radius: var(--r-l); z-index: -1; opacity: .6; }
.offer__card h3 { font-size: 1.5rem; margin-bottom: 22px; }
.offer__card li { position: relative; padding: 12px 0 12px 32px; border-top: 1px solid var(--line); font-size: .98rem; }
.offer__card li::before {
  content: ""; position: absolute; left: 0; top: 15px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--coral) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-6.5' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat;
}

/* ---------- FAQ ---------- */
.faq { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(32px, 6vw, 88px); align-items: start; }
.faq .sec__head { margin: 0; position: sticky; top: 110px; }
.faq__list details { border-top: 1px solid var(--line); }
.faq__list details:last-child { border-bottom: 1px solid var(--line); }
.faq__list summary {
  display: flex; justify-content: space-between; gap: 20px; align-items: center;
  padding: 24px 0; cursor: pointer; list-style: none; font: 600 1.12rem/1.35 var(--serif);
  transition: color .2s;
}
.faq__list summary::-webkit-details-marker { display: none; }
.faq__list summary::after { content: "+"; font: 400 1.7rem/1 var(--sans); color: var(--coral); transition: transform .3s var(--ease); flex-shrink: 0; }
.faq__list details[open] summary::after { transform: rotate(45deg); }
.faq__list summary:hover { color: var(--coral); }
.faq__list p { padding: 0 40px 26px 0; color: var(--ink-soft); }

/* ---------- Cierre ---------- */
.closing {
  position: relative; color: var(--paper); text-align: center; overflow: clip;
  padding: clamp(72px, 10vw, 130px) 0;
  background:
    radial-gradient(60% 90% at 15% 10%, rgba(201,55,82,.5), transparent 60%),
    radial-gradient(50% 80% at 90% 100%, rgba(198,154,69,.4), transparent 60%),
    var(--teal-deep);
}
.closing__in { display: grid; justify-items: center; gap: 22px; max-width: 780px; }
.closing h2 { font-size: clamp(2.2rem, 5vw, 3.9rem); }
.closing h2 em { color: var(--rose); }
.closing .lead { color: rgba(255,253,249,.82); margin-bottom: 10px; }
.closing .eyebrow { margin-bottom: 0; }

/* ---------- Footer ---------- */
.foot { background: var(--ink); color: rgba(255,253,249,.7); padding: 40px 0 48px; font-size: .88rem; }
.foot__in { display: grid; gap: 12px; }
.foot__brand { font: 600 1.15rem var(--serif); color: var(--paper); }
.foot__legal { max-width: 78ch; }

/* ---------- CTA fijo móvil ---------- */
.sticky-cta {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 60;
  display: none; align-items: center; justify-content: center; min-height: 56px;
  background: var(--coral); color: #fff; font-weight: 700; text-decoration: none;
  border-radius: 999px; box-shadow: 0 14px 30px -10px rgba(201,55,82,.8);
  transform: translateY(140%); transition: transform .4s var(--ease);
}
.sticky-cta.is-on { transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .gallery { columns: 3; }
  .doubts, .benefits { grid-template-columns: repeat(2, 1fr); }
  .nav .burger { display: inline-block; }
  .nav__in { gap: 12px; }
  .nav__btn { margin-left: auto; }
  .nav__links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0;
    max-height: calc(100dvh - 72px); overflow-y: auto;
    padding: 6px var(--gut) 24px;
    background: var(--cream); border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 32px -20px rgba(20,41,43,.35);
    opacity: 0; visibility: hidden; transform: translateY(-10px);
    transition: opacity .3s ease, transform .4s var(--ease), visibility .3s;
  }
  .nav__links.is-open { opacity: 1; visibility: visible; transform: none; }
  .nav__links a:not(.btn) {
    padding: 17px 0; font-size: 1.12rem; border-bottom: 1px solid var(--line);
    background: none; display: flex; justify-content: space-between; align-items: center;
  }
  .nav__links a:not(.btn)::after { content: "→"; color: var(--gold); transition: transform .3s var(--ease); }
  .nav__links a:not(.btn):hover::after { transform: translateX(5px); }
  .nav__links a[aria-current="true"] { color: var(--coral); }
  .nav__links.is-open a:not(.btn) { animation: drop .45s var(--ease) both; }
  .nav__links.is-open a:nth-child(2) { animation-delay: .04s; }
  .nav__links.is-open a:nth-child(3) { animation-delay: .08s; }
  .nav__links.is-open a:nth-child(4) { animation-delay: .12s; }
  .nav__links.is-open a:nth-child(5) { animation-delay: .16s; }
}
@media (max-width: 520px) {
  .nav__btn { display: none; }
  .burger { margin-left: auto; }
  .nav .nav__links .nav__cta { display: inline-flex; margin-top: 22px; width: 100%; padding: 0 28px; color: #fff; background: var(--coral); }
  .nav .nav__links .nav__cta:hover { background: var(--coral-hover); color: #fff; }
}
@media (max-width: 860px) {
  body { font-size: 16.5px; }
  .hero__grid, .split, .offer, .faq, .sec__head--row { grid-template-columns: 1fr; }
  .hero__art { max-width: 440px; margin-top: 10px; }
  .split--rev .split__media { order: 0; }
  .split__media { max-width: 520px; margin-inline: auto; }
  .faq .sec__head { position: static; }
  .modules { grid-template-columns: 1fr; }
  .sticky-cta { display: flex; }
  body { padding-bottom: 84px; }
}
@media (max-width: 600px) {
  .gallery { columns: 2; column-gap: 12px; }
  .gallery .ph { margin-bottom: 12px; border-radius: var(--r-s); }
  .doubts, .benefits { grid-template-columns: 1fr; }
  .hero__cta .btn { width: 100%; }
  .facts { gap: 20px; }
  .btn--lg { width: 100%; padding: 0 20px; }
  .mod summary { padding: 16px; gap: 10px; }
  .mod__c { display: none; }
  .mod ul { padding: 0 18px 20px 54px; }
  .steps li { grid-template-columns: 44px 1fr; gap: 12px; }
  .faq__list p { padding-right: 0; }
  .brand__txt { font-size: .9rem; }
  .btn--sm { padding: 0 16px; }
}

/* ---------- Menú móvil y botón subir ---------- */
.burger { display: none; width: 44px; height: 44px; padding: 0; border: 0; background: none; cursor: pointer; position: relative; border-radius: 50%; transition: background .25s; }
.burger:hover { background: rgba(20,41,43,.08); }
.burger span { position: absolute; left: 11px; right: 11px; height: 2px; background: var(--ink); border-radius: 2px; transition: top .35s var(--ease), transform .35s var(--ease), opacity .2s; }
.burger span:nth-child(1) { top: 15px; }
.burger span:nth-child(2) { top: 21px; }
.burger span:nth-child(3) { top: 27px; }
.burger[aria-expanded="true"] span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { top: 21px; transform: rotate(-45deg); }
.nav__cta { display: none; }

.to-top {
  position: fixed; right: 24px; bottom: 24px; z-index: 55;
  width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center; padding: 0; cursor: pointer;
  color: var(--ink); background: var(--paper); border: 2px solid var(--ink);
  box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(16px);
  transition: opacity .3s, transform .4s var(--ease), visibility .3s, background .25s, color .25s;
}
.to-top.is-on { opacity: 1; visibility: visible; transform: none; }
.to-top.is-on:hover { background: var(--ink); color: #fff; transform: translateY(-3px); }
.to-top svg { transition: transform .3s var(--ease); }
.to-top:hover svg { transform: translateY(-2px); }
@media (max-width: 860px) { .to-top { right: 16px; bottom: 88px; width: 44px; height: 44px; } }

/* ---------- Animaciones de interfaz ---------- */
:root { interpolate-size: allow-keywords; }

/* Despliegue suave de módulos y preguntas (apertura y cierre) */
.mod::details-content,
.faq__list details::details-content {
  block-size: 0; overflow: clip;
  transition: block-size .5s var(--ease), content-visibility .5s allow-discrete;
}
.mod[open]::details-content,
.faq__list details[open]::details-content { block-size: auto; }

/* Contenido que entra escalonado (también funciona sin ::details-content) */
@keyframes drop { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.mod[open] > ul { animation: fade .4s ease both; }
.mod[open] li { animation: drop .5s var(--ease) both; }
.mod li:nth-child(1) { animation-delay: .06s; }
.mod li:nth-child(2) { animation-delay: .11s; }
.mod li:nth-child(3) { animation-delay: .16s; }
.mod li:nth-child(4) { animation-delay: .21s; }
.mod li:nth-child(5) { animation-delay: .26s; }
.mod li:nth-child(6) { animation-delay: .31s; }
.mod li:nth-child(n+7) { animation-delay: .36s; }
.faq__list details[open] > p { animation: drop .5s var(--ease) .05s both; }

/* Módulos y preguntas: respuesta al pasar el cursor */
.mod summary { transition: background .25s; border-radius: var(--r-s); }
.mod summary:hover { background: rgba(241,229,211,.45); }
.mod__n { transition: transform .3s var(--ease); }
.mod summary:hover .mod__n { transform: translateX(3px); }
.mod__t { transition: color .25s; }
.mod summary:hover .mod__t, .mod[open] .mod__t { color: var(--teal); }
.faq__list summary { transition: color .2s, padding-left .3s var(--ease); }
.faq__list summary:hover { padding-left: 8px; }

/* Menú: subrayado animado y sección activa */
.nav__in { transition: min-height .35s var(--ease); }
.nav.is-stuck .nav__in { min-height: 62px; }
.nav.is-stuck { box-shadow: 0 8px 24px -16px rgba(20,41,43,.35); }
.nav__links a { transition: background-size .3s var(--ease), color .25s; }
.nav__links a:hover, .nav__links a[aria-current="true"] { color: var(--coral); }
.nav__links a[aria-current="true"] { background-size: 100% 2px; }
.brand__mark { transition: transform .6s var(--ease); }
.brand:hover .brand__mark { transform: rotate(180deg) scale(1.06); }

/* Botones y enlaces */
.btn { position: relative; }
.btn:focus-visible { transform: translateY(-2px); }
.link { transition: color .2s, text-underline-offset .25s var(--ease); }
.link:hover { text-underline-offset: 7px; }
.sticky-cta { transition: transform .4s var(--ease), background .25s; }
.sticky-cta:active { transform: scale(.98); }

/* Piezas de contenido */
.steps li { transition: padding-left .35s var(--ease); }
.steps li:hover { padding-left: 8px; }
.steps__n { transition: transform .35s var(--ease), color .25s; }
.steps li:hover .steps__n { transform: scale(1.12); color: var(--coral); }
.benefits h3::before { transition: transform .5s var(--ease); width: max-content; }
.benefits article:hover h3::before { transform: rotate(180deg) scale(1.25); }
.ticks li, .offer__card li, .extras li { transition: transform .3s var(--ease); }
.ticks li:hover, .offer__card li:hover, .extras li:hover { transform: translateX(6px); }
.facts div { transition: transform .3s var(--ease); }
.facts div:hover { transform: translateY(-3px); }
.offer__card { transition: transform .4s var(--ease), box-shadow .4s; }
.offer__card:hover { transform: translateY(-4px); }
.hero__card { transition: transform .5s var(--ease); }
.hero__art:hover .hero__card--a { transform: translate(-6px, 6px) rotate(-2deg); }
.hero__art:hover .hero__card--b { transform: translate(6px, -6px) rotate(2deg); }
.ring { transition: transform .6s var(--ease); }
.hero__art:hover .ring { transform: translate(22px, 22px); }
.badge { animation: float 5s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-6px); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-enter] { animation: none; }
  .strip__track { animation: none; }
  .badge { animation: none; }
  .mod[open] > ul, .mod[open] li, .faq__list details[open] > p { animation: none; }
  .mod::details-content, .faq__list details::details-content { transition: none; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}

/* ---------- Temario resumido + modal ---------- */
.sec__side .btn { margin-top: 18px; }
.stages { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.stage__tag {
  display: inline-block; margin-bottom: 14px; padding: 4px 12px; border-radius: 99px;
  background: var(--sand); color: var(--teal-deep); font-size: .78rem; font-weight: 700; letter-spacing: .02em;
}
.stages li:last-child .stage__tag { background: var(--rose); }
@media (max-width: 1024px) { .stages { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .stages { grid-template-columns: 1fr; } }

.modal {
  width: min(960px, calc(100% - 32px)); max-height: min(88vh, 860px); margin: auto; padding: 0;
  border: 0; border-radius: var(--r-l, 28px); background: var(--cream); color: var(--ink);
  box-shadow: 0 30px 80px -20px rgba(20,41,43,.5); overflow: hidden;
}
.modal[open] { display: block; animation: modalIn .45s var(--ease) both; }
.modal::backdrop { background: rgba(20,41,43,.6); backdrop-filter: blur(3px); }
.modal[open]::backdrop { animation: fade .35s ease both; }
.modal.is-closing { animation: modalOut .25s ease both; }
.modal.is-closing::backdrop { animation: fadeOut .25s ease both; }
@keyframes modalIn { from { opacity: 0; transform: translateY(24px) scale(.98); } }
@keyframes modalOut { to { opacity: 0; transform: translateY(16px) scale(.98); } }
@keyframes fadeOut { to { opacity: 0; } }
.modal__box { display: flex; flex-direction: column; max-height: inherit; }
.modal__head {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 16px;
  padding: 26px clamp(20px, 4vw, 40px) 18px; border-bottom: 1px solid var(--line);
}
.modal__head h2 { font-size: clamp(1.4rem, 3vw, 2rem); margin-top: 4px; }
.modal__close {
  flex-shrink: 0; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--paper); color: var(--ink); cursor: pointer;
  transition: background .25s, transform .3s var(--ease), color .25s;
}
.modal__close:hover { background: var(--coral); color: #fff; transform: rotate(90deg); }
.modal__body { overflow-y: auto; padding: 22px clamp(20px, 4vw, 40px) 8px; overscroll-behavior: contain; }
.modal__intro { color: var(--ink-soft); }
.modal__body .link { display: inline-block; margin: 8px 0 20px; }
.modal__body .note { margin: 24px 0 18px; }
.modal__foot { padding: 16px clamp(20px, 4vw, 40px); border-top: 1px solid var(--line); text-align: center; background: var(--cream); }
body.modal-open { overflow: hidden; }
@media (max-width: 600px) {
  .modal { width: 100%; max-height: 100dvh; height: 100dvh; border-radius: 0; }
  .modal__box { height: 100%; }
  .modal__body { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .modal[open], .modal[open]::backdrop, .modal.is-closing, .modal.is-closing::backdrop { animation: none; }
}
.modal .modules { grid-template-columns: 1fr; gap: 12px; }

/* ---------- Marca AulaNova (cabecera y pie) ---------- */
.brand { gap: 14px; }
.brand__logo { display: block; width: 124px; height: auto; }
.brand__course {
  padding-left: 14px; border-left: 1px solid var(--line);
  font: 500 .82rem/1.2 var(--sans); color: var(--ink-soft); max-width: 17ch;
}
.foot__logo { display: inline-block; justify-self: start; }
.foot__logo img { display: block; width: 140px; height: auto; }
.foot__course { color: rgba(255,253,249,.85); }
@media (max-width: 600px) {
  .brand__logo { width: 108px; }
  .brand__course { display: none; }
}

/* ---------- Clases gratuitas en vivo ---------- */
.live__grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.live__days { list-style: none; padding: 0; margin: 28px 0; display: grid; gap: 14px; }
.live__days .card { display: grid; gap: 4px; padding: 18px 22px; }
.live__tag { font: 700 .75rem/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--teal); }
.live__days strong { font: 700 1.15rem/1.3 var(--serif); }
.live__days span:last-child { color: var(--ink-soft); }
.live__timer { background: var(--teal); color: var(--paper); border-radius: var(--r-l); padding: clamp(24px, 4vw, 40px); text-align: center; box-shadow: var(--shadow); }
.live__label { font-weight: 600; margin-bottom: 18px; }
.live__count { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.live__count div { background: rgba(255,255,255,.1); border-radius: var(--r-s); padding: 14px 4px; }
.live__count b { display: block; font: 700 clamp(1.6rem, 4vw, 2.4rem)/1 var(--serif); font-variant-numeric: tabular-nums; }
.live__count span { font-size: .78rem; opacity: .8; }
.live__timer .fine { margin-top: 16px; color: rgba(255,253,249,.8); }
.live__timer.is-live .live__count { display: none; }
.live__timer.is-live .live__label { font: 700 1.5rem/1.3 var(--serif); margin: 0; }
@media (max-width: 860px) { .live__grid { grid-template-columns: 1fr; } }
.live [hidden], #clases[hidden] { display: none !important; }
