/*
 * Shared cinematic layer for Chemist's public pages.
 * One page-specific signature carries the visual emphasis; everything else
 * uses quiet, reusable reveal and interaction rules.
 */

body[data-page-cinema] {
    overflow-x: clip;
}

.pc-page-root {
    --pc-ease: cubic-bezier(.2, .75, .24, 1);
    --pc-pointer-x: 0px;
    --pc-pointer-y: 0px;
    --pc-scroll-y: 0px;
    --pc-page-deg: 0deg;
    position: relative !important;
    overflow-x: clip !important;
    overflow-y: visible !important;
    isolation: isolate;
}

.pc-page-root > [style*="position: fixed"][style*="mix-blend-mode: multiply"] {
    contain: strict;
    transform: translateZ(0);
}

body[data-page-cinema] .sc-host nav[style*="position:"][style*="sticky"],
body[data-page-cinema] .lab-nav {
    backface-visibility: hidden;
    transform: translateZ(0);
}

.pc-page-progress {
    position: fixed;
    z-index: 120;
    top: 0;
    right: 0;
    left: 0;
    height: 2px;
    pointer-events: none;
}

.pc-page-progress span {
    display: block;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, var(--gold, #C8922E), var(--goldb, #E0A93A));
    box-shadow: 0 0 14px color-mix(in srgb, var(--gold, #C8922E) 52%, transparent);
    transform: scaleX(0);
    transform-origin: left center;
    will-change: transform;
}

/* ---------------------------------------------------------- shared motion */

.pc-motion-ready .pc-page-hero {
    animation: pcHeroArrive 1.02s .06s var(--pc-ease) both !important;
}

.pc-motion-ready .pc-page-hero > .pc-hero-piece {
    animation: pcHeroPiece .82s calc(.2s + var(--pc-piece, 0) * 85ms) var(--pc-ease) both;
}

@keyframes pcHeroArrive {
    0% {
        opacity: 0;
        filter: saturate(.62) blur(7px);
        clip-path: inset(5% 4% 8% 4%);
        transform: translate3d(0, 34px, 0) scale(.985);
    }
    100% {
        opacity: 1;
        filter: none;
        clip-path: inset(0);
        transform: translate3d(0, 0, 0) scale(1);
    }
}

@keyframes pcHeroPiece {
    from { opacity: 0; transform: translate3d(0, 18px, 0); }
    to { opacity: 1; transform: translate3d(0, 0, 0); }
}

.pc-motion-ready .pc-reveal {
    opacity: 0;
    transform: translate3d(0, 24px, 0);
    transition:
        opacity .68s ease calc(var(--pc-index, 0) * 28ms),
        transform .78s var(--pc-ease) calc(var(--pc-index, 0) * 28ms);
}

.pc-motion-ready .pc-reveal.pc-in {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

.pc-interactive {
    transition: filter .28s ease, box-shadow .32s ease !important;
}

.pc-interactive:hover,
.pc-interactive:focus-within {
    filter: brightness(1.035) saturate(1.04);
    box-shadow: rgba(20, 15, 8, .2) 0 22px 42px -31px;
}

.pc-page-hero img {
    transition: filter .7s ease, transform .85s var(--pc-ease);
}

.pc-page-hero:hover img {
    filter: saturate(1.04) contrast(1.02);
}

/* The home pull-quote is the canonical closing scene. Every other public
   footer with data-quote receives the same depth, mark and ink reveal. */
body[data-page-cinema] .ck-quote-footer {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    background:
        radial-gradient(circle at 50% 4%, rgba(200, 146, 46, .14), transparent 36%),
        #17120a !important;
}

body[data-page-cinema] .ck-quote-footer::before {
    content: "";
    position: absolute;
    z-index: 0;
    inset: 0;
    opacity: .18;
    pointer-events: none;
    background:
        radial-gradient(circle at 50% 22%, rgba(200, 146, 46, .2), transparent 28%),
        linear-gradient(rgba(236, 224, 194, .035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(236, 224, 194, .035) 1px, transparent 1px);
    background-size: auto, 90px 90px, 90px 90px;
    mask-image: linear-gradient(#000, transparent 88%);
}

body[data-page-cinema] .ck-quote-footer::after {
    content: "CHEMIST";
    position: absolute;
    z-index: 0;
    top: -4vw;
    left: 50%;
    color: transparent;
    font-family: Cinzel, serif;
    font-size: clamp(110px, 19vw, 300px);
    font-weight: 700;
    letter-spacing: .08em;
    line-height: 1;
    white-space: nowrap;
    pointer-events: none;
    -webkit-text-stroke: 1px rgba(200, 146, 46, .11);
    transform: translate3d(-50%, var(--pc-scroll-y), 0);
    will-change: transform;
}

body[data-page-cinema] .ck-quote-footer > * {
    position: relative;
    z-index: 2;
}

body[data-page-cinema] .ck-quote-panel {
    isolation: isolate;
    background: linear-gradient(180deg, rgba(200, 146, 46, .035), transparent 76%);
}

body[data-page-cinema] .ck-quote-footer [data-quote] .qw {
    transition-duration: .78s;
    transition-timing-function: var(--pc-ease);
}

body[data-page-cinema] .ck-quote-footer [data-quote].is-revealed .qw {
    transition-delay: calc(var(--i, 0) * 55ms);
}

/* --------------------------------------------------------- signature base */

.pc-signature {
    position: absolute;
    /* The page shell itself lives at z-index: 2.  Keeping this at 1 made the
       signature technically animate while remaining hidden behind the page. */
    z-index: 3;
    top: 92px;
    right: max(20px, calc((100vw - 1240px) / 2));
    width: 430px;
    height: 430px;
    overflow: visible;
    opacity: .52;
    pointer-events: none;
    translate: var(--pc-pointer-x) calc(var(--pc-pointer-y) + var(--pc-scroll-y));
    transition: translate .7s var(--pc-ease), opacity .5s ease;
}

.pc-motion-ready .pc-signature {
    animation: pcSignatureEnter 1.25s .14s var(--pc-ease) both;
}

@keyframes pcSignatureEnter {
    0% { opacity: 0; filter: blur(12px); clip-path: circle(2% at 50% 50%); }
    100% { opacity: var(--pc-signature-opacity, .52); filter: none; clip-path: circle(72% at 50% 50%); }
}

.pc-sig-label {
    position: absolute;
    top: 7%;
    left: 50%;
    color: color-mix(in srgb, var(--gold, #C8922E) 74%, transparent);
    font-family: Cinzel, serif;
    font-size: 8px;
    font-weight: 600;
    letter-spacing: .24em;
    text-transform: uppercase;
    white-space: nowrap;
    transform: translateX(-50%);
}

.pc-sig-ring {
    position: absolute;
    border: 1px solid color-mix(in srgb, var(--gold, #C8922E) 28%, transparent);
    border-radius: 50%;
    box-shadow: 0 0 9px color-mix(in srgb, var(--gold, #C8922E) 12%, transparent);
}

.pc-sig-ring-a {
    inset: 9%;
    border-style: dashed;
    animation: pcOrbit 24s linear infinite;
}

.pc-sig-ring-b {
    inset: 25%;
    border-color: color-mix(in srgb, var(--gold, #C8922E) 42%, transparent);
    animation: pcOrbitReverse 17s linear infinite;
}

.pc-sig-ring-a::before,
.pc-sig-ring-a::after,
.pc-sig-ring-b::before {
    content: "";
    position: absolute;
    top: 50%;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--gold, #C8922E);
    box-shadow: 0 0 20px color-mix(in srgb, var(--gold, #C8922E) 76%, transparent);
}

.pc-sig-ring-a::before { left: -4px; }
.pc-sig-ring-a::after { right: -4px; }
.pc-sig-ring-b::before { top: -4px; left: 50%; }

.pc-sig-cross {
    position: absolute;
    top: 50%;
    left: 4%;
    width: 92%;
    height: 1px;
    background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--gold, #C8922E) 22%, transparent), transparent);
}

.pc-sig-cross-y { transform: rotate(90deg); }

.pc-sig-core {
    position: absolute;
    top: 50%;
    left: 50%;
    display: grid;
    width: 92px;
    height: 92px;
    place-items: center;
    border: 1px solid color-mix(in srgb, var(--gold, #C8922E) 48%, transparent);
    border-radius: 50%;
    color: var(--gold, #C8922E);
    background: color-mix(in srgb, var(--bg, #EDE3C7) 74%, transparent);
    box-shadow: 0 0 52px color-mix(in srgb, var(--gold, #C8922E) 17%, transparent);
    transform: translate(-50%, -50%);
}

.pc-sig-core b {
    position: relative;
    z-index: 2;
    max-width: 78px;
    overflow: hidden;
    font-family: Cinzel, serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .12em;
    text-overflow: clip;
    white-space: nowrap;
}

.pc-sig-core i {
    position: absolute;
    inset: 12px;
    border: 1px dashed color-mix(in srgb, var(--gold, #C8922E) 35%, transparent);
    border-radius: inherit;
    animation: pcOrbit 12s linear infinite;
}

.pc-sig-path {
    position: absolute;
    inset: 12% 0 auto;
    display: none;
    width: 100%;
    height: 68%;
    overflow: visible;
    fill: none;
    stroke: var(--gold, #C8922E);
    stroke-width: 1.4;
    vector-effect: non-scaling-stroke;
}

.pc-sig-path path {
    stroke-dasharray: 760;
    stroke-dashoffset: 760;
    animation: pcPathDraw 1.9s .42s var(--pc-ease) forwards;
}

.pc-sig-path .pc-sig-path-ghost {
    opacity: .24;
    stroke-dasharray: 3 9;
    stroke-dashoffset: 0;
    animation: pcDashTravel 14s linear infinite;
}

.pc-sig-particle {
    position: absolute;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--gold, #C8922E);
    box-shadow: 0 0 18px color-mix(in srgb, var(--gold, #C8922E) 72%, transparent);
}

.pc-sig-particle-a { top: 19%; left: 27%; }
.pc-sig-particle-b { right: 16%; bottom: 29%; width: 4px; height: 4px; }
.pc-sig-particle-c { bottom: 13%; left: 44%; width: 5px; height: 5px; }

@keyframes pcOrbit { to { transform: rotate(360deg); } }
@keyframes pcOrbitReverse { to { transform: rotate(-360deg); } }
@keyframes pcPathDraw { to { stroke-dashoffset: 0; } }
@keyframes pcDashTravel { to { stroke-dashoffset: -240; } }

/* ------------------------------------------------------- page signatures */

/* About: a slow philosophical astrolabe behind the hero plate. */
body[data-page-cinema="about"] .pc-signature {
    --pc-signature-opacity: .58;
    top: 18px;
    right: max(-24px, calc((100vw - 1420px) / 2));
    width: 430px;
    height: 430px;
    opacity: .58;
}

body[data-page-cinema="about"] .pc-sig-ring-a {
    border-width: 1px;
    background: repeating-radial-gradient(circle, transparent 0 35px, color-mix(in srgb, var(--gold, #C8922E) 7%, transparent) 36px 37px);
    animation-duration: 18s;
}

body[data-page-cinema="about"] .pc-sig-ring-b { animation-duration: 11s; }

body[data-page-cinema="about"] .pc-sig-core {
    width: 110px;
    height: 110px;
    background: radial-gradient(circle, rgba(244, 198, 84, .42), rgba(200, 146, 46, .08) 52%, transparent 72%);
    box-shadow:
        0 0 34px rgba(224, 169, 58, .35),
        0 0 92px rgba(200, 146, 46, .22);
    animation: pcAboutSun 4.6s ease-in-out infinite;
}

body[data-page-cinema="about"] .pc-sig-particle-a { animation: pcAboutPlanetA 8s ease-in-out infinite alternate; }
body[data-page-cinema="about"] .pc-sig-particle-b { animation: pcAboutPlanetB 6.4s ease-in-out infinite alternate; }

@keyframes pcAboutSun {
    0%, 100% { filter: brightness(.92); scale: .94; }
    50% { filter: brightness(1.18); scale: 1.07; }
}

@keyframes pcAboutPlanetA { to { translate: 34px -22px; scale: 1.45; } }
@keyframes pcAboutPlanetB { to { translate: -28px 25px; scale: .72; } }

/* Contact: a beacon opens and closes like a live transmission channel. */
body[data-page-cinema="contact"] .pc-signature {
    z-index: 3;
    top: 150px;
    right: auto;
    left: calc(50% - 170px);
    opacity: .34;
}

body[data-page-cinema="contact"] .pc-sig-ring-a,
body[data-page-cinema="contact"] .pc-sig-ring-b {
    animation: pcBeacon 3.1s ease-out infinite;
}

body[data-page-cinema="contact"] .pc-sig-ring-b { animation-delay: 1.05s; }
body[data-page-cinema="contact"] .pc-sig-core {
    width: 78px;
    height: 78px;
    background: color-mix(in srgb, var(--bg, #EDE3C7) 84%, transparent);
}
body[data-page-cinema="contact"] .pc-sig-core b { font-size: 22px; }

body[data-page-cinema="contact"] .pc-sig-particle-a {
    top: 50%;
    left: 50%;
    width: 9px;
    height: 9px;
    offset-path: path("M 0 0 C 28 88 152 212 274 386");
    offset-distance: 0%;
    offset-rotate: 0deg;
    animation: pcContactDispatch 4.8s 1.1s var(--pc-ease) infinite;
}

body[data-page-cinema="contact"] .pc-sig-particle-a::after {
    content: "";
    position: absolute;
    inset: -7px;
    border: 1px solid color-mix(in srgb, var(--gold, #C8922E) 46%, transparent);
    border-radius: 50%;
}

body[data-page-cinema="contact"] .pc-sig-particle-b {
    animation: pcContactEcho 2.8s .6s ease-in-out infinite;
}

body[data-page-cinema="contact"] .contact-cinema-grid {
    position: relative;
    isolation: isolate;
}

body[data-page-cinema="contact"] .contact-cinema-form {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

body[data-page-cinema="contact"] .contact-cinema-form::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 20px -22% 20px -10%;
    opacity: 0;
    pointer-events: none;
    background: linear-gradient(
        108deg,
        transparent 38%,
        color-mix(in srgb, var(--gold, #C8922E) 7%, transparent) 46%,
        color-mix(in srgb, var(--goldb, #E0A93A) 34%, transparent) 50%,
        color-mix(in srgb, var(--gold, #C8922E) 7%, transparent) 54%,
        transparent 62%
    );
    transform: translate3d(-105%, 0, 0);
}

body[data-page-cinema="contact"] .contact-cinema-form::after {
    content: "";
    position: absolute;
    z-index: 2;
    top: 52px;
    left: 0;
    width: 7px;
    height: 7px;
    opacity: 0;
    border-radius: 50%;
    background: var(--goldb, #E0A93A);
    box-shadow: 0 0 22px 7px color-mix(in srgb, var(--gold, #C8922E) 28%, transparent);
    pointer-events: none;
}

body[data-page-cinema="contact"] .contact-cinema-form.pc-contact-active::before {
    animation: pcContactReceive 1.5s .18s var(--pc-ease) both;
}

body[data-page-cinema="contact"] .contact-cinema-form.pc-contact-active::after {
    animation: pcContactArrival 1.05s .42s var(--pc-ease) both;
}

@keyframes pcContactDispatch {
    0%, 16% { opacity: 0; offset-distance: 0%; scale: .45; }
    24% { opacity: 1; scale: 1; }
    78% { opacity: .92; }
    100% { opacity: 0; offset-distance: 100%; scale: .7; }
}

@keyframes pcContactEcho {
    0%, 100% { opacity: .2; scale: .7; }
    50% { opacity: 1; scale: 1.35; }
}

@keyframes pcContactReceive {
    0% { opacity: 0; transform: translate3d(-105%, 0, 0); }
    28% { opacity: .72; }
    100% { opacity: 0; transform: translate3d(105%, 0, 0); }
}

@keyframes pcContactArrival {
    0% { opacity: 0; transform: translate3d(-28px, -28px, 0) scale(.4); }
    45% { opacity: 1; transform: translate3d(0, 0, 0) scale(1.2); }
    100% { opacity: .62; transform: translate3d(0, 0, 0) scale(1); }
}

@keyframes pcBeacon {
    0% { opacity: .8; transform: scale(.72); }
    76%, 100% { opacity: 0; transform: scale(1.14); }
}

/* Writing archive: one gold thesis line writes itself across the masthead. */
body[data-page-cinema="blog-index"] .pc-signature {
    --pc-signature-opacity: .72;
    top: 92px;
    right: max(12px, calc((100vw - 1280px) / 2));
    width: min(58vw, 650px);
    height: 290px;
    opacity: .72;
}

body[data-page-cinema="blog-index"] .pc-sig-ring,
body[data-page-cinema="blog-index"] .pc-sig-cross { display: none; }
body[data-page-cinema="blog-index"] .pc-sig-path { display: block; }
body[data-page-cinema="blog-index"] .pc-sig-core { top: 33%; left: 80%; width: 70px; height: 70px; }
body[data-page-cinema="blog-index"] .pc-sig-label { top: 4%; left: 80%; }
body[data-page-cinema="blog-index"] .pc-sig-particle-a {
    top: 73%;
    left: 1%;
    offset-path: path("M 0 0 C 98 -166 174 36 270 -98 S 444 -172 592 -134");
    offset-distance: 0%;
    offset-rotate: 0deg;
    animation: pcInkTravel 5.2s 1.15s var(--pc-ease) infinite;
}
body[data-page-cinema="blog-index"] .pc-sig-particle-b,
body[data-page-cinema="blog-index"] .pc-sig-particle-c { display: none; }

@keyframes pcInkTravel {
    0%, 12% { opacity: 0; offset-distance: 0%; scale: .45; }
    20% { opacity: 1; scale: 1.35; }
    82% { opacity: 1; }
    100% { opacity: 0; offset-distance: 100%; scale: .55; }
}

/* Essay detail: the reading aperture fills with actual page progress. */
body[data-page-cinema="blog-detail"] .pc-signature {
    --pc-signature-opacity: .58;
    position: fixed;
    top: 96px;
    right: 24px;
    width: 220px;
    height: 220px;
    opacity: .58;
}

body[data-page-cinema="blog-detail"] .pc-sig-cross,
body[data-page-cinema="blog-detail"] .pc-sig-ring-b,
body[data-page-cinema="blog-detail"] .pc-sig-particle { display: none; }
body[data-page-cinema="blog-detail"] .pc-sig-ring-a {
    inset: 3%;
    border: 0;
    background: conic-gradient(var(--gold, #C8922E) var(--pc-page-deg), color-mix(in srgb, var(--gold, #C8922E) 12%, transparent) 0);
    animation: none;
    mask: radial-gradient(circle, transparent 67%, #000 68% 72%, transparent 73%);
}
body[data-page-cinema="blog-detail"] .pc-sig-ring-a::before,
body[data-page-cinema="blog-detail"] .pc-sig-ring-a::after { display: none; }
body[data-page-cinema="blog-detail"] .pc-sig-core {
    width: 82px;
    height: 82px;
    animation: pcReadingBreath 3.4s ease-in-out infinite;
}
body[data-page-cinema="blog-detail"] .pc-sig-label { top: -8%; }

@keyframes pcReadingBreath {
    0%, 100% { scale: .96; box-shadow: 0 0 28px color-mix(in srgb, var(--gold, #C8922E) 12%, transparent); }
    50% { scale: 1.05; box-shadow: 0 0 68px color-mix(in srgb, var(--gold, #C8922E) 31%, transparent); }
}

/* References: a constellation for the index, a restrained seal for details. */
body[data-page-cinema="references-index"] .pc-signature {
    --pc-signature-opacity: .64;
    right: max(-40px, calc((100vw - 1320px) / 2));
    width: 500px;
    height: 500px;
    opacity: .64;
}

body[data-page-cinema="references-index"] .pc-sig-ring-a { animation-duration: 17s; }
body[data-page-cinema="references-index"] .pc-sig-ring-b { animation-duration: 10s; }
body[data-page-cinema="references-index"] .pc-sig-particle-a { animation: pcConstellationA 5.2s ease-in-out infinite alternate; }
body[data-page-cinema="references-index"] .pc-sig-particle-b { animation: pcConstellationB 6.1s ease-in-out infinite alternate; }
body[data-page-cinema="references-index"] .pc-sig-particle-c { animation: pcConstellationA 4.5s 1s ease-in-out infinite alternate-reverse; }

@keyframes pcConstellationA { to { translate: 24px -17px; opacity: .35; } }
@keyframes pcConstellationB { to { translate: -28px 21px; opacity: .45; } }

body[data-page-cinema="references-detail"] .pc-sig-ring,
body[data-page-cinema="references-detail"] .pc-sig-core {
    border-radius: 3px;
    transform: rotate(45deg);
}

body[data-page-cinema="references-detail"] .pc-sig-ring-a { animation: pcSealTurn 22s linear infinite; }
body[data-page-cinema="references-detail"] .pc-sig-ring-b { animation: pcSealTurnReverse 16s linear infinite; }
body[data-page-cinema="references-detail"] .pc-sig-core {
    transform: translate(-50%, -50%) rotate(45deg);
    animation: pcSealBreathe 3.8s ease-in-out infinite;
}
body[data-page-cinema="references-detail"] .pc-sig-core b { transform: rotate(-45deg); }
body[data-page-cinema="references-detail"] .pc-sig-core i { border-radius: 3px; }

@keyframes pcSealTurn { to { transform: rotate(405deg); } }
@keyframes pcSealTurnReverse { to { transform: rotate(-315deg); } }
@keyframes pcSealBreathe {
    0%, 100% { box-shadow: 0 0 24px color-mix(in srgb, var(--gold, #C8922E) 14%, transparent); }
    50% { box-shadow: 0 0 74px color-mix(in srgb, var(--gold, #C8922E) 36%, transparent); }
}

/* Lab landing: a reactor with three rising bubbles. */
body[data-page-cinema="lab-index"] .pc-signature {
    --pc-signature-opacity: .64;
    top: 116px;
    right: max(-30px, calc((100vw - 1330px) / 2));
    width: 510px;
    height: 510px;
    opacity: .64;
}

body[data-page-cinema="lab-index"] .pc-sig-particle {
    top: auto;
    bottom: 24%;
    animation: pcBubbleRise 3s ease-in infinite;
}
body[data-page-cinema="lab-index"] .pc-sig-particle-a { left: 42%; }
body[data-page-cinema="lab-index"] .pc-sig-particle-b { left: 53%; animation-delay: .8s; }
body[data-page-cinema="lab-index"] .pc-sig-particle-c { left: 61%; animation-delay: 1.6s; }

@keyframes pcBubbleRise {
    0% { opacity: 0; translate: 0 32px; scale: .5; }
    24% { opacity: .9; }
    100% { opacity: 0; translate: 7px -150px; scale: 1.25; }
}

/* Table-style market tools: a single scan crosses the data field. */
body[data-page-cinema^="lab-market"] .pc-signature {
    top: 154px;
    right: max(24px, calc((100vw - 1180px) / 2));
    width: min(48vw, 560px);
    height: 230px;
    overflow: hidden;
    opacity: .27;
    border: 1px solid color-mix(in srgb, var(--gold, #C8922E) 24%, transparent);
    background:
        linear-gradient(color-mix(in srgb, var(--gold, #C8922E) 8%, transparent) 1px, transparent 1px),
        linear-gradient(90deg, color-mix(in srgb, var(--gold, #C8922E) 8%, transparent) 1px, transparent 1px);
    background-size: 42px 42px;
}

body[data-page-cinema^="lab-market"] .pc-signature::after {
    content: "";
    position: absolute;
    top: -15%;
    bottom: -15%;
    width: 20%;
    background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--gold, #C8922E) 36%, transparent), transparent);
    animation: pcMarketScan 3.6s .5s ease-in-out infinite;
}

body[data-page-cinema^="lab-market"] .pc-sig-ring,
body[data-page-cinema^="lab-market"] .pc-sig-cross,
body[data-page-cinema^="lab-market"] .pc-sig-particle,
body[data-page-cinema^="lab-market"] .pc-sig-path { display: none; }
body[data-page-cinema^="lab-market"] .pc-sig-core { top: 50%; left: 80%; width: 78px; height: 78px; }
body[data-page-cinema^="lab-market"] .pc-sig-label { top: 9%; left: 80%; }

@keyframes pcMarketScan { 0%, 12% { left: -24%; } 68%, 100% { left: 108%; } }

/* Heatmap: a field of three cells breathes from cold to hot. */
body[data-page-cinema="lab-heatmap"] .pc-signature {
    top: 145px;
    right: max(24px, calc((100vw - 1200px) / 2));
    width: 430px;
    height: 280px;
    opacity: .34;
    background:
        linear-gradient(90deg, color-mix(in srgb, #b94b3c 22%, transparent) 49.5%, transparent 49.5% 50.5%, color-mix(in srgb, #3f8b5c 24%, transparent) 50.5%),
        linear-gradient(color-mix(in srgb, var(--gold, #C8922E) 16%, transparent) 49.5%, transparent 49.5% 50.5%, color-mix(in srgb, #3f8b5c 18%, transparent) 50.5%);
}
body[data-page-cinema="lab-heatmap"] .pc-sig-ring,
body[data-page-cinema="lab-heatmap"] .pc-sig-cross,
body[data-page-cinema="lab-heatmap"] .pc-sig-path { display: none; }
body[data-page-cinema="lab-heatmap"] .pc-sig-core { width: 80px; height: 80px; animation: pcHeatPulse 3.2s ease-in-out infinite; }
body[data-page-cinema="lab-heatmap"] .pc-sig-particle { border-radius: 1px; animation: pcHeatPulse 2.6s ease-in-out infinite alternate; }

@keyframes pcHeatPulse { 50% { opacity: .5; filter: hue-rotate(24deg); scale: 1.08; } }

/* BTC dominance: the signature is a chart line drawing once. */
body[data-page-cinema="lab-dominance"] .pc-signature,
body[data-page-cinema="lab-wallet"] .pc-signature {
    top: 140px;
    right: max(20px, calc((100vw - 1240px) / 2));
    width: min(50vw, 590px);
    height: 280px;
}
body[data-page-cinema="lab-dominance"] .pc-sig-ring,
body[data-page-cinema="lab-dominance"] .pc-sig-cross,
body[data-page-cinema="lab-wallet"] .pc-sig-ring,
body[data-page-cinema="lab-wallet"] .pc-sig-cross { display: none; }
body[data-page-cinema="lab-dominance"] .pc-sig-path,
body[data-page-cinema="lab-wallet"] .pc-sig-path { display: block; }
body[data-page-cinema="lab-dominance"] .pc-sig-core,
body[data-page-cinema="lab-wallet"] .pc-sig-core { top: 34%; left: 78%; width: 76px; height: 76px; }
body[data-page-cinema="lab-dominance"] .pc-sig-label,
body[data-page-cinema="lab-wallet"] .pc-sig-label { top: 2%; left: 78%; }

/* Sentiment: a measured needle swings once and settles. */
body[data-page-cinema="lab-sentiment"] .pc-sig-ring-a {
    border-width: 8px;
    border-color: #a64a39 #c8922e #63845b #63845b;
    animation: none;
    opacity: .34;
}
body[data-page-cinema="lab-sentiment"] .pc-sig-core i {
    inset: auto auto 50% 50%;
    width: 2px;
    height: 72px;
    border: 0;
    border-radius: 2px;
    background: var(--gold, #C8922E);
    transform-origin: bottom center;
    animation: pcNeedleSettle 1.8s .35s var(--pc-ease) both;
}

@keyframes pcNeedleSettle {
    0% { transform: translateX(-50%) rotate(-112deg); }
    64% { transform: translateX(-50%) rotate(24deg); }
    82% { transform: translateX(-50%) rotate(8deg); }
    100% { transform: translateX(-50%) rotate(14deg); }
}

/* Funding: three capital particles drop into the central ledger. */
body[data-page-cinema="lab-funding"] .pc-sig-particle {
    top: 8%;
    bottom: auto;
    border-radius: 50%;
    animation: pcCapitalDrop 3.2s ease-in infinite;
}
body[data-page-cinema="lab-funding"] .pc-sig-particle-a { left: 34%; }
body[data-page-cinema="lab-funding"] .pc-sig-particle-b { left: 49%; animation-delay: .8s; }
body[data-page-cinema="lab-funding"] .pc-sig-particle-c { left: 64%; animation-delay: 1.6s; }

@keyframes pcCapitalDrop {
    0% { opacity: 0; translate: 0 -15px; }
    24% { opacity: 1; }
    80%, 100% { opacity: 0; translate: 0 168px; }
}

/* Character counter: a calibrated 280-character dial. */
body[data-page-cinema="lab-counter"] .pc-sig-ring-a {
    border-width: 6px;
    border-style: dotted;
    animation-duration: 36s;
}
body[data-page-cinema="lab-counter"] .pc-sig-core {
    width: 118px;
    height: 118px;
}
body[data-page-cinema="lab-counter"] .pc-sig-core b { font-size: 25px; letter-spacing: .04em; }

/* Batch creator: nested square ledgers split from one source. */
body[data-page-cinema="lab-batch"] .pc-sig-ring,
body[data-page-cinema="lab-batch"] .pc-sig-core {
    border-radius: 2px;
}
body[data-page-cinema="lab-batch"] .pc-sig-ring-a { animation: pcBatchSplitA 3.4s ease-in-out infinite; }
body[data-page-cinema="lab-batch"] .pc-sig-ring-b { animation: pcBatchSplitB 3.4s ease-in-out infinite; }

@keyframes pcBatchSplitA { 50% { transform: translate(-18px, -12px) scale(.94); } }
@keyframes pcBatchSplitB { 50% { transform: translate(20px, 15px) scale(1.04); } }

/* Links: one centered halo sits behind the identity portrait. */
body[data-page-cinema="links"] .pc-signature {
    --pc-signature-opacity: .48;
    top: 70px;
    right: auto;
    left: 50%;
    width: 430px;
    height: 430px;
    margin-left: -215px;
    opacity: .48;
}
body[data-page-cinema="links"] .pc-sig-ring-a { animation: pcPortraitHaloA 10s ease-in-out infinite; }
body[data-page-cinema="links"] .pc-sig-ring-b { animation: pcPortraitHaloB 7s ease-in-out infinite; }
body[data-page-cinema="links"] .pc-sig-core {
    width: 104px;
    height: 104px;
    animation: pcPortraitCore 4s ease-in-out infinite;
}

@keyframes pcPortraitHaloA {
    0%, 100% { transform: rotate(0) scale(.92); opacity: .5; }
    50% { transform: rotate(180deg) scale(1.04); opacity: 1; }
}
@keyframes pcPortraitHaloB {
    0%, 100% { transform: rotate(0) scale(1.05); }
    50% { transform: rotate(-180deg) scale(.88); }
}
@keyframes pcPortraitCore { 50% { box-shadow: 0 0 82px rgba(200, 146, 46, .34); } }

/* Authentication: a keyhole breathes behind the restricted ledger. */
body[data-page-cinema^="auth-"] .pc-signature {
    --pc-signature-opacity: .34;
    position: fixed;
    top: 50%;
    right: auto;
    left: 50%;
    width: 390px;
    height: 390px;
    margin-top: -195px;
    margin-left: -195px;
    opacity: .34;
}
body[data-page-cinema^="auth-"] .pc-sig-cross { display: none; }
body[data-page-cinema^="auth-"] .pc-sig-core {
    border-radius: 50% 50% 46% 46%;
    animation: pcKeyPulse 2.8s ease-in-out infinite;
}
body[data-page-cinema^="auth-"] .pc-sig-core::after {
    content: "";
    position: absolute;
    bottom: -38px;
    left: 50%;
    width: 23px;
    height: 56px;
    background: color-mix(in srgb, var(--gold, #C8922E) 46%, transparent);
    clip-path: polygon(40% 0, 60% 0, 100% 100%, 0 100%);
    transform: translateX(-50%);
}

@keyframes pcKeyPulse { 50% { box-shadow: 0 0 72px color-mix(in srgb, var(--gold, #C8922E) 34%, transparent); scale: 1.035; } }

/* Lost page: the 404 drifts just off its broken orbit. */
body[data-page-cinema="not-found"] .pc-signature {
    position: fixed;
    top: 50%;
    right: 8%;
    margin-top: -215px;
    opacity: .3;
    animation: pcLostDrift 7s ease-in-out infinite alternate;
}
body[data-page-cinema="not-found"] .pc-sig-ring-a { border-right-color: transparent; }
body[data-page-cinema="not-found"] .pc-sig-core b { font-size: 20px; }

@keyframes pcLostDrift { to { translate: 24px -17px; rotate: 5deg; } }

/* Error page: a broken transmission tries once to re-form its signal. */
body[data-page-cinema="error"] .pc-signature {
    position: fixed;
    top: 50%;
    right: 8%;
    margin-top: -215px;
    opacity: .28;
}
body[data-page-cinema="error"] .pc-sig-ring-a {
    border-style: solid;
    border-top-color: transparent;
    border-bottom-color: transparent;
    animation: pcSignalRecover 3.8s var(--pc-ease) infinite;
}
body[data-page-cinema="error"] .pc-sig-ring-b {
    border-left-color: transparent;
    border-right-color: transparent;
    animation: pcSignalRecover 3.8s .18s var(--pc-ease) infinite reverse;
}
body[data-page-cinema="error"] .pc-sig-core b { font-size: 15px; }

@keyframes pcSignalRecover {
    0%, 14% { opacity: .12; rotate: -24deg; scale: .9; }
    42%, 72% { opacity: 1; rotate: 0deg; scale: 1; }
    100% { opacity: .12; rotate: 24deg; scale: .9; }
}

/* Shared draft: a restrained X transmission stamp. */
body[data-page-cinema^="draft-"] .pc-signature {
    --pc-signature-opacity: .38;
    top: 112px;
    right: 50%;
    width: 330px;
    height: 330px;
    margin-right: -165px;
    opacity: .38;
}
body[data-page-cinema^="draft-"] .pc-sig-ring,
body[data-page-cinema^="draft-"] .pc-sig-core { border-radius: 22%; }
body[data-page-cinema="draft-posted"] .pc-sig-core { animation: pcStamp 1s .3s var(--pc-ease) both; }

@keyframes pcStamp {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(1.45) rotate(-8deg); }
    100% { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(0); }
}

/* ------------------------------------------------------------- responsive */

@media (max-width: 900px) {
    body[data-page-cinema] .pc-signature {
        --pc-signature-opacity: .34;
        right: -95px;
        width: 360px;
        height: 360px;
        opacity: .34;
    }

    body[data-page-cinema="blog-detail"] .pc-signature {
        --pc-signature-opacity: .34;
        top: 96px;
        right: 12px;
        width: 120px;
        height: 120px;
    }

    body[data-page-cinema="blog-index"] .pc-signature,
    body[data-page-cinema="lab-dominance"] .pc-signature,
    body[data-page-cinema="lab-wallet"] .pc-signature {
        right: -40px;
        width: 72vw;
    }
}

@media (max-width: 680px) {
    .pc-page-root > [style*="position: fixed"][style*="mix-blend-mode: multiply"] {
        display: none;
    }

    body[data-page-cinema] .sc-host nav[style*="position:"][style*="sticky"],
    body[data-page-cinema] .lab-nav {
        background: color-mix(in srgb, var(--bg, #EDE3C7) 96%, transparent) !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }

    body[data-page-cinema] .pc-signature {
        --pc-signature-opacity: .28;
        top: 84px;
        right: -105px;
        width: 300px;
        height: 300px;
        opacity: .28;
        translate: none;
    }

    .pc-sig-label { font-size: 7px; }
    .pc-sig-core { width: 68px; height: 68px; }
    .pc-sig-core i { inset: 9px; }

    .pc-motion-ready .pc-page-hero {
        animation-duration: .82s !important;
    }

    .pc-motion-ready .pc-page-hero > .pc-hero-piece {
        animation-duration: .62s;
    }

    .pc-motion-ready .pc-reveal {
        filter: none;
        transform: translate3d(0, 17px, 0);
    }

    body[data-page-cinema="about"] .pc-signature,
    body[data-page-cinema="references-index"] .pc-signature,
    body[data-page-cinema="lab-index"] .pc-signature {
        top: 72px;
        right: -125px;
        width: 330px;
        height: 330px;
    }

    body[data-page-cinema="about"] .pc-signature {
        --pc-signature-opacity: .38;
        top: 76px;
        right: -92px;
        opacity: .38;
    }

    body[data-page-cinema="blog-index"] .pc-signature,
    body[data-page-cinema="lab-dominance"] .pc-signature,
    body[data-page-cinema="lab-wallet"] .pc-signature {
        top: 112px;
        right: -34%;
        width: 115vw;
        height: 220px;
    }

    body[data-page-cinema="blog-detail"] .pc-signature {
        --pc-signature-opacity: .28;
        position: absolute;
        top: 92px;
        right: -42px;
        width: 150px;
        height: 150px;
        opacity: .25;
    }

    body[data-page-cinema="blog-detail"] .pc-sig-core {
        width: 64px;
        height: 64px;
    }

    body[data-page-cinema="contact"] .pc-sig-particle-a {
        offset-path: path("M 0 0 C 12 62 72 126 132 214");
    }

    body[data-page-cinema="contact"] .pc-signature {
        top: 92px;
        right: auto;
        left: calc(50% - 150px);
    }

    body[data-page-cinema="contact"] .contact-cinema-form {
        overflow: clip;
    }

    body[data-page-cinema^="lab-market"] .pc-signature,
    body[data-page-cinema="lab-heatmap"] .pc-signature {
        top: 132px;
        right: -36%;
        width: 100vw;
        height: 190px;
        opacity: .18;
    }

    body[data-page-cinema^="auth-"] .pc-signature {
        top: 50%;
        width: 280px;
        height: 280px;
        margin-top: -140px;
        margin-left: -140px;
        opacity: .14;
    }

    body[data-page-cinema="not-found"] .pc-signature {
        top: 50%;
        right: auto;
        left: 50%;
        width: 300px;
        height: 300px;
        margin-left: -150px;
        margin-top: -150px;
    }

    body[data-page-cinema="error"] .pc-signature {
        top: 50%;
        right: auto;
        left: 50%;
        width: 300px;
        height: 300px;
        margin-left: -150px;
        margin-top: -150px;
    }

    body[data-page-cinema^="draft-"] .pc-signature {
        right: auto;
        left: 50%;
        margin-right: 0;
        margin-left: -150px;
    }

    body[data-page-cinema] .ck-quote-footer::after {
        top: 38px;
        font-size: 28vw;
        letter-spacing: .02em;
    }
}

/* Motion is enhancement; every page stays complete without it. */
@media (prefers-reduced-motion: reduce) {
    .pc-page-progress { display: none; }

    .pc-signature,
    .pc-signature *,
    .pc-page-hero,
    .pc-page-hero > .pc-hero-piece,
    .pc-reveal,
    .pc-interactive,
    .pc-page-hero img {
        opacity: 1;
        filter: none;
        clip-path: none;
        translate: none;
        scale: 1;
        rotate: 0deg;
        animation: none !important;
        transition: none !important;
    }

    body[data-page-cinema="contact"] .contact-cinema-form::before,
    body[data-page-cinema="contact"] .contact-cinema-form::after {
        display: none;
    }

    .pc-signature { opacity: .2; }
    .pc-sig-core { transform: translate(-50%, -50%); }
    .pc-sig-label { transform: translateX(-50%); }
    .pc-sig-path path { stroke-dashoffset: 0; }
}
