/* ============================================================
   MY PHOTO CORNER — Cinematic entrance + scroll depth
   Layered on top of styles.css (homepage only)
   ============================================================ */

:root { --motion-strength: 0.6; }

/* ============================================================
   INTRO — full-screen entrance overlay
   Visible by default so it covers on first paint; JS opens &
   dismisses it. Safety keyframe clears it after 6s even if JS
   never runs, and reduced-motion users never see it.
   ============================================================ */
.intro {
  position: fixed; inset: 0; z-index: 9000;
  overflow: hidden; background: #100f0d;
  animation: introSafety 0s linear 6.5s forwards;
}
html.intro-seen .intro { display: none; }
.intro.no-trans .cv,
.intro.no-trans .slats i,
.intro.no-trans .intro__center,
.intro.no-trans .intro__logo,
.intro.no-trans .intro__rule,
.intro.no-trans .intro__tag { transition: none !important; }
@media (prefers-reduced-motion: reduce) { .intro { display: none !important; } }
@keyframes introSafety { to { opacity: 0; visibility: hidden; pointer-events: none; } }

.intro.done {
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 0.7s var(--ease), visibility 0s linear 0.7s;
}

/* ---- Cover layers ---- */
.intro__cover { position: absolute; inset: 0; z-index: 1; }

/* Curtain: two halves that part vertically */
.cv {
  position: absolute; left: 0; width: 100%; height: 50.5%;
  background: #100f0d; overflow: hidden;
  transition: transform 1.3s cubic-bezier(0.76, 0, 0.24, 1);
}
.cv--top { top: 0; }
.cv--bottom { bottom: 0; }
.cv__img {
  position: absolute; left: 0; width: 100%; height: 200%;
  background-size: cover; background-position: center;
  opacity: 0.5; filter: saturate(0.9);
}
.cv--top .cv__img { top: 0; }
.cv--bottom .cv__img { bottom: 0; }
.intro[data-style="nature"] .cv { display: none; }

/* Into-nature: vertical slats that lift in a cascade */
.slats { position: absolute; inset: 0; display: flex; }
.slats i {
  position: relative; flex: 1 1 0; height: 100%; overflow: hidden;
  background: #100f0d;
  transition: transform 1.15s cubic-bezier(0.76, 0, 0.24, 1);
}
.slats i::before {
  content: ""; position: absolute; inset: 0;
  background-image: var(--slat-img);
  background-size: 600% 100%;
  opacity: 0.55; filter: saturate(0.9);
}
.slats i:nth-child(1)::before { background-position: 0% center; }
.slats i:nth-child(2)::before { background-position: 20% center; }
.slats i:nth-child(3)::before { background-position: 40% center; }
.slats i:nth-child(4)::before { background-position: 60% center; }
.slats i:nth-child(5)::before { background-position: 80% center; }
.slats i:nth-child(6)::before { background-position: 100% center; }
.intro[data-style="curtain"] .slats { display: none; }

/* ---- Centre title card ---- */
.intro__center {
  position: absolute; inset: 0; z-index: 3;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 22px; text-align: center; color: var(--paper);
  padding: 24px;
}
.intro__logo {
  height: clamp(74px, 11vw, 132px); width: auto;
  opacity: 0; transform: translateY(16px);
}
.intro__rule { width: 0; height: 1px; background: var(--accent); }
.intro__tag {
  font-family: var(--font-sans); font-size: 11.5px; font-weight: 500;
  letter-spacing: 0.34em; text-transform: uppercase; color: var(--accent);
  opacity: 0;
}

/* Play states (JS adds .play, then .open) */
.intro.play .intro__logo { opacity: 1; transform: translateY(0); transition: opacity 1s var(--ease) 0.15s, transform 1.2s var(--ease) 0.15s; }
.intro.play .intro__rule { width: clamp(60px, 9vw, 130px); transition: width 1.1s var(--ease) 0.55s; }
.intro.play .intro__tag { opacity: 1; transition: opacity 1s var(--ease) 0.8s; }

.intro.open .intro__center { opacity: 0; transform: translateY(-10px); transition: opacity 0.6s var(--ease), transform 0.8s var(--ease); }

/* Curtain opening */
.intro.open[data-style="curtain"] .cv--top { transform: translateY(-101%); }
.intro.open[data-style="curtain"] .cv--bottom { transform: translateY(101%); }

/* Slats lifting, staggered */
.intro.open[data-style="nature"] .slats i { transform: translateY(-101%); }
.intro.open[data-style="nature"] .slats i:nth-child(1) { transition-delay: 0.00s; }
.intro.open[data-style="nature"] .slats i:nth-child(2) { transition-delay: 0.08s; }
.intro.open[data-style="nature"] .slats i:nth-child(3) { transition-delay: 0.16s; }
.intro.open[data-style="nature"] .slats i:nth-child(4) { transition-delay: 0.24s; }
.intro.open[data-style="nature"] .slats i:nth-child(5) { transition-delay: 0.32s; }
.intro.open[data-style="nature"] .slats i:nth-child(6) { transition-delay: 0.40s; }

/* Scroll lock while intro runs */
html.intro-lock, html.intro-lock body { overflow: hidden; }

/* ============================================================
   HERO — entrance zoom (into-nature) + scroll parallax hooks
   ============================================================ */
/* Into-nature: hero starts tightly cropped, eases out to full as
   the slats clear — so you feel you're stepping into the scene. */
.intro-zoom .hero__media { transform: scale(1.22); }
.intro-zoom.hero-open .hero__media { transform: scale(1); transition: transform 2.4s cubic-bezier(0.22, 1, 0.36, 1); }

/* Parallax wrappers translate via --py set by JS (transform-free
   elements only, so we never fight Ken Burns / hover scale). */
.par { will-change: transform; transform: translate3d(0, var(--py, 0px), 0); }
html.no-motion .par, html.parallax-off .par { transform: none !important; }
html.no-motion .intro-zoom .hero__media { transform: none !important; }

/* Hero foreground drift on scroll */
.hero__inner { will-change: transform, opacity; }
html.parallax-off .hero__inner, html.no-motion .hero__inner { transform: none !important; opacity: 1 !important; }

/* ============================================================
   FILMS — a screening-room gallery (dark section)
   ============================================================ */
.films__head { margin-bottom: clamp(40px, 6vh, 72px); }
.films__head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.films__title { font-size: clamp(38px, 5.5vw, 88px); }
.films__intro { color: rgba(246, 242, 236, 0.78); max-width: 40ch; font-size: 16px; }

.films__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(18px, 2vw, 30px); }
.film {
  display: flex; flex-direction: column; gap: 16px;
  background: none; border: 0; padding: 0; margin: 0; text-align: left;
  color: var(--paper); cursor: pointer; font: inherit;
}
.film__media { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #161410; }
.film__media image-slot, .film__media .film__poster { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease); }
.film:hover .film__media image-slot, .film:hover .film__media .film__poster { transform: scale(1.05); }
.film__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 52%, rgba(10, 9, 8, 0.55)); pointer-events: none; }
.film__play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 66px; height: 66px; border-radius: 50%; z-index: 2;
  display: flex; align-items: center; justify-content: center;
  background: rgba(246, 242, 236, 0.16);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  border: 1px solid rgba(246, 242, 236, 0.55);
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease), transform 0.4s var(--ease);
}
.film:hover .film__play { background: var(--paper); border-color: var(--paper); transform: translate(-50%, -50%) scale(1.06); }
.film__play svg { width: 20px; height: 20px; margin-left: 3px; }
.film__play svg path { fill: var(--paper); transition: fill 0.4s var(--ease); }
.film:hover .film__play svg path { fill: var(--ink); }
.film__cap .film__t { font-family: var(--font-display); font-size: clamp(22px, 2vw, 28px); font-weight: 500; line-height: 1.1; }
.film__cap .film__m { font-size: 10.5px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); margin-top: 5px; }
.films__foot { display: flex; justify-content: center; margin-top: clamp(40px, 6vh, 72px); }

/* Video lightbox */
.vlb {
  position: fixed; inset: 0; z-index: 210; background: rgba(12, 11, 9, 0.97);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.5s var(--ease); padding: 6vh 6vw;
}
.vlb.open { opacity: 1; pointer-events: auto; }
.vlb__stage { width: 100%; max-width: min(1180px, 92vw); }
.vlb__frame { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; overflow: hidden; }
.vlb__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.vlb__ph {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 32px; color: rgba(246, 242, 236, 0.6);
  font-family: var(--font-display); font-style: italic; font-size: 22px;
  background: repeating-linear-gradient(45deg, rgba(168, 146, 122, 0.06) 0 12px, rgba(168, 146, 122, 0.02) 12px 24px), #161410;
}
.vlb__cap { color: var(--paper); margin-top: 18px; text-align: center; }
.vlb__cap .c-t { font-family: var(--font-display); font-size: 26px; }
.vlb__cap .c-m { font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); margin-top: 6px; }
.vlb__close { position: absolute; top: 4vh; right: 6vw; background: none; border: 0; color: var(--paper); font-size: 30px; line-height: 1; cursor: pointer; opacity: 0.8; }
.vlb__close:hover { opacity: 1; }

@media (max-width: 1080px) {
  .films__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .films__grid { grid-template-columns: 1fr; max-width: 480px; }
}
