/* ============================================================
   PPUZZL.works — A working studio in the forest, an Art Deco theatre.

   Palette:
     #0a1f1a  Pine Shadow (base, arch interior)
     #0f2a23  Deep Moss (primary background)
     #1a3a31  Forest Velvet (playbill, dividers)
     #2d5a4a  Mint Patina (HUD, soft outlines)
     #c8a268  Stage Brass (gilt, chevrons, diamond)
     #f0e6cf  Marquee Cream (text, wordmark)
     #e89858  Lamp Amber (interactive accent)

   Typography:
     Limelight     — display, marquee
     Poiret One    — sub-display, numerals
     Cormorant Garamond — body
     Share Tech Mono — HUD only
   ============================================================ */


/* ---------- Reset & base ---------- */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    background-color: #0a1f1a;
}

body {
    background: #0f2a23;
    color: #f0e6cf;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.0625rem;
    line-height: 1.7;
    margin: 0;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}


/* ---------- Sections (Acts) ---------- */

.act {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: clamp(48px, 10vh, 120px) 24px;
    isolation: isolate;
}

.act__inner {
    width: 100%;
    max-width: 920px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.overhead {
    font-family: 'Poiret One', sans-serif;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.32em;
    color: #c8a268;
    margin-bottom: 14px;
}

.headline {
    font-family: 'Limelight', display, serif;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: clamp(2rem, 4.6vw, 3.4rem);
    color: #f0e6cf;
    margin-bottom: 18px;
    line-height: 1.05;
}

.subhead {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 1.125rem;
    color: #f0e6cf;
    opacity: 0.78;
    letter-spacing: 0.02em;
    margin-bottom: 56px;
}


/* ---------- Section 1 — Marquee (Hero) ---------- */

.act--marquee {
    background: #0f2a23;
}

.proscenium {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(640px, 88vw);
    height: min(820px, 92vh);
    pointer-events: none;
    z-index: 0;
}

.proscenium__interior {
    position: absolute;
    inset: 0;
    background: #0a1f1a;
    clip-path: polygon(0 26%, 12% 26%, 12% 12%, 30% 12%, 30% 0, 70% 0, 70% 12%, 88% 12%, 88% 26%, 100% 26%, 100% 100%, 0 100%);
    box-shadow: inset 0 0 120px 20px rgba(0, 0, 0, 0.55);
}

.proscenium__ziggurat {
    position: absolute;
    inset: 0;
    pointer-events: none;
    border: 1px solid #c8a268;
    clip-path: polygon(
        0 26%, 12% 26%, 12% 12%, 30% 12%, 30% 0, 70% 0, 70% 12%, 88% 12%, 88% 26%, 100% 26%,
        100% calc(26% + 1px), 88% calc(26% + 1px), 88% calc(12% + 1px), 70% calc(12% + 1px), 70% 1px, 30% 1px, 30% calc(12% + 1px), 12% calc(12% + 1px), 12% calc(26% + 1px), 0 calc(26% + 1px)
    );
    opacity: 0.85;
}

.proscenium__column {
    position: absolute;
    top: 26%;
    bottom: 0;
    width: 38px;
    background: repeating-linear-gradient(
        to right,
        transparent 0 6px,
        #c8a268 6px 7px,
        transparent 7px 14px
    );
    opacity: 0.42;
}

.proscenium__column--left {
    left: -2px;
    border-left: 1px solid #c8a268;
}

.proscenium__column--right {
    right: -2px;
    border-right: 1px solid #c8a268;
}

.proscenium__keystone {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 14px;
    height: 14px;
    background: #c8a268;
    clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.proscenium__sunray {
    position: absolute;
    top: 12%;
    left: 50%;
    width: 240px;
    height: 110px;
    transform: translateX(-50%);
    background: repeating-linear-gradient(
        90deg,
        transparent 0 10px,
        rgba(200, 162, 104, 0.45) 10px 11px,
        transparent 11px 22px
    );
    mask-image: radial-gradient(ellipse 120px 80px at 50% 100%, #000 60%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 120px 80px at 50% 100%, #000 60%, transparent 100%);
    opacity: 0.55;
}

.proscenium__sunray--a {
    transform: translateX(-50%) rotate(-12deg);
    width: 200px;
}

.proscenium__sunray--b {
    width: 240px;
}

.proscenium__sunray--c {
    transform: translateX(-50%) rotate(12deg);
    width: 200px;
}

.marquee__inner {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 0 32px;
    max-width: 580px;
}

.wordmark {
    font-family: 'Limelight', display, serif;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: clamp(2.4rem, 6.4vw, 5.2rem);
    color: #f0e6cf;
    line-height: 1;
    margin: 0 0 22px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
}

.wordmark__diamond {
    display: inline-block;
    width: 0.42em;
    height: 0.42em;
    background: #c8a268;
    transform: rotate(45deg);
    margin: 0 0.32em;
    box-shadow: 0 0 12px rgba(200, 162, 104, 0.4);
}

.tagline {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: clamp(1rem, 1.6vw, 1.2rem);
    color: #f0e6cf;
    opacity: 0.84;
    letter-spacing: 0.015em;
    margin-bottom: 36px;
}

.fillet {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 28px auto 28px;
    max-width: 420px;
}

.fillet__rule {
    flex: 1;
    height: 1px;
    background: #c8a268;
    opacity: 0.85;
}

.fillet__chevron {
    color: #c8a268;
    font-size: 0.9rem;
    line-height: 1;
}

.marquee__year {
    font-family: 'Poiret One', sans-serif;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.32em;
    color: #c8a268;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
}

.marquee__diamond {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: #c8a268;
    transform: rotate(45deg);
    margin: 0 12px;
}


/* ---------- Frieze (deco friezes between sections) ---------- */

.frieze {
    width: 100%;
    height: 24px;
    overflow: hidden;
    position: relative;
}

.frieze--top {
    position: absolute;
    top: 0;
    left: 0;
}

.frieze--bottom {
    position: absolute;
    bottom: 0;
    left: 0;
}

.frieze__strip {
    width: 100%;
    height: 100%;
    background:
        linear-gradient(90deg, rgba(15, 42, 35, 1) 0%, rgba(26, 58, 49, 1) 6%, rgba(26, 58, 49, 1) 94%, rgba(15, 42, 35, 1) 100%),
        repeating-linear-gradient(135deg, #c8a268 0 6px, transparent 6px 12px);
    background-blend-mode: screen;
    mask-image: linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
    opacity: 0.78;
    transform-origin: left center;
}

.frieze.is-revealed .frieze__strip {
    animation: friezeDraw 600ms ease-out both;
}

@keyframes friezeDraw {
    0% {
        clip-path: inset(0 100% 0 0);
    }
    100% {
        clip-path: inset(0 0 0 0);
    }
}


/* ---------- Section 2 — The Workbench ---------- */

.act--workbench {
    background: #0f2a23;
}

.workbench-stage {
    position: relative;
    width: min(560px, 90vw);
    aspect-ratio: 1 / 1;
    margin: 24px auto 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hud-ring {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0.42;
    mix-blend-mode: screen;
    animation: hudSpin 60s linear infinite;
}

.hud-ring__label {
    fill: #2d5a4a;
    font-family: 'Share Tech Mono', monospace;
    font-size: 13px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hud-ring__label--code {
    fill: #c8a268;
    font-size: 11px;
    opacity: 0.85;
}

@keyframes hudSpin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.diorama {
    position: relative;
    width: 70%;
    height: auto;
    z-index: 1;
    filter: drop-shadow(0 14px 18px rgba(0, 0, 0, 0.5));
}

.bench-copy {
    max-width: 640px;
    margin: 0 auto;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.125rem;
    line-height: 1.75;
    color: #f0e6cf;
    text-align: center;
    opacity: 0.92;
}


/* ---------- Section 3 — Now Showing ---------- */

.act--works {
    background: #0f2a23;
    padding: clamp(48px, 10vh, 120px) 24px;
    align-items: center;
}

.works__header {
    text-align: center;
    margin-bottom: 56px;
}

.title-card {
    width: 100%;
    max-width: 1080px;
    min-height: 60vh;
    display: grid;
    grid-template-columns: 1fr 1.2fr 1.4fr;
    gap: 40px;
    align-items: center;
    padding: 56px 32px;
    margin: 0 auto;
}

.title-card__icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.title-card__icon svg {
    width: clamp(96px, 14vw, 140px);
    height: auto;
    filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.4));
}

.title-card__name h3 {
    font-family: 'Limelight', display, serif;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: clamp(1.6rem, 2.8vw, 2.2rem);
    color: #f0e6cf;
    line-height: 1.05;
    margin-bottom: 10px;
}

.title-card__year {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    color: #c8a268;
    font-size: 1rem;
    letter-spacing: 0.04em;
    opacity: 0.9;
}

.title-card__copy p {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.0625rem;
    line-height: 1.7;
    color: #f0e6cf;
    opacity: 0.88;
    margin-bottom: 18px;
}

.ghost-arrow {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    color: #c8a268;
    font-family: 'Poiret One', sans-serif;
    font-size: 0.85rem;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color 200ms ease, border-color 200ms ease;
}

.ghost-arrow:hover,
.ghost-arrow:focus {
    color: #e89858;
    border-bottom-color: #e89858;
    outline: none;
}

.ghost-arrow__mark {
    transition: transform 220ms ease;
}

.ghost-arrow:hover .ghost-arrow__mark {
    transform: translateX(6px);
}


/* ---------- Section 4 — The Studio (About) ---------- */

.act--studio {
    background: #0a1f1a;
    position: relative;
}

.act--studio::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 50% 50%, rgba(15, 42, 35, 0.6) 0%, rgba(10, 31, 26, 1) 100%);
    pointer-events: none;
    z-index: 0;
}

.act--studio .overhead,
.act--studio .headline {
    position: relative;
    z-index: 1;
    margin-bottom: 18px;
}

.act--studio .headline {
    margin-bottom: 44px;
}

.playbill {
    position: relative;
    z-index: 1;
    width: min(520px, 90vw);
    background: #1a3a31;
    border: 1px solid #c8a268;
    padding: 6px;
    clip-path: polygon(
        12px 0, calc(100% - 12px) 0,
        100% 12px, 100% calc(100% - 12px),
        calc(100% - 12px) 100%, 12px 100%,
        0 calc(100% - 12px), 0 12px
    );
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
}

.playbill__inner {
    border: 1px solid #c8a268;
    padding: 56px 48px;
    clip-path: polygon(
        8px 0, calc(100% - 8px) 0,
        100% 8px, 100% calc(100% - 8px),
        calc(100% - 8px) 100%, 8px 100%,
        0 calc(100% - 8px), 0 8px
    );
    text-align: left;
}

.playbill__copy {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.0625rem;
    line-height: 1.78;
    color: #f0e6cf;
    text-align: justify;
    text-align-last: left;
    margin-bottom: 28px;
}

.playbill__copy::first-letter {
    font-family: 'Limelight', display, serif;
    font-size: 4.2em;
    float: left;
    line-height: 0.85;
    margin: 6px 10px 0 0;
    color: #c8a268;
}

.playbill__signoff {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    text-align: right;
    color: #c8a268;
    font-size: 0.95rem;
    letter-spacing: 0.04em;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
}

.playbill__diamond {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #c8a268;
    transform: rotate(45deg);
}


/* ---------- Section 5 — Curtain Call (Contact) ---------- */

.act--curtain {
    background: #0f2a23;
    overflow: hidden;
}

.curtain__fan {
    position: absolute;
    width: 110vw;
    height: 110vw;
    pointer-events: none;
    opacity: 0.18;
    z-index: 0;
}

.curtain__fan--left {
    top: -20vw;
    left: -20vw;
    background: repeating-conic-gradient(from 0deg at 0% 0%, #c8a268 0deg 2deg, transparent 2deg 12deg);
    mask-image: radial-gradient(circle at 0% 0%, #000 0%, #000 70%, transparent 100%);
    -webkit-mask-image: radial-gradient(circle at 0% 0%, #000 0%, #000 70%, transparent 100%);
}

.curtain__fan--right {
    top: -20vw;
    right: -20vw;
    background: repeating-conic-gradient(from 90deg at 100% 0%, #c8a268 0deg 2deg, transparent 2deg 12deg);
    mask-image: radial-gradient(circle at 100% 0%, #000 0%, #000 70%, transparent 100%);
    -webkit-mask-image: radial-gradient(circle at 100% 0%, #000 0%, #000 70%, transparent 100%);
}

.bracket-frame {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 16px 0 48px;
    position: relative;
    z-index: 1;
    transition: box-shadow 240ms ease;
    padding: 14px 22px;
}

.bracket {
    color: #c8a268;
    font-size: clamp(2.2rem, 5vw, 3.4rem);
    line-height: 1;
    font-family: 'Limelight', display, serif;
    transition: color 240ms ease;
}

.contact-link {
    font-family: 'Limelight', display, serif;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: clamp(1.4rem, 3.6vw, 2.4rem);
    color: #f0e6cf;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: color 200ms ease;
    border-bottom: 1px solid transparent;
}

.contact-link:hover,
.contact-link:focus {
    color: #e89858;
    outline: none;
}

.contact-link:hover ~ .bracket,
.bracket-frame:hover .bracket {
    color: #e89858;
}

.contact-link__diamond {
    display: inline-block;
    width: 0.32em;
    height: 0.32em;
    background: #c8a268;
    transform: rotate(45deg);
    margin: 0 0.28em;
}

.contact-link__diamond--small {
    width: 0.22em;
    height: 0.22em;
}

/* Shake-error: theatrical refusal */
.bracket-frame.is-shake {
    animation: shakeError 240ms ease-in-out;
    box-shadow: 0 0 0 2px #e89858;
}

@keyframes shakeError {
    0%, 100% { transform: translateX(0); }
    25%      { transform: translateX(-4px); }
    50%      { transform: translateX(4px); }
    75%      { transform: translateX(-2px); }
}

.credits {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 0.9rem;
    color: #f0e6cf;
    opacity: 0.7;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    position: relative;
    z-index: 1;
}

.credits__diamond {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: #c8a268;
    transform: rotate(45deg);
}


/* ---------- Reveal animation hook ---------- */

.act .frieze {
    opacity: 1;
}

.act:not(.is-in-view) .frieze:not(.is-revealed) .frieze__strip {
    clip-path: inset(0 100% 0 0);
}


/* ---------- Responsive ---------- */

@media (max-width: 880px) {
    .title-card {
        grid-template-columns: 1fr;
        gap: 22px;
        text-align: center;
        padding: 40px 24px;
        min-height: 0;
    }

    .title-card__icon {
        margin-bottom: 4px;
    }

    .title-card__copy {
        max-width: 540px;
        margin: 0 auto;
    }

    .ghost-arrow {
        justify-content: center;
    }

    .workbench-stage {
        width: min(420px, 92vw);
    }

    .playbill__inner {
        padding: 40px 28px;
    }

    .wordmark__diamond {
        margin: 0 0.22em;
    }
}

@media (max-width: 540px) {
    .wordmark {
        font-size: clamp(2rem, 9vw, 3rem);
    }

    .marquee__year {
        font-size: 0.72rem;
        letter-spacing: 0.24em;
    }

    .headline {
        font-size: clamp(1.6rem, 6vw, 2.2rem);
    }

    .proscenium {
        height: min(680px, 86vh);
        width: min(540px, 92vw);
    }
}
