/* Hero · El mensajero (2D) */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  min-height: max(560px, 100svh);
  background: #14284B; color: var(--paper-2);
  display: flex; flex-direction: column;
}
.backdrop { position: absolute; inset: 0; z-index: 0; overflow: hidden; container-type: size; }
.backdrop > .ly { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 100%; display: block; }
.stage > .ly { position: absolute; left: 0; width: 100%; display: block; }
/* Las capas solo se mueven (y solo se promueven a la GPU) en escritorio con mouse; en celular quedan quietas */
.hero.has-parallax .backdrop .layer { will-change: transform; }
.sky-night, .dawn-scrim { will-change: opacity; }
.dawn-img { opacity: 0; will-change: opacity; }
.hero .grain { position: absolute; inset: 0; z-index: 1; pointer-events: none; background: url(../img/grano.webp) repeat; background-size: 256px; opacity: .35; }
.hero .site-header { z-index: 10; }

.stage { position: absolute; left: calc(50% - max(50cqw, 80cqh)); bottom: 0; width: max(100cqw, 160cqh); aspect-ratio: 1440 / 900; }
/* Estrellas en 3 grupos que titilan a destiempo: 3 capas animadas en lugar de una por estrella */
.stars .tw, .night-stars .tw { position: absolute; inset: 0; animation: twinkle 4.6s ease-in-out infinite alternate; }
.tw-2 { animation-duration: 3.4s !important; animation-delay: -1.7s !important; }
.tw-3 { animation-duration: 5.8s !important; animation-delay: -3.1s !important; }
.stars i, .night-stars i { position: absolute; border-radius: 50%; background: #EEF2FA; box-shadow: 0 0 6px rgba(238, 242, 250, .6); }
.hero.is-off .tw, .hero.is-off .shooting, .night-stars.is-off .tw { animation-play-state: paused; }
.moon { position: absolute; left: calc(1046 / 1440 * 100%); top: calc(176 / 900 * 100%); width: calc(48 / 1440 * 100%); aspect-ratio: 1; translate: -50% -50%; border-radius: 50%;
  box-shadow: 0 0 70px 34px rgba(233, 238, 248, .1); }
.moon::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: #F4EEDF; -webkit-mask: radial-gradient(circle at 75% 25%, transparent 46%, #000 47%); mask: radial-gradient(circle at 75% 25%, transparent 46%, #000 47%); }
.sun { position: absolute; left: calc(1090 / 1440 * 100%); top: calc(560 / 900 * 100%); width: calc(340 / 1440 * 100%); aspect-ratio: 1; translate: -50% -50%; border-radius: 50%;
  background: radial-gradient(closest-side, #FFD3A4 0 23%, rgba(255, 196, 138, .55) 26%, rgba(243, 132, 46, 0) 100%); opacity: 0; will-change: transform, opacity; }
@keyframes twinkle { from { opacity: .25; } to { opacity: .95; } }
.moon { opacity: .95; }

/* Contenido: la marca en grande a la izquierda; el lanzamiento a la derecha; el zorro sentado en la nieve */
.hero-inner {
  position: relative; z-index: 5; flex: 1;
  width: min(var(--page), 100%); margin: 0 auto; padding: clamp(120px, 20vh, 220px) var(--gutter) clamp(70px, 16vh, 180px);
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(32px, 5vw, 96px); align-items: start;
}
.hero .site-header { justify-content: space-between; }
.header-tag { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; color: var(--sky-200); }

.hero-copy { display: flex; flex-direction: column; align-items: flex-start; }
.hero-brand { width: clamp(260px, 36vw, 600px); height: auto; margin-bottom: clamp(26px, 4vh, 44px); }
.hero-title { font-size: clamp(30px, min(3.4vw, 6.2vh), 58px); line-height: 1.04; letter-spacing: -0.035em; font-weight: 600; }
.hero-title .accent { color: var(--orange); }
.hero-sub { margin-top: 16px; font-size: clamp(16px, 1.25vw, 19px); line-height: 1.55; color: var(--sky-200); max-width: 31em; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: clamp(26px, 4vh, 40px); }

/* El lanzamiento: sin caja. Los días en grande; horas, minutos y segundos en una línea fina. */
.hero-launch { position: relative; z-index: 2; align-self: start; justify-self: end; width: min(100%, 520px); margin-top: clamp(0px, 2vh, 20px); container-type: inline-size; }
.hl-top { display: flex; align-items: center; gap: 12px; font-size: clamp(17px, 1.35vw, 20px); font-weight: 500; color: var(--sky-200); }
.hl-top b { color: var(--paper-2); font-weight: 600; }
@keyframes live { 50% { box-shadow: 0 0 0 6px rgba(243, 132, 46, 0); } }
.hero .cd-big { display: block; margin-top: 10px; color: var(--paper-2); }
.cd-days { display: flex; align-items: flex-end; gap: .12em; font-size: min(230px, 46cqi); }
.cd-days .cd-num { color: var(--orange); font-weight: 600; letter-spacing: -0.06em; line-height: .8; }
.cd-days .cd-num [data-d] { width: .58em; }
.cd-dlabel { font: 600 .2em/1 var(--font-display); color: var(--paper-2); padding-bottom: .1em; letter-spacing: -0.01em; }
.cd-rest { display: flex; align-items: baseline; gap: .28em; margin-top: 18px; font-size: min(44px, 8.6cqi); font-weight: 500; }
.cd-rest .cd-num { line-height: 1; letter-spacing: -0.03em; }
.cd-rest small { font-size: .42em; font-weight: 600; color: var(--sky-200); margin-right: .7em; letter-spacing: .02em; }
.cd-rest small:last-child { margin-right: 0; }
.hl-sec { margin-top: 18px; height: 2px; background: rgba(207, 221, 240, .18); overflow: hidden; }
.hl-sec i { display: block; height: 100%; background: var(--orange); transform-origin: 0 50%; transform: scaleX(var(--sec, 0)); transition: transform 1s linear; }
.hl-zone { margin-top: 14px; font-size: 14px; color: var(--sky-200); }
/* El zorro, abajo a la derecha, sobre la nieve */
.story { position: absolute; z-index: 1; right: calc(var(--gutter) + 10px); bottom: clamp(4px, 2vh, 24px); width: clamp(130px, 12vw, 210px); height: clamp(150px, 14vw, 240px); }
.story-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.fox-wrap { transform-box: fill-box; transform-origin: 50% 100%; opacity: 0; animation: rise 1s .3s var(--ease-out) forwards; }

@media (max-width: 1100px) {
  .hero-inner { grid-template-columns: minmax(0, 1fr); padding-bottom: 40px; gap: 36px; }
  .hero-launch { justify-self: start; margin: 0 0 150px; }
  .story { right: var(--gutter); bottom: 20px; width: 130px; height: 150px; }
}
@media (max-width: 760px) {
  .hero-inner { padding: 96px 24px 40px; gap: 30px; }
  .header-tag { font-size: 13px; }
  .hero-launch { width: 100%; }
  .hero .cd-label { font-size: 12px; }
  .story { width: 104px; height: 124px; }
}
@media (prefers-reduced-motion: reduce) {

  .fox-wrap { opacity: 1; transform: none; }
}

/* Fondo: detalles */
.shooting { position: absolute; left: calc(820 / 1440 * 100%); top: calc(96 / 900 * 100%); width: 90px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, rgba(244, 241, 232, 0), #F4F1E8); transform-origin: 100% 50%; rotate: 159deg; opacity: 0; animation: shoot 13s 5s linear infinite; will-change: transform, opacity; }
@keyframes shoot { 0% { opacity: 0; transform: translateX(0); } 1% { opacity: .9; } 6% { opacity: 0; transform: translateX(-160px); } 100% { opacity: 0; transform: translateX(-160px); } }


/* Zorro acompañante */
.guide {
  position: fixed; right: 28px; bottom: 18px; z-index: 50;
  display: flex; align-items: flex-end; gap: 4px;
  pointer-events: none;
}
.guide.is-on { pointer-events: auto; }
.guide-link { display: flex; align-items: flex-end; gap: 10px; text-decoration: none; }
.guide-fox { position: relative; width: 66px; height: 85px; visibility: hidden; }
.guide.is-on .guide-fox { visibility: visible; }
.guide-fox::after { content: ""; position: absolute; left: 6px; right: 6px; bottom: -4px; height: 10px; border-radius: 50%; background: radial-gradient(closest-side, rgba(20, 40, 75, .35), rgba(20, 40, 75, 0)); }
.guide-fox svg { width: 100%; height: 100%; overflow: visible; transform-origin: 50% 100%; transition: transform .45s var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .guide-link:hover .guide-fox svg { transform: translateY(-3px) rotate(-3deg); } }
.guide-link:active .guide-fox svg { transform: scale(.95); }
.guide-bubble {
  margin-bottom: 52px;
  background: var(--paper-2); color: var(--navy); font: 600 14px var(--font-text);
  padding: 10px 14px; border-radius: 10px; border: 1px solid rgba(28, 53, 97, .15); width: max-content; max-width: 250px; line-height: 1.35;
  opacity: 0; transform: translateX(8px) scale(.96); transform-origin: 100% 100%;
  transition: opacity .3s ease, transform .45s var(--ease-out);
}
.guide.is-on.show-bubble .guide-bubble, .guide.is-on .guide-link:hover .guide-bubble, .guide.is-on .guide-link:focus-visible .guide-bubble { opacity: 1; transform: none; }
.guide-close {
  align-self: flex-start; width: 26px; height: 26px; margin-left: -10px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--paper-2); color: var(--navy); display: grid; place-items: center; opacity: 0; transition: opacity .2s ease;
}
.guide.is-on:hover .guide-close, .guide.is-on .guide-close:focus-visible { opacity: 1; }
.guide-close svg { width: 10px; height: 10px; }
.guide-close path { stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.guide.land .guide-fox svg { animation: land .5s var(--ease-out); }
@keyframes land { 0% { transform: scale(1.12, .86); } 55% { transform: scale(.96, 1.05); } 100% { transform: none; } }

/* El zorro en el aire */
.fox-flyer { position: fixed; left: 0; top: 0; z-index: 60; pointer-events: none; display: none; transform-origin: 50% 100%; will-change: transform; }
.fox-flyer svg { display: block; width: 100%; height: 100%; overflow: visible; }
.fox-flyer.is-flying { display: block; }
@media (max-width: 760px) { .guide { display: none; } }
@media (hover: none) { .guide.is-on .guide-close { opacity: 1; } }

/* Momento de scroll: el hero se queda fijo mientras amanece */
.hero-pin { position: relative; height: calc(max(560px, 100svh) + 65vh); }
.hero-pin > .hero { position: sticky; top: 0; height: max(560px, 100svh); }
@media (max-width: 1100px) {
  .hero-pin { height: auto; }
  .hero-pin > .hero { position: relative; height: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-pin { height: auto; }
  .hero-pin > .hero { position: relative; }
}
.dawn-scrim {
  position: absolute; inset: 0 44% 0 0; z-index: 1; pointer-events: none; opacity: 0;
  background: linear-gradient(90deg, rgba(16, 34, 66, .62) 0%, rgba(16, 34, 66, .42) 60.7%, rgba(16, 34, 66, 0) 100%);
}

@media (max-width: 760px) {
  /* en celular el paisaje ocupa la parte baja del hero, detrás de la historia */
  .stage { width: max(100cqw, 112cqh); left: calc(50% - max(50cqw, 56cqh)); }
}

/* Unión con la siguiente sección: el suelo nevado termina en el mismo tono */
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 56px; z-index: 2; pointer-events: none; background: linear-gradient(rgba(246, 241, 232, 0), var(--paper)); }

/* El zorro viajero: los zorros grandes de headhunting y del registro aparecen cuando él llega */
.fox-travels .hunt-fox:not(.is-home) svg, .fox-travels .reg-fox:not(.is-home) svg, .fox-travels .emp-fox:not(.is-home) svg { visibility: hidden; }

/* La nieve del frente baja un poco */
.backdrop .layer:last-of-type { translate: 0 clamp(22px, 5.5vh, 60px); }

/* Fondo del hero: la Ciudad de México al atardecer.
   El velo azul marino es más denso del lado del texto; el de noche se levanta al hacer scroll (hero.js). */
.hero { background: #0E1C38; }
.hero-photo { position: absolute; left: -2%; top: -3%; width: 104%; max-width: none; height: 106%; translate: none !important; object-fit: cover; object-position: 62% 58%; display: block; }
.hero-veil { position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(12, 24, 48, .9) 0%, rgba(12, 24, 48, .76) 34%, rgba(12, 24, 48, .34) 68%, rgba(12, 24, 48, .22) 100%),
    linear-gradient(180deg, rgba(12, 24, 48, .6) 0%, rgba(12, 24, 48, 0) 26%, rgba(12, 24, 48, 0) 64%, rgba(12, 24, 48, .7) 100%); }
.hero-night { position: absolute; inset: 0; background: rgba(12, 24, 48, .26); }
@media (max-width: 1100px) {
  .hero-photo { object-position: 70% 60%; }
  .hero-veil { background: linear-gradient(180deg, rgba(12, 24, 48, .72) 0%, rgba(12, 24, 48, .56) 55%, rgba(12, 24, 48, .8) 100%); }
}
