/* ============================================================
   courthouse.stream
   Pastoral-Romantic Civic Ceremony :: Gold-Black-Luxury
   ============================================================ */

:root {
    --vellum-black: #0B0A07;
    --notary-ink: #1A1610;
    --gilt-leaf: #D4A949;
    --candleshine: #F4D88A;
    --pear-blossom: #F2E6D2;
    --hayfield: #9A8A4E;
    --lavender-dusk: #6B5C7A;
    --sealing-wax: #7A2A1F;
    --gilt-soft: #C9A24A;

    --font-display: "Fraunces", "Cormorant Garamond", Georgia, serif;
    --font-body: "Cormorant Garamond", Georgia, serif;
    --font-inscription: "IM Fell English SC", "Cormorant Garamond", serif;
    --font-mono: "DM Mono", "Courier New", monospace;

    --max-col: 58ch;
    --axis-color: var(--gilt-soft);
}

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

html, body {
    background: var(--vellum-black);
    color: var(--pear-blossom);
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.7;
    overflow-x: hidden;
    cursor: none;
    scroll-behavior: smooth;
}

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

/* --------------------------------------------------------- */
/* GRID SUBSTRATE                                            */
/* --------------------------------------------------------- */
.grid-substrate {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    z-index: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 1.6s ease-out;
}

.grid-substrate.visible {
    opacity: 1;
}

.grid-substrate line.minor {
    stroke: var(--gilt-leaf);
    stroke-width: 0.5;
    opacity: 0;
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
}

.grid-substrate line.major {
    stroke: var(--gilt-leaf);
    stroke-width: 0.7;
    opacity: 0;
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
}

.grid-substrate.drawn line.minor {
    opacity: 0.06;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 1.2s ease-out, opacity 1.2s ease-out;
}

.grid-substrate.drawn line.major {
    opacity: 0.10;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 1.2s ease-out, opacity 1.2s ease-out;
}

.grid-substrate.brightened line.minor { opacity: 0.10; transition: opacity 0.8s ease; }
.grid-substrate.brightened line.major { opacity: 0.16; transition: opacity 0.8s ease; }

/* --------------------------------------------------------- */
/* PROCESSIONAL AXIS                                         */
/* --------------------------------------------------------- */
.processional-axis {
    position: fixed;
    top: 0; bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    background: var(--gilt-soft);
    opacity: 0.35;
    z-index: 1;
    pointer-events: none;
    transition: opacity 0.6s ease;
}

.processional-axis.brightened {
    opacity: 0.55;
}

/* --------------------------------------------------------- */
/* PEAR CURSOR                                               */
/* --------------------------------------------------------- */
.pear-cursor {
    position: fixed;
    top: 0; left: 0;
    width: 18px; height: 24px;
    z-index: 9999;
    pointer-events: none;
    transform: translate(-50%, -50%);
    transition: opacity 0.2s;
    will-change: transform;
}

.pear-cursor svg { width: 100%; height: 100%; display: block; }

.pear-cursor.swaying {
    animation: cursorSway 1.6s ease-in-out infinite;
}

.pear-cursor.clicking svg path {
    fill: var(--gilt-leaf) !important;
    transition: fill 0.18s ease;
}

@keyframes cursorSway {
    0%, 100% { transform: translate(-50%, -50%) rotate(-2deg); }
    50% { transform: translate(-50%, -50%) rotate(2deg); }
}

/* --------------------------------------------------------- */
/* PROCESSION RAIL (right edge nav)                          */
/* --------------------------------------------------------- */
.procession-rail {
    position: fixed;
    right: 28px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 50;
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
    pointer-events: auto;
}

.rail-link {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.8rem;
    text-decoration: none;
    font-family: var(--font-inscription);
    font-size: 0.95rem;
    letter-spacing: 0.18em;
    color: var(--gilt-leaf);
    opacity: 0.4;
    transition: opacity 0.4s ease, color 0.4s ease;
    position: relative;
}

.rail-link .numeral {
    font-family: var(--font-inscription);
    color: inherit;
    min-width: 2.4rem;
    text-align: right;
}

.rail-link .epithet {
    font-family: "Fraunces", serif;
    font-style: italic;
    font-size: 0.85rem;
    color: var(--gilt-leaf);
    opacity: 0;
    transform: translateX(12px);
    transition: opacity 0.22s ease, transform 0.22s ease;
    white-space: nowrap;
}

.rail-link:hover {
    opacity: 1;
}
.rail-link:hover .epithet {
    opacity: 1;
    transform: translateX(0);
}

.rail-link.visited { opacity: 0.7; color: var(--hayfield); }
.rail-link.active {
    opacity: 1;
    color: var(--candleshine);
}
.rail-link.active .numeral { color: var(--candleshine); }

/* --------------------------------------------------------- */
/* MAIN PROCESSIONAL                                         */
/* --------------------------------------------------------- */
.processional {
    position: relative;
    z-index: 2;
}

.station {
    position: relative;
    min-height: 100vh;
    padding: 8rem 6vw 6rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    overflow: hidden;
}

/* Corner brackets */
.corner-brackets {
    position: absolute;
    inset: 4rem 4rem;
    pointer-events: none;
}
.cb {
    position: absolute;
    width: 22px;
    height: 22px;
    opacity: 0;
    transition: opacity 1.2s ease;
}
.station.in-view .cb {
    opacity: 0.7;
}
.cb-tl { top: 0; left: 0; border-top: 1px solid var(--gilt-leaf); border-left: 1px solid var(--gilt-leaf); }
.cb-tr { top: 0; right: 0; border-top: 1px solid var(--gilt-leaf); border-right: 1px solid var(--gilt-leaf); }
.cb-bl { bottom: 0; left: 0; border-bottom: 1px solid var(--gilt-leaf); border-left: 1px solid var(--gilt-leaf); }
.cb-br { bottom: 0; right: 0; border-bottom: 1px solid var(--gilt-leaf); border-right: 1px solid var(--gilt-leaf); }

.corner-brackets.dimmed .cb { border-color: var(--hayfield); opacity: 0.4; }

/* Station glyph (single ringing letterpress) */
.station-glyph {
    width: 60px; height: 60px;
    margin-bottom: 1.6rem;
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 1.2s ease, transform 1.2s ease;
}
.station.in-view .station-glyph {
    opacity: 1;
    transform: translateY(0);
}

.glyph-svg { width: 100%; height: 100%; }

/* Station label (numeral + epithet) */
.station-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    margin-bottom: 2rem;
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 1s ease 0.16s, transform 1s ease 0.16s;
}
.station.in-view .station-label {
    opacity: 1;
    transform: translateY(0);
}
.numeral-tag {
    font-family: var(--font-inscription);
    color: var(--gilt-leaf);
    letter-spacing: 0.22em;
    font-size: 0.95rem;
}
.epithet-tag {
    font-family: "Fraunces", serif;
    font-style: italic;
    color: var(--hayfield);
    letter-spacing: 0.05em;
    font-size: 1.1rem;
}

.station-title {
    font-family: var(--font-display);
    font-weight: 360;
    font-variation-settings: "opsz" 144, "SOFT" 100;
    font-size: clamp(2.6rem, 5.8vw, 5.4rem);
    line-height: 1.05;
    color: var(--pear-blossom);
    margin-bottom: 2.2rem;
    letter-spacing: -0.005em;
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 1s ease 0.32s, transform 1s ease 0.32s;
}
.station.in-view .station-title {
    opacity: 1;
    transform: translateY(0);
}
.ital {
    font-style: italic;
    font-variation-settings: "opsz" 144, "SOFT" 100;
    color: var(--gilt-leaf);
    font-weight: 320;
    font-size: 0.85em;
}

/* --------------------------------------------------------- */
/* STATION I — THE GATE-HOUSE                                */
/* --------------------------------------------------------- */
#station-1 {
    padding-top: 7vh;
}

.in-session-sign {
    width: min(440px, 80vw);
    height: 90px;
    margin-bottom: 1rem;
    opacity: 0;
    transition: opacity 1.2s ease;
}
.in-session-sign.lit {
    opacity: 1;
}

.neon-svg { width: 100%; height: 100%; }
.neon-text {
    font-family: "Fraunces", serif;
    font-style: italic;
    font-weight: 380;
    font-size: 56px;
    fill: var(--candleshine);
    filter: url(#neonGlow);
    animation: neonBreath 5.2s ease-in-out infinite;
    letter-spacing: 0.02em;
}
.in-session-sign:not(.lit) .neon-text {
    fill: none;
    stroke: var(--hayfield);
    stroke-width: 0.6;
    opacity: 0.3;
    filter: none;
    animation: none;
}

@keyframes neonBreath {
    0%, 100% {
        opacity: 0.85;
        filter: url(#neonGlow) drop-shadow(0 0 4px rgba(244, 216, 138, 0.7))
                drop-shadow(0 0 16px rgba(244, 216, 138, 0.4))
                drop-shadow(0 0 48px rgba(244, 216, 138, 0.2));
    }
    50% {
        opacity: 1;
        filter: url(#neonGlow) drop-shadow(0 0 6px rgba(244, 216, 138, 0.9))
                drop-shadow(0 0 22px rgba(244, 216, 138, 0.55))
                drop-shadow(0 0 60px rgba(244, 216, 138, 0.3));
    }
}

/* Masthead */
.masthead {
    font-family: "Fraunces", serif;
    font-size: clamp(3.2rem, 8.5vw, 8rem);
    font-weight: 420;
    font-variation-settings: "opsz" 144, "SOFT" 100, "wght" 420;
    line-height: 1;
    letter-spacing: -0.01em;
    color: var(--candleshine);
    margin: 0.6rem 0 1.4rem;
    animation: masheadBreath 12s ease-in-out infinite;
    cursor: none;
}

@keyframes masheadBreath {
    0%, 100% { font-variation-settings: "opsz" 144, "SOFT" 100, "wght" 380; }
    50% { font-variation-settings: "opsz" 144, "SOFT" 100, "wght" 460; }
}

.mh-letter, .mh-dot {
    display: inline-block;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.masthead.assembled .mh-letter,
.masthead.assembled .mh-dot {
    opacity: 1;
    transform: translateY(0);
}
.mh-dot {
    color: var(--gilt-leaf);
}

.docket-line {
    font-family: var(--font-inscription);
    font-size: 0.95rem;
    letter-spacing: 0.18em;
    color: var(--gilt-leaf);
    margin-bottom: 2.4rem;
    opacity: 0;
    transition: opacity 0.8s ease 0.6s;
}
.docket-line.shown { opacity: 1; }

.gatehouse-preamble {
    max-width: var(--max-col);
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.7;
    color: var(--pear-blossom);
    font-variation-settings: "opsz" 14;
    margin: 0 auto 2.4rem;
    text-align: center;
    font-style: italic;
}

/* REC Rosette */
.rec-rosette {
    position: absolute;
    top: 8rem;
    right: 16%;
    width: 60px;
    height: 60px;
    opacity: 0.9;
    transition: opacity 1s ease;
}
.rosette-svg { width: 100%; height: 100%; }
.rosette-petals {
    transform-origin: 30px 30px;
    animation: rosetteSpin 90s linear infinite;
}
@keyframes rosetteSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* --------------------------------------------------------- */
/* PHRASE LINKS (no buttons)                                 */
/* --------------------------------------------------------- */
.phrase-link {
    display: inline-block;
    font-family: "Fraunces", serif;
    font-style: italic;
    font-variation-settings: "opsz" 144, "SOFT" 100, "wght" 380;
    color: var(--gilt-leaf);
    text-decoration: none;
    font-size: 1.4rem;
    margin-top: 1rem;
    padding-bottom: 0.3rem;
    position: relative;
    cursor: none;
    background-image: linear-gradient(var(--gilt-leaf), var(--gilt-leaf));
    background-repeat: no-repeat;
    background-size: 0% 1px;
    background-position: left bottom;
    transition: background-size 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.phrase-link:hover {
    background-size: 100% 1px;
}

/* --------------------------------------------------------- */
/* STATION II — THE WAITING ORCHARD                          */
/* --------------------------------------------------------- */
.orchard-prose {
    max-width: var(--max-col);
    margin: 0 auto 3.5rem;
    text-align: left;
    font-size: 1.0625rem;
    line-height: 1.75;
    color: var(--pear-blossom);
    font-variation-settings: "opsz" 14;
}
.orchard-prose p + p { margin-top: 1.2rem; }

.orchard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2.4rem 1.6rem;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
}

.vignette {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    padding: 1.2rem 0.6rem;
    transition: transform 0.6s ease;
}
.vignette:hover {
    transform: translateY(-4px);
}

.vignette-svg {
    width: 80px;
    height: 80px;
}

.vignette-svg .dpath {
    stroke-dasharray: 600;
    stroke-dashoffset: 600;
    transition: stroke-dashoffset 1.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.vignette.drawn .vignette-svg .dpath {
    stroke-dashoffset: 0;
}

.vignette figcaption {
    font-family: var(--font-inscription);
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    color: var(--hayfield);
    text-align: center;
    line-height: 1.4;
}

.vignette:hover .vignette-svg path {
    stroke: var(--candleshine);
    transition: stroke 0.4s ease;
}
.vignette:hover figcaption {
    color: var(--gilt-leaf);
    transition: color 0.4s ease;
}

/* --------------------------------------------------------- */
/* STATION III — THE BENCH                                   */
/* --------------------------------------------------------- */
.bench-roster {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 3rem 4rem;
    max-width: 1080px;
    width: 100%;
    margin: 0 auto;
    padding: 0 2rem;
}

.officer {
    text-align: left;
    padding: 1.4rem 1.6rem;
    position: relative;
    transition: transform 0.5s ease;
}

.officer h3 {
    font-family: "Fraunces", serif;
    font-variation-settings: "opsz" 144, "SOFT" 100, "wght" 480;
    font-size: 1.45rem;
    color: var(--candleshine);
    margin-bottom: 0.4rem;
    letter-spacing: -0.005em;
}

.officer .role {
    font-family: var(--font-inscription);
    font-size: 0.78rem;
    letter-spacing: 0.16em;
    color: var(--gilt-leaf);
    margin-bottom: 1rem;
}

.officer .bio {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--pear-blossom);
    font-style: italic;
}

.sc {
    font-family: var(--font-inscription);
    letter-spacing: 0.12em;
    font-style: normal;
    color: var(--gilt-leaf);
    font-size: 0.92em;
}

/* --------------------------------------------------------- */
/* STATION IV — THE LIVE STREAM                              */
/* --------------------------------------------------------- */
.station-stream {
    padding-bottom: 8rem;
}

.aedicula {
    position: relative;
    width: min(720px, 92vw);
    margin: 0 auto 3rem;
    padding: 0 60px;
}

.entablature {
    height: 64px;
    position: relative;
    border-bottom: 1px solid var(--gilt-leaf);
}

.motto {
    font-family: var(--font-inscription);
    font-size: 0.78rem;
    letter-spacing: 0.22em;
    color: var(--gilt-leaf);
    text-align: center;
    padding: 0.5rem 0 0.2rem;
}

.swag {
    width: 100%;
    height: 50px;
    display: block;
}
.swag-path {
    stroke-dasharray: 1200;
    stroke-dashoffset: 1200;
    transition: stroke-dashoffset 1.6s ease-out;
}
.station.in-view .swag-path {
    stroke-dashoffset: 0;
}

.blossom {
    transition: opacity 0.6s ease;
}
.blossom.hidden {
    opacity: 0;
}
.aedicula:hover .blossom.hidden {
    opacity: 1;
}

/* Columns */
.column {
    position: absolute;
    top: 64px;
    bottom: 0;
    width: 36px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: filter 0.6s ease;
}
.column-left { left: 0; }
.column-right { right: 0; }

.capital, .base {
    width: 36px;
    height: 14px;
    background: linear-gradient(180deg, transparent 0%, var(--gilt-leaf) 30%, var(--gilt-leaf) 70%, transparent 100%);
    border-top: 1px solid var(--gilt-leaf);
    border-bottom: 1px solid var(--gilt-leaf);
    opacity: 0.4;
}
.shaft {
    flex: 1;
    width: 4px;
    background: linear-gradient(90deg, transparent 0%, var(--gilt-leaf) 50%, transparent 100%);
    opacity: 0.6;
}

.aedicula:hover .column {
    filter: drop-shadow(0 0 8px rgba(212, 169, 73, 0.45));
}

/* Aperture (video) */
.aperture {
    position: relative;
    background: var(--vellum-black);
    border: 1px solid var(--gilt-leaf);
    aspect-ratio: 16 / 9;
    overflow: hidden;
    margin: 1rem 0;
}

.stream-still {
    width: 100%;
    height: 100%;
    position: relative;
}
.still-svg {
    width: 100%;
    height: 100%;
    display: block;
}

.play-pulse {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 14px; height: 14px;
    background: var(--candleshine);
    border-radius: 50%;
    animation: playPulse 5.2s ease-in-out infinite;
    box-shadow: 0 0 12px var(--candleshine), 0 0 24px var(--gilt-leaf);
}
@keyframes playPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.9; }
    50% { transform: translate(-50%, -50%) scale(1.15); opacity: 1; }
}

/* Pear-clock */
.pear-clock {
    position: absolute;
    bottom: 12px;
    left: 12px;
    width: 28px;
    height: 36px;
    z-index: 5;
}
.pear-clock svg { width: 100%; height: 100%; display: block; }
.pear-fill {
    transition: y 1.2s ease, height 1.2s ease;
}

/* Stream story */
.stream-story {
    width: min(720px, 92vw);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 2rem;
    text-align: left;
}

.steno-crawl-wrap {
    border-top: 1px solid var(--gilt-leaf);
    border-bottom: 1px solid var(--gilt-leaf);
    padding: 1rem 0;
    overflow: hidden;
}

.steno-label, .marg-label {
    font-family: var(--font-inscription);
    font-size: 0.7rem;
    letter-spacing: 0.22em;
    color: var(--hayfield);
    margin-bottom: 0.5rem;
}

.steno-crawl {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--gilt-leaf);
    white-space: nowrap;
    overflow: hidden;
    line-height: 1.6;
    min-height: 1.6em;
}

.steno-crawl .sc {
    font-family: var(--font-inscription);
    color: var(--candleshine);
}

.marginalia {
    border-left: 1px solid var(--gilt-leaf);
    padding-left: 1.2rem;
}

.marg-list {
    list-style: none;
}
.marg-entry {
    font-family: "Cormorant Garamond", serif;
    font-style: italic;
    color: var(--hayfield);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 0.9rem;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.9s ease, transform 0.9s ease;
}
.marg-entry.shown {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 720px) {
    .stream-story {
        grid-template-columns: 1fr;
    }
    .marginalia { border-left: none; border-top: 1px solid var(--gilt-leaf); padding-left: 0; padding-top: 1rem; }
}

/* --------------------------------------------------------- */
/* STATION V — THE DOCKET                                    */
/* --------------------------------------------------------- */
.docket-deck {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.6rem;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto 2.6rem;
}

.docket-card {
    position: relative;
    background: var(--notary-ink);
    padding: 1.6rem 1.6rem 1.4rem;
    border: 1px solid rgba(212, 169, 73, 0.25);
    text-align: left;
    transition: transform 0.6s ease, border-color 0.6s ease;
    transform-style: preserve-3d;
}

.docket-card::before, .docket-card::after,
.docket-card > .card-bracket-bl, .docket-card > .card-bracket-br {
    /* placeholder, brackets via box-shadow */
}

.docket-card:hover {
    border-color: var(--gilt-leaf);
    transform: perspective(800px) rotateZ(0deg);
}

.card-head {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.8rem;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--hayfield);
    letter-spacing: 0.1em;
}
.case-num { color: var(--gilt-leaf); }
.case-time { color: var(--hayfield); }

.docket-card h3 {
    font-family: "Fraunces", serif;
    font-variation-settings: "opsz" 144, "SOFT" 100, "wght" 460;
    font-size: 1.4rem;
    color: var(--candleshine);
    line-height: 1.2;
    margin-bottom: 0.7rem;
}

.case-desc {
    font-family: "Cormorant Garamond", serif;
    font-size: 1rem;
    line-height: 1.65;
    color: var(--pear-blossom);
    margin-bottom: 0.9rem;
}

.case-meta {
    font-size: 0.84rem;
    color: var(--hayfield);
    font-style: italic;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Pear bullet */
.pear-bullet {
    display: inline-block;
    width: 11px;
    height: 14px;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 24'><path d='M10 4 C 9 6, 8 7, 10 8 C 6 8, 4 14, 4 17 C 4 21, 7 23, 10 23 C 13 23, 16 21, 16 17 C 16 14, 14 8, 10 8 Z' fill='none' stroke='%23D4A949' stroke-width='1.25'/></svg>");
    background-size: contain;
    background-repeat: no-repeat;
    transition: background-image 0.4s ease, transform 0.4s ease;
    vertical-align: middle;
}
.docket-card:hover .pear-bullet,
.case-meta:hover .pear-bullet {
    transform: scale(1.04);
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 24'><path d='M10 4 C 9 6, 8 7, 10 8 C 6 8, 4 14, 4 17 C 4 21, 7 23, 10 23 C 13 23, 16 21, 16 17 C 16 14, 14 8, 10 8 Z' fill='%23D4A949' stroke='%23D4A949' stroke-width='1.25'/></svg>");
}

/* Corner brackets on cards */
.docket-card {
    box-shadow:
        inset 1px 0 0 0 transparent,
        inset 0 1px 0 0 transparent;
}
.docket-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 12px; height: 12px;
    border-top: 1px solid var(--gilt-leaf);
    border-left: 1px solid var(--gilt-leaf);
    transition: border-width 0.4s ease;
}
.docket-card::after {
    content: '';
    position: absolute;
    bottom: 0; right: 0;
    width: 12px; height: 12px;
    border-bottom: 1px solid var(--gilt-leaf);
    border-right: 1px solid var(--gilt-leaf);
    transition: border-width 0.4s ease;
}
.docket-card:hover::before,
.docket-card:hover::after {
    border-width: 1.5px;
}

/* --------------------------------------------------------- */
/* STATION VI — THE LEDGER                                   */
/* --------------------------------------------------------- */
.ledger-prose {
    max-width: 56ch;
    margin: 0 auto 2.6rem;
    text-align: center;
    font-family: "Cormorant Garamond", serif;
    font-style: italic;
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--pear-blossom);
}

.audience-form {
    width: min(620px, 92vw);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.6rem;
    text-align: left;
}

.field {
    position: relative;
}

.field label {
    display: block;
    margin-bottom: 0.4rem;
    font-family: "Fraunces", serif;
    font-style: italic;
    color: var(--hayfield);
    font-size: 1rem;
    transition: color 0.5s ease;
}

.field .lbl-text {
    background-image: linear-gradient(var(--gilt-leaf), var(--gilt-leaf));
    background-repeat: no-repeat;
    background-size: 0% 1px;
    background-position: left bottom;
    padding-bottom: 2px;
    transition: background-size 0.7s cubic-bezier(0.16, 1, 0.3, 1), color 0.5s ease;
}

.field input,
.field textarea {
    width: 100%;
    padding: 0.7rem 0.9rem;
    background: rgba(26, 22, 16, 0.6);
    border: 1px solid rgba(212, 169, 73, 0.3);
    color: var(--pear-blossom);
    font-family: "Cormorant Garamond", serif;
    font-size: 1.05rem;
    line-height: 1.5;
    transition: border-color 0.5s ease, background 0.5s ease;
    cursor: none;
    outline: none;
    border-radius: 0;
}

.field input:focus,
.field textarea:focus {
    border-color: var(--gilt-leaf);
    background: rgba(26, 22, 16, 0.85);
}

.field.focused label {
    color: var(--candleshine);
}
.field.focused .lbl-text {
    background-size: 100% 1px;
}

.ledger-button {
    align-self: center;
    margin-top: 0.6rem;
    background: transparent;
    border: 1px solid var(--gilt-leaf);
    box-shadow: inset 0 0 0 1px rgba(244, 216, 138, 0.15);
    color: var(--candleshine);
    font-family: "Fraunces", serif;
    font-style: italic;
    font-variation-settings: "opsz" 144, "SOFT" 100, "wght" 400;
    font-size: 1.15rem;
    padding: 0.7rem 1.8rem;
    cursor: none;
    letter-spacing: 0.02em;
    transition: background 0.5s ease, color 0.5s ease;
}
.ledger-button:hover {
    background: rgba(212, 169, 73, 0.08);
}

.form-status {
    text-align: center;
    font-family: "Cormorant Garamond", serif;
    font-style: italic;
    color: var(--candleshine);
    min-height: 1.6em;
    margin-top: 0.4rem;
}

/* --------------------------------------------------------- */
/* STATION VII — THE GOOD-NIGHT                              */
/* --------------------------------------------------------- */
.station-goodnight {
    position: relative;
    padding: 6rem 4vw 4rem;
}

.dusk-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, var(--vellum-black) 0%, var(--lavender-dusk) 50%, var(--vellum-black) 100%);
    opacity: 0.25;
    z-index: -1;
    pointer-events: none;
}

.goodnight-line {
    font-family: "Fraunces", serif;
    font-style: italic;
    font-variation-settings: "opsz" 144, "SOFT" 100, "wght" 360;
    font-size: clamp(2rem, 4.4vw, 3.2rem);
    color: var(--pear-blossom);
    text-align: center;
    margin: 2rem auto 3rem;
    line-height: 1.3;
    max-width: 38ch;
}

.marbled-endpaper {
    width: min(900px, 92vw);
    margin: 1rem auto 2rem;
    border-top: 1px solid var(--gilt-leaf);
    border-bottom: 1px solid var(--gilt-leaf);
    overflow: hidden;
}
.marbled-svg {
    width: 100%;
    height: 220px;
    display: block;
}

.court-seal {
    text-align: center;
    margin-top: 2rem;
}
.seal-svg {
    width: 110px;
    height: 110px;
    margin: 0 auto;
}
.seal-line {
    font-family: var(--font-inscription);
    font-size: 0.7rem;
    letter-spacing: 0.22em;
    color: var(--gilt-leaf);
    margin-top: 0.6rem;
}
.seal-line.dim { color: var(--hayfield); margin-top: 0.4rem; }

/* --------------------------------------------------------- */
/* LOADING PEAR                                              */
/* --------------------------------------------------------- */
.loading-pear {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 36px;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}
.loading-pear.active { opacity: 0.7; animation: pearSway 2.5s ease-in-out infinite; }
.loader-svg { width: 100%; height: 100%; }

@keyframes pearSway {
    0%, 100% { transform: translateX(-50%) rotate(-3deg); }
    50% { transform: translateX(-50%) rotate(3deg); }
}

/* --------------------------------------------------------- */
/* SCROLL REVEAL UTILITIES                                   */
/* --------------------------------------------------------- */
.reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.shown {
    opacity: 1;
    transform: translateY(0);
}

/* --------------------------------------------------------- */
/* RESPONSIVE                                                */
/* --------------------------------------------------------- */
@media (max-width: 900px) {
    .procession-rail {
        right: 12px;
        gap: 1rem;
    }
    .rail-link .epithet { display: none; }

    .corner-brackets { inset: 1.4rem 1.4rem; }
    .station { padding: 5rem 4vw 4rem; }

    .rec-rosette { right: 6%; top: 5rem; width: 44px; height: 44px; }

    body { cursor: auto; }
    .pear-cursor { display: none; }
}

@media (max-width: 600px) {
    .bench-roster { grid-template-columns: 1fr; }
    .docket-deck { grid-template-columns: 1fr; }
    .orchard-grid { gap: 1.6rem 1rem; }
    .vignette-svg { width: 70px; height: 70px; }
}

/* Ensure interactive elements show no native cursor */
a, button, input, textarea {
    cursor: none;
}
@media (max-width: 900px) {
    a, button, input, textarea { cursor: auto; }
}
