/* Vanessa Espín — Landing v3 Loading Overtures (o1–o6)
   Tactile museum thresholds: Komorebi dawn, hand-dealt prints, wet watercolour rag,
   velvet fly-curtain, gallery pin-spot iris, and editorial monograph parting. */

#introStage {
  --intro-serif: var(--serif, 'Gambetta', Georgia, serif);
  --intro-sans: var(--sans, 'Switzer', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif);
  --intro-gutter: var(--gutter, clamp(18px, 2.6vw, 42px));
  --intro-hair: var(--hair, 1px);
  position: fixed;
  inset: 0;
  z-index: 70;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  cursor: pointer;
  pointer-events: auto;
  contain: layout style;
}

@media (min-resolution: 2dppx) {
  #introStage {
    --intro-hair: 0.5px;
  }
}

#introStage[hidden],
#introStage.is-done {
  display: none !important;
  pointer-events: none !important;
}

#introStage.is-passthrough {
  pointer-events: none;
  cursor: default;
}

/* Shared 2D Canvas Layer (o1 Komorebi beams, o3 Watercolour wet-edge aperture, o5 Pin-spot iris) */
.intro-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  z-index: 2;
}

/* Shared Paper Grain (../img/noise.png) */
.intro-grain {
  position: absolute;
  inset: -3rem;
  z-index: 9;
  pointer-events: none;
  background-image: url(../img/noise.png);
  background-size: 150px 150px;
  opacity: 0.075;
  mix-blend-mode: screen;
  will-change: opacity;
}

#introStage[data-intro="o3"] .intro-grain {
  opacity: 0.08;
  mix-blend-mode: screen;
}

/* Scene Panels (only active style displays) */
.intro-scene {
  position: absolute;
  inset: 0;
  display: none;
  pointer-events: none;
  z-index: 4;
}

#introStage[data-intro="o1"] .intro-scene--o1,
#introStage[data-intro="o2"] .intro-scene--o2,
#introStage[data-intro="o3"] .intro-scene--o3,
#introStage[data-intro="o4"] .intro-scene--o4,
#introStage[data-intro="o5"] .intro-scene--o5,
#introStage[data-intro="o6"] .intro-scene--o6 {
  display: flex;
}

/* =========================================================================
   o1 — Komorebi Dawn & Rising Prints (Default Lead)
   ========================================================================= */
.intro-scene--o1 {
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  padding: var(--intro-gutter);
}

.intro-o1__lockup {
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  will-change: transform, opacity;
}

.intro-o1__name {
  margin: 0;
  font-family: var(--intro-serif);
  font-weight: 300;
  font-size: clamp(28px, 3.2vw, 44px);
  line-height: 1.04;
  letter-spacing: -0.025em;
  color: #f3ece0;
}

.intro-o1__meta {
  margin: 12px 0 0;
  font-family: var(--intro-sans);
  font-weight: 500;
  font-size: 10.5px;
  line-height: 1;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(238, 227, 209, 0.58);
}

.intro-o1__thread-track {
  position: relative;
  width: clamp(132px, 15vw, 210px);
  height: 1px;
  margin-top: 18px;
  background: rgba(218, 182, 120, 0.13);
  overflow: visible;
}

.intro-o1__thread {
  position: absolute;
  inset: 0;
  height: 0.5px;
  background: linear-gradient(
    90deg,
    rgba(206, 164, 98, 0.32) 0%,
    #e5c17d 68%,
    #f6deb0 100%
  );
  box-shadow: 0 0 8px rgba(242, 204, 132, 0.34);
  transform-origin: 0% 50%;
  transform: scaleX(0.06);
  will-change: transform, opacity;
}

/* =========================================================================
   o2 — Three-Print Deal (Charcoal Gallery Linen + Real Uncropped Prints)
   ========================================================================= */
.intro-scene--o2 {
  align-items: center;
  justify-content: center;
}

.intro-o2__ground {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(68% 62% at 50% 48%, rgba(40, 33, 27, 0.42) 0%, rgba(16, 14, 12, 0) 100%),
    #100e0c;
  will-change: opacity;
}

/* Anchored top-left at exact .masthead coordinates for zero-jump continuity */
.intro-o2__masthead {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 6;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: clamp(16px, 2.2vh, 26px) var(--intro-gutter);
  will-change: opacity, transform;
}

.intro-o2__brand {
  font-family: var(--intro-serif);
  font-weight: 400;
  font-size: clamp(20px, 1.65vw, 25px);
  line-height: 1;
  letter-spacing: -0.02em;
  color: #eee6d8;
}

.intro-o2__role {
  font-family: var(--intro-sans);
  font-weight: 500;
  font-size: 10.5px;
  line-height: 1;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(238, 230, 216, 0.48);
}

.intro-o2__deck {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}

.intro-o2__card {
  position: absolute;
  left: 50%;
  top: 50%;
  transform-origin: 50% 50%;
  will-change: transform, opacity;
}

.intro-o2__img {
  display: block;
  height: var(--o2-target-h, 460px);
  width: auto;
  max-width: none;
  border-radius: 1.5px;
  box-shadow:
    0 24px 56px rgba(0, 0, 0, 0.66),
    0 5px 16px rgba(0, 0, 0, 0.44),
    0 0 0 var(--intro-hair) rgba(255, 248, 236, 0.14);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.intro-o2__foot {
  position: absolute;
  left: var(--intro-gutter);
  right: var(--intro-gutter);
  bottom: clamp(18px, 2.8vh, 30px);
  z-index: 6;
  text-align: center;
  font-family: var(--intro-sans);
  font-weight: 500;
  font-size: 10.5px;
  line-height: 1;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(238, 230, 216, 0.44);
  will-change: opacity, transform;
}

/* =========================================================================
   o3 — Watercolour Wet-Edge Bloom (Warm Archival Cotton #f2ede3)
   ========================================================================= */
.intro-scene--o3 {
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  padding: var(--intro-gutter);
}

.intro-o3__lockup {
  position: relative;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  will-change: transform, opacity;
}

.intro-o3__name {
  margin: 0;
  font-family: var(--intro-serif);
  font-weight: 300;
  font-size: clamp(28px, 3.2vw, 44px);
  line-height: 1.04;
  letter-spacing: -0.025em;
  color: #f3ece0;
}

.intro-o3__reg {
  position: relative;
  width: clamp(160px, 19vw, 268px);
  height: 9px;
  margin: 13px 0 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.intro-o3__reg-line {
  width: 100%;
  height: var(--intro-hair);
  background: rgba(243, 236, 224, 0.28);
  transform-origin: 50% 50%;
  will-change: transform;
}

.intro-o3__reg::before,
.intro-o3__reg::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  border: var(--intro-hair) solid rgba(243, 236, 224, 0.34);
  transform: translateY(-50%);
}

.intro-o3__reg::before {
  left: -9px;
}

.intro-o3__reg::after {
  right: -9px;
}

.intro-o3__role {
  margin: 0;
  font-family: var(--intro-serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(15px, 1.28vw, 19px);
  line-height: 1.15;
  color: rgba(243, 236, 224, 0.68);
}

.intro-o3__city {
  margin: 8px 0 0;
  font-family: var(--intro-sans);
  font-weight: 500;
  font-size: 10px;
  line-height: 1;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(243, 236, 224, 0.48);
}

/* =========================================================================
   o4 — Theatre Velvet Fly-Curtain (Deep Espresso #0d0b0a + Footlights)
   ========================================================================= */
.intro-scene--o4 {
  align-items: stretch;
  justify-content: stretch;
}

.intro-o4__curtain {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--intro-gutter);
  background:
    radial-gradient(64% 26% at 50% 101%, rgba(246, 188, 106, 0.23) 0%, rgba(188, 116, 48, 0.085) 48%, rgba(13, 11, 10, 0) 100%),
    repeating-linear-gradient(
      90deg,
      rgba(255, 242, 224, 0.012) 0px,
      rgba(0, 0, 0, 0.08) 46px,
      rgba(255, 242, 224, 0.015) 94px
    ),
    #0d0b0a;
  box-shadow:
    0 34px 76px rgba(6, 4, 3, 0.66),
    0 10px 24px rgba(6, 4, 3, 0.42);
  will-change: transform;
}

/* Warm antique-brass footlight hem along bottom of fly-curtain */
.intro-o4__hem {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    rgba(218, 170, 96, 0) 4%,
    rgba(226, 178, 102, 0.36) 28%,
    rgba(250, 214, 146, 0.68) 50%,
    rgba(226, 178, 102, 0.36) 72%,
    rgba(218, 170, 96, 0) 96%
  );
  box-shadow: 0 -4px 22px rgba(245, 190, 108, 0.32);
  will-change: opacity;
}

.intro-o4__lockup {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  will-change: transform, opacity;
}

.intro-o4__line {
  display: flex;
   flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 8px 14px;
}

.intro-o4__name {
  font-family: var(--intro-serif);
  font-weight: 300;
  font-size: clamp(27px, 3vw, 42px);
  line-height: 1.04;
  letter-spacing: -0.024em;
  color: #f3ebe0;
}

.intro-o4__sep {
  color: rgba(219, 177, 108, 0.65);
  font-family: var(--intro-serif);
  font-size: clamp(18px, 1.8vw, 26px);
}

.intro-o4__role {
  font-family: var(--intro-serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(20px, 2.1vw, 29px);
  line-height: 1.08;
  color: rgba(243, 235, 224, 0.78);
}

.intro-o4__rule-wrap {
  width: clamp(190px, 26vw, 356px);
  height: 1px;
  margin-top: 16px;
  background: rgba(214, 172, 104, 0.14);
  position: relative;
}

.intro-o4__rule {
  position: absolute;
  inset: 0;
  height: var(--intro-hair);
  background: linear-gradient(
    90deg,
    rgba(198, 152, 82, 0.18) 0%,
    #ddb571 50%,
    rgba(198, 152, 82, 0.18) 100%
  );
  transform-origin: 50% 50%;
  will-change: transform, opacity;
}

.intro-o4__city {
  margin: 12px 0 0;
  font-family: var(--intro-sans);
  font-weight: 500;
  font-size: 10px;
  line-height: 1;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(235, 221, 198, 0.46);
}

/* =========================================================================
   o5 — Pin-Spot Aperture on the Poster (Pure Dark Gallery #090807)
   ========================================================================= */
.intro-scene--o5 {
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  padding: var(--intro-gutter);
}

.intro-o5__lockup {
  position: relative;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  will-change: transform, opacity;
}

.intro-o5__name {
  margin: 0;
  font-family: var(--intro-serif);
  font-weight: 300;
  font-size: clamp(26px, 2.9vw, 40px);
  line-height: 1.05;
  letter-spacing: -0.022em;
  color: rgba(239, 230, 214, 0.86);
  text-shadow: 0 0 28px rgba(246, 202, 132, 0.22);
}

.intro-o5__meta {
  margin: 11px 0 0;
  font-family: var(--intro-sans);
  font-weight: 500;
  font-size: 10px;
  line-height: 1;
  letter-spacing: 0.23em;
  text-transform: uppercase;
  color: rgba(236, 224, 204, 0.44);
}

/* =========================================================================
   o6 — Purpose Statement Overture (Umber Monograph Leaves #15120f)
   ========================================================================= */
.intro-scene--o6 {
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--intro-gutter);
}

.intro-o6__leaf {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50.5%;
  z-index: 2;
  background: #15120f;
  will-change: transform, opacity;
}

.intro-o6__leaf--left {
  left: 0;
  background:
    radial-gradient(90% 70% at 100% 50%, rgba(232, 194, 140, 0.05) 0%, rgba(21, 18, 15, 0) 100%),
    #15120f;
  border-right: var(--intro-hair) solid rgba(226, 188, 126, 0);
  box-shadow: 18px 0 48px rgba(6, 5, 4, 0);
}

.intro-o6__leaf--right {
  right: 0;
  background:
    radial-gradient(90% 70% at 0% 50%, rgba(232, 194, 140, 0.05) 0%, rgba(21, 18, 15, 0) 100%),
    #15120f;
  border-left: var(--intro-hair) solid rgba(226, 188, 126, 0);
  box-shadow: -18px 0 48px rgba(6, 5, 4, 0);
}

.intro-o6__center {
  position: relative;
  z-index: 6;
  max-width: min(34rem, 88vw);
  display: flex;
  flex-direction: column;
  align-items: center;
  will-change: transform, opacity;
}

.intro-o6__mask {
  overflow: hidden;
  padding: 0.16em 0.12em 0.22em;
}

.intro-o6__quote {
  margin: 0;
  font-family: var(--intro-serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(26px, 3vw, 42px);
  line-height: 1.2;
  letter-spacing: -0.018em;
  color: #f3ece0;
  text-wrap: balance;
  will-change: transform, opacity;
}

.intro-o6__rule {
  width: 34px;
  height: var(--intro-hair);
  margin: 16px 0 14px;
  background: rgba(219, 181, 118, 0.42);
  transform-origin: 50% 50%;
  will-change: transform, opacity;
}

.intro-o6__colophon {
  margin: 0;
  font-family: var(--intro-sans);
  font-weight: 500;
  font-size: 10.5px;
  line-height: 1.2;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(236, 225, 208, 0.56);
  will-change: transform, opacity;
}

@media (max-width: 820px) {
  .intro-o2__role {
    display: none;
  }
  .intro-o4__sep {
    display: none;
  }
  .intro-o4__line {
    flex-direction: column;
    align-items: center;
    gap: 4px;
  }
}
