/**
 * Cinema hero + visual backgrounds
 * @package Sandprof
 */

/* ——— Full-width cinema hero ——— */
.sp-hero--cinema {
  position: relative;
  width: 100%;
  min-height: var(--sp-hero-min-height);
  margin-top: calc(-1 * var(--sp-chrome-offset));
  padding-top: var(--sp-chrome-offset);
  padding-bottom: 0;
  margin-bottom: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.sp-hero--cinema .sp-hero__bg,
.sp-hero--cinema .sp-hero__blob,
.sp-hero--cinema::after { display: none; }

.sp-hero__cinema-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}
.sp-hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}
.sp-hero__yt {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 1;
  pointer-events: none;
}
.sp-hero__yt iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  width: max(100%, 177.78vh);
  height: max(100%, 56.25vw);
  transform: translate(-50%, -50%);
  border: 0;
}

/* ——— Vertical production video (9:16) — right grid columns ——— */
.sp-hero--vertical .sp-hero__yt--portrait,
.sp-hero--vertical .sp-hero__video--portrait {
  position: absolute;
  top: 50%;
  right: max(1rem, calc((100vw - var(--sp-grid-max)) / 2));
  left: auto;
  bottom: auto;
  transform: translateY(-50%);
  height: min(78vh, calc(100% - 7rem));
  width: auto;
  aspect-ratio: 9 / 16;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
  border-radius: 1rem;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.sp-hero--vertical .sp-hero__video--portrait {
  object-fit: cover;
  inset: auto;
}
.sp-hero--vertical .sp-hero__yt--portrait iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: none;
}
.sp-hero--vertical .sp-hero__scrim {
  background:
    linear-gradient(90deg, rgba(10, 24, 20, 0.84) 0%, rgba(10, 24, 20, 0.58) 40%, rgba(10, 24, 20, 0.2) 58%, rgba(10, 24, 20, 0.06) 100%),
    linear-gradient(180deg, rgba(10, 24, 20, 0.35) 0%, rgba(10, 24, 20, 0.55) 100%);
}
@media (max-width: 899px) {
  .sp-hero--vertical .sp-hero__yt--portrait,
  .sp-hero--vertical .sp-hero__video--portrait {
    right: 50%;
    transform: translate(50%, -50%);
    height: min(52vh, 480px);
    border-radius: 0.75rem;
    opacity: 0.55;
    box-shadow: none;
    border: none;
  }
  .sp-hero--vertical .sp-hero__scrim {
    background:
      linear-gradient(180deg, rgba(10, 24, 20, 0.78) 0%, rgba(10, 24, 20, 0.88) 100%);
  }
}

.sp-hero__poster-fallback {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 0;
  transition: opacity 0.4s var(--ease-premium, ease);
}
.sp-hero__poster-fallback.is-hidden,
.sp-hero__video.is-playing ~ .sp-hero__poster-fallback {
  opacity: 0;
}

.sp-hero__scrim {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(180deg, rgba(10, 24, 20, 0.4) 0%, rgba(10, 24, 20, 0.65) 50%, rgba(10, 24, 20, 0.9) 100%),
    linear-gradient(90deg, rgba(10, 24, 20, 0.72) 0%, rgba(10, 24, 20, 0.35) 45%, rgba(10, 24, 20, 0.2) 100%);
  pointer-events: none;
}

.sp-hero__content-wrap {
  position: relative;
  z-index: 3;
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  padding: var(--sp-hero-content-padding-block) var(--sp-hero-content-padding-inline);
  min-height: 0;
}

.sp-hero--cinema .sp-container {
  width: min(var(--sp-grid-max), 100% - 2rem);
  margin-inline: auto;
}

.sp-hero__inner {
  row-gap: var(--sp-hero-inner-gap);
}

.sp-hero--cinema .sp-hero__content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--sp-hero-content-gap);
}
.sp-hero--cinema .sp-hero__title {
  color: #fff;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.25);
  margin: 0;
}
.sp-hero--cinema .sp-hero__accent {
  display: block;
  color: var(--moss-400, #52a080);
}
.sp-hero--cinema .sp-hero__lead {
  color: rgba(255, 255, 255, 0.88);
  max-width: 36rem;
  margin: 0;
}
.sp-hero--cinema .sp-hero__trust {
  color: var(--moss-400);
  margin: 0;
}
.sp-hero--cinema .sp-badge {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
}
.sp-hero--cinema .sp-hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 0.75rem;
  margin-top: 0.5rem;
}
.sp-hero--cinema .sp-btn--ghost {
  color: rgba(255, 255, 255, 0.9);
  border-color: rgba(255, 255, 255, 0.25);
}
.sp-hero--cinema .sp-btn--ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
.sp-hero--cinema .sp-btn--secondary {
  background: rgba(255, 255, 255, 0.95);
  border-color: transparent;
}

/* Stats — nested 12-col row inside full-width band */
.sp-hero--cinema .sp-hero__stats {
  margin-top: 0;
  display: grid;
  grid-template-columns: repeat(var(--sp-grid-columns), minmax(0, 1fr));
  column-gap: var(--sp-grid-gap);
  row-gap: var(--sp-grid-gap);
}
.sp-hero--cinema .sp-hero__stat {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  text-align: left;
  padding: 1.25rem 1.5rem;
}
.sp-hero--cinema .sp-hero__stat-value {
  color: #fff;
}
.sp-hero--cinema .sp-hero__stat-label {
  color: rgba(255, 255, 255, 0.75);
}
.sp-hero--cinema .sp-hero__stat::after {
  color: rgba(255, 255, 255, 0.2);
}

/* ——— Visual showcase mosaic ——— */
.sp-visual-showcase {
  padding-block: var(--sp-space-section-y);
  background: linear-gradient(180deg, var(--sand-50), rgba(243, 245, 244, 0.5));
}
.sp-visual-showcase__grid {
  display: grid;
  gap: var(--sp-space-md);
  grid-template-columns: 1fr;
  margin-top: var(--sp-space-lg);
}
@media (min-width: 700px) {
  .sp-visual-showcase__grid {
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: 200px 200px;
  }
  .sp-visual-tile--lg {
    grid-column: span 2;
    grid-row: span 2;
  }
  .sp-visual-tile--wide { grid-column: span 2; }
}
.sp-visual-tile {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  margin: 0;
  min-height: 12rem;
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(224, 230, 227, 0.8);
}
.sp-visual-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease-premium);
}
.sp-visual-tile:hover img { transform: scale(1.06); }
.sp-visual-tile__cap {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(10, 24, 20, 0.55);
  backdrop-filter: blur(8px);
}

/* ——— Section with photo background ——— */
.sp-section--photo {
  position: relative;
  overflow: hidden;
}
.sp-section--photo::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--sp-section-bg);
  background-size: cover;
  background-position: center;
  opacity: 0.14;
  pointer-events: none;
}
.sp-section--photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--sand-50) 0%, transparent 30%, transparent 70%, var(--sand-50) 100%);
  pointer-events: none;
}
.sp-section--photo > .sp-container {
  position: relative;
  z-index: 1;
}

/* ——— Split section with image ——— */
.sp-split-visual {
  display: grid;
  gap: var(--sp-space-lg);
  align-items: center;
}
@media (min-width: 900px) {
  .sp-split-visual { grid-template-columns: 1fr 1fr; }
}
.sp-split-visual__media {
  position: relative;
  border-radius: 1.25rem;
  overflow: hidden;
  aspect-ratio: 4/3;
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(224, 230, 227, 0.8);
}
.sp-split-visual__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.sp-split-visual__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(15, 46, 38, 0.15), transparent 55%);
  pointer-events: none;
}

/* ——— Bento with photo backgrounds ——— */
.sp-bento__item--photo {
  min-height: 11rem;
  color: #fff;
}
.sp-bento__item--photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--sp-bento-bg);
  background-size: cover;
  background-position: center;
  z-index: 0;
  transition: transform 0.8s var(--ease-premium);
}
.sp-bento__item--photo:hover::after { transform: scale(1.05); }
.sp-bento__item--photo::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(10, 24, 20, 0.15) 0%, rgba(10, 24, 20, 0.82) 100%);
  opacity: 1;
}
.sp-bento__item--photo > * {
  position: relative;
  z-index: 2;
}
.sp-bento__item--photo h3 { color: #fff; }
.sp-bento__item--photo p { color: rgba(255, 255, 255, 0.85); }
.sp-bento__item--photo .sp-icon-box {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.sp-about-gallery {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, 1fr);
}
.sp-about-gallery__item {
  margin: 0;
  border-radius: 1rem;
  overflow: hidden;
  aspect-ratio: 4/3;
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(224, 230, 227, 0.8);
}
.sp-about-gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease-premium);
}
.sp-about-gallery__item:hover img { transform: scale(1.05); }
@media (max-width: 700px) {
  .sp-about-gallery { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .sp-hero__ken-burns,
  .sp-visual-tile img { animation: none; transition: none; }
  .sp-hero__yt,
  .sp-hero__video { display: none; }
}
