/* =====================================================
   thesecond.day &mdash; sepia-drenched art-deco time capsule
   broken-grid, expressive-variable, gradient-mesh, dreamy
   ===================================================== */

:root {
    /* Palette from DESIGN.md */
    --c-umber:   #1A1209;   /* Deep Umber Ground */
    --c-gold:    #C9A84C;   /* Aged Gold */
    --c-mist:    #E8D5B7;   /* Sepia Mist */
    --c-amber:   #D4A862;   /* Amber Glow */
    --c-shadow:  #2A1F14;   /* Warm Shadow */
    --c-wheat:   #D8C8B0;   /* Faded Wheat */
    --c-rose:    #8B5E4B;   /* Oxidized Rose */
    --c-teal:    #3A6B6B;   /* Gradient Mesh Teal */
    --c-violet:  #5E3A6B;   /* Gradient Mesh Violet */
    --c-white:   #F5EDE0;   /* Spectral White */
    --c-brown:   #5C4A3A;   /* Warm body brown */

    /* Anybody variable axes (driven by JS for scroll velocity) */
    --any-wdth: 100;
    --any-wght: 500;

    /* Page tone */
    --page-bg: var(--c-umber);
    --page-fg: var(--c-wheat);
}

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

html, body {
    background: var(--page-bg);
    color: var(--page-fg);
    font-family: "Libre Baskerville", Georgia, serif;
    font-size: 16px;
    line-height: 1.75;
    letter-spacing: 0.015em;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    position: relative;
}

/* ========== FILM GRAIN OVERLAY ========== */
.film-grain {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: overlay;
    opacity: 0.08;
    transition: opacity 1.6s ease;
}
.film-grain svg {
    width: 100%;
    height: 100%;
    display: block;
}
.grain-vignette {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center,
        rgba(0,0,0,0) 50%,
        rgba(0,0,0,0.45) 100%);
    pointer-events: none;
    mix-blend-mode: multiply;
}

/* ========== GRADIENT MESH STAGE ========== */
.mesh-stage {
    position: fixed;
    inset: -10vh -10vw;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}
.mesh {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    mix-blend-mode: screen;
    opacity: 0.55;
    will-change: transform;
}
.mesh-amber {
    width: 60vw;
    height: 60vw;
    top: 5vh;
    left: -10vw;
    background: radial-gradient(circle at 40% 40%,
        rgba(212, 168, 98, 0.55) 0%,
        rgba(201, 168, 76, 0.35) 30%,
        rgba(139, 94, 75, 0.15) 60%,
        rgba(0,0,0,0) 80%);
    animation: drift-a 38s ease-in-out infinite alternate;
}
.mesh-cool {
    width: 50vw;
    height: 50vw;
    top: 50vh;
    right: -8vw;
    background: radial-gradient(circle at 50% 50%,
        rgba(58, 107, 107, 0.55) 0%,
        rgba(58, 107, 107, 0.30) 35%,
        rgba(0,0,0,0) 75%);
    animation: drift-b 44s ease-in-out infinite alternate;
}
.mesh-violet {
    width: 55vw;
    height: 55vw;
    bottom: -10vh;
    left: 25vw;
    background: radial-gradient(circle at 50% 50%,
        rgba(94, 58, 107, 0.50) 0%,
        rgba(94, 58, 107, 0.25) 40%,
        rgba(0,0,0,0) 80%);
    animation: drift-c 52s ease-in-out infinite alternate;
}

@keyframes drift-a {
    0%   { transform: translate(0,0) scale(1); }
    50%  { transform: translate(8vw, 6vh) scale(1.1); }
    100% { transform: translate(-4vw, 12vh) scale(0.95); }
}
@keyframes drift-b {
    0%   { transform: translate(0,0) scale(1); }
    50%  { transform: translate(-10vw, -8vh) scale(1.15); }
    100% { transform: translate(6vw, 4vh) scale(0.9); }
}
@keyframes drift-c {
    0%   { transform: translate(0,0) scale(1); }
    50%  { transform: translate(8vw, -6vh) scale(0.95); }
    100% { transform: translate(-6vw, 8vh) scale(1.1); }
}

/* ========== MAIN ========== */
main#page {
    position: relative;
    z-index: 1;
}

/* ========== SECTION BASE ========== */
.section {
    position: relative;
    min-height: 100vh;
    width: 100%;
    padding: 14vh 6vw;
    display: grid;
    grid-template-columns: repeat(16, 1fr);
    grid-auto-rows: min-content;
    gap: 0;
}

/* ========== TYPOGRAPHY HELPERS ========== */
.section-label,
.gold-eyebrow {
    font-family: "Anybody", "Inter", sans-serif;
    font-variation-settings: "wdth" var(--any-wdth, 100), "wght" 600;
    font-size: clamp(0.75rem, 1vw, 0.95rem);
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--c-amber);
    text-shadow: 0 0 30px rgba(212, 168, 98, 0.25);
}

h2, h3, h4 {
    font-family: "Playfair Display", "Lora", Georgia, serif;
    font-weight: 500;
    line-height: 1.05;
    letter-spacing: 0.04em;
    color: var(--c-gold);
}

p { color: var(--c-wheat); }
em { color: var(--c-amber); font-style: italic; }

/* ===================== OPENING ===================== */
.opening {
    grid-column: 1 / -1;
    place-items: center;
    align-content: center;
    justify-items: center;
    text-align: center;
    padding-top: 22vh;
    padding-bottom: 12vh;
    position: relative;
}

.opening-line {
    grid-column: 1 / -1;
    width: 1px;
    height: 0;
    background: linear-gradient(to bottom,
        rgba(201, 168, 76, 0) 0%,
        rgba(201, 168, 76, 0.85) 30%,
        rgba(201, 168, 76, 0.85) 70%,
        rgba(201, 168, 76, 0) 100%);
    margin: 0 auto 4vh;
    box-shadow: 0 0 16px rgba(201, 168, 76, 0.5);
    animation: opening-line-grow 1.4s 0.4s ease-out forwards;
}
@keyframes opening-line-grow {
    0%   { height: 0; opacity: 0; }
    20%  { opacity: 1; }
    100% { height: 60vh; opacity: 1; }
}

.opening-stage {
    grid-column: 2 / -2;
    text-align: center;
    position: relative;
    z-index: 2;
    margin-top: -50vh;
}

.site-title {
    font-family: "Anybody", "Inter", sans-serif;
    font-variation-settings: "wdth" var(--title-wdth, 50), "wght" 700;
    font-size: clamp(2.4rem, 9vw, 7.5rem);
    color: var(--c-amber);
    text-shadow: 0 0 40px rgba(212, 168, 98, 0.35),
                 0 0 12px rgba(212, 168, 98, 0.5);
    letter-spacing: 0.02em;
    line-height: 1;
    opacity: 0;
    animation: title-fade-in 2.6s 0.8s ease-out forwards,
               title-expand 2.4s 0.9s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}
@keyframes title-fade-in {
    0%   { opacity: 0; }
    100% { opacity: 1; }
}
@keyframes title-expand {
    0%   { --title-wdth: 50; }
    100% { --title-wdth: 130; }
}
@property --title-wdth {
    syntax: '<number>';
    inherits: true;
    initial-value: 100;
}

.opening-whisper {
    margin-top: 4vh;
    font-family: "Libre Baskerville", Georgia, serif;
    font-style: italic;
    color: var(--c-wheat);
    opacity: 0;
    font-size: clamp(0.95rem, 1.4vw, 1.2rem);
    line-height: 1.85;
    max-width: 56ch;
    margin-left: auto;
    margin-right: auto;
    animation: whisper-in 2s 1.8s ease-out forwards,
               whisper-tremor 7s 3.8s ease-in-out infinite;
}
@keyframes whisper-in {
    0%   { opacity: 0; transform: translateY(8px); }
    100% { opacity: 0.6; transform: translateY(0); }
}
@keyframes whisper-tremor {
    0%, 100% { transform: rotate(0.18deg); }
    50%      { transform: rotate(-0.18deg); }
}

.deco-sun-small {
    position: absolute;
    width: 280px;
    height: 280px;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%) rotate(0);
    opacity: 0;
    z-index: 1;
    animation: sun-fade-in 3s 1.4s ease-out forwards,
               sun-rotate 80s linear infinite;
    pointer-events: none;
}
@keyframes sun-fade-in {
    0%   { opacity: 0; }
    100% { opacity: 0.35; }
}
@keyframes sun-rotate {
    0%   { transform: translate(-50%,-50%) rotate(0); }
    100% { transform: translate(-50%,-50%) rotate(360deg); }
}

.scroll-cue {
    grid-column: 1 / -1;
    margin-top: 12vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    opacity: 0;
    animation: whisper-in 2s 3s ease-out forwards;
}
.scroll-cue-text {
    font-family: "Anybody", "Inter", sans-serif;
    font-variation-settings: "wdth" 110, "wght" 400;
    font-size: 0.7rem;
    letter-spacing: 0.5em;
    text-transform: uppercase;
    color: var(--c-amber);
    text-shadow: 0 0 24px rgba(212,168,98,0.25);
}
.scroll-cue-line {
    width: 1px; height: 40px;
    background: linear-gradient(to bottom,
        rgba(201,168,76,0.7),
        rgba(201,168,76,0));
    animation: cue-pulse 2.4s ease-in-out infinite;
}
@keyframes cue-pulse {
    0%, 100% { transform: scaleY(1); opacity: 0.4; }
    50%      { transform: scaleY(1.4); opacity: 1; }
}

/* ===================== BROKEN HALL ===================== */
.broken-hall {
    background: linear-gradient(180deg,
        #1A1209 0%,
        #221A10 35%,
        #2A1F14 100%);
    margin-top: -8vh;
    padding-top: 18vh;
    padding-bottom: 22vh;
    overflow: visible;
}

.hall-header {
    grid-column: 2 / 11;
    grid-row: 1;
    margin-bottom: 6vh;
    transform: rotate(-0.6deg);
}
.hall-header .section-label { display: block; margin-bottom: 1rem; }
.hall-title {
    font-size: clamp(2.2rem, 6vw, 5.5rem);
    color: var(--c-gold);
    line-height: 1.05;
    font-weight: var(--hall-wght, 400);
}
.hall-title .emph {
    font-style: italic;
    color: var(--c-amber);
    font-weight: 600;
}

/* The 3 panels: deliberately misaligned, overlapping, rotated */
.panel {
    position: relative;
    background: rgba(26, 18, 9, 0.55);
    border: 1px solid rgba(201, 168, 76, 0.18);
    padding: 2.4rem 2.2rem;
    backdrop-filter: blur(0.5px);
    transform: rotate(var(--rot, 0deg)) translateY(40px);
    opacity: 0;
    transition: opacity 1.2s ease, transform 1.2s cubic-bezier(0.22, 0.61, 0.36, 1);
    z-index: 2;
}
.panel.in-view {
    opacity: 1;
    transform: rotate(var(--rot, 0deg)) translateY(0);
}

.panel-a {
    grid-column: 2 / 9;
    grid-row: 2;
    margin-top: -2vh;
    z-index: 4;
}
.panel-b {
    grid-column: 7 / 14;
    grid-row: 2;
    margin-top: 18vh;
    z-index: 3;
    background: rgba(42, 31, 20, 0.55);
}
.panel-c {
    grid-column: 4 / 12;
    grid-row: 3;
    margin-top: -10vh;
    z-index: 2;
    background: rgba(26, 18, 9, 0.65);
}

.panel-heading {
    font-size: clamp(1.4rem, 2.6vw, 2.4rem);
    margin-bottom: 1.2rem;
    color: var(--c-gold);
    font-weight: var(--panel-wght, 400);
    transition: font-weight 0.4s ease;
}
.panel-body {
    font-size: clamp(0.95rem, 1.3vw, 1.1rem);
    color: var(--c-wheat);
    line-height: 1.8;
    margin-bottom: 1.4rem;
}
.panel-meta {
    font-size: 0.85rem;
    color: rgba(216, 200, 176, 0.5);
    letter-spacing: 0.05em;
}

/* Panel frames (deco overlays, misaligned by 1.5deg) */
.panel-frame {
    position: absolute;
    inset: -10px;
    pointer-events: none;
    transform: rotate(1.5deg);
    border: 0.5px solid rgba(201, 168, 76, 0.45);
}
.panel-frame::before,
.panel-frame::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 24px;
    border: 0.5px solid rgba(201,168,76,0.7);
}
.panel-frame::before {
    top: -1px; left: -1px;
    border-right: none; border-bottom: none;
}
.panel-frame::after {
    bottom: -1px; right: -1px;
    border-left: none; border-top: none;
}

.frame-chevron::before,
.frame-chevron::after {
    background:
        linear-gradient(135deg, transparent 45%, rgba(201,168,76,0.6) 45%, rgba(201,168,76,0.6) 55%, transparent 55%) 0 0/8px 8px,
        linear-gradient(45deg,  transparent 45%, rgba(201,168,76,0.6) 45%, rgba(201,168,76,0.6) 55%, transparent 55%) 0 0/8px 8px;
}
.frame-zigg {
    border: none;
}
.frame-zigg::before, .frame-zigg::after {
    width: 40px; height: 40px;
}
.frame-zigg::before {
    top: -1px; left: -1px;
    background:
        linear-gradient(to right, rgba(201,168,76,0.6) 0 12px, transparent 12px) 0 0/100% 1px no-repeat,
        linear-gradient(to right, rgba(201,168,76,0.6) 0 18px, transparent 18px) 0 6px/100% 1px no-repeat,
        linear-gradient(to right, rgba(201,168,76,0.6) 0 26px, transparent 26px) 0 12px/100% 1px no-repeat,
        linear-gradient(to bottom, rgba(201,168,76,0.6) 0 12px, transparent 12px) 0 0/1px 100% no-repeat,
        linear-gradient(to bottom, rgba(201,168,76,0.6) 0 18px, transparent 18px) 6px 0/1px 100% no-repeat,
        linear-gradient(to bottom, rgba(201,168,76,0.6) 0 26px, transparent 26px) 12px 0/1px 100% no-repeat;
    border: none;
}
.frame-zigg::after {
    bottom: -1px; right: -1px;
    background:
        linear-gradient(to left, rgba(201,168,76,0.6) 0 12px, transparent 12px) 100% 100%/100% 1px no-repeat,
        linear-gradient(to left, rgba(201,168,76,0.6) 0 18px, transparent 18px) 100% calc(100% - 6px)/100% 1px no-repeat,
        linear-gradient(to left, rgba(201,168,76,0.6) 0 26px, transparent 26px) 100% calc(100% - 12px)/100% 1px no-repeat,
        linear-gradient(to top, rgba(201,168,76,0.6) 0 12px, transparent 12px) 100% 100%/1px 100% no-repeat,
        linear-gradient(to top, rgba(201,168,76,0.6) 0 18px, transparent 18px) calc(100% - 6px) 100%/1px 100% no-repeat,
        linear-gradient(to top, rgba(201,168,76,0.6) 0 26px, transparent 26px) calc(100% - 12px) 100%/1px 100% no-repeat;
    border: none;
}

.frame-mandala::before,
.frame-mandala::after {
    width: 30px; height: 30px;
    border-radius: 50%;
    border: 0.5px solid rgba(201,168,76,0.6);
    background:
        radial-gradient(circle, transparent 6px, rgba(201,168,76,0.5) 6px, rgba(201,168,76,0.5) 7px, transparent 7px),
        radial-gradient(circle, transparent 11px, rgba(201,168,76,0.4) 11px, rgba(201,168,76,0.4) 12px, transparent 12px);
}

/* Tremor animation */
.tremor {
    animation: tremor-rest 8s ease-in-out infinite;
}
@keyframes tremor-rest {
    0%, 100% { transform: rotate(var(--rot, 0deg)) translate(0, 0); }
    25%      { transform: rotate(calc(var(--rot, 0deg) + 0.3deg)) translate(1px, 0); }
    50%      { transform: rotate(var(--rot, 0deg)) translate(2px, 1px); }
    75%      { transform: rotate(calc(var(--rot, 0deg) - 0.3deg)) translate(0, -1px); }
}
.panel.in-view {
    animation: tremor-rest 8s ease-in-out infinite;
}

.tremor.shaking {
    animation: shake-error 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}
@keyframes shake-error {
    0%, 100% { transform: rotate(var(--rot, 0deg)) translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: rotate(var(--rot, 0deg)) translateX(-2px); }
    20%, 40%, 60%, 80%      { transform: rotate(var(--rot, 0deg)) translateX(2px); }
}

/* Panel clock watermark */
.panel-clock {
    position: absolute;
    width: 220px; height: 220px;
    right: -40px; bottom: -50px;
    opacity: 0.12;
    pointer-events: none;
}
.clock-num {
    font-family: "Playfair Display", Georgia, serif;
    fill: var(--c-gold);
    font-size: 22px;
    font-weight: 500;
}
.clock-num.drift { transform: translate(2px, -3px); opacity: 0.6; }

.hall-rule {
    grid-column: 3 / 14;
    grid-row: 4;
    height: 1px;
    margin-top: 8vh;
    background: linear-gradient(to right,
        transparent 0%,
        rgba(201,168,76,0.4) 40%,
        rgba(201,168,76,0.4) 60%,
        transparent 100%);
    transform: rotate(-0.4deg);
}

/* ===================== TREMOR GALLERY ===================== */
.tremor-gallery {
    background: linear-gradient(180deg,
        #2A1F14 0%,
        #1F1610 50%,
        #1A1209 100%);
    margin-top: -6vh;
    padding-top: 18vh;
    padding-bottom: 18vh;
    overflow: visible;
    position: relative;
}

.gallery-header {
    grid-column: 4 / 14;
    text-align: center;
    margin-bottom: 6vh;
    transform: rotate(0.5deg);
}
.gallery-header .section-label { display: block; margin-bottom: 1rem; }
.gallery-title {
    font-size: clamp(2rem, 5.6vw, 4.6rem);
    color: var(--c-gold);
    line-height: 1.05;
    font-weight: var(--gallery-wght, 400);
    margin-bottom: 1.2rem;
}
.gallery-sub {
    color: var(--c-wheat);
    opacity: 0.7;
    font-size: clamp(0.9rem, 1.2vw, 1.05rem);
}

.gallery-grid {
    grid-column: 2 / 16;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: minmax(220px, auto);
    gap: 0;
    position: relative;
}

.cell {
    position: relative;
    background: rgba(26, 18, 9, 0.6);
    border: 1px solid rgba(201, 168, 76, 0.15);
    padding: 2rem 1.8rem;
    transform: translateY(40px) rotate(var(--rot, 0deg));
    opacity: 0;
    transition: opacity 1s ease, transform 1s cubic-bezier(0.22,0.61,0.36,1);
    cursor: default;
    overflow: hidden;
}
.cell.in-view {
    opacity: 1;
    transform: translateY(0) rotate(var(--rot, 0deg));
}
.cell::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 80% 20%,
        rgba(212, 168, 98, 0.08) 0%,
        transparent 60%);
    pointer-events: none;
}

/* 6 cells across broken 2x3 grid */
.cell[data-cell="1"] { grid-column: 1 / 5;  grid-row: 1; --rot: -1.4deg; margin-top: 0; }
.cell[data-cell="2"] { grid-column: 5 / 9;  grid-row: 1; --rot: 0.8deg;  margin-top: 4vh; }
.cell[data-cell="3"] { grid-column: 9 / 13; grid-row: 1; --rot: -0.6deg; margin-top: -2vh; }
.cell[data-cell="4"] { grid-column: 2 / 6;  grid-row: 2; --rot: 1.2deg;  margin-top: 6vh; }
.cell[data-cell="5"] { grid-column: 6 / 10; grid-row: 2; --rot: -1.8deg; margin-top: -4vh; }
.cell[data-cell="6"] { grid-column: 9 / 13; grid-row: 2; --rot: 0.6deg;  margin-top: 8vh; }

.cell-frame {
    position: absolute;
    inset: 6px;
    border: 0.5px solid rgba(201,168,76,0.35);
    transform: rotate(1.5deg);
    pointer-events: none;
}
.cell-frame::before, .cell-frame::after {
    content: '';
    position: absolute;
    width: 14px; height: 14px;
    border: 0.5px solid rgba(201,168,76,0.7);
}
.cell-frame::before { top: -2px; left: -2px; border-right: none; border-bottom: none; }
.cell-frame::after  { bottom: -2px; right: -2px; border-left: none; border-top: none; }

.cell-num {
    font-family: "Anybody", "Inter", sans-serif;
    font-variation-settings: "wdth" var(--any-wdth, 100), "wght" 200;
    font-size: 2.6rem;
    color: rgba(212,168,98,0.5);
    display: block;
    margin-bottom: 0.6rem;
    letter-spacing: 0.05em;
}
.cell-head {
    font-size: clamp(1.1rem, 1.7vw, 1.5rem);
    color: var(--c-gold);
    margin-bottom: 0.8rem;
    line-height: 1.2;
    font-weight: 600;
}
.cell-body {
    font-size: 0.92rem;
    color: var(--c-wheat);
    line-height: 1.7;
}

.cell.tremor.shaking,
.cell.tremor.shaking-pair {
    animation: shake-error 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

/* Restful tremor for cells (subtle continuous) */
.cell.in-view {
    animation: cell-tremor 9s ease-in-out infinite;
}
@keyframes cell-tremor {
    0%, 100% { transform: rotate(var(--rot, 0deg)) translate(0, 0); }
    33%      { transform: rotate(calc(var(--rot, 0deg) + 0.25deg)) translate(1px, 0); }
    66%      { transform: rotate(calc(var(--rot, 0deg) - 0.25deg)) translate(-1px, 1px); }
}

/* ===================== GOLD ROOM ===================== */
.gold-room {
    background: radial-gradient(ellipse at 50% 50%,
        #3a2a18 0%,
        #2A1F14 40%,
        #1A1209 90%);
    margin-top: -4vh;
    padding-top: 22vh;
    padding-bottom: 22vh;
    place-items: center;
    align-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.gold-mesh {
    position: absolute;
    inset: -20%;
    background:
        radial-gradient(circle at 30% 40%, rgba(212, 168, 98, 0.45) 0%, transparent 45%),
        radial-gradient(circle at 70% 60%, rgba(201, 168, 76, 0.40) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(139, 94, 75, 0.30) 0%, transparent 60%),
        radial-gradient(circle at 20% 80%, rgba(94, 58, 107, 0.25) 0%, transparent 50%);
    filter: blur(40px);
    mix-blend-mode: screen;
    animation: gold-pulse 14s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: 0;
}
@keyframes gold-pulse {
    0%   { transform: scale(1) rotate(0); opacity: 0.7; }
    100% { transform: scale(1.15) rotate(8deg); opacity: 1; }
}

.sunburst {
    position: absolute;
    width: min(96vmin, 880px);
    height: min(96vmin, 880px);
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    pointer-events: none;
}
#sunburstRays line {
    stroke: var(--c-gold);
    stroke-width: 0.5;
    stroke-linecap: round;
    opacity: 0;
    transform-origin: 0 0;
}
.sun-core {
    opacity: 0;
    transition: opacity 1.6s ease;
}
.gold-room.in-view .sun-core { opacity: 1; }

.gold-text {
    grid-column: 3 / 15;
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 6vh 4vw;
}
.gold-eyebrow {
    display: inline-block;
    margin-bottom: 1.6rem;
    color: var(--c-amber);
    text-shadow: 0 0 24px rgba(212,168,98,0.3);
}
.gold-title {
    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(2.4rem, 7vw, 6.2rem);
    color: var(--c-gold);
    line-height: 1.04;
    letter-spacing: 0.03em;
    margin-bottom: 2rem;
    font-weight: var(--gold-wght, 500);
    text-shadow: 0 0 60px rgba(212,168,98,0.25),
                 0 0 16px rgba(212,168,98,0.4);
}
.gold-italic {
    font-family: "Anybody", "Inter", sans-serif;
    font-variation-settings: "wdth" var(--gold-wdth, 100), "wght" 600;
    font-style: normal;
    color: var(--c-amber);
    font-size: 0.9em;
    display: inline-block;
    margin-top: 0.4rem;
}
.gold-sub {
    color: var(--c-wheat);
    font-style: italic;
    opacity: 0.85;
    font-size: clamp(0.95rem, 1.3vw, 1.15rem);
    max-width: 44ch;
    margin: 0 auto;
}

/* ===================== DISSOLVE ===================== */
.dissolve {
    background: linear-gradient(180deg,
        #1A1209 0%,
        #120c06 60%,
        #0a0703 100%);
    margin-top: -2vh;
    padding-top: 18vh;
    padding-bottom: 18vh;
    place-items: center;
    align-content: center;
    text-align: center;
    overflow: hidden;
    position: relative;
}

.dissolve-stage {
    grid-column: 2 / 16;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.4rem 2.4rem;
    margin-bottom: 8vh;
    position: relative;
}
.dissolve-frag {
    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(1.6rem, 3.4vw, 3rem);
    color: var(--c-gold);
    font-style: italic;
    letter-spacing: 0.04em;
    opacity: 0.8;
    transition: opacity 1.4s ease, transform 1.4s ease, filter 1.4s ease;
    transform: translate(0,0) rotate(0);
    filter: blur(0);
}
.dissolve.in-view .dissolve-frag {
    opacity: var(--frag-op, 0.4);
    transform: translate(var(--frag-x, 0), var(--frag-y, 0)) rotate(var(--frag-r, 0deg));
    filter: blur(var(--frag-b, 1px));
}
.dissolve-frag[data-frag="1"] { --frag-x: -8vw; --frag-y: -2vh; --frag-r: -3deg; --frag-op: 0.5; --frag-b: 1px; }
.dissolve-frag[data-frag="2"] { --frag-x: 6vw;  --frag-y:  3vh; --frag-r:  4deg; --frag-op: 0.4; --frag-b: 2px; }
.dissolve-frag[data-frag="3"] { --frag-x: -4vw; --frag-y:  6vh; --frag-r: -1deg; --frag-op: 0.45; --frag-b: 1.4px; }
.dissolve-frag[data-frag="4"] { --frag-x: 8vw;  --frag-y: -3vh; --frag-r:  2deg; --frag-op: 0.3; --frag-b: 2.2px; }
.dissolve-frag[data-frag="5"] { --frag-x: -10vw;--frag-y:  1vh; --frag-r: -4deg; --frag-op: 0.35; --frag-b: 1.6px; }
.dissolve-frag[data-frag="6"] { --frag-x: 12vw; --frag-y:  4vh; --frag-r:  3deg; --frag-op: 0.25; --frag-b: 2.4px; }

.end-title {
    grid-column: 1 / -1;
    font-family: "Anybody", "Inter", sans-serif;
    font-variation-settings: "wdth" 50, "wght" 300;
    font-size: clamp(1.5rem, 4vw, 3rem);
    color: var(--c-amber);
    opacity: 0.2;
    text-shadow: 0 0 30px rgba(212,168,98,0.2);
    letter-spacing: 0.04em;
    animation: end-tremor 6s ease-in-out infinite;
}
@keyframes end-tremor {
    0%, 100% { transform: rotate(0.2deg) translateX(0); }
    50%      { transform: rotate(-0.2deg) translateX(1px); }
}
.end-meta {
    grid-column: 1 / -1;
    margin-top: 3vh;
    color: rgba(216, 200, 176, 0.3);
    font-size: 0.85rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

/* When dissolve is in-view, increase grain opacity */
body.in-dissolve .film-grain { opacity: 0.16; }
body.in-gold .film-grain { opacity: 0.12; }

/* ===================== HOVER TREMORS (links/elements) ===================== */
.cell:hover {
    border-color: rgba(201, 168, 76, 0.5);
}
.panel:hover {
    border-color: rgba(201, 168, 76, 0.45);
}

/* ===================== RESPONSIVE BREAKPOINTS ===================== */
@media (max-width: 900px) {
    .panel-a, .panel-b, .panel-c {
        grid-column: 2 / 16;
        margin-top: 4vh;
    }
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    .cell[data-cell="1"],
    .cell[data-cell="2"],
    .cell[data-cell="3"],
    .cell[data-cell="4"],
    .cell[data-cell="5"],
    .cell[data-cell="6"] {
        grid-column: 1 / -1;
        grid-row: auto;
        margin-top: 2vh;
    }
    .gold-text { grid-column: 2 / 16; }
    .hall-header, .gallery-header { grid-column: 2 / 16; }
}
@media (max-width: 560px) {
    .section { padding: 10vh 5vw; }
    .panel { padding: 1.6rem 1.4rem; }
    .cell  { padding: 1.4rem 1.2rem; }
}

/* ===================== UTILITY ===================== */
.in-view-fade {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1.2s ease, transform 1.2s ease;
}
.in-view-fade.in-view { opacity: 1; transform: translateY(0); }
