/* =========================================================
   Agencia Aduanal de Occidente · Sistema visual del sitio
   Minimal institucional. Paleta del logo: azul marino #1F2D6C de base,
   turquesa #027E94 como único acento. Íconos propios (assets/icons.svg).
   Radios: 8px controles · 12px paneles y medios.
   ========================================================= */
:root {
  /* Tema claro (base) */
  --bg: #FFFFFF;
  --bg-2: #F4F6FA;
  --surface: #FFFFFF;
  --surface-2: #EEF2F7;
  --line: rgb(21 31 78 / .09);
  --line-2: rgb(21 31 78 / .16);
  --hover-line: rgb(21 31 78 / .32);
  --text: #141C40;
  --text-2: #2E3858;
  --muted: #4E5876;
  --faint: #6A7390;
  --accent: #027E94;
  --accent-text: #016A7C;
  --accent-ink: #FFFFFF;
  --accent-soft: rgb(2 126 148 / .10);
  --btn-bg: #1F2D6C;
  --btn-ink: #FFFFFF;
  --btn-hover: #2A3B88;
  --sk-hi: #E4E9F1;
  --shadow: 0 1px 2px rgb(21 31 78 / .04), 0 14px 32px -16px rgb(21 31 78 / .14);
  --danger: #C0392B;
  --navy: #151F4E;
  --r: 8px;
  --r-lg: 12px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --wrap: 1240px;
  --gutter: 32px;
  --section: 136px;
  color-scheme: light;
}

/* Zonas oscuras sobre video (portada, banda, pie y menú transparente sobre la portada) */
.hero, .band, .footer, .nav:not(.is-solid):not(.is-open) {
  --bg: #151F4E;
  --bg-2: #131C47;
  --surface: #1B2760;
  --surface-2: #22306E;
  --line: rgb(255 255 255 / .1);
  --line-2: rgb(255 255 255 / .16);
  --hover-line: rgb(255 255 255 / .34);
  --text: #F1F4FA;
  --text-2: rgb(241 244 250 / .82);
  --muted: #B3BCD6;
  --faint: #8E98B8;
  --accent: #33B6CB;
  --accent-text: #5CC8D9;
  --btn-bg: #027E94;
  --btn-ink: #FFFFFF;
  --btn-hover: #0794AC;
  --shadow: none;
  color: var(--text);
}
@media (max-width: 900px) { :root { --gutter: 20px; --section: 88px; } }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text); font-family: var(--font);
  font-size: 16px; line-height: 1.6; font-weight: 400; -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
body.no-scroll { overflow: hidden; }
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 500; letter-spacing: -0.03em; line-height: 1.08; }
h2 { font-size: clamp(30px, 3.4vw, 48px); text-wrap: balance; }
p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--accent); color: var(--accent-ink); }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.lead { color: var(--muted); font-size: 17px; line-height: 1.6; max-width: 54ch; margin-top: 18px; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); color: var(--accent-text); font-weight: 500; }
.hint { font-size: 13px; color: var(--faint); }
.form-error { color: var(--danger); font-size: 14px; }

/* ---------- Íconos propios ---------- */
.ico { width: 20px; height: 20px; flex: none; display: inline-block; vertical-align: middle; }
.ico--lg { width: 28px; height: 28px; }
.ico--xl { width: 40px; height: 40px; }

/* ---------- Marcador de sección: los tres puntos del logo ---------- */
.marker { display: inline-flex; align-items: center; gap: 12px; font-size: 13.5px; color: var(--muted); letter-spacing: .01em; margin-bottom: 22px; }
.dots { display: inline-flex; gap: 4px; }
.dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }

/* ---------- Botones y enlaces ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 46px; padding: 0 22px; border-radius: var(--r); border: 1px solid transparent;
  font-weight: 500; font-size: 15px; white-space: nowrap; cursor: pointer;
  transition: background .2s var(--ease), border-color .2s var(--ease), color .2s, transform .15s;
}
.btn:active { transform: translateY(1px); }
.btn--sm { height: 38px; padding: 0 16px; font-size: 14px; }
.btn--lg { height: 52px; padding: 0 28px; font-size: 15.5px; }
.btn--block { width: 100%; }
.btn--primary, .btn--accent { background: var(--btn-bg); color: var(--btn-ink); }
.btn--primary:hover, .btn--accent:hover { background: var(--btn-hover); }
.btn--ghost { border-color: var(--line-2); color: var(--text); }
.btn--ghost:hover { border-color: var(--hover-line); }
.btn--light { background: var(--surface-2); color: var(--text); border-color: var(--line-2); }
.btn--light:hover { border-color: var(--hover-line); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn .ico { width: 18px; height: 18px; }

.link-arrow { display: inline-flex; align-items: center; gap: 10px; font-weight: 500; font-size: 15px; color: var(--text); padding: 6px 0; }
.link-arrow .ico { color: var(--accent); width: 18px; height: 18px; transition: transform .25s var(--ease); }
.link-arrow:hover .ico { transform: translateX(4px); }

/* ---------- Campos ---------- */
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field__label { font-size: 13px; color: var(--muted); font-weight: 500; }
.field input, .field select, .field textarea {
  width: 100%; height: 48px; padding: 0 14px; border-radius: var(--r);
  background: var(--bg-2); border: 1px solid var(--line-2); color: var(--text); font-size: 16px;
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { height: auto; padding: 12px 14px; resize: vertical; line-height: 1.5; }
.field select, .select-flag select {
  appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23A1B0C6' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center;
}
.field input::placeholder, .field textarea::placeholder { color: var(--faint); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field input[aria-invalid="true"] { border-color: var(--danger); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: end; }
.form-grid--3 { grid-template-columns: 1fr 1fr 1fr; }
.field--full { grid-column: 1 / -1; }
@media (max-width: 640px) {
  .form-grid--3 { grid-template-columns: 1fr 1fr; }
  .form-grid--3 .field:last-child { grid-column: 1 / -1; }
}

/* Selector segmentado */
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: var(--r); border: 1px solid var(--line-2); background: var(--bg-2); }
.seg button {
  height: 38px; padding: 0 16px; border-radius: 6px; border: 0; background: transparent; color: var(--muted);
  cursor: pointer; font-weight: 500; font-size: 14.5px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: background .2s, color .2s;
}
.seg button:hover { color: var(--text); }
.seg button[aria-checked="true"] { background: var(--surface); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2), inset 0 -2px 0 var(--accent); }
.seg button .ico { width: 18px; height: 18px; color: var(--accent); }
.seg--full { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
.seg--full button { height: 44px; }

/* Panel plano */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px; box-shadow: var(--shadow); }
@media (max-width: 640px) { .panel { padding: 20px; } }

/* Listas con guion fino */
.list, .ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.list li, .ticks li { position: relative; padding-left: 24px; color: var(--text-2); font-size: 15.5px; line-height: 1.5; }
.list li::before, .ticks li::before { content: ""; position: absolute; left: 0; top: .78em; width: 12px; height: 1px; background: var(--accent); }

/* Banderas */
.flag { position: relative; display: inline-block; flex: none; overflow: hidden; width: 28px; aspect-ratio: 4 / 3; border-radius: 3px; box-shadow: 0 0 0 1px var(--line-2); background: var(--surface-2); }
.flag img { width: 100%; height: 100%; object-fit: cover; }
.flag--sm { width: 22px; border-radius: 2px; }
.select-flag { position: relative; display: block; }
.select-flag .flag { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); z-index: 1; pointer-events: none; }
.select-flag select { padding-left: 50px; }
.select-flag--lg select { height: 54px; font-size: 16.5px; font-weight: 500; padding-left: 54px; }
.select-flag--lg .flag { width: 26px; }

/* ---------- Navegación ---------- */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 40; height: 76px; border-bottom: 1px solid transparent; transition: background .3s var(--ease), border-color .3s; }
.nav.is-solid { background: rgb(255 255 255 / .94); border-color: var(--line); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.nav__inner { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); height: 100%; display: flex; align-items: center; gap: 40px; }
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand img { border-radius: 50%; box-shadow: 0 0 0 1px var(--line-2); flex: none; }
.brand__name { max-width: 13ch; font-size: 14.5px; font-weight: 500; line-height: 1.15; letter-spacing: -0.01em; }
.nav__links { display: flex; align-items: center; gap: 32px; margin-left: auto; font-size: 14.5px; color: var(--muted); }
.nav__links a:not(.btn) { transition: color .2s; }
.nav__links a:not(.btn):hover { color: var(--text); }
.nav__menu-cta { display: none !important; }
.nav__burger { display: none; margin-left: auto; background: none; border: 0; padding: 8px; cursor: pointer; color: var(--text); }
.nav__burger .ico { width: 26px; height: 26px; }
@media (max-width: 900px) {
  .nav__links {
    position: fixed; inset: 76px 0 0 0; flex-direction: column; align-items: stretch; gap: 0; margin: 0;
    background: var(--bg); padding: 12px var(--gutter) 32px; font-size: 22px; font-weight: 500; color: var(--text);
    opacity: 0; pointer-events: none; transform: translateY(-6px); transition: .25s var(--ease);
  }
  .nav__links a:not(.btn) { padding: 18px 0; border-bottom: 1px solid var(--line); }
  .nav__menu-cta { display: inline-flex !important; margin-top: 28px; height: 54px; font-size: 16px; }
  .nav.is-open .nav__links { opacity: 1; pointer-events: auto; transform: none; }
  .nav.is-open { background: var(--bg); }
  .nav__burger { display: block; }
  .nav__cta { display: none; }
}

/* ---------- Medios ---------- */
[data-media] { position: absolute; inset: 0; overflow: hidden; background: var(--surface) center / cover no-repeat; }
[data-media] video, [data-media] img, [data-media] .lottie { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
[data-media] video { opacity: 0; transition: opacity 1s var(--ease); }
[data-media] video.is-ready { opacity: 1; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100svh; display: flex; align-items: flex-end; overflow: hidden; isolation: isolate; }
.hero__media { z-index: -2; background-image: url(/assets/video/hero.webp); background-position: 100% center; }
.hero__media video { object-position: 100% center; }
.hero__scrim {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgb(21 31 78 / .6) 0%, rgb(21 31 78 / 0) 20%),
    linear-gradient(90deg, rgb(21 31 78 / .9) 0%, rgb(21 31 78 / .55) 42%, rgb(21 31 78 / 0) 72%),
    linear-gradient(0deg, var(--navy) 0%, rgb(21 31 78 / 0) 34%);
}
.hero__inner { padding-top: 140px; padding-bottom: 96px; }
.hero__title { font-size: clamp(40px, 5.4vw, 76px); font-weight: 450; letter-spacing: -0.04em; line-height: 1.02; max-width: 15ch; text-wrap: balance; }
.hero__sub { margin-top: 24px; font-size: clamp(16px, 1.3vw, 18.5px); color: var(--text-2); max-width: 46ch; line-height: 1.6; }
.hero__ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; margin-top: 40px; }
.hero .marker { color: var(--text-2); }
.hero__inner > * { opacity: 0; transform: translateY(14px); animation: rise .9s var(--ease) forwards; }
.hero__inner > :nth-child(2) { animation-delay: .08s; }
.hero__inner > :nth-child(3) { animation-delay: .16s; }
.hero__inner > :nth-child(4) { animation-delay: .24s; }
@keyframes rise { to { opacity: 1; transform: none; } }
@media (max-width: 767px), (orientation: portrait) {
  .hero__media { background-image: url(/assets/video/hero-m.webp); background-position: center; }
  .hero__media video { object-position: center; }
}
@media (max-width: 767px) {
  .hero { min-height: 92svh; }
  .hero__scrim { background: linear-gradient(180deg, rgb(21 31 78 / .55) 0%, rgb(21 31 78 / .15) 26%, rgb(21 31 78 / .7) 50%, rgb(21 31 78 / .9) 72%, var(--navy) 100%); }
  .hero__inner { padding-bottom: 48px; }
  .hero__title { font-size: clamp(36px, 10.5vw, 46px); }
  .hero__ctas { margin-top: 32px; }
  .hero__ctas .btn { width: 100%; }
}

/* ---------- Pilares ---------- */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); padding-top: 56px; padding-bottom: 56px; border-bottom: 1px solid var(--line); }
.pillar { display: flex; gap: 18px; padding-right: 40px; }
.pillar .ico { color: var(--accent); margin-top: 2px; }
.pillar p { color: var(--muted); font-size: 14.5px; line-height: 1.55; }
.pillar strong { display: block; color: var(--text); font-weight: 500; font-size: 16px; margin-bottom: 4px; }
@media (max-width: 900px) { .pillars { grid-template-columns: 1fr; gap: 28px; padding-top: 40px; padding-bottom: 48px; } }

/* ---------- Servicios: índice editorial ---------- */
.services { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 80px; padding-top: var(--section); padding-bottom: var(--section); align-items: start; }
.services__aside { position: sticky; top: 120px; }
.services__media { position: relative; margin: 44px 0 0; aspect-ratio: 4 / 5; max-height: 460px; width: 100%; border-radius: var(--r-lg); overflow: hidden; }
.index { border-top: 1px solid var(--line); }
.index__item { border-bottom: 1px solid var(--line); }
.index__item summary {
  list-style: none; cursor: pointer; display: grid; grid-template-columns: 44px 1fr 24px; align-items: center; gap: 20px;
  padding: 28px 0;
}
.index__item summary::-webkit-details-marker { display: none; }
.index__icon { color: var(--accent); }
.index__title { font-size: clamp(19px, 1.6vw, 23px); font-weight: 500; letter-spacing: -0.02em; line-height: 1.25; transition: color .2s; }
.index__title small { display: block; font-size: 14.5px; font-weight: 400; color: var(--muted); letter-spacing: 0; margin-top: 4px; }
.index__item summary:hover .index__title { color: var(--accent-text); }
.index__toggle { position: relative; width: 16px; height: 16px; justify-self: end; flex: none; }
.index__toggle::before, .index__toggle::after { content: ""; position: absolute; left: 0; top: 7.25px; width: 16px; height: 1.5px; background: var(--muted); border-radius: 1px; transition: transform .3s var(--ease), background .2s; }
.index__toggle::after { transform: rotate(90deg); }
details[open] > summary .index__toggle::after { transform: rotate(0deg); }
details[open] > summary .index__toggle::before, details[open] > summary .index__toggle::after { background: var(--accent); }
.index__body { padding: 0 0 32px 64px; display: grid; gap: 20px; justify-items: start; animation: fade .35s var(--ease); }
@keyframes fade { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@media (max-width: 900px) {
  .services { grid-template-columns: 1fr; gap: 40px; }
  .services__aside { position: static; }
  .services__media { aspect-ratio: 16 / 10; margin-top: 32px; }
  .index__item summary { grid-template-columns: 32px 1fr 20px; gap: 16px; padding: 22px 0; }
  .index__icon { width: 26px; height: 26px; }
  .index__body { padding-left: 48px; }
}

/* ---------- Banda con declaración ---------- */
.band { position: relative; isolation: isolate; min-height: 72svh; display: flex; align-items: center; overflow: hidden; }
.band__media { z-index: -2; }
.band__scrim { position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgb(21 31 78 / .9) 0%, rgb(21 31 78 / .55) 60%, rgb(21 31 78 / .4) 100%); }
.band__text { font-size: clamp(28px, 3.8vw, 54px); font-weight: 400; letter-spacing: -0.035em; line-height: 1.12; text-wrap: balance; }
.band__text em { font-style: normal; color: var(--accent-text); }
@media (min-width: 901px) { .band__text { padding-right: 34%; } }
@media (max-width: 767px) { .band { min-height: 64svh; } .band__scrim { background: linear-gradient(0deg, rgb(21 31 78 / .9) 0%, rgb(21 31 78 / .7) 45%, rgb(21 31 78 / .55) 100%); } }

/* ---------- Proceso ---------- */
.process { padding-top: var(--section); padding-bottom: 40px; }
.steps { list-style: none; margin: 56px 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--line-2); }
.steps li { position: relative; padding: 28px 28px 0 0; }
.steps li::before { content: ""; position: absolute; top: -1px; left: 0; width: 32px; height: 1px; background: var(--accent); }
.steps__n { display: block; font-family: var(--mono); font-size: 12.5px; color: var(--faint); }
.steps .ico { color: var(--accent); margin: 22px 0 16px; }
.steps h3 { font-size: 17.5px; letter-spacing: -0.015em; }
.steps p { color: var(--muted); font-size: 14.5px; margin-top: 8px; line-height: 1.55; }
@media (max-width: 900px) {
  .steps { grid-template-columns: 1fr; margin-top: 36px; border-top: 0; }
  .steps li { display: grid; grid-template-columns: 40px 1fr; column-gap: 16px; padding: 22px 0; border-top: 1px solid var(--line); }
  .steps li::before { display: none; }
  .steps__n { grid-row: 1 / span 3; padding-top: 4px; }
  .steps .ico { display: none; }
  .steps p { margin-top: 4px; }
}

/* ---------- Calculadora (inicio) ---------- */
.calc { position: relative; isolation: isolate; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 96px; align-items: center; padding-top: var(--section); padding-bottom: 40px; }
.calc::before {
  content: ""; position: absolute; z-index: -1; left: -120px; top: 50%; width: 620px; aspect-ratio: 1; transform: translateY(-40%);
  background: url(/assets/brand/ring-navy.svg) center / contain no-repeat; opacity: .05; pointer-events: none;
}
.calc .link-arrow { margin-top: 28px; }
.mini { display: grid; gap: 22px; }
.mini__out { display: grid; gap: 4px; }
.mini__row { display: flex; justify-content: space-between; gap: 12px; font-size: 14.5px; padding: 4px 0; }
.mini__row span { color: var(--text-2); }
.mini__row b { font-weight: 500; font-variant-numeric: tabular-nums; }
.mini__row--muted { color: var(--muted); border-bottom: 1px solid var(--line); padding-bottom: 10px; margin-bottom: 6px; }
.mini__total { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 0 12px; border-top: 1px solid var(--line); padding-top: 16px; margin: 8px 0 16px; }
.mini__total span { color: var(--muted); font-size: 13px; }
.mini__total strong { font-size: 34px; letter-spacing: -0.03em; font-weight: 500; font-variant-numeric: tabular-nums; grid-row: span 2; }
.mini__total small { color: var(--faint); font-family: var(--mono); font-size: 12px; }
.mini__empty { color: var(--muted); padding: 24px 0; text-align: center; }
@media (max-width: 900px) { .calc { grid-template-columns: 1fr; gap: 36px; } .calc::before { left: -40%; width: 140%; } }

/* ---------- Contacto ---------- */
.contact { padding-top: var(--section); padding-bottom: 40px; }
.contact__head { max-width: 720px; margin-bottom: 48px; }
.contact__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: stretch; }
.contact__info { display: flex; flex-direction: column; }
.contact__form { display: flex; flex-direction: column; justify-content: center; }
.contact__list { list-style: none; padding: 0; margin: 36px 0 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.contact__list li { display: flex; align-items: center; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 15.5px; }
.contact__list .ico { color: var(--accent); }
.contact__list a { transition: color .2s; }
.contact__list a:hover { color: var(--accent); }
.contact__done { text-align: center; padding: 40px 8px; }
.contact__done h3 { font-size: 26px; margin: 18px 0 4px; }
.contact__done .lead { margin-left: auto; margin-right: auto; }
.done-mark { display: inline-grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; border: 1px solid var(--accent); color: var(--accent); }
/* Botones de contacto directo */
.cbtns { display: grid; gap: 12px; flex: 1; grid-auto-rows: 1fr; }
.cbtn {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px;
  padding: 18px 20px; border-radius: var(--r-lg); border: 1px solid var(--line-2); background: var(--surface); box-shadow: var(--shadow);
  transition: border-color .2s var(--ease), background .2s var(--ease), transform .15s;
}
.cbtn:hover { border-color: var(--hover-line); }
.cbtn:active { transform: translateY(1px); }
.cbtn > .ico:first-child { color: var(--accent); }
.cbtn strong { display: block; font-size: 17px; font-weight: 500; }
.cbtn small { display: block; color: var(--muted); font-size: 14px; margin-top: 2px; overflow-wrap: anywhere; }
.cbtn > .ico:last-child { color: var(--faint); transition: transform .25s var(--ease), color .2s; }
.cbtn:hover > .ico:last-child { transform: translateX(4px); color: var(--text); }
.cbtn--primary { background: var(--btn-bg); border-color: var(--btn-bg); color: var(--btn-ink); }
.cbtn--primary:hover { background: var(--btn-hover); border-color: var(--btn-hover); }
.cbtn--primary > .ico:first-child { color: var(--accent); }
.cbtn--primary small, .cbtn--primary > .ico:last-child { color: var(--btn-ink); }
.cbtn--primary small { opacity: .75; }
.contact__addr { display: flex; align-items: center; gap: 10px; margin-top: 16px; color: var(--muted); font-size: 14.5px; }
.contact__addr .ico { color: var(--accent); width: 18px; height: 18px; }
.contact__fields { display: grid; gap: 18px; }
.contact__fields h3 { font-size: 22px; letter-spacing: -0.02em; }
.contact__fields .hint { margin-top: -10px; font-size: 14px; }
@media (max-width: 900px) { .contact__grid { grid-template-columns: 1fr; gap: 16px; } .contact__head { margin-bottom: 28px; } .cbtns { grid-auto-rows: auto; } }

/* ---------- Preguntas frecuentes ---------- */
.faq { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 80px; padding-top: var(--section); padding-bottom: var(--section); align-items: start; }
.faq__aside { position: sticky; top: 112px; }
.faq__aside .lead { max-width: 36ch; }
.faq__help {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; margin-top: 32px; max-width: 400px;
  padding: 16px 18px; border-radius: var(--r-lg); border: 1px solid var(--line-2); background: var(--bg-2);
  transition: border-color .2s var(--ease);
}
.faq__help:hover { border-color: var(--hover-line); }
.faq__help > .ico:first-child { color: var(--accent); }
.faq__help strong { display: block; font-weight: 500; font-size: 15.5px; }
.faq__help small { display: block; color: var(--muted); font-size: 13.5px; margin-top: 1px; }
.faq__help > .ico:last-child { color: var(--faint); width: 18px; height: 18px; transition: transform .25s var(--ease); }
.faq__help:hover > .ico:last-child { transform: translateX(4px); color: var(--text); }
.faq__list { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 24px 0; font-weight: 500; font-size: 17px; display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.faq summary::-webkit-details-marker { display: none; }
.faq details p { color: var(--muted); padding: 0 40px 24px 0; max-width: 64ch; animation: fade .3s var(--ease); }
@media (max-width: 900px) { .faq { grid-template-columns: 1fr; gap: 28px; } .faq__aside { position: static; } .faq summary { font-size: 16px; } }

/* ---------- Pie ---------- */
.footer { position: relative; isolation: isolate; overflow: hidden; border-top: 1px solid var(--line); padding: 72px 0 40px; background: var(--bg-2); }
.footer::before {
  content: ""; position: absolute; z-index: -1; right: -160px; top: -120px; width: 560px; aspect-ratio: 1;
  background: url(/assets/brand/ring-white.svg) center / contain no-repeat; opacity: .06; pointer-events: none;
}
.footer__inner { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px 56px; align-items: start; }
.footer__brand { display: flex; align-items: center; gap: 18px; }
.footer__brand img { border-radius: 50%; box-shadow: 0 0 0 1px var(--line-2); }
.footer__name { font-weight: 500; font-size: 17px; }
.footer__tag { color: var(--muted); font-size: 14.5px; margin-top: 2px; }
.footer__col { display: grid; gap: 10px; align-content: start; font-size: 14.5px; color: var(--muted); }
.footer__col a:hover { color: var(--text); }
.footer__head { color: var(--text); font-weight: 500; margin-bottom: 4px; }
.footer__copy { grid-column: 1 / -1; color: var(--faint); font-size: 13px; border-top: 1px solid var(--line); padding-top: 24px; margin-top: 16px; }
.footer--slim { padding: 28px 0; }
.footer--slim::before { display: none; }
.footer--slim .footer__copy { border: 0; padding: 0; margin: 0; }
@media (max-width: 900px) { .footer__inner { grid-template-columns: 1fr 1fr; } .footer__brand { grid-column: 1 / -1; } }

/* =========================================================
   Página de la calculadora
   ========================================================= */
.qpage { padding-top: 120px; padding-bottom: 24px; }
.qhead { margin-bottom: 36px; max-width: 720px; }
.qhead h1 { font-size: clamp(32px, 3.8vw, 52px); font-weight: 450; letter-spacing: -0.035em; }
.qhead .lead { margin-top: 12px; font-size: 16px; }
.qq { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 28px; align-items: start; }
.qq.is-export { grid-template-columns: minmax(0, 760px); }
.qq__form { display: grid; gap: 24px; padding: 28px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); min-width: 0; box-shadow: var(--shadow); }
.qq__pane { display: grid; gap: 24px; }
.qq__cargo { display: grid; gap: 12px; animation: fade .3s var(--ease); }

.modes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.mode {
  display: grid; justify-items: start; gap: 2px; padding: 14px; border-radius: var(--r); text-align: left; cursor: pointer;
  border: 1px solid var(--line-2); background: transparent; transition: border-color .2s, background .2s;
}
.mode .ico { color: var(--accent); margin-bottom: 8px; width: 22px; height: 22px; }
.mode strong { font-size: 14.5px; font-weight: 500; line-height: 1.3; }
.mode small { font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.mode:hover:not(:disabled) { border-color: var(--hover-line); }
.mode[aria-checked="true"] { border-color: var(--accent); background: var(--accent-soft); }
.mode:disabled { opacity: .35; cursor: not-allowed; }
.modes .mode[data-mode="customs"] { grid-column: 1 / -1; grid-template-columns: auto 1fr; column-gap: 14px; align-items: center; padding: 16px; }
.modes .mode[data-mode="customs"] .ico { grid-row: 1 / span 2; margin: 0; width: 28px; height: 28px; }
.modes .mode[data-mode="customs"] strong { font-size: 16px; }
.modes__label { grid-column: 1 / -1; font-size: 13px; color: var(--faint); margin: 10px 0 2px; }

.dims summary, .more summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 10px; font-size: 14.5px; color: var(--muted); }
.dims summary::-webkit-details-marker, .more summary::-webkit-details-marker { display: none; }
.dims summary .ico { color: var(--accent); width: 18px; height: 18px; }
.dims summary:hover, .more summary:hover { color: var(--text); }
.dims[open] summary { color: var(--text); margin-bottom: 12px; }
.dims__row { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr auto; align-items: center; gap: 8px; }
.dims__row i { color: var(--faint); font-style: normal; }
.dims__row span { color: var(--faint); font-size: 13px; }
.dims__row input { width: 100%; min-width: 0; height: 46px; padding: 0 12px; border-radius: var(--r); background: var(--bg-2); font-size: 16px; border: 1px solid var(--line-2); font-variant-numeric: tabular-nums; }
.dims__row input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.dims .hint { margin-top: 10px; }
.more { border-top: 1px solid var(--line); padding-top: 18px; }
.more summary { width: 100%; font-weight: 500; color: var(--text); }
.more summary::after { content: ""; flex: none; margin-left: auto; width: 14px; height: 14px; background: linear-gradient(var(--muted), var(--muted)) center / 14px 1.5px no-repeat, linear-gradient(var(--muted), var(--muted)) center / 1.5px 14px no-repeat; transition: transform .3s var(--ease); }
.more[open] summary::after { transform: rotate(45deg); }
.more[open] summary { margin-bottom: 18px; }
.more summary .muted { color: var(--faint); font-weight: 400; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.stepper { display: flex; align-items: center; gap: 12px; }
.stepper__btn { display: grid; place-items: center; width: 46px; height: 46px; border-radius: var(--r); border: 1px solid var(--line-2); background: var(--bg-2); cursor: pointer; color: var(--text); transition: border-color .2s; }
.stepper__btn:hover { border-color: var(--accent); }
.stepper output { font-size: 30px; font-weight: 500; min-width: 2ch; text-align: center; font-variant-numeric: tabular-nums; }

.toggles { display: flex; flex-wrap: wrap; gap: 14px 28px; margin-top: 20px; }
.toggle { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14.5px; user-select: none; }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle__ui { width: 36px; height: 20px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line-2); position: relative; transition: background .2s; flex: none; }
.toggle__ui::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--muted); transition: transform .25s var(--ease), background .2s; }
.toggle input:checked + .toggle__ui { background: var(--accent); border-color: var(--accent); }
.toggle input:checked + .toggle__ui::after { transform: translateX(16px); background: var(--accent-ink); }
.toggle input:focus-visible + .toggle__ui { outline: 2px solid var(--accent); outline-offset: 2px; }

.export { display: grid; gap: 20px; }
.export h2 { font-size: clamp(24px, 2.4vw, 30px); }
.export .lead { margin-top: -8px; font-size: 15.5px; }

/* Resultado */
.result { position: sticky; top: 100px; }
.result__card { border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); padding: 28px; position: relative; overflow: hidden; box-shadow: var(--shadow); }
.result__card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 2px; background: var(--accent); transform-origin: left; transform: scaleX(0); transition: transform .5s var(--ease); }
.result.is-loading .result__card::before { transform: scaleX(.5); transition-duration: 1.5s; }
.result.is-ready .result__card::before { transform: scaleX(1); }
.result__empty { text-align: center; padding: 56px 12px; color: var(--muted); }
.result__empty .ico { color: var(--faint); margin-bottom: 16px; }
.result__route { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--muted); }
.result__place { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.result__line { flex: 1; display: flex; align-items: center; gap: 10px; color: var(--accent); }
.result__line::before, .result__line::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }
.result__line .ico { width: 18px; height: 18px; }
.result__total { margin-top: 26px; }
.result__label { font-size: 13px; color: var(--muted); }
.result__total strong { display: block; font-size: clamp(40px, 3.8vw, 52px); letter-spacing: -0.04em; font-weight: 500; line-height: 1.08; font-variant-numeric: tabular-nums; transition: opacity .2s; }
.result.is-stale .result__total strong { opacity: .5; }
.result__crc { color: var(--muted); font-family: var(--mono); font-size: 12.5px; }
.result__meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 22px 0 0; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.result__meta dt { font-size: 12px; color: var(--faint); }
.result__meta dd { margin: 3px 0 0; font-weight: 500; font-size: 15px; font-variant-numeric: tabular-nums; }
.result__details summary { cursor: pointer; list-style: none; padding: 16px 0 4px; font-size: 14px; color: var(--muted); display: flex; justify-content: space-between; align-items: center; }
.result__details summary::-webkit-details-marker { display: none; }
.result__details summary::after { content: ""; width: 12px; height: 12px; background: linear-gradient(var(--muted), var(--muted)) center / 12px 1.5px no-repeat, linear-gradient(var(--muted), var(--muted)) center / 1.5px 12px no-repeat; transition: transform .3s var(--ease); }
.result__details[open] summary::after { transform: rotate(45deg); }
.result__lines { display: grid; gap: 2px; }
.rl-group { font-size: 12px; color: var(--faint); margin-top: 12px; display: flex; justify-content: space-between; }
.rl { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; padding: 4px 0; }
.rl span:first-child { color: var(--text-2); }
.rl small { display: block; color: var(--faint); font-size: 12px; }
.rl b { font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.result__error { color: var(--danger); font-size: 14px; margin-top: 12px; }
.result__actions { display: grid; gap: 10px; margin-top: 22px; }
.result__fine { font-size: 12px; color: var(--faint); margin-top: 18px; line-height: 1.55; }

/* Estado de solicitud */
.status { padding-top: 96px; padding-bottom: 64px; }
.status__box { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 16px 48px; align-items: end; border-top: 1px solid var(--line); padding-top: 56px; }
.status h2 { font-size: clamp(24px, 2.6vw, 32px); }
.status .lead { font-size: 15.5px; margin-top: 10px; }
.status-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: end; }
.status-form .btn { height: 48px; }
.status-out { grid-column: 1 / -1; }
.status-card { border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); padding: 20px; animation: fade .3s var(--ease); }
.status-card__badge { display: inline-block; padding: 3px 10px; border-radius: 6px; background: var(--accent-soft); color: var(--accent-text); font-size: 13px; font-weight: 500; text-transform: capitalize; }
.status-card p { margin-top: 8px; color: var(--muted); font-size: 14.5px; }

@media (max-width: 1023px) { .qq { grid-template-columns: 1fr; } .result { position: static; } }
@media (max-width: 900px) { .status__box { grid-template-columns: 1fr; padding-top: 36px; } .status-form { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  .qpage { padding-top: 100px; padding-bottom: 72px; }
  .qhead { margin-bottom: 22px; }
  .qq__form { padding: 18px; gap: 20px; }
  .modes { grid-template-columns: 1fr 1fr; }
  .mode { grid-template-columns: auto 1fr; column-gap: 10px; align-items: center; padding: 12px; }
  .mode .ico { grid-row: 1 / span 2; margin: 0; }
  .more .form-grid { grid-template-columns: 1fr; }
  .result__card { padding: 20px; }
  .result__meta dd { font-size: 14px; }
}

/* Píldora con el total (móvil) */
.total-pill {
  position: fixed; z-index: 30; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 12px; height: 48px; padding: 0 18px; border-radius: var(--r);
  background: var(--btn-bg); color: var(--btn-ink); box-shadow: 0 14px 32px rgb(21 31 78 / .3); white-space: nowrap;
}
.total-pill span { font-size: 13px; opacity: .75; }
.total-pill strong { font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.total-pill .ico { width: 18px; height: 18px; }

/* ---------- Modal ---------- */
.modal { width: min(560px, calc(100% - 24px)); max-height: calc(100dvh - 24px); border: 1px solid var(--line-2); border-radius: var(--r-lg); background: var(--surface); color: var(--text); padding: 32px; }
.modal::backdrop { background: rgb(4 10 20 / .72); }
.modal[open] { animation: fade .3s var(--ease); }
.modal h2 { font-size: 24px; padding-right: 40px; }
.modal .lead { font-size: 15px; margin: 10px 0 22px; }
.modal__x { position: absolute; top: 16px; right: 16px; }
.modal__x button { display: grid; place-items: center; width: 36px; height: 36px; border-radius: var(--r); border: 1px solid var(--line); background: transparent; cursor: pointer; color: var(--muted); }
.lead-done { text-align: center; padding: 8px 0; }
.lead-done h2 { padding: 0; margin-top: 18px; }
.lead-done .lead { margin: 10px auto 4px; }
.lead-done__ref { font-family: var(--mono); font-size: 24px; color: var(--accent-text); margin-bottom: 14px; }
.lead-done .hint { margin-bottom: 24px; }
@media (max-width: 640px) {
  .modal { padding: 24px 18px; margin: auto auto 0; width: 100%; max-width: none; border-radius: var(--r-lg) var(--r-lg) 0 0; max-height: 92dvh; }
}

/* ---------- Utilidades ---------- */
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 60; background: var(--text); color: var(--bg); padding: 12px 20px; border-radius: var(--r); font-size: 14.5px; font-weight: 500; }
.sk { border-radius: var(--r); background: linear-gradient(90deg, var(--surface-2) 0%, var(--sk-hi) 50%, var(--surface-2) 100%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: calc(var(--i, 0) * 60ms); }
.reveal.is-in { opacity: 1; transform: none; }

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