/* Single-section hero: photo/video mosaic + centered logo + CTA */

:root {
  --hero-media-dim: 0.48;
  --hero-cell-scrim: 0.28;
  --hero-transition: 0.4s ease;
}

body.hero-page {
  margin: 0;
  min-height: 100vh;
  font-family: "Noto Sans", system-ui, sans-serif;
  font-weight: 300;
  background: #0a0a0a;
  color: #fff;
  overflow-x: hidden;
  overflow-y: auto;
}

/* Scrollable background layer (mosaic grows as you scroll). */
.media-scroll {
  position: relative;
  z-index: 0;
  width: 100%;
  min-height: 100vh;
}

.scroll-sentinel {
  width: 100%;
  height: 4px;
  pointer-events: none;
}

/*
 * Mosaic: Instagram-style portrait tiles (9:16).
 * Row height = column width × (16/9) so each cell stays vertical on every screen.
 */
.media-grid {
  --mosaic-cols: 6;
  --tile-w: calc(100vw / var(--mosaic-cols));
  /* width:height = 9:16 → height = width × (16/9) */
  --tile-h: calc(var(--tile-w) * 16 / 9);

  position: relative;
  z-index: 0;
  display: grid;
  width: 100%;
  gap: 0;
  grid-template-columns: repeat(var(--mosaic-cols), minmax(0, 1fr));
  grid-auto-rows: var(--tile-h);
  box-sizing: border-box;
}

@media (max-width: 991.98px) {
  .media-grid {
    --mosaic-cols: 5;
  }
}

@media (max-width: 575.98px) {
  .media-grid {
    --mosaic-cols: 3;
  }
}

.media-cell {
  position: relative;
  display: block;
  padding: 0;
  margin: 0;
  border: 0;
  overflow: hidden;
  cursor: pointer;
  background: #111;
  min-width: 0;
  min-height: 0;
  width: 100%;
  height: 100%;
  -webkit-tap-highlight-color: transparent;
}

.media-cell:focus-visible {
  outline: 2px solid #ff0095;
  outline-offset: -2px;
  z-index: 1;
}

.media-cell video,
.media-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: var(--hero-media-dim);
  transition: opacity var(--hero-transition);
}

.media-cell img {
  display: block;
}

.media-cell::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, var(--hero-cell-scrim));
  pointer-events: none;
  transition: opacity var(--hero-transition);
}

@media (hover: hover) {
  .media-cell:hover video,
  .media-cell:hover img {
    opacity: 1;
  }

  .media-cell:hover::after {
    opacity: 0;
  }
}

/* Same look as hover: stays on after click/tap (toggled via .is-lit in JS). */
.media-cell.is-lit video,
.media-cell.is-lit img {
  opacity: 1;
}

.media-cell.is-lit::after {
  opacity: 0;
}

.media-cell:focus-visible video,
.media-cell:focus-visible img {
  opacity: 1;
}

.media-cell:focus-visible::after {
  opacity: 0;
}

@media (hover: none) {
  .media-cell:active video,
  .media-cell:active img {
    opacity: 1;
  }

  .media-cell:active::after {
    opacity: 0;
  }
}

.hero-vignette {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(
    ellipse 85% 75% at 50% 42%,
    rgba(0, 0, 0, 0.06) 0%,
    rgba(0, 0, 0, 0.42) 100%
  );
}

.hero-content--fixed {
  position: fixed;
  inset: 0;
  z-index: 2;
}

.hero-content {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 4vw, 2.5rem);
  pointer-events: none;
}

.hero-content__brand,
.hero-content__cta {
  pointer-events: auto;
}

.hero-content__brand {
  background: #fff;
  border-radius: 0;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(280px, 58vw);
  aspect-ratio: 1 / 1;
  padding: clamp(0.75rem, 2.5vw, 1.25rem);
}

.hero-logo {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  display: block;
  object-fit: contain;
}

.hero-content__cta {
  margin-top: clamp(1.25rem, 4vh, 2rem);
}

.btn-whatsapp {
  --bs-btn-color: #fff;
  --bs-btn-bg: #25d366;
  --bs-btn-border-color: #25d366;
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #1ebe57;
  --bs-btn-hover-border-color: #1ebe57;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: #1aa952;
  --bs-btn-active-border-color: #1aa952;
  font-weight: 600;
  padding-inline: 1.5rem;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.35);
}

.btn-whatsapp i {
  margin-right: 0.5rem;
}

@media (prefers-reduced-motion: reduce) {
  .media-cell video,
  .media-cell img,
  .media-cell::after {
    transition: none;
  }
}
