/**
 * Lovetsky Art — visual polish (v1.6)
 * Hero media, film-frame language, typography, motion, light theme depth.
 */

/* —— Film frame (shared visual language) —— */
.film-frame {
  position: relative;
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  overflow: hidden;
}

.film-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 14%, transparent);
  z-index: 2;
}

[data-theme="light"] .film-frame {
  box-shadow: 0 2px 12px rgba(28, 25, 22, 0.06);
}

/* —— Intro hero visual —— */
.intro--has-visual {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(10rem, 38vw);
  align-items: stretch;
  gap: 0;
}

.intro--has-visual > .wrap.intro__content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: calc(var(--section-y) + var(--bar-h));
}

.intro__visual {
  position: relative;
  min-height: 12rem;
  margin: 0;
  border: 0;
  border-radius: 0;
}

.intro__visual::after {
  display: none;
}

.intro__visual img,
.intro__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.intro__visual-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    var(--bg) 0%,
    color-mix(in srgb, var(--bg) 88%, transparent) 38%,
    color-mix(in srgb, var(--bg) 35%, transparent) 100%
  );
  z-index: 1;
  pointer-events: none;
}

.intro--has-visual .intro__scroll-cue {
  grid-column: 1 / -1;
}

@media (max-width: 900px) {
  .intro--has-visual {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }

  .intro__visual {
    position: absolute;
    inset: 0;
    min-height: 0;
    opacity: 0.42;
  }

  .intro--has-visual .intro__visual-scrim {
    background: linear-gradient(
      180deg,
      color-mix(in srgb, var(--bg) 55%, transparent),
      var(--bg) 72%
    );
  }

  .intro--has-visual > .wrap.intro__content {
    grid-row: 1;
    min-height: 100vh;
    min-height: 100dvh;
  }
}

/* —— Featured film —— */
.featured-film {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
  padding: var(--space-md);
  align-items: center;
}

.featured-film__poster {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.featured-film__poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-film__title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin: 0 0 var(--space-sm);
  line-height: 1.15;
}

.featured-film__title a {
  color: var(--text);
}

.featured-film__title a:hover {
  color: var(--accent);
}

.featured-film__lead {
  margin: 0 0 var(--space-md);
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.featured-film__cta {
  margin: var(--space-md) 0 0;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

@media (max-width: 720px) {
  .featured-film {
    grid-template-columns: 1fr;
  }
}

/* —— Horizontal scroll fade masks —— */
.h-scroll-wrap {
  position: relative;
}

.h-scroll-wrap::before,
.h-scroll-wrap::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0.5rem;
  width: clamp(1.5rem, 5vw, 3rem);
  z-index: 2;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.25s ease;
}

.h-scroll-wrap::before {
  left: 0;
  background: linear-gradient(90deg, var(--bg), transparent);
}

.h-scroll-wrap::after {
  right: 0;
  background: linear-gradient(270deg, var(--bg), transparent);
}

.h-scroll-wrap.is-at-start::before {
  opacity: 0;
}

.h-scroll-wrap.is-at-end::after {
  opacity: 0;
}

.h-scroll-wrap.is-nudge .film-card:nth-child(2) .film-card__media {
  animation: films-nudge 1.1s ease-out 0.6s 1;
}

@keyframes films-nudge {
  0%,
  100% {
    transform: translateX(0);
  }
  40% {
    transform: translateX(-0.65rem);
  }
}

/* —— Poster warm grade —— */
.film-card__poster::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--accent) 12%, transparent),
    transparent 45%,
    transparent 55%,
    color-mix(in srgb, var(--bg) 35%, transparent)
  );
  mix-blend-mode: multiply;
  opacity: 0.75;
}

[data-theme="light"] .film-card__poster::after {
  opacity: 0.5;
}

/* —— Press quotes —— */
.press-quote.film-frame {
  border-left: 3px solid var(--accent);
}

.press-quote__text {
  font-size: clamp(1.15rem, 0.5vw + 1rem, 1.45rem);
  line-height: 1.55;
}

.press-quote__text::before {
  font-family: var(--font-display);
  font-size: 2.5em;
  line-height: 0;
  vertical-align: -0.35em;
  margin-right: 0.05em;
  opacity: 0.85;
}

.press-quote__attribution {
  color: var(--accent-cool);
}

/* —— Events date accent —— */
.event-card__datetime {
  color: var(--accent-cool);
}

.edu-item time,
.career-item time {
  color: var(--accent-cool);
}

/* —— Single film typography —— */
.detail-copy__header {
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--line);
}

.detail-copy__title {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 4.5vw, 3rem);
  font-weight: 600;
  line-height: 1.08;
  margin: 0 0 var(--space-sm);
  letter-spacing: -0.02em;
}

.detail-lead {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  line-height: 1.5;
}

.detail-prose {
  margin-bottom: var(--space-lg);
}

.detail-prose--wide p {
  max-width: 42rem;
  font-size: 1.05rem;
  line-height: 1.75;
  color: color-mix(in srgb, var(--text) 92%, var(--muted));
}

.detail-layout .detail-copy__title {
  margin-bottom: var(--space-sm);
}

.detail-layout .lead {
  display: none;
}

.press-panel--grid ul {
  display: grid;
  gap: var(--space-sm) var(--space-lg);
}

@media (min-width: 560px) {
  .press-panel--grid ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* —— Section label motion —— */
.reveal.is-visible .section__label {
  animation: section-label-in 0.55s ease-out both;
}

@keyframes section-label-in {
  from {
    opacity: 0;
    letter-spacing: 0.22em;
  }
  to {
    opacity: 1;
    letter-spacing: 0.15em;
  }
}

/* —— Countdown & announcement micro-motion —— */
.film-countdown__value,
.event-countdown__value {
  animation: countdown-breathe 3.5s ease-in-out infinite;
}

.film-card--announcement .film-card__media {
  animation: announcement-glow 4s ease-in-out infinite;
}

@keyframes countdown-breathe {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.82;
  }
}

@keyframes announcement-glow {
  0%,
  100% {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 0%, transparent);
  }
  50% {
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent);
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal.is-visible .section__label,
  .film-countdown__value,
  .event-countdown__value,
  .film-card--announcement .film-card__media {
    animation: none;
  }

  .h-scroll-wrap.is-nudge .film-card:nth-child(2) .film-card__media {
    animation: none;
  }
}

/* —— Light theme depth —— */
[data-theme="light"] .site-ambient__grain {
  opacity: 0.055;
}

[data-theme="light"] .film-card__media,
[data-theme="light"] .still-card__img,
[data-theme="light"] .featured-film.film-frame {
  box-shadow: 0 2px 14px rgba(28, 25, 22, 0.07);
}

[data-theme="light"] .press-quote.film-frame,
[data-theme="light"] .press-panel.film-frame {
  background: var(--bg-elevated);
}

[data-theme="light"] .h-scroll-wrap::before {
  background: linear-gradient(90deg, var(--bg), transparent);
}

[data-theme="light"] .h-scroll-wrap::after {
  background: linear-gradient(270deg, var(--bg), transparent);
}
