html,
body {
  width: 100%;
  overflow-x: hidden;
}

html.is-loading,
html.is-menu-open {
  overflow: hidden;
}

body {
  position: relative;
  background: var(--background);
}

.page {
  position: relative;
  min-height: 100svh;
}

.experience {
  position: relative;
  width: 100%;
  height: 480vh;
}

.experience.is-complete {
  height: 100vh;
}

.experience.is-complete .experience__pin {
  pointer-events: none;
}

.experience.is-complete .experience__pin.is-handing-off {
  will-change: opacity;
}

.experience.is-complete .experience__pin::after {
  background: transparent;
}

.experience__pin {
  --hero-exit: 0;
  position: relative;
  width: 100%;
  height: 100svh;
  height: 100dvh;
  overflow: hidden;
  background: var(--background);
}

.experience__pin::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(5, 5, 5, calc(var(--hero-exit) * 0.18)) 0%,
    rgba(5, 5, 5, calc(var(--hero-exit) * 0.42)) 45%,
    rgba(5, 5, 5, calc(var(--hero-exit) * 0.92)) 100%
  );
}

.experience__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: var(--z-canvas);
  background: var(--background);
}

.experience__atmosphere {
  position: absolute;
  inset: 0;
  z-index: var(--z-atmosphere);
  pointer-events: none;
}

.experience__chapters {
  position: absolute;
  inset: 0;
  z-index: var(--z-chapters);
  pointer-events: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.credits {
  position: relative;
  z-index: 5;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(0, 96, 57, 0.08), transparent 60%),
    linear-gradient(180deg, #050505 0%, #0a0a09 40%, #050505 100%);
  padding:
    clamp(5rem, 12vh, 9rem)
    clamp(1.25rem, 5vw, 5rem)
    calc(clamp(3rem, 8vh, 6rem) + var(--safe-bottom));
  border-top: 1px solid var(--border-soft);
}

.credits__inner {
  max-width: 72rem;
  margin: 0 auto;
  display: grid;
  gap: clamp(3rem, 8vh, 6rem);
}

.credits__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(2rem, 4vw, 4rem);
}

.credits__col h3 {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--champagne);
  margin-bottom: 1.25rem;
}

.credits__col p,
.credits__col li {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.credits__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.credits__footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-soft);
  color: var(--text-muted);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
}

.credits__disclaimer {
  max-width: 52ch;
  color: var(--text-muted);
  font-size: 0.8125rem;
  line-height: 1.6;
}

.studio-section {
  position: relative;
  z-index: 5;
  padding:
    clamp(5rem, 12vh, 9rem)
    clamp(1.25rem, 5vw, 5rem);
  border-top: 1px solid var(--border-soft);
  background:
    radial-gradient(ellipse 60% 40% at 80% 0%, rgba(0, 61, 41, 0.14), transparent 55%),
    var(--background);
}

.studio-section--bridge {
  border-top-color: transparent;
  background:
    linear-gradient(180deg, rgba(5, 5, 5, 0.35) 0%, rgba(5, 5, 5, 0.08) 8%, transparent 18%),
    radial-gradient(ellipse 70% 45% at 20% 10%, rgba(185, 154, 97, 0.06), transparent 55%),
    var(--background);
}

.studio-section--motion {
  background:
    radial-gradient(ellipse 55% 40% at 70% 0%, rgba(0, 96, 57, 0.1), transparent 50%),
    var(--background-secondary);
}

.studio-section__inner {
  max-width: 78rem;
  margin: 0 auto;
  display: grid;
  gap: clamp(2.5rem, 6vh, 4.5rem);
}

.studio-section__header {
  display: grid;
  gap: 1rem;
  max-width: 40rem;
}

.studies-editorial {
  display: grid;
  gap: clamp(1rem, 2.5vw, 2rem);
}

.studies-editorial__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1rem, 2.5vw, 2rem);
}

.study-frame {
  position: relative;
  overflow: hidden;
  background: #0a0a09;
}

.study-frame img {
  width: 100%;
  height: auto;
  display: block;
  transform: scale(1.03);
  transition: transform 1.2s var(--ease-out), opacity 0.6s ease;
  opacity: 0.94;
}

.study-frame:hover img {
  transform: scale(1.06);
  opacity: 1;
}

.study-frame--hero {
  max-width: min(28rem, 100%);
  margin-inline: auto;
}

.study-frame--hero img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
  width: 100%;
}

.study-frame--wide img {
  aspect-ratio: 16 / 9;
  object-fit: cover;
  width: 100%;
}

.study-frame figcaption {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(242, 239, 232, 0.72);
  mix-blend-mode: difference;
}

.film-feature {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: clamp(1.25rem, 3vw, 2.5rem);
  align-items: end;
}

.film-feature--reverse {
  grid-template-columns: 0.65fr 1.35fr;
}

.film-feature--reverse .film-feature__media {
  order: 2;
}

.film-feature--reverse .film-feature__copy {
  order: 1;
}

.film-card__media {
  position: relative;
  overflow: hidden;
  background: #000;
  aspect-ratio: 16 / 9;
}

.film-feature__media {
  aspect-ratio: 16 / 9;
}

.film-card__media video,
.film-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.film-feature__copy {
  display: grid;
  gap: 0.85rem;
  padding-bottom: 0.25rem;
}

.film-card__meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}

.film-card__meta h3 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  letter-spacing: -0.02em;
  line-height: 1;
}

.film-card__meta button {
  min-height: 44px;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.film-card__meta button:hover {
  color: var(--champagne);
}

.film-feature__copy p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.55;
  max-width: 34ch;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.9s var(--ease-out),
    transform 0.9s var(--ease-out);
}

[data-reveal].is-inview {
  opacity: 1;
  transform: translateY(0);
}

.chapter__continue {
  margin-top: 0.75rem;
  color: var(--champagne);
  letter-spacing: 0.18em;
}

@media (max-width: 900px) {
  .studies-editorial__row,
  .film-feature,
  .film-feature--reverse {
    grid-template-columns: 1fr;
  }

  .film-feature--reverse .film-feature__media,
  .film-feature--reverse .film-feature__copy {
    order: initial;
  }

  .study-frame--hero {
    max-width: 100%;
  }
}
