/* EducaQuix · Sitio v2 · Componentes compartidos */

/* ---------- Logo (SVG en línea: la E toma --mark y el texto --wordmark) ---------- */
.logo { height: 38px; width: auto; }
.logo .logo__mark { fill: var(--mark); }
.logo .logo__type { fill: var(--wordmark); }
.logo .logo__dot { fill: var(--mark); }

/* ---------- Botones ---------- */
.btn {
  --_bg: var(--btn-bg); --_ink: var(--btn-ink);
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: 48px; padding: .7em 1.25em;
  border: 1px solid transparent; border-radius: var(--r-sm);
  background: var(--_bg); color: var(--_ink);
  font-weight: 700; font-size: 1rem; line-height: 1.1; letter-spacing: -.005em;
  text-decoration: none; white-space: nowrap;
  transition: background-color .2s var(--ease), transform .2s var(--ease), border-color .2s;
}
.btn:hover { background: var(--btn-bg-hover); }
.btn:active { transform: translateY(1px); }
.btn--sm { min-height: 40px; padding: .5em 1em; font-size: .95rem; }
.btn--lg { min-height: 56px; padding: .8em 1.5em; font-size: 1.05rem; }
.btn--line { --_bg: transparent; --_ink: var(--ink); border-color: var(--control-edge); }
.btn--line:hover { background: var(--surface-2); border-color: var(--ink); }
.btn--turq { --_bg: var(--turquesa); --_ink: var(--navy); }
.btn--turq:hover { background: #3FD8C6; }
.btn .arrow { transition: transform .2s var(--ease); }
.btn:hover .arrow, .link-arrow:hover .arrow { transform: translateX(3px); }

.link-arrow {
  display: inline-flex; align-items: center; gap: .45em; min-height: 44px;
  font-weight: 700; color: var(--ink);
  text-decoration: underline; text-decoration-color: var(--accent-fill); text-decoration-thickness: 1.5px; text-underline-offset: 6px;
}
.link-arrow:hover { text-decoration-color: var(--ink); }
.arrow { width: 1em; height: 1em; flex: none; }

/* ---------- Cabecera ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.site-header__in { display: flex; align-items: center; gap: 28px; height: var(--header-h); }
.brand { display: inline-flex; align-items: center; flex: none; min-height: 44px; border-radius: 4px; }
.nav { display: flex; align-items: center; gap: 4px; margin-left: 8px; }
.nav__item { position: relative; }
.nav__link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 12px; border: 0; background: none; border-radius: var(--r-sm);
  color: var(--ink); font-size: .98rem; text-decoration: none;
}
.nav__link:hover, .nav__link[aria-expanded="true"] { background: var(--surface-2); }
.nav__link[aria-current="page"], .nav__link[data-current] { font-weight: 700; box-shadow: inset 0 -2px 0 var(--accent-fill); border-radius: 0; }
.nav__link .chev { width: 12px; height: 12px; transition: transform .2s; }
.nav__link[aria-expanded="true"] .chev { transform: rotate(180deg); }
.site-header__actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.link-acceso { font-weight: 700; font-size: .98rem; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; padding: 8px 4px; }
.link-acceso .ico { width: 18px; height: 18px; }
.link-acceso:hover { color: var(--accent-ink); }

/* Menú de productos */
.mega {
  position: absolute; top: calc(100% + 10px); left: -12px;
  width: min(640px, 92vw);
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: var(--shadow-soft); padding: 10px;
}
.mega__group { padding: 6px; }
.mega__group + .mega__group { border-left: 1px solid var(--line); }
.mega__label { display: block; padding: 6px 10px 8px; font-family: var(--f-mono); font-size: var(--t-xs); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); }
.mega__item { display: flex; gap: 12px; align-items: flex-start; padding: 10px; border-radius: var(--r-sm); text-decoration: none; }
.mega__item:hover { background: var(--surface-2); }
.mega__ico { width: 32px; height: 32px; border-radius: 7px; flex: none; }
.mega__item strong { display: block; font-size: .98rem; line-height: 1.25; }
.mega__item small { display: block; color: var(--ink-2); font-size: .84rem; line-height: 1.35; margin-top: 2px; }

/* Botón de tema */
.theme-btn {
  width: 44px; height: 44px; display: inline-grid; place-items: center;
  border: 1px solid var(--control-edge); background: transparent; border-radius: var(--r-sm); color: var(--ink);
}
.theme-btn:hover { border-color: var(--line-2); background: var(--surface-2); }
.theme-btn svg { width: 18px; height: 18px; }
.theme-btn .i-sol { display: none; }

/* Menú móvil */
.burger { display: none; width: 44px; height: 44px; border: 1px solid var(--control-edge); background: transparent; border-radius: var(--r-sm); place-items: center; }
.burger span { display: block; width: 18px; height: 2px; background: var(--ink); border-radius: 2px; position: relative; }
.burger span::before, .burger span::after { content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .2s; }
.burger span::before { top: -6px; } .burger span::after { top: 6px; }
.burger[aria-expanded="true"] span { background: transparent; }
.burger[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.burger[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }
/* Menú móvil a pantalla completa: soluciones en mosaico, enlaces grandes y botones fijos abajo */
.mobile-nav {
  position: fixed; inset: var(--header-h) 0 0 0; z-index: 49;
  display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain;
  background: var(--bg); border-top: 1px solid var(--line);
}
.mobile-nav__in { flex: 1 0 auto; padding-block: 20px 28px; }
.mobile-nav__label { margin: 0 0 10px; font-family: var(--f-mono); font-size: var(--t-xs); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); }
.mtiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 28px; }
.mtile { display: flex; align-items: center; gap: 10px; min-height: 68px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); text-decoration: none; }
.mtile:active { background: var(--surface-2); }
.mtile[aria-current="page"] { border-color: var(--accent-fill); box-shadow: inset 0 0 0 1px var(--accent-fill); }
.mtile img { width: 32px; height: 32px; border-radius: 8px; flex: none; }
.mtile span { min-width: 0; }
.mtile b { display: block; font-size: 1.0625rem; line-height: 1.2; letter-spacing: -.01em; }
.mtile small { display: block; margin-top: 2px; font-size: .8125rem; line-height: 1.25; color: var(--ink-2); }
.mlinks { border-top: 1.5px solid var(--rule-strong); }
.mlinks a { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; border-bottom: 1px solid var(--line); text-decoration: none; font-size: 1.125rem; font-weight: 700; letter-spacing: -.01em; }
.mlinks a[aria-current="page"] { color: var(--accent-ink); }
.mlinks .arrow { width: 18px; height: 18px; color: var(--accent-ink); }
.mobile-nav__foot { position: sticky; bottom: 0; background: var(--bg); border-top: 1px solid var(--line); padding-block: 12px calc(12px + env(safe-area-inset-bottom)); }
.mobile-nav__acts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.mobile-nav__acts .btn { min-height: 52px; padding-inline: .6em; white-space: normal; text-align: center; }
html.menu-abierto, html.menu-abierto body { overflow: hidden; }
/* backdrop-filter haría que el menú fijo se mida contra la cabecera: se quita mientras está abierto */
html.menu-abierto .site-header { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; border-bottom-color: var(--line); }

@media (max-width: 1020px) {
  .nav, .site-header__actions .link-acceso, .site-header__actions > .btn { display: none; }
  .burger { display: inline-grid; }
}

/* ---------- Kicker / encabezados de sección ---------- */
.kicker {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--f-mono); font-size: var(--t-xs); letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 22px;
}
.kicker::after { content: ""; flex: 0 1 64px; height: 1px; background: var(--line-2); }
.kicker b { color: var(--accent-ink); font-weight: 400; }
.sec-head { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); margin-bottom: clamp(40px, 5vw, 72px); align-items: end; }
.sec-head > h2 { grid-column: 1 / span 7; }
.sec-head > .sec-head__aside { grid-column: 9 / span 4; color: var(--ink-2); }
.sec-head > .sec-head__aside p:last-child { margin: 0; }
@media (max-width: 860px) { .sec-head > h2, .sec-head > .sec-head__aside { grid-column: 1 / -1; } }

/* ---------- Distintivos de línea (pastilla de marca) ---------- */
.pill {
  display: inline-flex; align-items: center; height: 26px; padding: 0 12px; border-radius: 13px;
  background: var(--turquesa); color: var(--navy); font-family: var(--f-round); font-weight: 700; font-size: .88rem; letter-spacing: .02em;
}
.sticker {
  display: inline-block; padding: 6px 12px 7px; border-radius: 6px;
  background: var(--navy); color: #fff; font-family: var(--f-round); font-weight: 700; font-size: .88rem;
  border: 2px solid var(--sticker-edge); transform: rotate(-6deg);
  box-shadow: 0 6px 14px -8px rgba(5,35,59,.6);
}

.tag { display: inline-flex; align-items: center; gap: 6px; font-family: var(--f-mono); font-size: var(--t-xs); padding: 4px 8px; border: 1px solid var(--line-2); border-radius: 4px; color: var(--ink-2); }

/* ---------- Iconos Magnific (SVG en teal; en oscuro se aclaran) ---------- */
.ico { display: inline-block; width: 28px; height: 28px; flex: none; object-fit: contain; filter: var(--ico-filter); }
.ico--sm { width: 18px; height: 18px; }
.ico--lg { width: 44px; height: 44px; }

/* ---------- Marcos para pantallas reales ---------- */
.frame {
  position: relative; background: var(--surface); border: 1px solid var(--frame-edge);
  border-radius: var(--r-md); overflow: hidden; box-shadow: var(--shadow-frame);
}
.frame__bar {
  display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 12px;
  border-bottom: 1px solid var(--line); background: var(--surface-2);
  font-family: var(--f-mono); font-size: 12px; color: var(--ink-3);
}
.frame__bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--control-edge); opacity: .6; flex: none; }
.frame__bar i + i { margin-left: -4px; }
.frame__url { margin-left: 8px; padding: 3px 10px; border-radius: 4px; background: var(--bg); border: 1px solid var(--line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.frame__url b { color: var(--ink); font-weight: 400; }
.frame img { width: 100%; filter: var(--shot-filter); }
.frame--bleed { border-right: 0; border-radius: var(--r-md) 0 0 var(--r-md); }

.phone {
  position: relative; width: 100%; max-width: 300px; border-radius: 34px; padding: 9px;
  background: var(--bezel); box-shadow: 0 0 0 1px var(--bezel-edge), var(--shadow-frame);
}
.phone img { border-radius: 26px; width: 100%; filter: var(--shot-filter); }
.phone::before { content: ""; position: absolute; top: 18px; left: 50%; width: 64px; height: 6px; margin-left: -32px; border-radius: 6px; background: #1C3246; z-index: 1; }

.caption { display: flex; gap: 10px; margin-top: 14px; font-size: var(--t-sm); color: var(--ink-3); line-height: 1.45; }
.caption::before { content: "↳"; font-family: var(--f-mono); color: var(--accent-ink); }

/* Nota anotada sobre una pantalla (tipo nota de papel, no tarjeta flotante) */
.note {
  position: absolute; z-index: 2; max-width: 250px; padding: 14px 16px 15px;
  background: var(--note-bg); color: var(--note-ink); border-radius: 3px;
  font-size: .92rem; line-height: 1.4; box-shadow: 0 14px 24px -16px rgba(5,35,59,.55);
  transform: rotate(-2deg);
}
.note strong { display: block; font-size: 1rem; }
.note--menta { background: var(--menta-2); }
.note--coral { background: var(--coral); }

/* ---------- Letra pequeña ---------- */
.tyc { display: block; margin-top: 12px; font-size: var(--t-xs); color: var(--ink-3); letter-spacing: .01em; }

/* ---------- Libro mayor: filas con guía punteada ---------- */
.ledger { list-style: none; border-top: 1.5px solid var(--rule-strong); }
.ledger li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 20px; align-items: baseline; padding: 18px 0; border-bottom: 1px solid var(--line); }
.ledger__k { font-weight: 700; font-size: 1.05rem; display: flex; align-items: baseline; gap: 10px; }
.ledger__k::after { content: ""; flex: 1; border-bottom: 1.5px dotted var(--line-2); transform: translateY(-4px); min-width: 24px; }
.ledger__v { font-family: var(--f-mono); color: var(--accent-ink); font-size: 1rem; text-align: right; white-space: nowrap; }
.ledger__d { grid-column: 1 / -1; color: var(--ink-2); font-size: .96rem; max-width: 62ch; margin: 0; }

/* ---------- Lista numerada editorial ---------- */
.steps { list-style: none; counter-reset: s; display: grid; gap: 0; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 56px 1fr; gap: 16px; padding: 18px 0; border-top: 1px solid var(--line); }
.steps li:last-child { border-bottom: 1px solid var(--line); }
.steps li::before { content: "0" counter(s); font-family: var(--f-mono); font-size: 1.05rem; color: var(--accent-ink); padding-top: 2px; }
.steps h4 { margin-bottom: 4px; }
.steps p { margin: 0; color: var(--ink-2); }

/* ---------- Interruptor ---------- */
.switch { display: inline-flex; align-items: center; gap: 12px; border: 0; background: none; padding: 6px 0; font-weight: 700; color: var(--ink); }
.switch__track { position: relative; width: 58px; height: 32px; border-radius: 16px; background: var(--track-off); transition: background-color .25s var(--ease); flex: none; }
.switch__track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(5,35,59,.3); transition: transform .3s var(--ease); }
.switch[aria-checked="true"] .switch__track { background: var(--turquesa); }
.switch[aria-checked="true"] .switch__track::after { transform: translateX(26px); }

/* ---------- Selector segmentado (una sola opción a la vez) ---------- */
.seg { display: inline-flex; padding: 3px; border: 1px solid var(--control-edge); border-radius: 8px; background: var(--surface); gap: 2px; flex-wrap: wrap; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg span { display: block; padding: 7px 14px; border-radius: 6px; font-size: .92rem; font-weight: 700; color: var(--ink-2); }
.seg input:checked + span { background: var(--btn-bg); color: var(--btn-ink); }
.seg input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 1px; }

/* ---------- Formularios ---------- */
.field { display: grid; gap: 8px; margin-bottom: 18px; }
.field label { font-weight: 700; font-size: .95rem; }
.field .hint { font-size: var(--t-sm); color: var(--ink-3); margin: 0; }
.input {
  width: 100%; min-height: 56px; padding: 12px 16px;
  border: 1.5px solid var(--control-edge); border-radius: var(--r-sm); background: var(--surface); color: var(--ink);
  font-size: 1.15rem; transition: border-color .2s, box-shadow .2s;
}
.input--mono { font-family: var(--f-mono); letter-spacing: .06em; font-size: 1.3rem; }
.input::placeholder { color: var(--ink-3); opacity: .8; }
.input:hover { border-color: var(--ink-3); }
.input:focus { outline: none; border-color: var(--accent-fill); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent-fill) 22%, transparent); }
.field.is-invalid .input { border-color: var(--err); box-shadow: 0 0 0 3px color-mix(in srgb, var(--err) 18%, transparent); }
.field .error { display: none; color: var(--err); font-size: var(--t-sm); font-weight: 700; margin: 0; }
.field.is-invalid .error { display: block; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .95rem; color: var(--ink-2); }
.check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--teal); }
.captcha-slot { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 12px 16px; border: 1.5px dashed var(--line-2); border-radius: var(--r-sm); color: var(--ink-3); font-size: var(--t-sm); margin-bottom: 18px; }

/* ---------- Preguntas frecuentes ---------- */
.faq { border-top: 1.5px solid var(--rule-strong); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 1fr 28px; gap: 16px; align-items: center; padding: 20px 0; font-weight: 700; font-size: 1.1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--f-mono); font-weight: 400; font-size: 1.4rem; text-align: center; color: var(--accent-ink); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .faq__a { padding: 0 44px 22px 0; color: var(--ink-2); max-width: 70ch; }
.faq .faq__a p:last-child { margin-bottom: 0; }

/* ---------- Quixi ---------- */
.quixi { width: 160px; height: auto; }
.quixi--sm { width: 110px; }
.quixi--lg { width: 220px; }

/* ---------- Franja de llamada final ---------- */
.cta-band { background: var(--band-bg); border: 1px solid var(--band-edge); color: #fff; border-radius: var(--r-lg); padding: clamp(32px, 5vw, 64px); display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; align-items: center; position: relative; overflow: hidden; }
.cta-band h2 { font-size: clamp(1.9rem, 1.3rem + 2.2vw, 3rem); margin-bottom: 18px; }
.cta-band p { max-width: 46ch; margin-bottom: 28px; }
.cta-band .acento { color: var(--menta-3); }
.cta-band p { color: #C7D6DF; }
.cta-band .tyc { color: #A9BFCC; }
.cta-band .btn { --_bg: var(--turquesa); --_ink: var(--navy); }
.cta-band .btn:hover { background: #3FD8C6; }
.cta-band .link-arrow { color: #fff; }
.cta-band__side { display: flex; justify-content: flex-end; align-items: flex-end; gap: 16px; }
@media (max-width: 760px) { .cta-band { grid-template-columns: 1fr; } .cta-band__side { justify-content: flex-start; } }

/* ---------- Pie ---------- */
.site-footer { background: var(--bg-alt); border-top: 1px solid var(--line); padding-block: 72px 32px; font-size: .96rem; }
.footer__top { display: grid; grid-template-columns: 1.2fr 2fr; gap: 48px; padding-bottom: 48px; border-bottom: 1px solid var(--line); }
.footer__claim { font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem); font-weight: 700; letter-spacing: -.025em; line-height: 1.15; margin: 20px 0 0; max-width: 20ch; }
.footer__sub { margin: 12px 0 0; color: var(--ink-2); max-width: 40ch; }
.footer__cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.footer__cols h3 { font-family: var(--f-mono); font-weight: 400; font-size: var(--t-xs); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 14px; }
.footer__cols ul { list-style: none; display: grid; gap: 8px; }
.footer__cols a { text-decoration: none; color: var(--ink); }
.footer__cols a:hover { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; }
.footer__ig { display: inline-flex; align-items: center; gap: 8px; }
.footer__ig svg { width: 18px; height: 18px; }
.footer__bottom { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; justify-content: space-between; padding-top: 28px; color: var(--ink-3); font-size: var(--t-sm); }
.footer__bottom p { margin: 0; }
.theme-seg .seg span { padding: 5px 12px; font-size: .85rem; }
@media (max-width: 860px) {
  .footer__top { grid-template-columns: 1fr; }
  .footer__cols { grid-template-columns: 1fr 1fr; }
}

/* ---------- Aparición al hacer scroll (sutil) ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* Pantallas que solo existen en claro: en oscuro van sobre una tarjeta clara, sin filtros */
.frame--light { background: var(--shot-light-bg); }
.frame--light .frame__bar { background: var(--shot-light-bar); border-bottom-color: rgba(5,35,59,.10); color: var(--shot-light-ink); }
.frame--light .frame__url { background: rgba(255,255,255,.7); border-color: rgba(5,35,59,.10); color: var(--shot-light-ink); }
.frame--light .frame__url b { color: #05233B; }
.frame--light .frame__bar i { background: #9AA8B4; }
.frame--light img { filter: none; }
.frame--light { padding: 0; }
