
/* ==========================================
   TOMATILLO — PAGES.CSS
   Estilos específicos de las páginas
   ========================================== */


/* ==========================================
   1. HERO
   ========================================== */

.hero-copy {
  position: relative;
  z-index: 1;
}

.hero-copy h1 {
  margin-bottom: 1rem;
  max-width: 11ch;
}

.hero-copy h1 em {
  color: var(--color-olive);
}

.hero-copy p {
  max-width: 34rem;
}

/* Título y logo decorativo */

.hero-copy .hero-title-row {
  display: block;
}

.hero-copy .hero-title-row > img.hero-mark {
  display: none;
  width: 64px;
  height: 64px;
  max-width: 64px;
  max-height: 64px;
  object-fit: contain;
  border-radius: 50%;
}


/* ==========================================
   2. NUESTRA ESENCIA
   ========================================== */

.essence-editorial {
  align-items: center;
  padding-block: var(--space-3);
  border-block: 1px solid var(--color-line);
}

.essence-copy {
  max-width: 34rem;
  padding-bottom: var(--space-2);
}

.essence-copy::after {
  content: '•';
  display: block;
  width: fit-content;
  margin-top: var(--space-3);
  color: var(--color-olive);
  font-size: 1.35rem;
  line-height: 1;
}

.essence-photo {
  align-self: stretch;
  background: transparent;
  padding: 0;
}

.essence-photo img {
  height: 100%;
  min-height: 13rem;
  aspect-ratio: 1.3 / 1;
  border-radius: var(--radius-soft);
  object-fit: cover;
}


/* ==========================================
   3. VISÍTANOS
   ========================================== */

.visit-panel {
  display: grid;
  gap: var(--space-3);
  padding: var(--space-3);
  border-radius: clamp(1rem, 3vw, 1.7rem);
  background: #efeddf;
}

.visit-copy {
  align-self: center;
}

.visit-copy h2 {
  margin-bottom: var(--space-2);
}

.visit-copy h2 em {
  color: var(--color-olive);
}

.visit-copy p {
  max-width: 28rem;
  margin-bottom: 0;
}

.visit-photo {
  overflow: hidden;
  border-radius: var(--radius-soft);
}

.visit-photo img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}


/* ==========================================
   4. GOOGLE MAPS
   ========================================== */

.map-embed {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  border-radius: var(--radius-soft);
}

.map-embed iframe {
  display: block;
  width: 100%;
  height: clamp(13.75rem, 60vw, 16.25rem);
  border: 0;
}


/* ==========================================
   5. LOS TRES PILARES
   ========================================== */

.love-block {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  margin-top: var(--space-4);
  padding: var(--space-3);
  border-radius: var(--radius-soft);
  background: rgba(165, 174, 145, .15);
}

.love-photo {
  flex: 0 0 7rem;
}

.love-photo img {
  display: block;
  width: 100%;
  height: auto;
}

.love-copy {
  align-self: center;
}

.love-copy h3 {
  max-width: 15ch;
  margin-bottom: 0;
  font-size: clamp(1.55rem, 6vw, 2.5rem);
}


/* ==========================================
   6. PÁGINAS DE PLATILLOS Y BEBIDAS
   ========================================== */

.page-header h1 {
  margin-bottom: 1rem;
}

.page-header p {
  max-width: 40rem;
  margin-bottom: 0;
}

.menu-utility {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-bottom: var(--space-5);
}


/* ==========================================
   7. ANIMACIONES DE ENTRADA
   ========================================== */

/*
  Los elementos permanecen visibles sin JS.
  La clase .js se añade desde main.js.
*/

.js [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 500ms ease,
    transform 500ms ease;
}

.js [data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

.js .hero-photo {
  transition-delay: 100ms;
}

.js .gallery-grid [data-reveal]:nth-child(2) {
  transition-delay: 60ms;
}

.js .gallery-grid [data-reveal]:nth-child(3) {
  transition-delay: 120ms;
}


/* ==========================================
   8. LIGHTBOX
   ========================================== */

.lightbox {
  width: min(100% - 1.5rem, 72rem);
  max-width: 72rem;
  height: min(100% - 1.5rem, 52rem);
  max-height: 52rem;
  padding: 0;
  border: 0;
  border-radius: var(--radius-soft);
  background: transparent;
}

.lightbox::backdrop {
  background: rgba(27, 24, 20, .82);
}

.lightbox__frame {
  position: relative;
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
}

.lightbox__frame img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.lightbox__close,
.lightbox__nav {
  position: absolute;
  z-index: 1;
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  border: 1px solid rgba(255, 252, 247, .8);
  border-radius: 50%;
  background: rgba(56, 43, 37, .82);
  color: var(--color-paper);
  cursor: pointer;
}

.lightbox__close {
  top: .5rem;
  right: .5rem;
  font-size: 1.8rem;
  line-height: 1;
}

.lightbox__nav {
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
}

.lightbox__nav--previous {
  left: .5rem;
}

.lightbox__nav--next {
  right: .5rem;
}

.is-lightbox-open {
  overflow: hidden;
}


/* ==========================================
   9. ACCESIBILIDAD DE ANIMACIONES
   ========================================== */

@media (prefers-reduced-motion: reduce) {

  .js [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }

}


/* ==========================================
   10. HERO MÓVIL
   ========================================== */

@media (max-width: 699px) {

  /*
    Título y logo en una fila.
    El título ocupa el espacio disponible.
  */

  .hero-copy .hero-title-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 60px;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin-bottom: 1rem;
  }

  .hero-copy .hero-title-row h1 {
    min-width: 0;
    max-width: none;
    margin: 0;
    font-size: clamp(1.75rem, 7.5vw, 2.5rem);
    line-height: 1.06;
  }

  /*
    Logo original pequeño.
    Se controla su tamaño explícitamente.
  */

  .hero-copy .hero-title-row > img.hero-mark {
    display: block;
    width: min(60px, 100%);
    height: auto;
    max-width: 60px;
    max-height: 60px;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    border-radius: 50%;
    margin: 0;
    justify-self: end;
    align-self: center;
  }

  /*
    Imagen del Hero a ancho completo.
  */

  .hero-photo {
    position: relative;
    isolation: isolate;
    width: 100%;
    min-width: 0;
    overflow: hidden;
  }

  .hero-photo > img {
    display: block;
    width: 100%;
    height: auto;
  }

  /*
    Difuminado superior únicamente.
    La parte inferior permanece nítida.
  */

  
.hero-photo::before {
  display: none;
}

.hero-photo {
  background: var(--color-cream);
}

.hero-photo > img {
  display: block;
  width: 100%;
  height: auto;

  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    black 18%,
    black 100%
  );

  mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    black 18%,
    black 100%
  );
}


}


/* ==========================================
   11. AJUSTES PARA MÓVILES PEQUEÑOS
   ========================================== */

@media (max-width: 360px) {

  .hero-copy .hero-title-row {
    grid-template-columns: minmax(0, 1fr) 48px;
    gap: 8px;
  }

  .hero-copy .hero-title-row h1 {
    font-size: clamp(1.65rem, 8vw, 1.9rem);
  }

  .hero-copy .hero-title-row > img.hero-mark {
    width: 48px;
    max-width: 48px;
    max-height: 48px;
  }

}


/* ==========================================
   12. ESCRITORIO
   ========================================== */

@media (min-width: 700px) {

  /*
    Hero original aprobado.
    Mantener fundido lateral.
  */

  .hero-photo {
    margin-left: -4rem;
  }

  .hero-photo > img {
    aspect-ratio: 1.2 / 1;

    -webkit-mask-image: linear-gradient(
      to right,
      transparent 0%,
      #000 30%,
      #000 100%
    );

    mask-image: linear-gradient(
      to right,
      transparent 0%,
      #000 30%,
      #000 100%
    );
  }

  /*
    Nuestra esencia
  */

  .essence-copy {
    padding: var(--space-3) 0;
  }

  .essence-photo img {
    min-height: 19rem;
  }

  /*
    Visítanos
  */

  .visit-panel {
    grid-template-areas:
      "copy photo"
      "map photo";

    grid-template-columns:
      minmax(0, 1fr)
      minmax(0, 1fr);

    align-items: stretch;
    padding: var(--space-4);
  }

  .visit-copy {
    grid-area: copy;
  }

  .visit-photo {
    grid-area: photo;
  }

  .map-embed {
    grid-area: map;
  }

  .visit-photo img {
    height: 100%;
    min-height: 16rem;
  }

  /*
    Tres pilares
  */

  .love-block {
    justify-content: flex-start;
    padding-inline: clamp(2rem, 8vw, 6rem);
  }

  .love-photo {
    flex-basis: 8rem;
  }

  /*
    Footer
  */

  .footer-brand-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-4);
  }

  .footer-brand-row p {
    margin: 0;
    padding-left: var(--space-4);
    border-left: 1px solid var(--color-line);
    font-family: var(--font-display);
    font-size: var(--step-1);
    font-style: italic;
    color: var(--color-olive);
  }

  

}


/* ==========================================
   13. FALLBACK PARA MASK-IMAGE
   ========================================== */

@supports not (mask-image: linear-gradient(to right, transparent, #000)) {

  @media (min-width: 700px) {

    .hero-photo {
      position: relative;
    }

    .hero-photo::before {
      content: "";
      position: absolute;
      z-index: 1;
      inset: 0 auto 0 0;
      width: 38%;

      background: linear-gradient(
        to right,
        var(--color-cream, #F7F3E7),
        transparent
      );

      pointer-events: none;
    }

  }

}


/* ==========================================
   FOOTER — TOMATILLO × AXOMYR
   ========================================== */

.site-footer {
  background: var(--color-cream, #F7F3E7);
  border-top: 1px solid var(--color-line);
  padding: 1.5rem 0 1rem;
}

.site-footer .footer-grid {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

/* Primera fila */

.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-footer .footer-brand-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.8rem;
  padding: 0;
  border: 0;
}

.site-footer .footer-brand-row .brand {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
}

.site-footer .footer-brand-row .brand img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: contain;
}

.site-footer .footer-slogan {
  padding-left: 0.8rem;
  border-left: 1px solid var(--color-line);
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-style: italic;
  color: var(--color-olive);
  white-space: nowrap;
}

/* Navegación */

.site-footer .footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.7rem 1.2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer .footer-links a {
  color: var(--color-brown, #382B25);
  font-size: 0.8rem;
  text-decoration: none;
}

.site-footer .footer-links a:hover {
  color: var(--color-olive);
  text-decoration: underline;
}

/* Segunda fila */

.site-footer .footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--color-line);
}

.site-footer .footer-bottom small {
  font-size: 0.72rem;
  color: var(--color-olive);
  line-height: 1.5;
}

/* Crédito AXOMYR */

.site-footer .footer-credit {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.72rem;
  color: var(--color-olive);
}

.footer-axomyr {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 600;
  color: #123D2B;
  white-space: nowrap;
}

.footer-axomyr img {
  display: block;
  width: 34px;
  height: 34px;
  max-width: 34px;
  object-fit: contain;
  border-radius: 50%;
}

/* ==========================================
   MOBILE
   ========================================== */

@media (max-width: 699px) {

  .site-footer {
    padding: 1.3rem 0 1rem;
  }

  .footer-top {
    flex-direction: column;
    gap: 1rem;
  }

  .site-footer .footer-brand-row {
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.6rem;
  }

  .site-footer .footer-slogan {
    font-size: 0.75rem;
    padding-left: 0.6rem;
  }

  .site-footer .footer-links {
    gap: 0.6rem 1rem;
  }

  .site-footer .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
  }

  .site-footer .footer-credit {
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.3rem 0.45rem;
  }

}

@media (max-width: 360px) {

  .site-footer .footer-slogan {
    font-size: 0.7rem;
  }

  .site-footer .footer-links {
    gap: 0.5rem 0.8rem;
  }


.footer-instagram {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: var(--color-olive);
}

.footer-instagram:hover {
  opacity: 0.7;
}


.visit-instagram {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  padding: 0;
}

.visit-instagram svg {
  width: 21px;
  height: 21px;
  flex-shrink: 0;
}


}
