/* Vanguardia · base compartida (reset, tipografía, header, footer, botones, utilidades) */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; overflow-x: hidden; }
/* Nada puede ensanchar la página de costado (Safari iOS deja panear aunque el body recorte) */
main, .site-footer { overflow-x: hidden; }
@supports (overflow: clip) { main, .site-footer { overflow-x: clip; } }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
body {
  background: var(--papel);
  color: var(--tinta);
  font-family: var(--f-text);
  font-size: var(--step-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, picture, video, canvas, svg { display: block; max-width: 100%; }
img { height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .18em; }
ul[class], ol[class], nav ul, footer ul { list-style: none; padding: 0; }
h1, h2, h3, h4 { font-family: var(--f-display); font-weight: 800; line-height: .92; letter-spacing: -.035em; text-wrap: balance; }
p { text-wrap: pretty; }
::selection { background: var(--ambar); color: var(--noche); }
:focus-visible { outline: 3px solid var(--ambar); outline-offset: 3px; }
.on-dark :focus-visible, .site-footer :focus-visible { outline-color: var(--ambar); }

.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: fixed; left: var(--gutter); top: -100px; z-index: 100; background: var(--noche); color: #fff; padding: 12px 18px; font-weight: 600; }
.skip:focus { top: 12px; }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); }
.on-dark { background: var(--noche); color: var(--papel); }
.on-blue { background: var(--vanguardia); color: #fff; }
.on-paper-2 { background: var(--papel-2); }

/* ---------- Tipografía utilitaria ---------- */
.t-hero { font-size: var(--step-hero); }
.t-head { font-size: var(--step-head); }
.t-giant { font-size: var(--step-giant); line-height: .86; letter-spacing: -.045em; }
.t-lead { font-size: var(--step-lead); line-height: 1.35; font-weight: 500; }
.t-small { font-size: var(--step-small); }
.muted { color: var(--tinta-2); }
.on-dark .muted { color: var(--hielo); }
.tabular { font-variant-numeric: tabular-nums; }
.line { display: block; overflow: hidden; padding-bottom: .06em; margin-bottom: -.06em; }
.line > span { display: block; }

/* ---------- Motivo: flecha ---------- */
.ico-flecha { width: .78em; height: .78em; fill: currentColor; flex: none; transition: transform var(--d-state) var(--ease-out); }
.cut { clip-path: var(--clip-cut); }
.cut-sm { clip-path: var(--clip-cut-sm); }

/* ---------- Botones ---------- */
.btn {
  --bg: var(--ambar); --fg: var(--noche);
  display: inline-flex; align-items: center; gap: .7em;
  min-height: 56px; padding: 0 28px;
  background: var(--bg); color: var(--fg);
  font: 700 1.0625rem/1 var(--f-display); letter-spacing: -.01em;
  text-decoration: none; white-space: nowrap;
  clip-path: var(--clip-cut-sm);
  transition: background-color var(--d-state) var(--ease-out), transform var(--d-micro) var(--ease-out);
  will-change: transform;
}
.btn:hover { --bg: #FFC24F; }
.btn:hover .ico-flecha, .btn:focus-visible .ico-flecha { transform: translate(3px, -3px); }
.btn:active { transform: scale(.97); }
.btn:focus-visible { clip-path: none; outline-offset: 4px; outline-color: var(--luz); }
.on-dark .btn:focus-visible, .site-footer .btn:focus-visible { outline-color: #fff; }
.btn--sm { min-height: 46px; padding: 0 20px; font-size: .98rem; }
.btn--dark { --bg: var(--noche); --fg: #fff; }
.btn--dark:hover { --bg: var(--vanguardia); }

.link-flecha { position: relative; display: inline-flex; align-items: center; gap: .5em; font-weight: 600; text-decoration: none; padding-bottom: 4px; }
.link-flecha::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: currentColor; transform: scaleX(.25); transform-origin: left; transition: transform var(--d-state) var(--ease-out); }
.link-flecha:hover::after, .link-flecha:focus-visible::after { transform: scaleX(1); }
.link-flecha:hover .ico-flecha { transform: translate(3px, -3px); }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50;
  display: flex; align-items: center; gap: clamp(16px, 2vw, 40px);
  height: 76px; padding-inline: var(--gutter);
  background: var(--papel);
  transition: transform var(--d-state) var(--ease-out), background-color var(--d-state);
}
.site-header.is-hidden { transform: translateY(-100%); }
.site-header.is-dark { background: var(--noche); color: #fff; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--vanguardia); text-decoration: none; margin-right: auto; }
.is-dark .brand { color: #fff; }
.brand .mark { width: 50px; height: auto; fill: currentColor; }
.brand .wordmark { width: 132px; height: auto; fill: currentColor; }
.nav ul { display: flex; gap: clamp(14px, 1.8vw, 32px); }
.nav a { font-weight: 500; text-decoration: none; padding: 8px 0; position: relative; }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 2px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform var(--d-state) var(--ease-out); }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }
.menu:focus { outline: none; }
.menu { position: fixed; inset: 0; z-index: 60; background: var(--noche); color: #fff; padding: 96px var(--gutter) 120px; overflow-y: auto; }
.menu__list { display: grid; gap: 6px; }
.menu__list a { font: 800 clamp(2rem, 9vw, 3.4rem)/1.02 var(--f-display); letter-spacing: -.03em; text-decoration: none; display: block; padding: 6px 0; }
.menu__list a[aria-current="page"] { color: var(--ambar); }

/* ---------- Dock móvil (pulgar) + botón de email ---------- */
.dock { display: none; }
.mail-float {
  position: fixed; right: 24px; bottom: 24px; z-index: 40;
  width: 60px; height: 60px; display: grid; place-items: center;
  background: #25D366; color: #fff; clip-path: var(--clip-cut-sm);
  transition: transform var(--d-micro) var(--ease-out), background-color var(--d-state);
}
.mail-float svg { width: 28px; height: 28px; fill: currentColor; }
.mail-float:hover { background: #1EBE5A; transform: translateY(-3px); }
.mail-float:focus-visible { clip-path: none; }

/* ---------- Footer ---------- */
.site-footer { background: var(--noche); color: var(--papel); padding: clamp(80px, 9vw, 140px) var(--gutter) 28px; overflow: hidden; }
.site-footer__top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 28px; max-width: var(--max); margin: 0 auto clamp(64px, 7vw, 110px); }
.site-footer__claim { font: 800 var(--step-head)/.95 var(--f-display); letter-spacing: -.035em; max-width: 13ch; }
.site-footer__cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; max-width: var(--max); margin-inline: auto; }
.site-footer__h { font-weight: 600; color: var(--hielo); margin-bottom: 14px; }
.site-footer__cols ul { display: grid; gap: 8px; }
.site-footer__cols a { text-decoration: none; }
.site-footer__cols a:hover { text-decoration: underline; }
.site-footer__mark { display: block; max-width: var(--max); margin: clamp(64px, 8vw, 120px) auto 0; color: var(--papel); }
.site-footer__mark .wordmark { width: 100%; height: auto; fill: currentColor; }
.site-footer__legal { padding-right: 88px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; max-width: var(--max); margin: 28px auto 0; color: var(--hielo); font-size: var(--step-small); }
.site-footer__up { display: inline-flex; align-items: center; gap: .5em; text-decoration: none; }

/* ---------- Medios de pago ---------- */
.medios-pago { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; }
.mp { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 16px; background: rgba(201, 214, 236, .1); font-weight: 600; font-size: .95rem; clip-path: var(--clip-cut-sm); }
.mp svg { width: 26px; height: 26px; fill: currentColor; flex: none; }
.mp--visa svg { width: 34px; }
.medio-badge { display: grid; place-items: center; width: 26px; height: 26px; font: 800 .95rem/1 var(--f-display); color: var(--noche); background: currentColor; }
.medio-badge--cabal { background: #9BC3F5; }
.medio-badge--naranjax { background: #FF8A3D; border-radius: 50%; }
.site-footer__pagos { max-width: var(--max); margin: clamp(48px, 6vw, 80px) auto 0; }
.site-footer__pagos .mp { color: var(--papel); }

/* ---------- Transición entre páginas ---------- */
.pt { position: fixed; inset: 0; z-index: 90; pointer-events: none; visibility: hidden; background: var(--vanguardia); clip-path: polygon(0 100%, 100% 100%, 100% 100%, 0 100%); display: grid; place-items: center; }
.pt__flecha { width: min(18vw, 120px); fill: var(--ambar); }
html.pt-in .pt { visibility: visible; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); }

/* ---------- Imágenes con el motivo ---------- */
.media { position: relative; overflow: hidden; background: var(--noche); }
.media img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Breadcrumbs (internas) ---------- */
.crumbs { font-size: var(--step-small); color: var(--tinta-2); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: .4em; list-style: none; padding: 0; }
.crumbs li + li::before { content: "/"; margin-right: .4em; opacity: .6; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.on-dark .crumbs { color: var(--hielo); }

/* ---------- Placeholder de datos a confirmar ---------- */
.tbc { background: rgba(255, 178, 30, .22); padding: 0 .25em; }

/* ---------- Responsive ---------- */
@media (max-width: 1023px) {
  .nav, .site-header__cta { display: none; }
  .site-header { height: 64px; }
  .brand .mark { width: 42px; }
  .brand .wordmark { width: 112px; }
  .mail-float { display: none; }
  .dock {
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 6px;
    position: fixed; left: 10px; right: 10px; bottom: max(10px, env(safe-area-inset-bottom)); z-index: 70;
    transform: translateY(calc(100% + 32px)); transition: transform .45s var(--ease-out);
  }
  body.dock-on .dock, body.menu-open .dock { transform: none; }
  .dock > * { min-width: 0; white-space: nowrap; overflow: hidden; min-height: 56px; display: flex; align-items: center; justify-content: center; gap: .55em; font: 700 1rem/1 var(--f-display); text-decoration: none; }
  .dock__menu { background: var(--noche); color: #fff; padding: 0 18px; clip-path: var(--clip-cut-sm); }
  .dock__cta { background: var(--ambar); color: var(--noche); clip-path: var(--clip-cut-sm); }
  .dock__mail { background: #25D366; color: #fff; width: 56px; clip-path: var(--clip-cut-sm); }
  .dock__mail svg { width: 26px; height: 26px; fill: currentColor; }
  .dock__burger { width: 18px; height: 12px; position: relative; border-block: 2px solid currentColor; transition: border-color var(--d-micro); }
  .dock__burger::before { content: ""; position: absolute; left: 0; right: 0; top: 3px; height: 2px; background: currentColor; transition: transform var(--d-state) var(--ease-out); }
  .dock__menu[aria-expanded="true"] .dock__burger { border-color: transparent; }
  .dock__menu[aria-expanded="true"] .dock__burger::before { transform: rotate(-53deg); }
  .dock :focus-visible { clip-path: none; }
  .site-footer { padding-bottom: calc(28px + 84px + env(safe-area-inset-bottom)); }
  .site-footer__cols { grid-template-columns: 1fr 1fr; }
  .site-footer__cols > div { grid-column: 1 / -1; }
  .site-footer__legal { padding-right: 0; }
}

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .pt { display: none; }
}
@media (forced-colors: active) {
  .btn, .dock > *, .mail-float { border: 2px solid; clip-path: none; }
}
