/* ==========================================================================
   HERO.CSS — nav, hero, marquesina, historia.
   Dueño: agente hero-historia.
   ========================================================================== */

/* --------------------------------------------------------------------------
   NAV
   -------------------------------------------------------------------------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px var(--pad);
  border-bottom: 1px solid transparent;
  transition: background var(--dur-ui) var(--ease-salida),
              border-color var(--dur-ui) var(--ease-salida),
              padding var(--dur-ui) var(--ease-salida);
}
.nav.is-scrolled {
  background: rgba(11,10,9,.95);
  border-color: var(--filete);
  padding-top: 13px;
  padding-bottom: 13px;
}

/* Monograma JC + nombre */
.nav__logo {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  white-space: nowrap;
}
.nav__logo-mono {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--filete-fuerte);
  font-family: var(--serif);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: .04em;
  color: var(--oro);
  flex-shrink: 0;
  transition: border-color var(--dur-micro);
}
.nav__logo:hover .nav__logo-mono { border-color: var(--oro); }
.nav__logo-name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: .03em;
  color: var(--crema);
  transition: color var(--dur-micro);
}
.nav__logo:hover .nav__logo-name { color: var(--oro); }

/* Links */
.nav__links {
  display: flex;
  gap: clamp(16px,2.6vw,36px);
  align-items: center;
  font-size: 12px;
  letter-spacing: var(--tracking-etiqueta);
  text-transform: uppercase;
  white-space: nowrap;
}
.nav__links a { text-decoration: none; transition: color var(--dur-micro); }
.nav__links a:not(.nav__cta):hover { color: var(--oro); }

/* CTA "Contrataciones" — filete dorado refinado */
.nav__cta {
  border: 1px solid var(--filete-fuerte);
  color: var(--oro);
  padding: 10px 22px;
  font-size: 11px;
  letter-spacing: var(--tracking-etiqueta);
  transition: background var(--dur-micro), color var(--dur-micro), border-color var(--dur-micro);
}
.nav__cta:hover {
  background: var(--oro);
  color: var(--negro);
  border-color: var(--oro);
}
/* Foco visible en nav */
.nav__cta:focus-visible { outline-offset: 3px; }

/* --------------------------------------------------------------------------
   HERO
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  height: clamp(680px,100vh,960px);
  overflow: hidden;
  background: var(--negro-2);
}

/* Foto: anclada a la derecha con máscara de degradado a la izquierda */
.hero__photo {
  position: absolute;
  right: 0; top: 0;
  height: 100%;
  aspect-ratio: 1/1;
  transform-origin: 65% 25%;
}
.hero__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 28%);
  mask-image: linear-gradient(to right, transparent 0%, #000 28%);
}

/* Halo / spotlight de escenario sobre la foto */
.hero__spotlight {
  position: absolute;
  right: 0; top: 0;
  height: 100%;
  aspect-ratio: 1/1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 55% 70% at 60% 28%, rgba(201,161,90,.13) 0%, transparent 68%),
    radial-gradient(ellipse 30% 45% at 65% 15%, rgba(240,215,160,.09) 0%, transparent 60%);
  mix-blend-mode: screen;
}

/* Scrim y fade-out inferior */
.hero__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(11,10,9,.88) 0%,
    rgba(11,10,9,.44) 42%,
    transparent 62%
  );
}
.hero__fade {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 320px;
  background: linear-gradient(to bottom, transparent, var(--negro) 85%);
}

/* Texto del hero */
.hero__text {
  position: relative;
  z-index: 2;
  padding: clamp(120px,19vh,172px) var(--pad) 0;
  max-width: 760px;
}

/* Eyebrow: etiqueta superior — reveal estándar de base.css; solo redefinimos tracking */
.hero .eyebrow {
  letter-spacing: var(--tracking-etiqueta);
}

/* Título h1 — telón de entrada
   clip-path SOLO dentro de .js-reveal → sin JS el h1 es visible.
   Especificidad (0,2,1) supera (0,2,0) de .js-reveal .reveal para
   que la transition incluya clip-path.                             */
.hero h1 {
  margin: 20px 0 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(64px,9vw,116px);
  line-height: .92;
  letter-spacing: .01em;
  white-space: nowrap;
  /* clase .oro-metal aplicada en HTML para el gradiente metálico.
     background-clip:text y el clip-path del telón recortan lo que sale de la caja:
     el gancho de la J baja por debajo del line-height .92. El padding da aire a los
     trazos y el margen negativo lo compensa, así el diseño no se mueve. */
  padding: .06em .08em .2em;
  margin-left: -.08em;
  margin-bottom: -.2em;
}
.js-reveal .hero h1 {
  clip-path: inset(0 100% 0 0);  /* estado inicial cuando hay JS */
  transform: none;               /* sin translateY — el telón es el reveal */
  transition: clip-path var(--dur-seccion) var(--ease-cine),
              opacity var(--dur-seccion) var(--ease-salida);
}
.js-reveal .hero h1.is-in {
  clip-path: inset(0 0% 0 0);   /* telón abierto */
}

/* Lema itálico */
.hero__tag {
  margin-top: 16px;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(26px,3.2vw,42px);
  line-height: 1.1;
  color: var(--crema-3);
}

/* Párrafo descriptivo */
.hero p {
  margin: 24px 0 32px;
  font-size: 17px;
  line-height: 1.65;
  max-width: 460px;
  color: rgba(230,222,206,.75);
  text-wrap: pretty;
}

/* Botones */
.hero .btns { gap: 14px; }

/* --------------------------------------------------------------------------
   FRANJA DE ERAS (bottom del hero)
   -------------------------------------------------------------------------- */
.eras {
  position: absolute;
  left: var(--pad);
  right: var(--pad);
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(10px,2.5vw,28px);
  border-top: 1px solid var(--filete);
  padding: 20px 0 28px;
}
.eras button {
  background: none;
  border: 0;
  padding: 0;
  text-align: left;
  cursor: pointer;
  color: var(--crema-3);
  transition: color var(--dur-micro);
  min-height: 44px;        /* objetivo táctil */
}
.eras button:hover { color: var(--oro); }
.eras button:hover strong { color: var(--oro); }
.eras strong {
  display: block;
  font-family: var(--serif);
  font-size: clamp(18px,1.9vw,24px);
  font-weight: 600;
  letter-spacing: .01em;
  color: var(--crema);
  transition: color var(--dur-micro);
}
.eras span {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  letter-spacing: var(--tracking-etiqueta);
  text-transform: uppercase;
  color: var(--filete-fuerte);
}
/* Separador decorativo entre eras */
.eras button + button { border-left: 1px solid var(--filete); padding-left: clamp(10px,1.8vw,22px); }

/* --------------------------------------------------------------------------
   MARQUESINA DE CANCIONES
   -------------------------------------------------------------------------- */
.marquee {
  overflow: hidden;
  border-top: 1px solid var(--filete);
  border-bottom: 1px solid var(--filete);
  padding: 16px 0;
  background: var(--negro-2);
}
.marquee__track {
  display: flex;
  align-items: center;
  width: max-content;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(22px,2.4vw,30px);
  white-space: nowrap;
  animation: marquee 60s linear infinite;    /* velocidad más serena */
}
.marquee__track span {
  padding: 0 20px;
  color: var(--crema-3);
}
.marquee__track .orn {                       /* ornamento ✦ */
  color: var(--oro);
  font-style: normal;
  font-size: .75em;
  padding: 0 4px;
  vertical-align: middle;
  letter-spacing: 0;
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* --------------------------------------------------------------------------
   KEN-BURNS (foto hero) — sin definición en @media reduced-motion
   -------------------------------------------------------------------------- */
@keyframes kenburns { from { transform: scale(1) } to { transform: scale(1.055) } }
.hero__photo { animation: kenburns 22s ease-in-out infinite alternate; }

/* --------------------------------------------------------------------------
   HISTORIA (#historia, fondo crema)
   -------------------------------------------------------------------------- */
.historia {
  background: var(--crema);
  color: var(--tinta);
  padding: var(--sec) var(--pad);
  display: flex;
  flex-wrap: wrap;
  gap: clamp(44px,7vw,96px);
}

.historia__quote { flex: 5 1 340px; min-width: 0; }
.historia__bio   { flex: 6 1 400px; min-width: 0; font-size: 18px; line-height: 1.75; color: #2a2420; text-wrap: pretty; }
.historia__bio p { margin: 0 0 22px; }

/* Drop cap en el primer párrafo */
.historia__bio p:first-child::first-letter {
  font-family: var(--serif);
  font-size: 4.6em;
  font-weight: 600;
  line-height: .78;
  float: left;
  margin: .06em .15em 0 0;
  color: var(--vino-texto);
}

/* Bloque de cita con comillas ornamentales grandes */
.quote-box {
  position: relative;
  min-height: 260px;
  margin-top: 32px;
  padding: 8px 0 8px 48px;  /* espacio para la comilla */
}
/* Comilla ornamental de apertura */
.quote-box::before {
  content: '\201C';          /* " */
  position: absolute;
  left: -4px;
  top: -18px;
  font-family: var(--serif);
  font-size: clamp(96px,10vw,128px);
  line-height: 1;
  color: var(--vino-texto);
  opacity: .18;
  pointer-events: none;
  user-select: none;
}

blockquote {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(32px,3.8vw,50px);
  line-height: 1.1;
  text-wrap: balance;
  color: var(--tinta);
  transition: opacity var(--dur-ui) var(--ease-escena),
              transform var(--dur-ui) var(--ease-escena);
}
blockquote.fading {
  opacity: 0;
  transform: translateY(6px);
}

/* Meta de la cita (nombre + dots) */
.quote-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(92,26,37,.18);
}
.quote-meta > span {
  font-size: 11px;
  letter-spacing: var(--tracking-etiqueta);
  text-transform: uppercase;
  color: var(--vino-texto);
  font-weight: 600;
}

/* Dots de navegación de frases */
.dots { display: flex; gap: 6px; }
.dots button {
  position: relative;
  width: 32px;
  height: 32px;
  min-width: 32px;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  /* objetivo táctil ≥44px gracias al pseudo-element */
}
/* Ampliar área táctil sin agrandar el punto visual */
.dots button::after {
  content: "";
  position: absolute;
  width: 44px;
  height: 44px;
}
.dots button::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid rgba(110,31,43,.5);
  transition: background var(--dur-micro), border-color var(--dur-micro), transform var(--dur-micro);
}
.dots button.is-active::before {
  background: var(--vino-texto);
  border-color: var(--vino-texto);
  transform: scale(1.25);
}
.dots button:hover::before { border-color: var(--vino-texto); }

/* --------------------------------------------------------------------------
   RESPONSIVE
   -------------------------------------------------------------------------- */
@media (max-width:767px) {
  /* Nav móvil: solo logo + CTA */
  .nav__links a:not(.nav__cta) { display: none; }
  .nav__logo-name { font-size: 18px; }
  .nav { gap: 12px; }
  .nav__cta { padding: 12px 14px; letter-spacing: .16em; min-height: 44px; display: inline-flex; align-items: center; }
}
@media (max-width:359px) {
  .nav__logo-name { display: none; }
}
@media (max-width:767px) {

  /* Hero móvil: sin intro de clip-path; contenido visible de inmediato */
  .hero {
    height: auto;
    min-height: 100svh;
    padding-bottom: 200px;
  }
  .hero h1 { white-space: normal; word-break: break-word; }
  .js-reveal .hero h1,
  .js-reveal .hero h1.is-in { clip-path: none; }   /* sin telón en móvil */
  .js-reveal .hero h1 { transition: opacity var(--dur-seccion) var(--ease-salida); }
  .hero__photo {
    animation: none;              /* sin ken-burns en móvil (perf) */
    right: -10%;
    opacity: .55;
  }
  /* Eras en 2 columnas en móvil */
  .eras {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 16px;
  }
  .eras button + button { border-left: 0; padding-left: 0; }
  .eras button:nth-child(3) { border-top: 1px solid var(--filete); padding-top: 14px; }
  .eras button:nth-child(4) { border-top: 1px solid var(--filete); padding-top: 14px; }
  /* Historia: sin drop cap (puede desbordar en pantallas pequeñas) */
  .historia__bio p:first-child::first-letter { all: unset; }
  .quote-box { padding-left: 0; }
  .quote-box::before { display: none; }
}

/* Capa extra: parallax del puntero solo en escritorio con hover y sin reduced-motion */
@media (min-width:1024px) and (hover:hover) {
  /* Activado desde hero.js con rAF + lerp */
  .hero__photo { will-change: transform; }
}

/* --------------------------------------------------------------------------
   REDUCED MOTION — mismo contenido, estático
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion:reduce) {
  .hero__photo                        { animation: none; }
  .marquee__track                     { animation: none; }
  .js-reveal .hero h1,
  .js-reveal .hero h1.is-in           { clip-path: none; }
  .js-reveal .hero h1                 { transition: none; }
  blockquote                          { transition: none; }
  .dots button::before                { transition: none; }
}

/* ==========================================================================
   HERO MÓVIL — versión propia (no un parche del escritorio).
   Retrato arriba a sangre con la cara despejada, que se funde a negro; texto debajo,
   nombre en una línea, botones lado a lado visibles sin bajar; etapas en tira deslizable.
   ========================================================================== */
@media (max-width:767px) {
  .hero { --foto-h: min(64svh, 560px); height: auto; min-height: 0; padding-bottom: 0; }
  .hero__photo {
    left: 0; right: 0; top: 0; width: 100%; height: var(--foto-h);
    aspect-ratio: auto; opacity: 1; transform: none;
  }
  .hero__photo img {
    object-position: 66% 14%;
    -webkit-mask-image: linear-gradient(to bottom, #000 58%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 58%, transparent 100%);
  }
  .hero__spotlight { left: 0; right: 0; width: 100%; height: var(--foto-h); aspect-ratio: auto; }
  .hero__scrim {
    background: linear-gradient(to bottom,
      rgba(11,10,9,.6) 0, rgba(11,10,9,0) 16%, rgba(11,10,9,0) 44%,
      rgba(11,10,9,.72) calc(var(--foto-h) - 90px), var(--negro-2) var(--foto-h));
  }
  .hero__fade { display: none; }

  .hero__text { padding: calc(var(--foto-h) - 150px) var(--pad) 0; max-width: none; }
  .hero .eyebrow { font-size: 11px; letter-spacing: .2em; }
  .hero h1 { font-size: clamp(44px, 13.6vw, 64px); white-space: nowrap; margin-top: 10px; }
  .hero__tag { margin-top: 6px; font-size: clamp(20px, 5.8vw, 26px); }
  .hero p { margin: 14px 0 22px; font-size: 15.5px; line-height: 1.6; }
  .hero .btns { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 10px; }
  .hero .btns .btn { padding: 15px 8px; font-size: 13px; }

  /* Etapas: tira horizontal deslizable con snap, cada etapa como placa */
  .eras {
    position: relative; left: auto; right: auto; bottom: auto;
    display: flex; gap: 10px; margin: 30px 0 0; padding: 16px var(--pad) 26px;
    overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-left: var(--pad);
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
    border-top: 1px solid var(--filete);
  }
  .eras::-webkit-scrollbar { display: none; }
  .eras button,
  .eras button + button,
  .eras button:nth-child(3),
  .eras button:nth-child(4) {
    flex: 0 0 auto; min-width: 148px; scroll-snap-align: start;
    border: 1px solid var(--filete); padding: 12px 16px; border-left: 1px solid var(--filete);
  }
  .eras strong { font-size: 19px; }
  .eras span { font-size: 10px; }
}
@media (max-width:359px) {
  .hero h1 { font-size: 42px; }
  .hero .btns { grid-template-columns: minmax(0,1fr); }
}

/* Historia: la altura de la cita la fija hero.js (frase más larga); sin hueco reservado */
.quote-box { min-height: 0; }
@media (max-width:767px) {
  .historia { gap: 28px; }
  .quote-box { margin-top: 18px; padding-top: 0; padding-bottom: 0; }
  .quote-meta { margin-top: 14px; }
}

/* Historia en celular: menos aire arriba y abajo, biografía más compacta */
@media (max-width:767px) {
  .historia { padding-top: 34px; padding-bottom: 40px; gap: 22px; }
  .quote-box { margin-top: 12px; }
  .historia__bio { font-size: 16px; line-height: 1.6; }
  .historia__bio p { margin-bottom: 14px; }
  .historia__bio p:last-child { margin-bottom: 0; }
}

/* Hero móvil: la etiqueta cae sobre la camisa clara del retrato → dorado claro + sombra
   pegada a las letras (no se oscurece la foto) */
@media (max-width:767px) {
  .hero .eyebrow {
    color: var(--oro-claro);
    text-shadow: 0 1px 2px rgba(0,0,0,.95), 0 0 6px rgba(0,0,0,.9), 0 0 10px rgba(0,0,0,.6);
  }
}
