/* ── Cabecera ── */
.site-header { position: sticky; top: 0; z-index: 50; backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%); background: rgba(5, 8, 20, 0.72); border-bottom: 1px solid var(--border); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: var(--sp-3); color: var(--text); text-decoration: none; font: 700 1.05rem/1 var(--font-display); }
.brand-mark { width: 40px; height: 40px; flex: none; object-fit: contain; filter: drop-shadow(0 0 10px rgba(245, 196, 94, 0.35)); }
.brand-name span { color: var(--text-2); font-weight: 600; }
.nav-links { display: flex; align-items: center; gap: var(--sp-2); list-style: none; margin: 0; padding: 0; }
.nav-links a:not(.btn) { color: var(--text-2); text-decoration: none; padding: 8px 10px; border-radius: 8px; font-size: var(--fs-sm); font-weight: 500; }
.nav-links a:not(.btn):hover { color: var(--text); background: var(--surface); }
.nav-toggle { display: none; }
@media (max-width: 960px) {
  .brand-name span { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav-links { position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch; padding: var(--sp-4) var(--gutter); background: rgba(5, 8, 20, 0.97); border-bottom: 1px solid var(--border); display: none; }
  .nav-links.open { display: flex; }
  .nav-links a { text-align: center; }
}

/* ── Hero ── */
.hero { padding: clamp(32px, 6vw, 80px) 0 var(--sp-7); position: relative; overflow-x: clip; }
.hero-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: var(--sp-6); align-items: center; }
.hero-title { font-size: var(--fs-hero); font-weight: 800; letter-spacing: -0.035em; margin-bottom: var(--sp-4); }
.hero-sub { font-size: var(--fs-lg); color: var(--text-2); max-width: 36ch; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin: var(--sp-5) 0; }
.hero-points { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-5); list-style: none; padding: 0; margin: 0; color: var(--text-3); font-size: var(--fs-sm); }
.hero-points li::before { content: '✓'; color: var(--green); margin-right: 6px; font-weight: 700; }
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); }
.hero-visual { position: relative; aspect-ratio: 1; max-width: 620px; justify-self: center; width: 100%; }
.hero-visual::before { content: ''; position: absolute; inset: -10%; background: var(--grad-glow); pointer-events: none; }
.globe { width: 100%; height: 100%; cursor: grab; touch-action: pan-y; position: relative; }
.globe:active { cursor: grabbing; }
.globe-caption { position: absolute; bottom: 2%; left: 0; right: 0; text-align: center; color: var(--text-3); font-size: var(--fs-sm); margin: 0; }
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; max-width: 420px; }
  .hero-sub { max-width: none; }
}

/* ── Secciones ── */
.section { padding: clamp(56px, 8vw, 104px) 0; position: relative; }
.section.slim { padding: var(--sp-6) 0; }
.section-head { max-width: 720px; margin-bottom: var(--sp-6); }
.section-head h2, .split > div > h2 { font-size: var(--fs-2xl); }
.narrow { max-width: 820px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-7); align-items: center; }
.split.reverse > :first-child { order: 2; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: var(--sp-5); } .split.reverse > :first-child { order: 0; } }
[data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity 700ms var(--ease), transform 700ms var(--ease); }
[data-reveal].in { opacity: 1; transform: none; }

/* ── Catálogo de idiomas ── */
.lang-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: var(--sp-4); }
.lang-card {
  position: relative; display: grid; gap: 6px; padding: var(--sp-5); border-radius: var(--radius-lg); text-decoration: none; color: var(--text);
  background: linear-gradient(160deg, rgba(59, 130, 246, 0.14), rgba(10, 17, 36, 0.4) 60%); border: 1px solid var(--border);
  transition: transform var(--dur-2) var(--ease), border-color var(--dur-2), box-shadow var(--dur-2); transform-style: preserve-3d; overflow: hidden; min-height: 170px;
}
.lang-card::before { content: ''; position: absolute; inset: 0; background: radial-gradient(240px circle at var(--gx, 50%) var(--gy, 0%), rgba(56, 189, 248, 0.2), transparent 60%); opacity: 0; transition: opacity var(--dur-2); pointer-events: none; }
.lang-card:hover, .lang-card:focus-visible { border-color: var(--sky); box-shadow: var(--shadow-glow); }
.lang-card:hover::before { opacity: 1; }
.lang-native { font: 700 1.7rem/1.1 var(--font-display); transform: translateZ(30px); }
.lang-name { color: var(--text-2); font-weight: 600; transform: translateZ(20px); }
.lang-greet { color: var(--text-3); font-size: var(--fs-sm); }
.lang-card .pill { justify-self: start; margin-top: auto; transform: translateZ(16px); }
.lang-card.is-selected { border-color: var(--gold); box-shadow: var(--shadow-gold); }

/* ── Pasos y niveles ── */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: var(--sp-4); }
.step-n { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--grad-primary); color: var(--on-accent); font: 800 1.1rem/1 var(--font-display); margin-bottom: var(--sp-4); }
.step h3 { font-size: var(--fs-lg); }
.levels { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-4); }
@media (max-width: 900px) { .levels { grid-template-columns: 1fr; } }
.level { transition: transform var(--dur-2) var(--ease); }
.level h3 { font-size: var(--fs-xl); margin-top: var(--sp-4); }
.level ul { margin: 0; padding-left: 1.1em; color: var(--text-2); display: grid; gap: 6px; }
.level li::marker { color: var(--sky); }

/* ── Tutor demo ── */
.modes { display: flex; flex-wrap: wrap; gap: var(--sp-2); list-style: none; padding: 0; }
.modes li { padding: 6px 12px; border-radius: var(--radius-pill); background: var(--surface); border: 1px solid var(--border); font-size: var(--fs-sm); color: var(--text-2); }
.chat-demo { display: grid; gap: var(--sp-3); }
.chat-head { display: flex; gap: var(--sp-3); align-items: center; }
.chat-head .demo-badge { margin-left: auto; }
.avatar { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--surface-2); font-size: 1.4rem; flex: none; }
.chat-log { display: grid; align-content: start; gap: var(--sp-2); max-height: 340px; min-height: 200px; overflow-y: auto; padding: var(--sp-2); border-radius: var(--radius); background: rgba(5, 8, 20, 0.5); }
.msg { max-width: 88%; padding: 10px 14px; border-radius: 16px; font-size: var(--fs-sm); animation: toast-in var(--dur-2) var(--ease); }
.msg.tutor { background: var(--surface-2); border-top-left-radius: 4px; }
.msg.me { justify-self: end; background: rgba(59, 130, 246, 0.25); border-top-right-radius: 4px; }
.msg .corr { margin-top: 8px; padding: 8px 10px; border-radius: 10px; font-size: var(--fs-xs); }
.corr.error { background: rgba(251, 113, 133, 0.12); border-left: 3px solid var(--danger); }
.corr.variant { background: rgba(52, 211, 153, 0.12); border-left: 3px solid var(--green); }
.corr.style { background: rgba(56, 189, 248, 0.12); border-left: 3px solid var(--sky); }
.chat-form { display: flex; gap: var(--sp-2); }
.chat-form .input { flex: 1; min-width: 0; }

/* ── Mundos y recompensas ── */
.worlds { list-style: none; padding: 0; margin: 0 0 var(--sp-6); display: grid; grid-template-columns: repeat(7, 1fr); gap: var(--sp-3); counter-reset: w; position: relative; }
.worlds::before { content: ''; position: absolute; left: 4%; right: 4%; top: 38px; height: 2px; background: linear-gradient(90deg, var(--sky), var(--gold)); opacity: 0.4; }
.world { position: relative; text-align: center; display: grid; justify-items: center; gap: 8px; }
.world-orb { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; font-size: 1.9rem; position: relative;
  background: radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.35), transparent 40%), radial-gradient(circle at 50% 60%, #1d4ed8, #0b1638 75%);
  box-shadow: inset -6px -10px 18px rgba(0, 0, 0, 0.45), 0 10px 26px -8px rgba(56, 189, 248, 0.6); animation: float 6s ease-in-out infinite; }
.world:nth-child(2n) .world-orb { animation-delay: -2s; }
.world:last-child .world-orb { background: radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.45), transparent 40%), radial-gradient(circle at 50% 60%, #d99a2b, #5a3a05 80%); box-shadow: inset -6px -10px 18px rgba(0, 0, 0, 0.4), 0 10px 26px -8px rgba(245, 196, 94, 0.7); }
.world-n { font-size: var(--fs-xs); color: var(--text-3); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.world-t { font-weight: 600; font-size: var(--fs-sm); }
@keyframes float { 50% { transform: translateY(-6px); } }
@media (max-width: 900px) { .worlds { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); row-gap: var(--sp-5); } .worlds::before { display: none; } }
.rewards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: var(--sp-4); }
.reward h3 { font-size: var(--fs-lg); margin-top: var(--sp-4); }

/* Medalla tridimensional */
.medal { --c1: #7dd3fc; --c2: #1d4ed8; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; position: relative;
  background: conic-gradient(from 210deg, var(--c1), var(--c2), var(--c1), var(--c2), var(--c1));
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.5), inset 0 -4px 8px rgba(0, 0, 0, 0.35), 0 8px 20px -6px rgba(56, 189, 248, 0.6);
  transform: perspective(300px) rotateY(-14deg); transition: transform var(--dur-3) var(--ease); }
.medal > span { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; font-size: 1.5rem; background: radial-gradient(circle at 35% 30%, #1e3a8a, #0a1124); box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.6); }
.medal.gold { --c1: #fde68a; --c2: #b7791f; box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.6), inset 0 -4px 8px rgba(0, 0, 0, 0.35), 0 8px 22px -6px rgba(245, 196, 94, 0.7); }
.medal.gold > span { background: radial-gradient(circle at 35% 30%, #6b4a10, #2a1a00); }
.card:hover .medal { transform: perspective(300px) rotateY(18deg) translateY(-2px); }

/* ── Certificado ── */
.cert-flow { padding-left: 1.2em; color: var(--text-2); display: grid; gap: 8px; margin-bottom: var(--sp-5); }
.cert-flow li::marker { color: var(--gold); font-weight: 700; }

/* ── Panel de ejemplo ── */
.panel-preview { display: grid; gap: var(--sp-5); }
.pp-head { display: flex; justify-content: space-between; gap: var(--sp-4); align-items: center; flex-wrap: wrap; }
.pp-head p { margin: 0; }
.pp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--sp-3); }
.pp-stat { padding: var(--sp-4); border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); display: grid; gap: 4px; }
.pp-k { font-size: var(--fs-xs); color: var(--text-3); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }
.pp-v { font: 700 var(--fs-lg)/1.2 var(--font-display); }
.pp-bars { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: var(--sp-3) var(--sp-6); }
.pp-bars p { display: grid; gap: 6px; margin: 0; font-size: var(--fs-sm); color: var(--text-2); }

/* ── FAQ ── */
.faq { display: grid; gap: var(--sp-3); }
.faq details { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 0 var(--sp-5); transition: border-color var(--dur-2); }
.faq details[open] { border-color: var(--border-strong); }
.faq summary { cursor: pointer; padding: var(--sp-4) 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: var(--sp-4); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--sky); font-size: 1.4rem; line-height: 1; transition: transform var(--dur-2); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p { color: var(--text-2); }

.access { text-align: center; }
.access p { max-width: 64ch; margin-inline: auto; }
.final-cta { text-align: center; }
.final-cta h2 { font-size: var(--fs-2xl); }
.final-cta::before { content: ''; position: absolute; inset: 0; background: radial-gradient(50% 60% at 50% 50%, rgba(59, 130, 246, 0.18), transparent 70%); pointer-events: none; }

.site-footer { border-top: 1px solid var(--border); padding: var(--sp-6) 0; }
.footer-grid { display: flex; justify-content: space-between; gap: var(--sp-5); flex-wrap: wrap; }
.footer-brand { display: flex; align-items: center; gap: var(--sp-4); flex-wrap: wrap; }
.footer-logo { width: 160px; height: auto; max-width: 100%; }
.legal-line { margin: var(--sp-5) 0 0; padding-top: var(--sp-4); border-top: 1px solid var(--border); text-align: center; font-size: 0.8rem; letter-spacing: 0.04em; color: var(--text-2); text-wrap: balance; }
.legal-line .nw { white-space: nowrap; }
.legal-line em { letter-spacing: 0; color: var(--gold, #f5c45e); }
.site-footer-compact { padding: 0 0 var(--sp-5); border-top: 0; }
.site-footer-compact .legal-line { margin-top: 0; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.sample-ex { min-height: 320px; }
.hero .eyebrow { text-transform: none; letter-spacing: 0.01em; font-size: var(--fs-sm); line-height: 1.4; font-style: italic; }


/* Planes en la portada */
.plans-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--sp-4); }
.plan-card { display: grid; gap: var(--sp-2); align-content: start; }
.plan-card h3 { margin: 0; font-size: 1.5rem; }
.plan-price { margin: 0; } .plan-price strong { font: 800 2rem/1.1 var(--font-display); }
.plan-features { margin: 0; padding-left: 1.1em; color: var(--text-2); display: grid; gap: 4px; }
.plan-card .pill { justify-self: start; }
.plans-note { margin-top: var(--sp-4); text-align: center; }

/* ───────── Certificado 3D: papel marfil, marco dorado, sello y firma ───────── */
.certificate { --paper: #fbf6e8; --paper-2: #efe3c4; --ink: #1a2140; --ink-2: #4b5170; --foil: #b8872b; --foil-2: #f2d27a;
  margin: 0; perspective: 1400px; max-width: 100%; overflow-x: clip; padding: 6px; container-type: inline-size; }
.cert-paper { position: relative; aspect-ratio: 1.414; border-radius: 6px; overflow: hidden; color: var(--ink);
  background:
    radial-gradient(circle at 50% 46%, rgba(184, 135, 43, 0.07) 0 22%, transparent 23%),
    repeating-radial-gradient(circle at 50% 46%, transparent 0 10px, rgba(184, 135, 43, 0.045) 10px 11px),
    linear-gradient(160deg, var(--paper), var(--paper-2));
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset, 0 40px 70px -28px rgba(0, 0, 0, 0.85), 0 18px 30px -18px rgba(0, 0, 0, 0.6), 0 0 60px -24px rgba(242, 210, 122, 0.55);
  transform: rotateX(9deg) rotateY(-12deg) rotateZ(0.6deg); transform-style: preserve-3d; transition: transform 900ms var(--ease); }
.certificate:hover .cert-paper, .certificate:focus-within .cert-paper { transform: none; }
/* Marco doble con lámina dorada */
.cert-paper::before { content: ''; position: absolute; inset: 3.2%; border: 2px solid var(--foil); border-radius: 3px; pointer-events: none;
  box-shadow: 0 0 0 5px var(--paper), 0 0 0 6px rgba(184, 135, 43, 0.55), inset 0 0 0 4px rgba(184, 135, 43, 0.12); }
/* Brillo que recorre la lámina */
.cert-paper::after { content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 38%, rgba(255, 255, 255, 0.55) 50%, transparent 62%); mix-blend-mode: soft-light; transform: translateX(-70%); animation: sheen 6s ease-in-out infinite; }
@keyframes sheen { 60%, 100% { transform: translateX(70%); } }
.cert-corner { position: absolute; width: 11%; aspect-ratio: 1; border: 2px solid var(--foil); pointer-events: none; opacity: 0.8; }
.cert-corner.tl { top: 5.5%; left: 4%; border-right: 0; border-bottom: 0; } .cert-corner.tr { top: 5.5%; right: 4%; border-left: 0; border-bottom: 0; }
.cert-corner.bl { bottom: 5.5%; left: 4%; border-right: 0; border-top: 0; } .cert-corner.br { bottom: 5.5%; right: 4%; border-left: 0; border-top: 0; }
.cert-watermark { position: absolute; inset: 0; display: grid; place-items: center; font: 800 clamp(2.5rem, 9vw, 5.5rem)/1 var(--font-display); color: rgba(26, 33, 64, 0.06); transform: rotate(-18deg); pointer-events: none; letter-spacing: 0.12em; z-index: 1; }
.cert-body { position: relative; z-index: 2; height: 100%; box-sizing: border-box; padding: 6.5% 9% 5.5%; display: grid; justify-items: center; align-content: center; text-align: center; gap: 0.25em;
  font-size: clamp(6.5px, 2cqi, 15px); }
.cert-body p { margin: 0; }
.cert-logo { width: 3em; height: 3em; object-fit: contain; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.25)); }
.cert-issuer { font: 700 0.78em/1.2 var(--font-body); letter-spacing: 0.24em; text-transform: uppercase; color: var(--foil); }
.cert-title { font: 700 3.1em/1 var(--font-cert); letter-spacing: 0.08em; text-transform: uppercase; margin-top: 0.15em !important;
  background: linear-gradient(180deg, #e9c56a, #a8761f 55%, #7c5512); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cert-kicker { font: 600 0.9em/1.3 var(--font-body); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-2); }
.cert-granted { font: italic 500 1.05em/1.2 var(--font-cert); color: var(--ink-2); margin-top: 0.6em !important; }
.cert-name { font: italic 700 2.3em/1.15 var(--font-cert); color: var(--ink); padding: 0 1.2em 0.15em; border-bottom: 1px solid rgba(184, 135, 43, 0.7); min-width: 60%; }
.cert-text { font: 400 0.92em/1.45 var(--font-body); color: var(--ink-2); max-width: 46ch; margin-top: 0.4em !important; }
.cert-meta { font: 500 0.75em/1.3 var(--font-body); color: var(--ink-2); opacity: 0.85; }
.cert-foot { width: 100%; display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 1em; margin-top: 0.9em; }
.cert-col { display: grid; gap: 0.15em; justify-items: center; min-width: 0; }
.cert-small { font: 500 0.68em/1.3 var(--font-body); color: var(--ink-2); }
.cert-code { font: 600 0.72em/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--ink); letter-spacing: 0.02em; overflow-wrap: anywhere; }
.cert-sign { position: relative; }
.cert-signature { width: 8.5em; height: auto; margin-bottom: -0.8em; position: relative; z-index: 1; }
.cert-line { display: block; width: 100%; max-width: 15em; height: 1px; background: var(--ink-2); opacity: 0.6; }
.cert-signer { font-weight: 600; max-width: 18em; }
.cert-seal { position: relative; width: 5.2em; height: 6.4em; display: grid; justify-items: center; }
.cert-seal-ring { width: 5.2em; height: 5.2em; border-radius: 50%; display: grid; place-items: center; position: relative; z-index: 1;
  background: radial-gradient(circle at 35% 30%, #fff3c4, #e6b94f 45%, #9b6b18 100%);
  box-shadow: 0 0 0 0.25em #f6dc8f inset, 0 0 0 0.32em #a8761f inset, 0 0.4em 0.8em -0.2em rgba(0, 0, 0, 0.5); }
.cert-seal-ring img { width: 70%; height: 70%; object-fit: contain; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.35)); }
.cert-ribbon { position: absolute; bottom: 0; width: 1.5em; height: 2.6em; background: linear-gradient(#1f3a8a, #13246a); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 78%, 0 100%); }
.cert-ribbon.l { left: 1.1em; transform: rotate(14deg); } .cert-ribbon.r { right: 1.1em; transform: rotate(-14deg); }
.certificate figcaption { margin-top: var(--sp-4); text-align: center; }
@media (max-width: 600px) {
  .cert-paper { transform: none; aspect-ratio: auto; }
  .cert-body { font-size: 10.5px; padding: 30px 26px 26px; }
  .cert-signature { width: 10em; }
  .cert-corner { width: 34px; }
  .cert-foot { grid-template-columns: 1fr; justify-items: center; gap: 1.2em; }
  .cert-seal { order: -1; }
}
@media (prefers-reduced-motion: reduce) { .cert-paper { transform: none; } .cert-paper::after { animation: none; } }
