/* Expo Transporte 2027 — Header hero */

:root {
  /* Paleta oficial cartel 2027 */
  --bg: #04060c;
  --bg-deep: #0b2c4a;
  --cyan: #2bbcdb;
  --cyan-intense: #0593c3;
  --white: #ffffff;

  --font: "Montserrat", system-ui, sans-serif;
  /* Horizonte del grid en header.jpg */
  --floor-y: 72%;
  /* Punto de “llantas” dentro de header-front.png */
  --vehicles-ground: 88%;
  --nav-h: 72px;
  --nav-bg-scrolled: rgba(255, 255, 255, 0.96);

  /* Texto sobre fondos claros (derivado del azul profundo) */
  --ink: #0b2c4a;
  --ink-soft: #4a6a82;
  --line: rgba(11, 44, 74, 0.12);
  --surface: #f3f7fa;
  --hero-veil: 0;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 12px);
}

body {
  font-family: var(--font);
  background: #fff;
  color: var(--white);
  min-height: 100svh;
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* ——— Hero ——— */

.hero {
  position: relative;
  isolation: isolate;
  min-height: 100svh;
  display: flex;
  align-items: stretch;
  justify-content: center;
  overflow: hidden;
  background: var(--bg);
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    url("../img/header.jpg") center / cover no-repeat;
  transform: scale(1.02);
}

/* Velo blanco: opacidad controlada por --hero-veil (JS al scroll) */
.hero__veil {
  position: absolute;
  inset: 0;
  z-index: 8;
  background: #fff;
  opacity: var(--hero-veil, 0);
  pointer-events: none;
  will-change: opacity;
}

.hero__stage {
  position: relative;
  z-index: 1;
  width: min(100%, 1200px);
  margin-inline: auto;
  padding:
    calc(var(--nav-h) + clamp(0.5rem, 2vh, 1.5rem))
    clamp(1rem, 4vw, 2rem)
    clamp(1.5rem, 4vw, 3rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: clamp(0.5rem, 1.5vw, 1.25rem);
  min-height: 100svh;
}

/* ——— Anillos HUD ——— */

.hero__rings {
  position: absolute;
  top: clamp(-2%, 1vw, 4%);
  left: 50%;
  translate: -50% 0;
  width: min(72vw, 620px);
  aspect-ratio: 1;
  pointer-events: none;
  z-index: 1;
}

.hero__ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0.95;
}

.hero__ring--1 {
  animation: spin-cw 48s linear infinite;
}

.hero__ring--2 {
  inset: 6%;
  width: 88%;
  height: 88%;
  margin: auto;
  animation: spin-ccw 36s linear infinite;
  opacity: 0.85;
}

@keyframes spin-cw {
  to { transform: rotate(360deg); }
}

@keyframes spin-ccw {
  to { transform: rotate(-360deg); }
}

/* ——— Logo ——— */

.hero__logo {
  position: relative;
  top: 12%;
  z-index: 3;
  width: min(52vw, 420px);
  margin-top: clamp(1.5rem, 6vh, 4.5rem);
  filter: drop-shadow(0 0 18px rgba(43, 188, 219, 0.28));
}

.hero__logo img {
  width: 100%;
  height: auto;
}

/* ——— Vehículos (anclados al piso / horizonte del fondo) ——— */

.hero__vehicles {
  position: absolute;
  left: 0;
  right: 0;
  top: var(--floor-y);
  z-index: 2;
  display: flex;
  justify-content: center;
  /* Alinea las llantas con el horizonte, no el borde del PNG */
  transform: translateY(calc(-1 * var(--vehicles-ground)));
  pointer-events: none;
  margin: 0;
}

.hero__vehicles img {
  width: min(96vw, 980px);
  height: auto;
  filter: drop-shadow(0 8px 24px rgba(5, 147, 195, 0.22));
}

/* ——— Texto ——— */

.hero__copy {
  position: relative;
  z-index: 3;
  text-align: center;
  margin-top: auto;
  padding-bottom: clamp(0.5rem, 2vh, 1.5rem);
  max-width: 52rem;
}

.hero__eyebrow {
  font-size: clamp(0.65rem, 1.5vw, 0.9rem);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.92);
  margin-bottom: clamp(0.65rem, 1.8vw, 1.15rem);
  text-wrap: balance;
}

.hero__title {
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-wrap: balance;
}

.hero__title-line {
  display: block;
  font-size: clamp(1.85rem, 7.2vw, 4.75rem);
}

.hero__title-line--sub {
  font-size: clamp(1.55rem, 5.8vw, 3.85rem);
  font-weight: 800;
  margin-top: 0.08em;
}

/* ——— Entrada suave ——— */

@media (prefers-reduced-motion: no-preference) {
  .hero__logo,
  .hero__copy {
    animation: rise-in 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  .hero__logo { animation-delay: 0.1s; }
  .hero__copy { animation-delay: 0.42s; }

  .hero__vehicles {
    animation: vehicles-in 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.28s both;
  }

  .hero__rings {
    animation: fade-in 1.2s ease both;
  }
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* No tocar translateY del anclaje al piso */
@keyframes vehicles-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .hero__ring--1,
  .hero__ring--2 {
    animation: none;
  }

  .hero__veil {
    opacity: 0 !important;
  }
}

/* ——— Breakpoints ——— */

@media (max-width: 768px) {
  :root {
    --floor-y: 70%;
  }

  .hero__rings {
    width: min(88vw, 420px);
    top: 2%;
  }

  .hero__logo {
    top: 0;
    width: min(68vw, 280px);
    margin-top: clamp(0.75rem, 4vh, 2rem);
  }

  .hero__vehicles img {
    width: min(108vw, 640px);
  }

  .hero__copy {
    padding-bottom: 1rem;
  }

  .hero__eyebrow {
    letter-spacing: 0.12em;
    padding-inline: 0.5rem;
  }

  .hero__title-line {
    font-size: clamp(1.7rem, 8vw, 2.75rem);
  }

  .hero__title-line--sub {
    font-size: clamp(1.4rem, 6.5vw, 2.25rem);
  }
}

@media (max-width: 480px) {
  :root {
    --floor-y: 68%;
  }

  .hero__stage {
    padding-inline: 0.75rem;
    gap: 0.35rem;
  }

  .hero__rings {
    width: min(92vw, 360px);
  }

  .hero__logo {
    top: 0;
    width: min(74vw, 260px);
    margin-top: 0.5rem;
  }

  .hero__vehicles img {
    width: min(112vw, 520px);
    max-width: none;
  }

  .hero__title-line {
    font-size: clamp(1.55rem, 9vw, 2.2rem);
  }

  .hero__title-line--sub {
    font-size: clamp(1.25rem, 7.5vw, 1.85rem);
  }

  .countdown {
    padding-block: 2rem;
  }

  .countdown__value {
    font-size: clamp(1.45rem, 8vw, 2.25rem);
  }
}

/* Pantallas altas / desktop amplio: más aire vertical */
@media (min-width: 1100px) and (min-height: 800px) {
  .hero__stage {
    padding-top: calc(var(--nav-h) + 2rem);
    padding-bottom: 3.5rem;
  }

  .hero__rings {
    width: min(58vw, 680px);
  }

  .hero__logo {
    width: min(28vw, 420px);
  }

  .hero__vehicles img {
    width: min(78vw, 1040px);
  }
}

/* Ultrawide: cover recorta arriba/abajo y el horizonte baja un poco */
@media (min-aspect-ratio: 2 / 1) {
  :root {
    --floor-y: 74%;
  }
}

/* Pantallas muy bajas (landscape móvil) */
@media (max-height: 520px) and (orientation: landscape) {
  .hero__stage {
    min-height: auto;
    padding-top: calc(var(--nav-h) + 0.5rem);
    padding-bottom: 1rem;
  }

  .hero {
    min-height: auto;
  }

  .hero__rings {
    width: min(42vh, 280px);
    top: -4%;
  }

  .hero__logo {
    top: 0;
    width: min(28vh, 220px);
    margin-top: 0.25rem;
  }

  .hero__vehicles img {
    width: min(70vw, 520px);
  }

  .hero__title-line {
    font-size: clamp(1.25rem, 5vw, 2rem);
  }

  .hero__title-line--sub {
    font-size: clamp(1.1rem, 4vw, 1.65rem);
  }

  .hero__eyebrow {
    font-size: 0.65rem;
    margin-bottom: 0.4rem;
  }

  .hero__veil {
    display: none;
  }
}

/* ——— Site nav ——— */

.site-nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--nav-h);
  transition:
    background-color 0.28s ease,
    box-shadow 0.28s ease,
    backdrop-filter 0.28s ease;
}

.site-nav.is-scrolled {
  background: var(--nav-bg-scrolled);
  backdrop-filter: saturate(1.2) blur(12px);
  -webkit-backdrop-filter: saturate(1.2) blur(12px);
  box-shadow: 0 1px 0 var(--line), 0 8px 24px rgba(4, 30, 66, 0.06);
}

.site-nav__inner {
  height: 100%;
  width: min(100%, 1200px);
  margin-inline: auto;
  padding-inline: clamp(1rem, 3vw, 2rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.site-nav__brand {
  position: relative;
  flex: 0 0 auto;
  width: clamp(140px, 16vw, 200px);
  height: 36px;
  display: block;
}

.site-nav__logo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: left center;
  transition: opacity 0.28s ease;
}

.site-nav__logo--white { opacity: 1; }
.site-nav__logo--color { opacity: 0; }

.site-nav.is-scrolled .site-nav__logo--white { opacity: 0; }
.site-nav.is-scrolled .site-nav__logo--color { opacity: 1; }

.site-nav__menu {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(0.65rem, 1.8vw, 1.75rem);
  margin: 0;
  padding: 0;
  flex: 1 1 auto;
}

.site-nav__menu a {
  font-size: clamp(0.72rem, 1.1vw, 0.875rem);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.92);
  transition: color 0.22s ease;
  white-space: nowrap;
}

.site-nav__menu a:hover { color: var(--cyan); }

.site-nav.is-scrolled .site-nav__menu a { color: var(--ink); }
.site-nav.is-scrolled .site-nav__menu a:hover { color: var(--cyan-intense); }

.site-nav.is-solid .site-nav__logo--white { opacity: 0; }
.site-nav.is-solid .site-nav__logo--color { opacity: 1; }
.site-nav.is-solid .site-nav__menu a { color: var(--ink); }
.site-nav.is-solid .site-nav__menu a:hover,
.site-nav.is-solid .site-nav__menu a.is-active { color: var(--cyan-intense); }

.site-nav__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  flex: 0 0 auto;
  min-width: clamp(140px, 16vw, 200px);
}

.site-nav__lang {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-decoration: none;
  color: #fff;
  padding: 0.35rem 0.5rem;
}

.site-nav.is-scrolled .site-nav__lang { color: var(--ink); }

.site-nav__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  background: #fff;
  padding: 0.55rem 1rem;
  border-radius: 2px;
}

.site-nav.is-scrolled .site-nav__cta {
  background: var(--ink);
  color: #fff;
}

.site-nav__lang[hidden],
.site-nav__cta[hidden] {
  display: none !important;
}

/* ——— Countdown ——— */

.countdown {
  background: #fff;
  color: var(--ink);
  padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1rem, 4vw, 2rem);
  border-bottom: 1px solid var(--line);
}

.countdown__inner {
  width: min(100%, 900px);
  margin-inline: auto;
  text-align: center;
}

.countdown__eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 1.25rem;
}

.countdown__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(0.5rem, 2vw, 1.25rem);
  margin-bottom: 1.5rem;
}

.countdown__unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: clamp(0.75rem, 2vw, 1.25rem) 0.5rem;
  border-radius: 4px;
  background: var(--surface);
}

.countdown__value {
  font-size: clamp(1.75rem, 6vw, 3.25rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.countdown__label {
  font-size: clamp(0.65rem, 1.4vw, 0.8rem);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.countdown__date {
  font-size: clamp(0.85rem, 1.6vw, 1rem);
  font-weight: 500;
  color: var(--ink-soft);
}

.section-anchor {
  height: 1px;
  scroll-margin-top: calc(var(--nav-h) + 12px);
}

@media (max-width: 900px) {
  .site-nav {
    height: auto;
  }

  .site-nav__inner {
    flex-wrap: wrap;
    padding-block: 0.65rem;
    row-gap: 0.55rem;
  }

  .site-nav__brand {
    order: 1;
    width: min(42vw, 150px);
    height: 28px;
  }

  .site-nav__actions {
    order: 2;
    margin-left: auto;
    min-width: 0;
  }

  .site-nav__menu {
    order: 3;
    flex: 1 0 100%;
    justify-content: flex-start;
    gap: 0.75rem 1rem;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 0.1rem;
  }

  .site-nav__menu::-webkit-scrollbar {
    display: none;
  }

  .site-nav__menu a {
    font-size: 0.68rem;
  }

  .site-nav.is-scrolled {
    box-shadow: 0 1px 0 var(--line), 0 6px 16px rgba(4, 30, 66, 0.05);
  }
}

@media (max-width: 480px) {
  .countdown__grid {
    gap: 0.4rem;
  }

  .countdown__unit {
    padding: 0.7rem 0.25rem;
  }

  .countdown__label {
    letter-spacing: 0.06em;
  }
}
