/* ===========================================================================
   GL·9 Strata — Selected Works, embedded in the portfolio (section 05).
   A scroll-scrubbed WebGL journey: eleven works walk the stage in depth,
   each with its own choreography, then settle into a quiet background shelf.
   Driven by the tall #work section's own scroll progress (sticky viewport).
   All layers are absolute WITHIN .st-stage so nothing leaks into the page.
   =========================================================================== */

/* ── Scroll-locked pin: tall section + sticky viewport (drives the scrub) ── */
.section-work-showcase {
    height: 1280vh !important;
    min-height: 0 !important;
    overflow: clip;
    background: #050506;
}
.section-work-showcase::after { display: none !important; }
.work-showcase-viewport {
    position: sticky !important;
    top: 0 !important;
    height: 100vh !important;
    min-height: 0 !important;
    clip-path: none !important;
    overflow: hidden;
    will-change: auto;
}
@media (max-width: 860px) {
    .section-work-showcase { height: 1120vh !important; }
}

.st-stage {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
    background: #050506;
    color: var(--paper, #f4ead0);
    font-family: 'JetBrains Mono', monospace;
    isolation: isolate;
}
.st-stage.can-click { cursor: pointer; }

.st-glow { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.st-gl   { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; display: block; }

.st-ghost { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 1;
            pointer-events: none; font-family: 'Bodoni Moda', 'Didot', Georgia, serif; font-style: italic;
            font-size: clamp(8rem, 26vw, 26rem); line-height: 1; color: transparent;
            -webkit-text-stroke: 1px rgba(244, 234, 208, 0.05); user-select: none; letter-spacing: -0.02em; }

/* the active work's caption — idx, subject, meta — orbiting the glass name */
.st-cap { position: absolute; left: clamp(1.25rem, 6vw, 5rem); bottom: clamp(3.5rem, 14vh, 8rem); z-index: 3;
          pointer-events: none; opacity: 0; transition: opacity 0.5s ease; max-width: 74%; }
.st-cap.flip { left: auto; right: clamp(1.25rem, 6vw, 5rem); text-align: right; }
.st-cap-idx  { display: block; font-family: 'JetBrains Mono', monospace; font-size: clamp(0.55rem, 0.8vw, 0.68rem);
               letter-spacing: 0.34em; color: rgba(244, 234, 208, 0.5); margin-bottom: 0.5rem; }
.st-cap-sub  { display: block; font-family: 'Instrument Serif', Georgia, serif; font-style: italic;
               text-transform: lowercase; font-size: clamp(1.35rem, 2.4vw, 2rem); letter-spacing: 0.01em;
               color: var(--acc, #f4ead0); text-shadow: 0 1px 14px rgba(0, 0, 0, 0.9); line-height: 1.1; }
.st-cap-meta { display: block; margin-top: 0.55rem; font-family: 'JetBrains Mono', monospace;
               font-size: clamp(0.52rem, 0.75vw, 0.62rem); letter-spacing: 0.3em; text-transform: uppercase;
               color: rgba(244, 234, 208, 0.42); }

/* the live-site call to action — a SOLID button in the project's accent, so
   it reads as something you press, not a caption. */
.st-cta-eyebrow { display: block; margin-top: 1.4rem; margin-bottom: 0.55rem;
                  font-family: 'JetBrains Mono', monospace; font-size: clamp(0.5rem, 0.7vw, 0.58rem);
                  letter-spacing: 0.42em; text-transform: uppercase; color: rgba(244, 234, 208, 0.5); }
.st-cta { display: inline-flex; align-items: center; gap: 0.9rem;
          padding: clamp(1rem, 1.8vh, 1.35rem) clamp(1.7rem, 3vw, 2.7rem);
          border: 1px solid var(--acc, #f4ead0); border-radius: 2px;
          background: var(--acc, #f4ead0); color: #08080a;
          font-family: 'JetBrains Mono', monospace; font-weight: 700;
          font-size: clamp(0.68rem, 0.95vw, 0.84rem);
          letter-spacing: 0.2em; text-transform: uppercase; text-decoration: none; white-space: nowrap;
          box-shadow: 0 14px 34px -14px rgba(0, 0, 0, 0.9);
          pointer-events: auto; cursor: pointer;
          transition: filter 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease; }
.st-cta:hover { filter: brightness(1.14); transform: translateY(-3px);
                box-shadow: 0 20px 44px -14px rgba(0, 0, 0, 0.95); }
.st-cta:active { transform: translateY(-1px); }
.st-cta:focus-visible { outline: 2px solid #f7f3ea; outline-offset: 3px; }
.st-cta svg { width: 17px; height: 17px; flex: 0 0 auto; }
.st-cta[hidden] { display: none; }
.st-cta[hidden] + .st-cta-eyebrow, .st-cta-eyebrow[hidden] { display: none; }

/* mid-year interlude — one breath of the author's voice between rooms */
.st-inter { position: absolute; left: 50%; top: 15%; transform: translateX(-50%); z-index: 3;
            opacity: 0; pointer-events: none; text-align: center; width: min(82%, 44rem);
            padding: 2rem 2.5rem;
            background: radial-gradient(ellipse 62% 74% at 50% 50%, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0.3) 58%, transparent 100%); }
.st-inter .int-q { font-family: 'Cormorant Garamond', Georgia, serif; font-style: italic;
                   font-size: clamp(1.25rem, 2.6vw, 2.2rem); line-height: 1.4; color: rgba(244, 234, 208, 0.85);
                   text-shadow: 0 2px 30px rgba(0, 0, 0, 0.9); }
.st-inter .int-s { display: block; margin-top: 0.6rem; font-family: 'La Belle Aurore', cursive;
                   font-size: 1.05rem; color: #c0552f; transform: rotate(-2deg); }

/* the section opener — the year, monumental */
.st-intro { position: absolute; inset: 0; z-index: 3; display: grid; place-items: center;
            pointer-events: none; text-align: center; padding: 0 1rem; }
.st-intro .in-kicker { display: block; font-family: 'JetBrains Mono', monospace;
                       font-size: clamp(0.58rem, 0.9vw, 0.8rem); letter-spacing: 0.5em; text-transform: uppercase;
                       color: rgba(244, 234, 208, 0.72); margin-bottom: 1.1rem; }
.st-intro .in-2026 { display: block; font-family: 'Bodoni Moda', 'Didot', Georgia, serif; font-weight: 400;
                     font-size: clamp(7rem, 30vw, 26rem); line-height: 0.8; letter-spacing: -0.02em;
                     color: #f7f3ea; text-shadow: 0 4px 90px rgba(0, 0, 0, 0.85); }
.st-intro .in-sig { display: block; font-family: 'La Belle Aurore', cursive; font-size: 1.15rem;
                    color: #c0552f; margin-top: 0.5rem; transform: rotate(-3deg); }
.st-intro .in-scroll { display: block; margin-top: 1.8rem; font-family: 'JetBrains Mono', monospace;
                       font-size: 0.56rem; letter-spacing: 0.3em; text-transform: uppercase; color: rgba(244, 234, 208, 0.35); }
.st-intro > div { will-change: transform, opacity; }

.st-fin { position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; pointer-events: none;
          text-align: center; opacity: 0; padding: 0 1rem;
          background: radial-gradient(ellipse 70% 55% at 50% 50%, rgba(0,0,0,0.78) 0%, rgba(0,0,0,0.25) 62%, transparent 100%); }
.st-fin .fin-big { display: block; font-family: 'Bodoni Moda', 'Didot', Georgia, serif; font-weight: 400;
                   font-size: clamp(1.9rem, 4.5vw, 4rem); line-height: 0.95; color: #f7f3ea; margin-bottom: 1rem;
                   text-shadow: 0 2px 40px rgba(0, 0, 0, 0.9); }
.st-fin .fin-hand { font-family: 'La Belle Aurore', cursive; font-size: clamp(1.15rem, 2.4vw, 2rem);
                    color: rgba(244, 234, 208, 0.8); transform: rotate(-2deg); display: inline-block; }

.st-grain { position: absolute; inset: 0; z-index: 4; pointer-events: none; opacity: 0.04;
            background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/></svg>");
            background-size: 220px; }

.st-hint { position: absolute; right: clamp(1rem, 5vw, 3rem); bottom: 0.9rem; z-index: 5;
           font-family: 'JetBrains Mono', monospace; font-size: 0.54rem; letter-spacing: 0.2em;
           text-transform: uppercase; color: rgba(244, 234, 208, 0.32); pointer-events: none; }

/* section head — a small top bar over the stage, cleared below the site nav */
.st-topbar { position: absolute; top: 0; left: 0; right: 0; z-index: 6;
             display: flex; align-items: center; justify-content: flex-end; gap: 1.5rem;
             padding: clamp(3.6rem, 8vh, 5.5rem) clamp(1.25rem, 5vw, 4.5rem) clamp(0.7rem, 1.6vh, 1.1rem);
             pointer-events: none; }
.st-topbar .cf-eyebrow { margin-right: auto; }
.st-topbar .cf-eyebrow { display: inline-flex; align-items: center; gap: 0.7rem;
             font-family: 'JetBrains Mono', monospace; font-size: 0.62rem; font-weight: 500;
             letter-spacing: 0.34em; text-transform: uppercase; color: rgba(244, 234, 208, 0.72); }
.st-topbar .cf-eyebrow b { font-weight: 500; color: color-mix(in srgb, var(--acc, #6b7da6) 72%, #fff); transition: color 0.6s ease; }
.st-topbar .cf-gh { pointer-events: auto; display: inline-flex; align-items: center; gap: 0.55rem;
             padding: 0.5rem 0.95rem; border: 1px solid rgba(244, 234, 208, 0.14);
             font-family: 'JetBrains Mono', monospace; font-size: 0.6rem; letter-spacing: 0.18em;
             text-transform: uppercase; color: rgba(244, 234, 208, 0.66); text-decoration: none;
             transition: border-color 0.3s, color 0.3s, background 0.3s; }
.st-topbar .cf-gh:hover { border-color: var(--paper, #f4ead0); background: var(--paper, #f4ead0); color: #0a0a0b; }
.st-topbar .cf-gh svg { width: 14px; height: 14px; }

/* lightbox — a work opened full */
.st-lb { position: absolute; inset: 0; z-index: 50; display: flex; flex-direction: column;
         align-items: center; justify-content: center; gap: 1.1rem; padding: clamp(1.5rem, 5vh, 3rem);
         background: rgba(0, 0, 0, 0.94); backdrop-filter: blur(8px); opacity: 0; visibility: hidden;
         transition: opacity 0.4s, visibility 0.4s; }
.st-lb.open { opacity: 1; visibility: visible; }
.st-lb h3 { font-family: 'Unbounded', sans-serif; font-weight: 800; text-transform: uppercase;
            font-size: clamp(1.6rem, 4.2vw, 3.4rem); line-height: 1; letter-spacing: -0.01em;
            color: #f7f3ea; text-align: center; }
.st-lb-sub  { font-family: 'Instrument Serif', Georgia, serif; font-style: italic; font-size: 1.2rem;
              text-transform: lowercase; letter-spacing: 0.01em; }
.st-lb-note { font-family: 'JetBrains Mono', monospace; font-size: 0.56rem; letter-spacing: 0.3em; text-transform: uppercase; }
.st-lb-lead { max-width: 50ch; text-align: center; font-family: 'Cormorant Garamond', Georgia, serif;
              font-style: italic; font-size: 1.02rem; line-height: 1.6; color: rgba(244, 234, 208, 0.6); }
.st-lb-strip { display: flex; gap: 0.8rem; max-width: 92%; overflow-x: auto; padding: 0.4rem; }
.st-lb-strip img { height: min(34vh, 300px); width: auto; border-radius: 3px; box-shadow: 0 24px 60px -26px rgba(0, 0, 0, 0.9); }
.st-lb-close { position: absolute; top: clamp(1rem, 3vh, 2rem); right: clamp(1rem, 3vw, 2rem);
               width: 46px; height: 46px; border: 1px solid rgba(244, 234, 208, 0.18); border-radius: 50%;
               background: none; color: var(--paper, #f4ead0); cursor: pointer; display: flex;
               align-items: center; justify-content: center; }
.st-lb-close:hover { border-color: rgba(244, 234, 208, 0.5); }
.st-lb-close svg { width: 18px; height: 18px; }

.st-nogl { display: none; position: absolute; inset: 0; place-items: center; text-align: center;
           font-family: 'JetBrains Mono', monospace; font-size: 0.7rem; letter-spacing: 0.2em;
           color: rgba(244, 234, 208, 0.6); z-index: 9; padding: 0 2rem; }

/* ── Mobile: lighter chrome, tap-to-open, caption centred ────────────────── */
@media (max-width: 860px) {
    .st-hint { display: none; }
    .st-cap, .st-cap.flip { left: 50%; right: auto; transform: translateX(-50%); text-align: center;
                            bottom: clamp(2.5rem, 10vh, 5rem); max-width: 88%; }
    .st-topbar { padding-left: 1.1rem; padding-right: 1.1rem; }
    .st-topbar .cf-gh { padding: 0.42rem 0.7rem; }
}
@media (prefers-reduced-motion: reduce) {
    .st-intro > div { transition: none; }
}
