/* ==========================================================================
   Componentes reutilizables: nav, logo, mockup de celular, tabs, acordeón, formulario
   ========================================================================== */

/* ---------- Logo ---------- */
.logo { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; }
.logo img { height: auto; }
.on-navy .wm { filter: brightness(0) invert(1) !important; }

/* ---------- Barra de navegación ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100; height: var(--nav-h);
  background: color-mix(in srgb, var(--bg) 55%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.5); backdrop-filter: blur(14px) saturate(1.5);
  border-bottom: var(--bw) solid transparent;
  transition: background var(--t-mid), border-color var(--t-mid);
}
.nav.is-scrolled { background: color-mix(in srgb, var(--bg) 88%, transparent); border-bottom-color: var(--line); }
.nav__inner { height: 100%; display: flex; align-items: center; gap: 1rem; }
.nav__links { display: none; margin-inline: auto; gap: .25rem; }
.nav__links a { display: block; padding: .5rem .9rem; border-radius: 999px; color: var(--text); font-weight: 600; font-size: .9375rem; text-decoration: none; transition: background var(--t-fast); }
.nav__links a:hover { background: var(--sky-soft); }
.nav__actions { display: flex; align-items: center; gap: .5rem; margin-left: auto; }
.icon-btn {
  display: grid; place-items: center; width: 44px; height: 44px; background: var(--surface); color: var(--text);
  border: var(--bw) solid var(--line); border-radius: 50%; box-shadow: 2px 2px 0 var(--shadow-c);
  transition: transform var(--t-fast), box-shadow var(--t-fast);
}
.icon-btn:active { transform: translate(2px, 2px); box-shadow: none; }
.menu-btn .i-close { display: none; }
.menu-btn[aria-expanded="true"] .i-close { display: block; }
.menu-btn[aria-expanded="true"] .i-menu { display: none; }
.mobile-menu {
  position: absolute; top: 100%; left: 0; right: 0; background: var(--bg); border-bottom: var(--bw) solid var(--line);
  padding: .75rem var(--gutter) 1.25rem; display: grid; gap: .25rem;
  clip-path: inset(0 0 100% 0); visibility: hidden; transition: clip-path var(--t-mid) var(--ease), visibility 0s var(--t-mid);
}
.mobile-menu.is-open { clip-path: inset(0 0 -20px 0); visibility: visible; transition: clip-path var(--t-mid) var(--ease); }
.mobile-menu a { padding: .9rem 1rem; border-radius: var(--r-s); font-weight: 700; color: var(--text); text-decoration: none; font-size: 1.0625rem; }
.mobile-menu a:hover { background: var(--sky-soft); }
@media (min-width: 900px) {
  .nav__links { display: flex; }
  .menu-btn, .mobile-menu { display: none; }
}
@media (max-width: 440px) { .logo .wm { display: none; } .nav .btn--sm { padding: .4rem .8rem; min-height: 44px; font-size: .8125rem; white-space: nowrap; } .nav__actions { gap: .4rem; } }

/* ---------- Mockup de celular (CSS) con captura real ----------
   Las capturas son 1170 × 2532 px (sin marco, barra de estado ni muesca); el marco y la cámara los pone el mockup. */
.phone {
  --w: 280px;
  position: relative; width: var(--w); padding: 8px;
  background: var(--surface); border: 3px solid var(--line); border-radius: 40px; box-shadow: var(--sh-lg);
}
.phone::before { /* cámara */
  content: ""; position: absolute; z-index: 3; top: 15px; left: 50%; translate: -50% 0; width: 26%; height: 12px;
  background: var(--line); border-radius: 999px;
}
.phone__screen { position: relative; aspect-ratio: 1170 / 2532; overflow: hidden; border-radius: 30px; border: 2px solid var(--line); background: var(--bg-alt); }
.phone__screen img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.phone--sm { padding: 6px; border-radius: 32px; }
.phone--sm .phone__screen { border-radius: 24px; }

/* ---------- Tarjeta base (colores planos, borde grueso, sombra dura) ---------- */
.card {
  background: var(--surface); color: var(--text);
  border: var(--bw) solid var(--line); border-radius: var(--r-m); box-shadow: var(--sh);
  transition: transform var(--t-mid) var(--ease), box-shadow var(--t-mid) var(--ease);
}
.card--sky { background: var(--c-sky); color: var(--on-pastel); }
.card--mint { background: var(--c-mint); color: var(--on-pastel); }
.card--yellow { background: var(--c-yellow); color: var(--on-pastel); }
.card--coral { background: var(--c-coral); color: var(--on-pastel); }
.card--lilac { background: var(--c-lilac); color: var(--on-pastel); }
.card--lift:hover { transform: translate(-3px, -3px); box-shadow: 7px 7px 0 var(--shadow-c); }
.chip-ico { display: grid; place-items: center; width: 3rem; height: 3rem; flex: none; background: #fff; color: var(--navy); border: var(--bw) solid var(--ink); border-radius: 14px; box-shadow: 2px 2px 0 var(--ink); }
.chip-ico .ico { width: 1.5rem; height: 1.5rem; }

/* ---------- Pestañas (roles) ---------- */
.tablist {
  position: relative; display: flex; gap: .4rem; padding: .4rem; width: fit-content; max-width: 100%;
  overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none;
  background: var(--surface); border: var(--bw) solid var(--line); border-radius: 999px; box-shadow: var(--sh);
  margin-bottom: 1.75rem;
}
.tablist::-webkit-scrollbar { display: none; }
.tab-indicator {
  position: absolute; z-index: 0; left: 0; top: .4rem; bottom: .4rem; width: var(--w, 0); translate: var(--x, 0) 0;
  background: var(--accent); border: var(--bw) solid var(--line); border-radius: 999px;
  transition: translate var(--t-mid) var(--ease), width var(--t-mid) var(--ease);
}
.tab {
  position: relative; z-index: 1; flex: none; scroll-snap-align: center; display: inline-flex; align-items: center; gap: .55rem;
  min-height: 46px; padding: .5rem 1.15rem; background: transparent; border: var(--bw) solid transparent; border-radius: 999px;
  font-weight: 800; font-size: .9875rem; color: var(--text); white-space: nowrap; transition: color var(--t-fast);
}
.tab[aria-selected="true"] { color: var(--accent-ink); }
.tab:not([aria-selected="true"]):hover { background: var(--sky-soft); }
.tab .ico { width: 1.25rem; height: 1.25rem; }
.tabpanel[hidden] { display: none; }
.tabpanel { animation: panel-in 420ms var(--ease); }
@keyframes panel-in { from { opacity: 0; translate: 0 14px; } }

/* ---------- Acordeón (FAQ) ---------- */
.acc { display: grid; gap: .9rem; }
.acc-item { background: var(--surface); border: var(--bw) solid var(--line); border-radius: var(--r-m); box-shadow: var(--sh); overflow: hidden; transition: background var(--t-mid); }
.acc-item.is-open { background: var(--sky-soft); }
.acc-q { margin: 0; font-size: inherit; letter-spacing: 0; line-height: 1.3; }
.acc-btn {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem; text-align: left;
  padding: 1.1rem 1.35rem; min-height: 64px; background: none; border: 0; font-weight: 800; font-size: clamp(1rem, .95rem + .3vw, 1.175rem); color: var(--text);
}
.acc-btn:focus-visible { outline-offset: -4px; }
.acc-btn .ico { transition: transform var(--t-mid) var(--ease); }
.acc-btn[aria-expanded="true"] .ico { transform: rotate(180deg); }
.acc-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--t-mid) var(--ease); }
.acc-item.is-open .acc-panel { grid-template-rows: 1fr; }
.acc-panel > div { overflow: hidden; }
.acc-panel p { padding: 0 1.35rem 1.3rem; color: var(--muted); max-width: 60ch; }
.acc-panel[inert] { visibility: hidden; }

/* ---------- Formulario ---------- */
.form-card { background: var(--surface); color: var(--text); border: var(--bw) solid var(--line); border-radius: var(--r-l); box-shadow: var(--sh-lg); padding: clamp(1.4rem, 1rem + 2vw, 2.4rem); --line: #0E0E10; --shadow-c: #0E0E10; --muted: #3D4466; --text: #0E0E10; --focus: #101E70; }
.form-grid { display: grid; gap: 1.1rem 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .form-grid { grid-template-columns: 1fr 1fr; } .field--full { grid-column: 1 / -1; } }
.field label { display: block; font-weight: 700; font-size: .9375rem; margin-bottom: .4rem; }
.field .opt { font-weight: 500; color: var(--muted); }
.field input:not([type="checkbox"]), .field textarea {
  width: 100%; min-height: 50px; padding: .7rem .95rem; background: var(--bg); color: var(--text);
  border: var(--bw) solid var(--line); border-radius: var(--r-s); transition: box-shadow var(--t-fast), border-color var(--t-fast);
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus-visible, .field textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; box-shadow: 3px 3px 0 var(--shadow-c); }
.field [aria-invalid="true"] { border-color: var(--error); box-shadow: 3px 3px 0 var(--error); }
.field-error { display: none; align-items: flex-start; gap: .4rem; margin-top: .45rem; color: var(--error); font-size: .875rem; font-weight: 600; }
.field-error .ico { width: 1.1rem; height: 1.1rem; margin-top: .1rem; }
.field.has-error .field-error { display: flex; }
.consent { display: flex; gap: .75rem; align-items: flex-start; }
.consent input { appearance: none; flex: none; width: 26px; height: 26px; margin: .1rem 0 0; background: var(--bg); border: var(--bw) solid var(--line); border-radius: 8px; display: grid; place-content: center; cursor: pointer; }
.consent input::after { content: ""; width: 14px; height: 8px; border-left: 3px solid var(--accent-ink); border-bottom: 3px solid var(--accent-ink); rotate: -45deg; translate: 0 -1px; scale: 0; transition: scale var(--t-fast) var(--ease); }
.consent input:checked { background: var(--accent); }
.consent input:checked::after { scale: 1; }
.consent input:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.consent label { margin: 0; font-weight: 500; cursor: pointer; }
.form-actions { margin-top: 1.5rem; }
.form-actions .btn { width: 100%; }
@media (min-width: 640px) { .form-actions .btn { width: auto; } }
.form-ok { text-align: center; padding: clamp(1rem, 4vw, 2.5rem) 1rem; display: grid; justify-items: center; gap: 1rem; }
.form-ok[hidden] { display: none; }
.form-ok:focus { outline: none; }
.form-ok__ico { display: grid; place-items: center; width: 4.5rem; height: 4.5rem; background: var(--c-mint); color: var(--ink); border: var(--bw) solid var(--line); border-radius: 50%; box-shadow: var(--sh); }
.form-ok__ico .ico { width: 2.2rem; height: 2.2rem; stroke-width: 3; }
.form-ok p { font-size: var(--fs-h3); font-weight: 800; letter-spacing: -.01em; }
