/* Fuentes propias (licencia OFL, ver licencias/): así Google no recibe datos de los visitantes */
@font-face { font-family: "Fraunces"; font-weight: 600 900; font-display: swap; src: url("assets/fonts/fraunces-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Fraunces"; font-weight: 600 900; font-display: swap; src: url("assets/fonts/fraunces-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113; }
@font-face { font-family: "Manrope"; font-weight: 400 800; font-display: swap; src: url("assets/fonts/manrope-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Manrope"; font-weight: 400 800; font-display: swap; src: url("assets/fonts/manrope-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113; }
@font-face { font-family: "Doto"; font-weight: 700 900; font-display: swap; src: url("assets/fonts/doto-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --red: #c8141c;
  --red-deep: #8f0b12;
  --cream: #fff4e4;
  --cream-2: #fbe7cc;
  --ink: #1d1513;
  --ink-soft: #5a4a44;
  --amber: #ffb22e;
  --board: #17110f;
  --mint: #2f9e6b;

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Manrope", system-ui, sans-serif;
  --font-led: "Doto", ui-monospace, monospace;

  --gutter: clamp(16px, 4vw, 56px);
  --ease-out: cubic-bezier(.22, 1, .36, 1);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; }

/* ───────────── NAV ───────────── */

.nav {
  position: fixed;
  z-index: 50;
  top: 14px;
  left: 50%;
  translate: -50% 0;
  width: min(1180px, calc(100% - 2 * 12px));
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 8px 8px 10px;
  border-radius: 18px;
  background: color-mix(in srgb, var(--cream) 82%, transparent);
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .6) inset, 0 10px 30px -12px rgba(40, 10, 5, .35);
  opacity: 0;
  animation: fade-down .9s .5s var(--ease-out) forwards;
}

.nav__brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.nav__logo { width: 36px; height: 36px; flex: none; }
.nav__name { white-space: nowrap; font-family: var(--font-display); font-weight: 800; font-size: 19px; letter-spacing: -.01em; }

.nav__links { display: flex; gap: 4px; margin-left: auto; }
.nav__links a {
  padding: 8px 14px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  color: var(--ink-soft);
  transition: background-color .2s, color .2s;
}
.nav__links a:hover { background: rgba(200, 20, 28, .08); color: var(--red); }

.nav__cta {
  white-space: nowrap;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--red);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  transition: background-color .2s, transform .2s var(--ease-out);
}
.nav__cta:hover { background: var(--red-deep); }
.nav__cta:active { transform: scale(.97); }

@media (max-width: 860px) {
  .nav__links { display: none; }
  .nav__cta { margin-left: auto; }
}

/* ───────────── HERO ───────────── */

.hero {
  position: relative;
  height: 280vh;          /* largo del “viaje” de scroll */
}

.hero__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100lvh; /* alto grande: la foto sigue detrás de la barra de Safari */
  overflow: hidden;
  isolation: isolate;
  /* Safari en iPhone (iOS 26) pinta la barra de abajo del color del contenedor fijo que la toca
     (era este crema). Invisible para Safari; lo de adentro se ve igual (la capa .inside ya es crema). */
  visibility: hidden;
}
.hero__sticky > * { visibility: visible; }

/* iPhone y iPad: lo que asoma debajo de la barra de Safari es el fondo del hero: grava oscura
   mientras se ve el bus y crema cuando ya se está adentro. La foto se funde en esa grava abajo. */
@supports (-webkit-touch-callout: none) {
  .hero { background: linear-gradient(#2e2421 0 218vh, var(--cream) 228vh); }
  html.js .bus::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 120px;
    background: linear-gradient(rgba(46, 36, 33, 0), #2e2421);
    pointer-events: none;
  }
}

/* Capa: el bus (foto con la ventana enmascarada) */
.bus {
  position: absolute;
  inset: 0;
  z-index: 2;
}
.bus__canvas {
  width: 100%;
  height: 100%;
  display: block;
  /* “respiración” de entrada al cargar */
  scale: 1.08;
  transition: scale 2.2s var(--ease-out);
}
.is-ready .bus__canvas { scale: 1; }

/* Capa: portada */
.intro {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  will-change: transform, opacity;
}
.intro__scrim {
  position: absolute;
  inset: auto 0 0 0;
  height: 52%;
  background: linear-gradient(to top, rgba(22, 10, 8, .78), rgba(22, 10, 8, .35) 55%, transparent);
}
.intro__content {
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  bottom: clamp(24px, 6vh, 64px);
  color: #fff;
}
.intro__h1 { margin: 0; font: inherit; }
.intro__eyebrow, .intro__title { display: block; }
.intro__eyebrow {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--cream-2);
}
.intro__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 900;
  font-variation-settings: "SOFT" 100;
  font-size: clamp(38px, 5.8vw, 92px);
  line-height: .95;
  letter-spacing: -.025em;
  text-wrap: balance;
  text-shadow: 0 2px 30px rgba(0, 0, 0, .25);
}
.intro__hint {
  pointer-events: auto;
  margin-top: clamp(16px, 3vh, 28px);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  color: #fff;
}
.intro__hint-icon {
  width: 26px;
  height: 40px;
  border: 2px solid rgba(255, 255, 255, .85);
  border-radius: 14px;
  display: grid;
  justify-items: center;
  padding-top: 7px;
}
.intro__hint-icon span {
  width: 4px;
  height: 8px;
  border-radius: 2px;
  background: #fff;
  animation: wheel 1.8s var(--ease-out) infinite;
}

/* Entrada de la portada al cargar */
.intro__eyebrow, .intro__title, .intro__hint {
  opacity: 0;
  translate: 0 24px;
  transition: opacity 1s var(--ease-out), translate 1s var(--ease-out);
}
.is-ready .intro__eyebrow, .is-ready .intro__title, .is-ready .intro__hint { opacity: 1; translate: 0 0; }
.is-ready .intro__title { transition-delay: .12s; }
.is-ready .intro__hint { transition-delay: .3s; }

.vignette {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(ellipse at center, transparent 45%, rgba(20, 6, 4, .55) 100%);
}

/* ───────────── ADENTRO ───────────── */

.inside {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(1200px 600px at 85% 30%, rgba(255, 178, 46, .16), transparent 60%),
    var(--cream);
  will-change: transform;
}

/* Toldo rayado con valanza festoneada, como el del bus */
.awning {
  flex: none;
  height: 74px;
  position: relative;
  background: repeating-linear-gradient(90deg, var(--red) 0 34px, #fff 34px 68px);
  box-shadow: inset 0 -8px 14px -10px rgba(0, 0, 0, .35);
}
.awning::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 26px;
  margin-top: -2px;
  background: var(--red);
  border-top: 2px solid rgba(0, 0, 0, .12);
  -webkit-mask:
    linear-gradient(#000 0 0) top / 100% 12px no-repeat,
    radial-gradient(circle 14px at 50% 12px, #000 96%, transparent 100%) 0 0 / 34px 100% repeat-x;
          mask:
    linear-gradient(#000 0 0) top / 100% 12px no-repeat,
    radial-gradient(circle 14px at 50% 12px, #000 96%, transparent 100%) 0 0 / 34px 100% repeat-x;
  filter: drop-shadow(0 6px 6px rgba(70, 10, 5, .2));
}

.inside__grid {
  flex: 1;
  min-height: 0;
  width: min(1180px, 100% - 2 * var(--gutter));
  margin: 0 auto;
  padding: clamp(28px, 6vh, 64px) 0 clamp(20px, 4vh, 40px);
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  align-items: center;
  gap: clamp(24px, 4vw, 64px);
}

/* Letrero de destino LED */
.board {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  max-width: 100%;
  padding: 10px 16px 10px 14px;
  border-radius: 10px;
  background: var(--board);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .06),
    inset 0 0 0 5px #2a201c,
    0 10px 24px -14px rgba(0, 0, 0, .6);
  color: var(--amber);
  font-family: var(--font-led);
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
  text-shadow: 0 0 6px rgba(255, 178, 46, .75), 0 0 18px rgba(255, 140, 20, .35);
  opacity: 0;
  transition: opacity .2s;
}
.board__label { font-size: 15px; font-weight: 700; opacity: .75; letter-spacing: .04em; }
.board__arrow { font-size: 14px; opacity: .75; }
.board__dest { display: inline-block; min-width: 9ch; font-size: 24px; line-height: 1; letter-spacing: .03em; }
.board__word { display: inline-block; }
.board__word.is-flip { animation: led-in .5s steps(5) both; }

.inside__title {
  margin: clamp(16px, 3vh, 28px) 0 0;
  font-family: var(--font-display);
  font-weight: 900;
  font-variation-settings: "SOFT" 100;
  font-size: clamp(40px, 6.2vw, 92px);
  line-height: .94;
  letter-spacing: -.03em;
  text-wrap: balance;
}
.inside__title em {
  font-style: italic;
  font-weight: 800;
  color: var(--red);
}

.inside__lead {
  margin: clamp(14px, 2.4vh, 22px) 0 0;
  max-width: 34rem;
  font-size: clamp(16px, 1.25vw, 18.5px);
  color: var(--ink-soft);
  text-wrap: pretty;
}

.inside__actions {
  margin-top: clamp(18px, 3.2vh, 30px);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 14px;
  font-weight: 800;
  font-size: 16px;
  text-decoration: none;
  transition: transform .2s var(--ease-out), background-color .2s, box-shadow .2s;
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn:active { transform: scale(.97); }
.btn--primary {
  background: var(--red);
  color: #fff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .25) inset, 0 12px 24px -12px rgba(200, 20, 28, .8);
}
.btn--primary:hover { background: var(--red-deep); }
.btn--primary:hover svg { translate: 3px 0; }
.btn--primary svg { transition: translate .25s var(--ease-out); }
.btn--ghost {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 2px rgba(29, 21, 19, .16);
}
.btn--ghost:hover { box-shadow: inset 0 0 0 2px var(--ink); }

/* Boleto con horario */
.ticket {
  margin-top: clamp(18px, 3.4vh, 32px);
  display: flex;
  width: fit-content;
  max-width: 100%;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .04), 0 14px 30px -18px rgba(70, 20, 10, .45);
  /* muescas laterales del boleto */
  -webkit-mask: radial-gradient(circle 9px at 0 50%, transparent 98%, #000) left / 51% 100% no-repeat,
                radial-gradient(circle 9px at 100% 50%, transparent 98%, #000) right / 51% 100% no-repeat;
          mask: radial-gradient(circle 9px at 0 50%, transparent 98%, #000) left / 51% 100% no-repeat,
                radial-gradient(circle 9px at 100% 50%, transparent 98%, #000) right / 51% 100% no-repeat;
}
.ticket__main, .ticket__stub {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  padding: 12px 22px;
}
.ticket__main { padding-left: 24px; }
.ticket__stub {
  border-left: 2px dashed rgba(29, 21, 19, .15);
  padding-right: 24px;
}
.ticket__kicker {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--red);
}
.ticket__days { font-size: 16px; font-weight: 800; }
.ticket__hours { font-size: 15px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.ticket__place { font-size: 14px; color: var(--ink-soft); }

.status { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 800; }
.status__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #b9aaa4;
}
.status.is-open .status__dot { background: var(--mint); box-shadow: 0 0 0 4px rgba(47, 158, 107, .18); animation: pulse 2s infinite; }
.status.is-open { color: #1f7a50; }
.status.is-closed .status__dot { background: var(--red); }

/* Fotos */
.inside__media {
  position: relative;
  height: min(62vh, 560px);
  min-height: 0;
}
.card {
  position: absolute;
  margin: 0;
  padding: 10px 10px 0;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 30px 50px -28px rgba(60, 15, 8, .55), 0 2px 6px rgba(0, 0, 0, .06);
}
.card__photo { height: calc(100% - 40px); overflow: hidden; border-radius: 3px; background: var(--cream-2); }
.card__photo img { width: 100%; height: 100%; object-fit: cover; }
.card figcaption {
  height: 40px;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: 16px;
  color: var(--ink-soft);
}
.card--front {
  top: 0;
  right: 0;
  width: 92%;
  height: 64%;
  rotate: 2.5deg;
}
.card--front img { object-position: 70% 60%; }
.card--front figcaption { padding-left: 36%; }   /* la otra tarjeta tapa ese lado */
.card--interior {
  left: 0;
  bottom: 0;
  width: 44%;
  height: 54%;
  rotate: -5deg;
  z-index: 2;
}
.card--interior img { object-position: 50% 30%; }

.sticker {
  position: absolute;
  z-index: 3;
  right: 2%;
  bottom: 7%;
  width: clamp(96px, 9vw, 128px);
  aspect-ratio: 1;
}
.sticker svg { width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 10px 14px rgba(80, 10, 5, .3)); }
.sticker__text { font: 800 9.5px var(--font-body); fill: #fff; }
.sticker svg > text { transform-origin: 60px 60px; animation: spin 22s linear infinite; }

/* Revelado escalonado al “entrar” */
.reveal {
  opacity: 0;
  translate: 0 28px;
  transition: opacity .7s var(--ease-out), translate .9s var(--ease-out);
}
.card.reveal { translate: 0 60px; }
.sticker.reveal { scale: .6; translate: 0 0; transition: opacity .5s, scale .8s cubic-bezier(.34, 1.56, .64, 1); }

.is-inside .board { opacity: 1; }
.is-inside .reveal { opacity: 1; translate: 0 0; }
.is-inside .sticker.reveal { scale: 1; }
.is-inside .inside__title { transition-delay: .05s; }
.is-inside .inside__lead { transition-delay: .14s; }
.is-inside .inside__actions { transition-delay: .22s; }
.is-inside .ticket { transition-delay: .3s; }
.is-inside .card--front { transition-delay: .12s; }
.is-inside .card--interior { transition-delay: .26s; }
.is-inside .sticker { transition-delay: .5s; }

/* ───────────── RESPONSIVE ───────────── */

@media (max-width: 960px) {
  .inside__grid {
    grid-template-columns: 1fr;
    align-content: start;
    gap: 22px;
    padding-top: clamp(64px, 11vh, 96px);
  }
  .inside__media { height: auto; flex: 1; min-height: 150px; }
  .card--front { inset: 0 0 0 auto; width: 59%; height: 100%; rotate: 1.5deg; }
  .card--front img { object-position: 50% 60%; }
  .card--front figcaption { padding-left: 0; }
  .card--interior { inset: 0 auto 0 0; width: 44%; height: 100%; rotate: -2.5deg; }
  .sticker { right: -6px; bottom: auto; top: -36px; width: 92px; }
  .inside__grid { display: flex; flex-direction: column; align-items: stretch; }
  .inside__copy { flex: none; }
}

@media (max-width: 560px) {
  .card--front img { object-position: 50% 80%; }
  .sticker { width: 70px; top: -46px; right: -8px; }
  .inside__grid { padding-top: 44px; padding-bottom: 44px; }
  .awning { height: 56px; }
  .awning::after { height: 22px; }
  .board { gap: 8px; padding: 8px 12px; }
  .board__label { font-size: 12px; }
  .board__dest { font-size: 19px; }
  .btn { padding: 13px 18px; font-size: 15px; flex: 1; justify-content: center; }
  .ticket { width: 100%; }
  .ticket__main, .ticket__stub { padding: 10px 14px; flex: 1; }
  .ticket__main { padding-left: 18px; }
  .ticket__stub { padding-right: 18px; }
  .ticket__days { font-size: 14.5px; }
  .ticket__hours, .status { font-size: 13.5px; }
  .ticket__place { font-size: 12.5px; }
}

@media (max-height: 760px) and (max-width: 560px) {
  .inside__media { display: none; }
}

/* Teléfono en horizontal: la pantalla es muy baja para la columna de móvil.
   El texto va a la izquierda, botones y horario a la derecha, y las fotos se ocultan. */
@media (orientation: landscape) and (max-height: 540px) {
  .awning { height: 40px; }
  .awning::after { height: 18px; }
  .inside__grid {
    display: block;
    width: min(1180px, 100% - 2 * var(--gutter));
    padding: 74px 0 12px;
  }
  .inside__media { display: none; }
  .inside__copy {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    gap: 0 clamp(20px, 4vw, 44px);
    align-items: start;
  }
  .inside__copy > * { grid-column: 1; }
  .board { gap: 8px; padding: 6px 12px; justify-self: start; }
  .board__label { font-size: 11px; }
  .board__dest { font-size: 17px; }
  .inside__title { margin-top: 10px; font-size: clamp(28px, 9vh, 42px); }
  .inside__lead { margin-top: 8px; font-size: 14px; line-height: 1.45; }
  .inside__actions { grid-column: 2; grid-row: 1 / span 2; align-self: end; margin: 0; flex-wrap: wrap; }
  .inside__actions .btn { padding: 11px 16px; font-size: 14.5px; flex: 1 1 auto; justify-content: center; }
  .ticket { grid-column: 2; grid-row: 3; width: 100%; margin-top: 8px; }
  .ticket__main, .ticket__stub { padding: 8px 14px; }
  .ticket__days { font-size: 14px; }
  .ticket__hours, .status, .ticket__place { font-size: 12.5px; }
  .intro__title { font-size: clamp(30px, 10vh, 54px); }
  .intro__content { bottom: 18px; }
}

/* ───────────── KEYFRAMES ───────────── */

@keyframes fade-down { from { opacity: 0; translate: -50% -12px; } to { opacity: 1; translate: -50% 0; } }
@keyframes wheel { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(12px); opacity: 0; } 100% { transform: translateY(0); opacity: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(47, 158, 107, 0); } }
@keyframes led-in {
  from { clip-path: inset(0 100% 0 0); }
  to   { clip-path: inset(0 0 0 0); }
}

/* ───────────── MOVIMIENTO REDUCIDO ───────────── */

@media (prefers-reduced-motion: reduce) {
  .hero { height: auto; }
  .hero__sticky { position: relative; height: auto; min-height: 100svh; }
  .inside { position: relative; min-height: 100svh; }
  .bus, .vignette { display: none; }
  /* el título principal sigue disponible para lectores de pantalla */
  .intro { inset: auto; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .intro__hint { display: none; }
  .board, .reveal { opacity: 1; translate: 0 0; scale: 1; transition: none; }
  .sticker svg > text, .status__dot, .intro__hint-icon span { animation: none !important; }
  .nav { animation-duration: .01s; }
}
