/* ==========================================================================
   iCase — HERO "EL LOCAL" v4.0
   Archivo: static/css/icase-hero.css
   Requiere: icase-tokens.css

   La foto manda. El texto va en una tarjeta sólida encima, nunca en un
   overlay oscuro: la luz natural de la fotografía se conserva entera.
   ========================================================================== */

.ic-hero { position: relative; background: var(--ic-mist); }

/* --------------------------------------------------------------------------
   1. FOTOGRAFÍA
   -------------------------------------------------------------------------- */
.ic-hero__shot { position: relative; overflow: hidden; }
/* El parallax mueve el <picture> DENTRO del recorte, con un 3% de sangrado.
   Si moviera el contenedor, se abriría un hueco blanco en el borde. */
.ic-hero__shot picture {
  display: block; width: 100%; height: 100%;
  transform: translate3d(0, var(--ic-par, 0px), 0) scale(1.03);
  will-change: transform;
}
.ic-hero__shot img {
  display: block; width: 100%; height: 100%;
  object-fit: cover; object-position: center 42%;
}

/* Mobile: cuadrado sobre la pared de fundas.
   Con 4/5 el botón caía 75px debajo del pliegue en un iPhone de 812px. */
.ic-hero__shot { aspect-ratio: 1 / 1; }
@media (min-width: 620px) { .ic-hero__shot { aspect-ratio: 3 / 2; } }
@media (min-width: 900px) {
  .ic-hero__shot { aspect-ratio: auto; height: min(76vh, 700px); }
}

/* Desvanecido inferior mínimo: asienta la tarjeta sin apagar la foto */
@media (min-width: 900px) {
  .ic-hero__shot::after {
    content: ""; position: absolute; inset: auto 0 0 0; height: 42%;
    background: linear-gradient(to top left, rgba(255,255,255,.40), rgba(255,255,255,0) 62%);
    pointer-events: none;
  }
}

/* --------------------------------------------------------------------------
   2. TARJETA DE TEXTO
   -------------------------------------------------------------------------- */
.ic-hero__anchor { position: relative; }
@media (min-width: 900px) {
  .ic-hero__anchor {
    position: absolute; inset: 0; left: 50%; transform: translateX(-50%);
    display: flex; align-items: flex-end; justify-content: flex-end;
    padding-bottom: clamp(36px, 4vw, 64px);
    pointer-events: none;
  }
}

.ic-hero__card {
  position: relative;
  margin-top: calc(var(--ic-s6) * -1);
  padding: var(--ic-s6) var(--ic-s5) var(--ic-s7);
  background: var(--ic-paper);
  border-radius: var(--ic-r-case) var(--ic-r-case) 0 0;
}
@media (min-width: 900px) {
  .ic-hero__card {
    pointer-events: auto;
    margin-top: 0;
    max-width: 33rem;
    padding: clamp(32px, 3vw, 44px);
    border-radius: var(--ic-r-case);
    box-shadow:
      0 1px 3px rgba(16, 20, 24, .05),
      0 16px 40px -20px rgba(16, 20, 24, .22);
  }
}

.ic-hero__eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--ic-mono); font-size: var(--ic-fs-xs);
  letter-spacing: var(--ic-ls-mono); text-transform: uppercase;
  font-weight: var(--ic-fw-medium); color: var(--ic-ink-3);
  margin-bottom: var(--ic-s4);
}
.ic-hero__eyebrow::before {
  content: ""; width: 24px; height: 1.5px; background: var(--ic-blue); flex: none;
}

.ic-hero__title {
  font-size: clamp(1.875rem, 1.25rem + 2.6vw, 3rem);
  line-height: 1.06; letter-spacing: -0.035em;
  font-weight: var(--ic-fw-black); color: var(--ic-ink);
  margin: 0 0 var(--ic-s4); text-wrap: balance;
}
.ic-hero__title em {
  font-style: normal;
  color: var(--ic-blue-deep);
  /* La frase destacada ocupa su propia línea. No es estética nada más:
     "Este es el local." mide casi exactamente el ancho de la tarjeta, así que
     si la tipografía tarda o entra la del sistema, el navegador la partiría
     por donde le convenga. Con el quiebre fijo, el corte siempre cae acá. */
  display: block;
}

.ic-hero__text {
  font-size: var(--ic-fs-body); line-height: 1.55;
  color: var(--ic-ink-2); margin: 0 0 var(--ic-s5);
  max-width: 46ch; text-wrap: pretty;
}

/* --------------------------------------------------------------------------
   2b. WHATSAPP EN EL TEXTO Y FRANJA DE ENVÍO
   -------------------------------------------------------------------------- */
.ic-hero__wa {
  color: var(--ic-blue-deep);
  font-weight: var(--ic-fw-semi);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  text-decoration-color: var(--ic-blue-ring);
  transition: text-decoration-color var(--ic-t-fast) var(--ic-ease);
}
.ic-hero__wa:hover { text-decoration-color: currentColor; }

/* El único lugar del hero donde se usa el naranja: es el color de urgencia
   del sistema y acá dice algo que caduca a una hora concreta. */
.ic-hero__urg {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: var(--ic-s4) 0 0;
  padding: 12px 14px;
  border-radius: var(--ic-r-ui);
  background: var(--ic-flame-wash);
  color: var(--ic-ink);
  font-size: var(--ic-fs-sm);
  line-height: 1.45;
  text-wrap: pretty;
}
.ic-hero__urg svg {
  flex: 0 0 auto;
  width: 18px; height: 18px;
  margin-top: 1px;
  color: var(--ic-flame-deep);
}
.ic-hero__urg strong {
  font-weight: var(--ic-fw-bold);
  color: var(--ic-flame-deep);
  font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------------------
   3. BOTONES
   -------------------------------------------------------------------------- */
.ic-hero__cta { margin-bottom: 0; display: flex; flex-direction: column; gap: var(--ic-s3); }
/* Probé ponerlos en fila desde 360px para ganar 64px de alto: no entra.
   "Ver productos" + "Cómo llegar" miden 356px juntos y el ancho útil de la
   tarjeta en un iPhone es 295px, así que se envuelven igual — y achicarlos
   para que entren deja dos botones de 141px, incómodos para el pulgar.
   Apilados se quedan. */
@media (min-width: 420px) { .ic-hero__cta { flex-direction: row; flex-wrap: wrap; } }

.ic-hero__btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 52px; padding: 0 var(--ic-s6);
  border: 1.5px solid transparent; border-radius: var(--ic-r-ui);
  font-size: var(--ic-fs-body); font-weight: var(--ic-fw-bold);
  letter-spacing: -0.01em; line-height: 1; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 240ms var(--ic-ease),
              color 240ms var(--ic-ease),
              border-color 240ms var(--ic-ease),
              transform 150ms var(--ic-ease);
}
.ic-hero__btn:active { transform: translateY(1px); }
.ic-hero__btn svg { width: 15px; height: 15px; flex: none; transition: transform 300ms var(--ic-ease-out); }
.ic-hero__btn--main { background: var(--ic-ink); color: #fff; }
.ic-hero__btn--main:hover { background: var(--ic-blue); }
.ic-hero__btn--main:hover svg { transform: translateX(4px); }
.ic-hero__btn--alt { background: transparent; border-color: var(--ic-line); color: var(--ic-ink); }
.ic-hero__btn--alt:hover { border-color: var(--ic-ink); }

.ic-hero__hours {
  display: flex; align-items: flex-start; gap: 8px;
  margin: var(--ic-s5) 0 0;
  font-family: var(--ic-mono); font-size: var(--ic-fs-xs);
  letter-spacing: .03em; line-height: 1.5; color: var(--ic-ink-3);
}
.ic-hero__hours svg { width: 13px; height: 13px; margin-top: 2px; flex: none; opacity: .6; }

/* --------------------------------------------------------------------------
   4. MOVIMIENTO — sobrio. La foto no se mueve sola.
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  .ic-hero__eyebrow,
  .ic-hero__title,
  .ic-hero__text,
  .ic-hero__urg,
  .ic-hero__cta,
  .ic-hero__hours { animation: ic-rise 720ms var(--ic-ease-out) both; }
  .ic-hero__eyebrow { animation-delay: 80ms; }
  .ic-hero__title   { animation-delay: 150ms; }
  .ic-hero__text    { animation-delay: 230ms; }

  .ic-hero__cta     { animation-delay: 310ms; }
  .ic-hero__urg     { animation-delay: 390ms; }
  .ic-hero__hours   { animation-delay: 470ms; }
}

/* La fotografía NO se anima al entrar.
   Es el elemento LCP: si la animación no corre (pestaña en segundo plano,
   JS trabado, motor que la ignora), un `opacity: 0` con fill-mode both la
   deja invisible para siempre. Se pinta apenas decodifica. */
@keyframes ic-rise {
  from { opacity: 0; transform: translate3d(0, 12px, 0); }
  to   { opacity: 1; transform: none; }
}
/* El JS escribe --ic-par sobre .ic-hero__shot y lo hereda el <picture>. */
