/* ══════════════════════════════════════════════════════════════════
   FOUR PARKING · base.css
   Tokens de marca, reset, tipografía, botones y utilidades comunes.
   ══════════════════════════════════════════════════════════════════ */

/* ---------- 1. Tokens ------------------------------------------- */
:root {
  /* Paleta de marca */
  --azul:        #214A88;   /* Azul Four (principal)      */
  --navy:        #0E1E3A;   /* Navy profundo (dark)       */
  --azul-luz:    #3E6BB5;   /* Azul luminoso (glow/hover) */
  --platino:     #C9D2E3;   /* Platino (filetes, acentos) */
  --blanco:      #FFFFFF;
  --off-white:   #F4F6FA;
  --wa:          #25D366;   /* Verde WhatsApp */
  --wa-dark:     #1DA851;

  /* Texto */
  --tx:          #0E1E3A;
  --tx-soft:     #45536E;
  --tx-mute:     #6B7894;
  --tx-inv:      #FFFFFF;
  --tx-inv-soft: #C9D2E3;

  /* Superficies */
  --surface:     #FFFFFF;
  --surface-alt: #F4F6FA;
  --line:        rgba(14, 30, 58, .10);
  --line-strong: rgba(14, 30, 58, .16);
  --line-inv:    rgba(201, 210, 227, .20);

  /* Degradados de marca */
  --grad-brand:  linear-gradient(135deg, #214A88 0%, #0E1E3A 100%);
  --grad-lux:    linear-gradient(135deg, #3E6BB5 0%, #214A88 55%, #0E1E3A 100%);
  --grad-line:   linear-gradient(90deg, transparent, var(--platino), transparent);

  /* Sombras: suaves y frías, coherentes con el azul de marca */
  --sh-sm:  0 1px 2px rgba(14, 30, 58, .06), 0 2px 8px rgba(14, 30, 58, .05);
  --sh-md:  0 4px 12px rgba(14, 30, 58, .07), 0 12px 32px rgba(14, 30, 58, .07);
  --sh-lg:  0 8px 24px rgba(14, 30, 58, .09), 0 28px 64px rgba(14, 30, 58, .12);
  --sh-glow: 0 8px 28px rgba(62, 107, 181, .38);
  --sh-glow-wa: 0 8px 28px rgba(37, 211, 102, .34);

  /* Tipografía */
  --font-display: 'Poppins', 'Segoe UI', system-ui, sans-serif;
  --font-body:    'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;

  /* Escala fluida (clamp: móvil → escritorio) */
  --fs-xs:   .78rem;
  --fs-sm:   .875rem;
  --fs-base: 1rem;
  --fs-md:   clamp(1.03rem, .99rem + .2vw, 1.15rem);
  --fs-lg:   clamp(1.15rem, 1.05rem + .5vw, 1.4rem);
  --fs-xl:   clamp(1.5rem,  1.3rem + 1vw,   2.05rem);
  --fs-2xl:  clamp(1.95rem, 1.6rem + 1.7vw, 3rem);
  --fs-3xl:  clamp(2.4rem,  1.7rem + 3.2vw, 4.4rem);

  /* Ritmo vertical */
  --sp-section: clamp(4.5rem, 3rem + 6vw, 8rem);
  --radius:     18px;
  --radius-sm:  12px;
  --radius-lg:  26px;

  /* Alturas de la cabecera fija (se usan para el offset del scroll) */
  --h-topbar: 38px;
  --h-nav:    76px;
  --h-header: calc(var(--h-topbar) + var(--h-nav));

  --ease: cubic-bezier(.22, .61, .36, 1);
  --container: 1240px;
}

/* En móvil la barra superior crece: sus tres accesos (teléfono, email,
   WhatsApp) son CTA y necesitan un área de pulsación real de 40 px. */
@media (max-width: 900px) {
  :root { --h-topbar: 44px; --h-nav: 62px; }
}

/* ---------- 2. Reset -------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Compensa la cabecera fija al saltar a un ancla */
  scroll-padding-top: calc(var(--h-header) + 12px);
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.65;
  color: var(--tx);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body.is-locked { overflow: hidden; }

img, svg, video, iframe { display: block; max-width: 100%; }
img, video { height: auto; }

button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }

a { color: inherit; text-decoration: none; }

ul, ol { list-style: none; padding: 0; }

address { font-style: normal; }

table { border-collapse: collapse; width: 100%; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -.02em;
  text-wrap: balance;
}

p { text-wrap: pretty; }

/* Foco visible y coherente en toda la web */
:focus-visible {
  outline: 3px solid var(--azul-luz);
  outline-offset: 3px;
  border-radius: 4px;
}

/* El sprite de iconos no debe ocupar espacio */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- 3. Utilidades --------------------------------------- */
.container {
  width: min(100% - 2.5rem, var(--container));
  margin-inline: auto;
}
.container--narrow { width: min(100% - 2.5rem, 860px); }

@media (max-width: 600px) {
  .container, .container--narrow { width: calc(100% - 2rem); }
}

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100px; left: 1rem;
  z-index: 999;
  padding: .8rem 1.3rem;
  background: var(--navy);
  color: var(--blanco);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  font-weight: 600;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 0; }

/* Iconos: heredan color y tamaño del contexto */
.icon {
  width: 1.25em; height: 1.25em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon--xs { width: 1em;    height: 1em;    }
.icon--lg { width: 1.6em;  height: 1.6em;  }
.icon--xl { width: 2.25em; height: 2.25em; }

.flag {
  width: 20px; height: 14px;
  border-radius: 2px;
  flex: none;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .18);
}

/* Eyebrow: pequeño rótulo sobre los títulos de sección */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--azul);
  margin-bottom: 1rem;
}
.eyebrow--light { color: var(--platino); }

/* Estrellas de valoración */
.stars { display: inline-flex; gap: 1px; color: #F5B301; }

/* ---------- 4. Botones ------------------------------------------ */
.btn {
  --btn-bg: var(--azul);
  --btn-tx: #fff;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  padding: .9rem 1.6rem;
  background: var(--btn-bg);
  color: var(--btn-tx);
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-sm);
  letter-spacing: .01em;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  isolation: isolate;
  transition: transform .28s var(--ease), box-shadow .28s var(--ease),
              background-color .28s var(--ease), color .28s var(--ease);
}

/* Barrido de brillo en hover (puro CSS, solo transform/opacity) */
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.28) 50%, transparent 70%);
  transform: translateX(-120%);
  opacity: 0;
  z-index: -1;
  transition: transform .7s var(--ease), opacity .3s;
}
.btn:hover::after { transform: translateX(120%); opacity: 1; }

.btn:hover  { transform: translateY(-2px); }
.btn:active { transform: translateY(0); transition-duration: .08s; }

.btn--primary { --btn-bg: var(--azul); box-shadow: var(--sh-md); }
.btn--primary:hover { --btn-bg: var(--azul-luz); box-shadow: var(--sh-glow); }

.btn--wa { --btn-bg: var(--wa); box-shadow: 0 4px 14px rgba(37,211,102,.28); }
.btn--wa:hover { --btn-bg: var(--wa-dark); box-shadow: var(--sh-glow-wa); }

.btn--ghost {
  --btn-bg: transparent;
  --btn-tx: #fff;
  box-shadow: inset 0 0 0 1.5px rgba(201, 210, 227, .55);
  backdrop-filter: blur(8px);
}
.btn--ghost:hover {
  --btn-bg: rgba(255, 255, 255, .1);
  box-shadow: inset 0 0 0 1.5px var(--platino), var(--sh-glow);
}

.btn--sm { padding: .68rem 1.15rem; font-size: var(--fs-xs); }
.btn--lg { padding: 1.1rem 2.1rem;  font-size: var(--fs-md); }

.btn--block { width: 100%; }

@media (max-width: 600px) {
  .btn--block-sm { width: 100%; }
  /* En pantalla pequeña, un CTA de texto largo debe partirse en dos
     líneas antes que desbordar la página. Ocurría en alemán ("Fragen
     Sie nach dem genauen Treffpunkt") y en francés. */
  .btn {
    white-space: normal;
    text-align: center;
    max-width: 100%;
  }
  .loc__actions .btn { width: 100%; }
}

/* Enlace con flecha que se desplaza al pasar el ratón */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-weight: 600;
  color: var(--wa);
  border-bottom: 1px solid transparent;
  transition: border-color .25s var(--ease);
}
.link-arrow .icon { transition: transform .3s var(--ease); }
.link-arrow:hover { border-color: currentColor; }
.link-arrow:hover .icon { transform: translateX(4px); }

/* ---------- 5. Animaciones -------------------------------------- */

/* Reveal al hacer scroll (activado por IntersectionObserver) */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
  will-change: auto;
}
/* Escalonado suave dentro de una misma rejilla */
.reveal[style*="--d"] { transition-delay: var(--d); }

@keyframes fp-pulse {
  0%   { transform: scale(1);   opacity: .55; }
  70%  { transform: scale(1.9); opacity: 0;   }
  100% { transform: scale(1.9); opacity: 0;   }
}

@keyframes fp-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-7px); }
}

/* ---------- 6. prefers-reduced-motion --------------------------- *
   Si el usuario pide menos movimiento, desactivamos todo lo que no
   es esencial: reveals, parallax, muro de reseñas, pulsos y el vídeo
   se deja congelado en el póster mediante JS.
   ---------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }

  .reveal { opacity: 1 !important; transform: none !important; }
  .btn::after { display: none; }
}
