/* =========================================================
   PASSION / EXPERIMENTS PAGE
   ========================================================= */

/* ── Body light theme ───────────────────────────────────── */

.body--light {
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.5) 0.75px, transparent 0.75px);
  background-size: 40px 40px;
  background-color: #2a00b3;
  color: var(--color-bg-light);
}

/* Nav on light background */
.body--light .nav__logo,
.body--light .nav__link {
  color: var(--color-bg-light);
}

.body--light .nav__link::after {
  color: var(--color-bg-light);
}

.body--light .nav__hamburger-line {
  background: var(--color-bg-light);
}

.body--light .nav__blur::before {
  background: rgba(42, 0, 179, 0.85);
}

/* Footer on light background */
.body--light .footer__link {
  color: var(--color-bg-light);
}

.body--light .footer__copy-btn {
  color: var(--color-bg-light);
  border-color: rgba(242, 240, 237, 0.3);
}

/* Divider on light background */
.body--light .divider {
  background: rgba(242, 240, 237, 0.2);
}

/* ── Header ─────────────────────────────────────────────── */

.passion-header {
  text-align: center;
  padding-top: clamp(10rem, 24vh, 20rem);
  padding-bottom: clamp(6rem, 13vh, 11rem);
}

.passion-header__title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 7vw, 6rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--color-bg-light);
  margin-bottom: clamp(1.5rem, 3vh, 2.5rem);
}

.passion-header__subtitle {
  font-family: var(--font-body);
  font-size: var(--text-md);
  font-weight: 300;
  color: rgba(242, 240, 237, 0.75);
  max-width: 480px;
  margin-inline: auto;
  line-height: 1.6;
}

.passion-header__title { cursor: none; }

/* Intro header sits on body purple; each scene paints its own bg over top. */
.passion-header { position: relative; z-index: 1; }

/* ── Scene system ───────────────────────────────────────── */

/*
  A "scene" is a full-bleed story section with its own background color.
  Inside, a 12-col × auto-row grid lets each slot be placed with explicit
  column AND row ranges. Slots are addressed via CSS custom properties on
  inline style, so HTML reads like coordinates:
    style="--col:3/11; --row:1/span 4; --rot:-2deg;"
*/

.passion-scenes {
  --scene-row-height: clamp(40px, 5vh, 56px);
  --scene-gap: clamp(0.5rem, 1vw, 1rem);
}

.scene {
  position: relative;
  width: 100%;
  padding-block: clamp(3rem, 6vw, 6rem);
  overflow: hidden;
}

.scene__grid {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--container-pad);
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: var(--scene-row-height);
  gap: var(--scene-gap);
  align-items: start;
}

/* All scenes inherit body bg; color variants kept as no-ops for future use. */
.scene--blue,
.scene--cream,
.scene--purple,
.scene--black { background: transparent; color: var(--color-bg-light); }

/* ── Slot primitive ─────────────────────────────────────── */

.slot {
  grid-column: var(--col, auto);
  grid-row: var(--row, auto);
  transform: rotate(var(--rot, 0deg));
  transform-origin: center center;
  position: relative;
  min-width: 0;
}

/* Z-index helpers for overlapping props */
.slot--front { z-index: 3; }
.slot--mid   { z-index: 2; }
.slot--back  { z-index: 1; }

/* ── Hover caption (shown when previous sibling slot is hovered) ── */

.slot--caption {
  position: relative;
  z-index: 10;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: lowercase;
  letter-spacing: 0.02em;
  color: rgba(242, 240, 237, 0.55);
  padding-top: 1rem;
  opacity: 0 !important;
  transform: translateY(-4px);
  transition: opacity 0.3s var(--ease-out),
              transform 0.3s var(--ease-out);
}

.slot--pile:hover ~ .slot--caption,
.slot--hero:hover ~ .slot--caption,
.slot--pair:hover ~ .slot--caption,
.slot--narrative:hover ~ .slot--caption {
  opacity: 1 !important;
  transform: translateY(0);
}

/* ── Slot: sticker-title ────────────────────────────────── */

.slot--sticker .sticker {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.4em;
  width: 100%;
  height: 100%;
  padding: clamp(1rem, 2vw, 2rem) clamp(1.5rem, 3vw, 3rem);
  border-radius: 999px;
  background: #f2ea8c;
  color: #0a0a0a;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.25rem, 3vw, 2.75rem);
  line-height: 1;
  letter-spacing: -0.02em;
  text-align: center;
  box-shadow: 0 12px 32px rgba(0,0,0,0.12);
}

.slot--sticker .sticker__ico {
  display: inline-block;
  width: 1em;
  height: 1em;
  background: #0a0a0a;
  border-radius: 4px;
  vertical-align: middle;
}

/* ── Slot: hero-asset ───────────────────────────────────── */

.slot--hero .slot__media {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 32px;
  overflow: hidden;
  background: #0a0a0a;
}

.slot--hero .slot__media img,
.slot--hero .slot__media video {
  width: 100%;
  height: auto;
  border-radius: 32px;
  object-fit: cover;
  display: block;
}

/* ── Slot: narrative ────────────────────────────────────── */

.slot--narrative {
  display: flex;
  align-items: flex-start;
}

.slot--narrative p {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: clamp(1.375rem, 2.8vw, 2rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
  max-width: 40ch;
  color: currentColor;
}


/* micro-caption font styles merged into the hover-caption block above */

/* ── Slot: prop (tilted small asset) ────────────────────── */

.slot--prop .slot__media {
  width: 100%;
  height: 100%;
  border-radius: 8px;
  overflow: hidden;
  background: #0a0a0a;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f2ea8c;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.slot--prop .slot__media img,
.slot--prop .slot__media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── Slot: pair (two small assets side-by-side) ─────────── */

.slot--pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--scene-gap);
}

.slot--pair .slot__media {
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  overflow: hidden;
  background: #0a0a0a;
}

.slot--pair .slot__media img,
.slot--pair .slot__media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── Pile inside a scene slot ───────────────────────────── */

/* Allow video children in the case-pile (original only styled img) */
.case-pile__card video {
  width: 100%;
  height: auto;
  max-height: 60vh;
  display: block;
}

/* When a pile lives inside a scene slot, cap it to a sensible card size
   (the case-pile defaults to 60vh tall — too big when used as a slot).
   Extra padding gives the curtain reveal room to clip beyond the rotated
   peek of back cards without chopping them. */
.slot--pile {
  display: flex;
  align-items: start;
  justify-content: flex-start;
}

/* Drop clip-path once the curtain finishes so rotated peek cards aren't clipped */
.slot--pile.is-revealed {
  clip-path: none !important;
}

.slot--pile .case-pile {
  width: 100%;
  justify-content: flex-start;
}

.slot--pile .case-pile__stack {
  width: clamp(240px, 28vw, 420px);
  max-height: none;
}

.slot--pile .case-pile__card img,
.slot--pile .case-pile__card video {
  width: 100%;
  height: auto;
  max-height: none;
  border-radius: 32px;
}

/* Bare pile — no card chrome, just the image */
.case-pile--bare .case-pile__card {
  background: none;
  box-shadow: none;
  border-radius: 0;
  overflow: visible;
}

.case-pile--bare .case-pile__card img {
  border-radius: 0;
}

/* Hide all cards behind the top one; keep transition so shuffle animates */
.case-pile--bare .case-pile__card {
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.3s ease;
}

.case-pile--bare .case-pile__card:nth-child(n+2) {
  opacity: 0;
  pointer-events: none;
}


/* ── Phone pile (portrait iPhone cards) ─────────────────── */

.slot--pile-phone {
  justify-content: center;
}

.slot--pile-phone .case-pile {
  justify-content: center;
}

.slot--pile-phone .case-pile__stack {
  width: clamp(160px, 17vw, 260px);
}

.slot--pile-phone .case-pile__card {
  border-radius: 35px;
  aspect-ratio: 9 / 19.5;
  overflow: hidden;
}

.slot--pile-phone .case-pile__card:nth-child(1) {
  transform: rotate(-4deg);
}

.slot--pile-phone .case-pile__card:nth-child(2) {
  transform: rotate(8deg) translate(18px, 10px);
}

.slot--pile-phone:hover .case-pile__card:nth-child(2) {
  transform: rotate(12deg) translate(36px, 16px);
}

.slot--pile-phone .case-pile__card video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 35px;
  max-height: none;
}

/* ── Black placeholder (no asset yet) ───────────────────── */

.slot__media--placeholder {
  background: #0a0a0a !important;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.35);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ── Scene intro / ending ───────────────────────────────── */

.scene--intro .scene__grid {
  min-height: 40vh;
}

/* ── Responsive: collapse to single column on mobile ────── */

@media (max-width: 768px) {
  .scene__grid {
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: auto;
  }

  .slot {
    grid-column: 1 / -1 !important;
    grid-row: auto !important;
    transform: none !important;
    margin-bottom: var(--space-lg);
  }

  .slot--pair { grid-template-columns: 1fr 1fr; }
  .slot--hero .slot__media { aspect-ratio: 16 / 9; }
  .slot--prop .slot__media { aspect-ratio: 1 / 1; max-width: 200px; }
}

/* ── Lightbox (FLIP expand) ─────────────────────────────── */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9500;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 10, 0.85);
  opacity: 0;
  transition: opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.lightbox.is-open {
  pointer-events: all;
}

.lightbox.is-open .lightbox__backdrop {
  opacity: 1;
}

.lightbox__content {
  position: relative;
  max-width: 900px;
  width: 90vw;
  max-height: 85vh;
  border-radius: 24px;
  transform-origin: center center;
  will-change: transform;
}

.lightbox__close {
  position: absolute;
  top: -40px;
  right: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #fff;
  background: none;
  border: none;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lightbox.is-open .lightbox__close {
  opacity: 0.7;
  transition-delay: 0.2s;
}

.lightbox__close:hover {
  opacity: 1;
}

.lightbox__media {
  border-radius: 24px;
  overflow: hidden;
}

.lightbox__media img,
.lightbox__media video {
  width: 100%;
  height: auto;
  display: block;
  max-height: 70vh;
  object-fit: contain;
}

.lightbox__info {
  padding-top: var(--space-md);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.35s ease 0.15s, transform 0.35s ease 0.15s;
}

.lightbox.is-open .lightbox__info {
  opacity: 1;
  transform: translateY(0);
}

.lightbox__title {
  font-family: var(--font-body);
  font-size: var(--text-md);
  font-weight: 500;
  color: #fff;
}

.lightbox__desc {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 300;
  color: rgba(255, 255, 255, 0.64);
  margin-top: 0.25rem;
}

/* ── Back link (light theme) ────────────────────────────── */

.passion-back {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(242, 240, 237, 0.6);
  padding-bottom: var(--space-2xl);
  transition: color var(--dur-fast) var(--ease-out);
}

.passion-back::before {
  content: '←';
  transition: transform var(--dur-fast) var(--ease-out);
  display: inline-block;
}

.passion-back:hover {
  color: var(--color-bg-light);
}

.passion-back:hover::before {
  transform: translateX(-4px);
}

