/* ============================================================
   GGOGGL.com — Victorian Cabinet of Curiosities
   Palette: #1B4D4F #A4421A #F2E8D5 #EDE0C8 #C6923A #1E1811 #5C4E3C #6B7F53 #D4C4A0
   Fonts: Playfair Display SC, Cormorant Garamond, Lora
   ============================================================ */

:root {
    --c-teal: #1B4D4F;
    --c-umber: #A4421A;
    --c-vellum: #F2E8D5;
    --c-parchment: #EDE0C8;
    --c-gold: #C6923A;
    --c-ink: #1E1811;
    --c-faded: #5C4E3C;
    --c-bronze: #6B7F53;
    --c-fox: #D4C4A0;

    --frame-w: 16px;
    --pad-side: clamp(28px, 6vw, 80px);
    --max-w: 880px;

    --f-display: 'Playfair Display SC', 'Playfair Display', Georgia, serif;
    --f-accent: 'Cormorant Garamond', 'Cormorant', Georgia, serif;
    --f-body: 'Lora', Georgia, serif;
}

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

html, body {
    background: var(--c-vellum);
    color: var(--c-ink);
    font-family: var(--f-body);
    font-size: clamp(1rem, 1.8vw, 1.15rem);
    line-height: 1.75;
    overflow-x: hidden;
}

body {
    position: relative;
    min-height: 100vh;
    text-shadow: 0.3px 0.3px 0 rgba(30, 24, 17, 0.2);
}

.svg-defs { position: absolute; width: 0; height: 0; pointer-events: none; }

/* =========================================================
   VELLUM BACKGROUND with foxing
   ========================================================= */
.vellum {
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(ellipse at 30% 20%, #F7EFD9 0%, transparent 55%),
        radial-gradient(ellipse at 80% 60%, #ECDDC0 0%, transparent 60%),
        radial-gradient(ellipse at 50% 90%, #E6D5B5 0%, transparent 70%),
        var(--c-vellum);
    overflow: hidden;
}

.vellum-noise {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' seed='4'/><feColorMatrix values='0 0 0 0 0.36  0 0 0 0 0.30  0 0 0 0 0.21  0 0 0 0.18 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
    opacity: 0.55;
    mix-blend-mode: multiply;
    pointer-events: none;
}

.foxing {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(1.5px);
    opacity: 0.55;
}
.fox-1 { width: 70px; height: 50px; top: 8%; left: 12%;
    background: radial-gradient(circle, var(--c-fox) 0%, transparent 70%); }
.fox-2 { width: 40px; height: 30px; top: 28%; right: 18%;
    background: radial-gradient(circle, #C9B58E 0%, transparent 70%); opacity: 0.4; }
.fox-3 { width: 90px; height: 60px; top: 55%; left: 8%;
    background: radial-gradient(circle, var(--c-fox) 0%, transparent 70%); }
.fox-4 { width: 50px; height: 50px; bottom: 12%; right: 14%;
    background: radial-gradient(circle, #B89F73 0%, transparent 70%); opacity: 0.35; }
.fox-5 { width: 30px; height: 24px; top: 76%; left: 42%;
    background: radial-gradient(circle, var(--c-fox) 0%, transparent 70%); }
.fox-6 { width: 60px; height: 40px; top: 38%; left: 60%;
    background: radial-gradient(circle, #C9B58E 0%, transparent 70%); opacity: 0.4; }
.fox-7 { width: 24px; height: 24px; top: 90%; right: 38%;
    background: radial-gradient(circle, #B89F73 0%, transparent 70%); opacity: 0.3; }

/* =========================================================
   PERSISTENT VIEWPORT FRAME
   ========================================================= */
.viewport-frame {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 50;
}

.frame-edge {
    position: absolute;
    display: block;
}
.frame-top { top: 0; left: 0; right: 0; height: var(--frame-w); width: 100%; }
.frame-bottom { bottom: 0; left: 0; right: 0; height: var(--frame-w); width: 100%; }
.frame-left { top: 0; bottom: 0; left: 0; width: var(--frame-w); height: 100%; }
.frame-right { top: 0; bottom: 0; right: 0; width: var(--frame-w); height: 100%; }

.frame-stroke {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.frame-stroke-rect {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: frame-draw 2.5s ease-out 0.2s forwards;
}
.frame-stroke-inner {
    animation-delay: 0.6s;
    animation-duration: 2.2s;
}

@keyframes frame-draw {
    to { stroke-dashoffset: 0; }
}

/* Corner ornaments */
.corner {
    position: absolute;
    width: 80px;
    height: 80px;
    pointer-events: none;
    opacity: 0;
    animation: corner-fade 1.5s ease-out 2.2s forwards;
}
.corner-tl { top: 4px; left: 4px; }
.corner-tr { top: 4px; right: 4px; }
.corner-bl { bottom: 4px; left: 4px; }
.corner-br { bottom: 4px; right: 4px; }

@keyframes corner-fade {
    from { opacity: 0; transform: scale(0.7); }
    to { opacity: 1; transform: scale(1); }
}

/* =========================================================
   STAGE & PLATES
   ========================================================= */
.stage {
    position: relative;
    z-index: 1;
    padding: var(--frame-w);
}

.plate {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(60px, 10vh, 140px) var(--pad-side);
    position: relative;
}

.plate-inner {
    width: 100%;
    max-width: var(--max-w);
    text-align: center;
    position: relative;
}
.plate-inner.narrow { max-width: 720px; }

/* =========================================================
   PLATE 1: TITLE
   ========================================================= */
.plate-title {
    background:
        radial-gradient(ellipse at center, transparent 30%, rgba(27, 77, 79, 0.05) 100%);
}

.title-eyebrow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    font-family: var(--f-accent);
    font-style: italic;
    font-weight: 600;
    color: var(--c-faded);
    letter-spacing: 0.3em;
    text-transform: uppercase;
    font-size: 0.85rem;
    margin-bottom: 36px;
}
.title-eyebrow .rule {
    flex: 0 0 80px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--c-gold), transparent);
}

.display-title {
    font-family: var(--f-display);
    font-weight: 900;
    font-size: clamp(2.5rem, 7vw, 6rem);
    line-height: 0.95;
    letter-spacing: 0.08em;
    color: var(--c-teal);
    margin-bottom: 36px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.title-line { display: block; }
.title-line-top { color: var(--c-teal); }
.title-line-bot { color: var(--c-umber); font-style: normal; }
.title-amp {
    font-family: var(--f-accent);
    font-style: italic;
    font-weight: 400;
    color: var(--c-gold);
    font-size: 0.6em;
    line-height: 1;
    margin: -0.05em 0;
}

.subtitle {
    font-family: var(--f-accent);
    font-size: clamp(1.1rem, 2.4vw, 1.6rem);
    font-style: italic;
    font-weight: 300;
    color: var(--c-faded);
    line-height: 1.5;
    margin-bottom: 40px;
}
.subtitle strong {
    font-family: var(--f-display);
    font-weight: 900;
    font-style: normal;
    color: var(--c-ink);
    letter-spacing: 0.12em;
    font-size: 1.05em;
}

.title-ornament {
    margin: 32px auto 36px;
    max-width: 360px;
}
.title-ornament svg { width: 100%; height: auto; display: block; }

.title-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 14px;
    font-family: var(--f-accent);
    font-style: italic;
    font-weight: 600;
    color: var(--c-faded);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-size: 0.78rem;
    margin-bottom: 56px;
}
.dingbat { color: var(--c-gold); font-size: 1.1em; }

.scroll-cue {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: var(--f-accent);
    font-style: italic;
    color: var(--c-umber);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    font-size: 0.8rem;
}
.cue-arrow {
    display: inline-block;
    transform: rotate(90deg);
    font-size: 1rem;
    animation: cue-bob 2.4s ease-in-out infinite;
    color: var(--c-gold);
}
@keyframes cue-bob {
    0%, 100% { transform: rotate(90deg) translateX(0); }
    50% { transform: rotate(90deg) translateX(6px); }
}

/* =========================================================
   DIVIDERS
   ========================================================= */
.divider {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px var(--pad-side);
    overflow: hidden;
}
.divider-svg {
    width: 100%;
    max-width: 800px;
    height: auto;
    display: block;
}

.vine path { transition: opacity 0.6s ease; }
.vine-left {
    transform-origin: 50% 50%;
    transform: scaleX(0);
    transition: transform 1.2s ease-out;
}
.vine-right {
    transform-origin: 50% 50%;
    transform: scaleX(0);
    transition: transform 1.2s ease-out 0.1s;
}
.rosette {
    transform-origin: 400px 50px;
    transform: scale(0);
    transition: transform 1s cubic-bezier(0.34, 1.56, 0.64, 1) 0.4s;
}

.divider.assembled .vine-left,
.divider.assembled .vine-right { transform: scaleX(1); }
.divider.assembled .rosette { transform: scale(1); }

.divider.pulsing .rosette circle:first-child {
    animation: rosette-pulse 3s ease-in-out 0s 3;
    transform-origin: center;
    transform-box: fill-box;
}

@keyframes rosette-pulse {
    0%, 100% {
        filter: drop-shadow(0 0 0 rgba(198, 146, 58, 0));
    }
    50% {
        filter: drop-shadow(0 0 12px rgba(198, 146, 58, 0.85))
                drop-shadow(0 0 24px rgba(198, 146, 58, 0.4));
    }
}

.rosette-petals { transform-origin: center; transform-box: fill-box; }
.divider.pulsing .rosette-petals {
    animation: petal-spin 12s linear infinite;
}
@keyframes petal-spin {
    to { transform: rotate(360deg); }
}

/* =========================================================
   PLATE 2: INTRODUCTION
   ========================================================= */
.plate-eyebrow {
    font-family: var(--f-accent);
    font-style: italic;
    font-weight: 600;
    color: var(--c-bronze);
    letter-spacing: 0.3em;
    text-transform: uppercase;
    font-size: 0.78rem;
    margin-bottom: 20px;
}
.plate-eyebrow .dingbat { margin: 0 8px; color: var(--c-gold); }

.plate-heading {
    font-family: var(--f-display);
    font-weight: 900;
    font-size: clamp(1.9rem, 5vw, 3.6rem);
    letter-spacing: 0.14em;
    line-height: 1.1;
    color: var(--c-teal);
    margin-bottom: 28px;
    text-shadow: 1px 1px 0 rgba(166, 66, 26, 0.08);
}

.pull-quote {
    font-family: var(--f-accent);
    font-style: italic;
    font-weight: 300;
    font-size: clamp(1.2rem, 3vw, 2rem);
    color: var(--c-umber);
    line-height: 1.4;
    margin: 0 auto 36px;
    max-width: 620px;
    position: relative;
}
.pull-quote::before,
.pull-quote::after {
    content: '\275D';
    color: var(--c-gold);
    font-size: 1.3em;
    margin: 0 0.2em;
    vertical-align: -0.1em;
    opacity: 0.6;
}
.pull-quote::after { content: '\275E'; }

.body-prose {
    font-family: var(--f-body);
    font-weight: 400;
    color: var(--c-ink);
    text-align: left;
    margin: 0 auto;
    max-width: 640px;
}
.body-prose p { margin-bottom: 1.2em; }
.body-prose p:last-child { margin-bottom: 0; }
.body-prose em { color: var(--c-umber); font-style: italic; }
.body-prose strong { color: var(--c-teal); font-weight: 700; }

/* DROP CAP */
.dropcap {
    font-family: var(--f-display);
    font-weight: 900;
    font-size: 4em;
    line-height: 0.85;
    color: var(--c-umber);
    float: left;
    padding: 0.05em 0.12em 0 0;
    margin: 0.05em 0.1em 0 0;
    text-shadow:
        2px 2px 0 rgba(198, 146, 58, 0.35),
        4px 4px 0 rgba(198, 146, 58, 0.15);
    cursor: pointer;
    transition: transform 0.3s ease-out;
    transform-origin: center;
    display: inline-block;
}
.dropcap:hover,
.dropcap.pulse {
    animation: dropcap-pulse 0.6s ease-out;
}
@keyframes dropcap-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

.ornament-list {
    list-style: none;
    margin: 36px auto 0;
    max-width: 540px;
    text-align: left;
    font-family: var(--f-body);
    color: var(--c-faded);
    font-size: 0.98rem;
    line-height: 1.9;
}
.ornament-list li {
    padding: 6px 0;
    border-bottom: 1px dotted rgba(107, 127, 83, 0.3);
}
.ornament-list li:last-child { border-bottom: none; }
.ornament-list .dingbat { margin-right: 12px; color: var(--c-gold); }

/* =========================================================
   PLATE 3: SHOWCASE
   ========================================================= */
.showcase-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 36px;
    margin-top: 48px;
}

.exhibit {
    background: var(--c-parchment);
    border: 1px solid rgba(198, 146, 58, 0.4);
    padding: 28px 24px;
    text-align: center;
    position: relative;
    box-shadow:
        0 1px 0 rgba(30, 24, 17, 0.05),
        inset 0 0 0 4px var(--c-parchment),
        inset 0 0 0 5px rgba(166, 66, 26, 0.25);
}
.exhibit::before,
.exhibit::after {
    content: '\2766';
    position: absolute;
    color: var(--c-gold);
    font-size: 1rem;
}
.exhibit::before { top: 8px; left: 12px; }
.exhibit::after { bottom: 8px; right: 12px; }

.exhibit-frame {
    width: 120px;
    height: 120px;
    margin: 0 auto 16px;
}
.exhibit-svg { width: 100%; height: 100%; display: block; }

.exhibit-numeral {
    font-family: var(--f-accent);
    font-style: italic;
    font-weight: 600;
    color: var(--c-gold);
    letter-spacing: 0.3em;
    text-transform: uppercase;
    font-size: 0.8rem;
    margin-bottom: 8px;
}

.exhibit-title {
    font-family: var(--f-display);
    font-weight: 900;
    font-size: clamp(1rem, 2vw, 1.3rem);
    letter-spacing: 0.1em;
    color: var(--c-teal);
    margin-bottom: 12px;
}

.exhibit-body {
    font-family: var(--f-body);
    font-size: 0.92rem;
    color: var(--c-faded);
    line-height: 1.6;
}

.showcase-coda {
    margin-top: 56px;
    font-family: var(--f-accent);
    font-style: italic;
    color: var(--c-bronze);
    font-size: 1.05rem;
    letter-spacing: 0.05em;
}
.showcase-coda .dingbat { margin: 0 14px; color: var(--c-gold); }

/* =========================================================
   PLATE 4: COLOPHON
   ========================================================= */
.colophon-body {
    font-family: var(--f-body);
    text-align: left;
    margin: 24px auto 36px;
    max-width: 600px;
    color: var(--c-ink);
}
.colophon-body p { margin-bottom: 1em; }
.colophon-body em { color: var(--c-umber); }

.colophon-list {
    margin: 36px auto;
    max-width: 480px;
    font-family: var(--f-accent);
    border-top: 1px solid rgba(107, 127, 83, 0.4);
    border-bottom: 1px solid rgba(107, 127, 83, 0.4);
    padding: 18px 0;
}
.col-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px dotted rgba(107, 127, 83, 0.25);
}
.col-row:last-child { border-bottom: none; }
.col-row dt {
    font-weight: 600;
    color: var(--c-teal);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-size: 0.82rem;
}
.col-row dd {
    font-style: italic;
    color: var(--c-faded);
    font-size: 1rem;
}

.colophon-mark {
    margin: 48px auto 24px;
    width: 140px;
}
.colophon-mark svg {
    width: 100%;
    height: auto;
    display: block;
    animation: mark-breath 6s ease-in-out infinite;
}
@keyframes mark-breath {
    0%, 100% { filter: drop-shadow(0 0 0 rgba(198, 146, 58, 0)); }
    50% { filter: drop-shadow(0 0 16px rgba(198, 146, 58, 0.4)); }
}
.mark-caption {
    font-family: var(--f-accent);
    font-style: italic;
    color: var(--c-umber);
    font-size: 1.1rem;
    letter-spacing: 0.2em;
    margin-top: 10px;
}

.copyright {
    margin-top: 36px;
    font-family: var(--f-accent);
    font-style: italic;
    color: var(--c-faded);
    font-size: 0.85rem;
    letter-spacing: 0.15em;
    opacity: 0.85;
}

/* =========================================================
   REVEAL ANIMATIONS
   ========================================================= */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition:
        opacity 0.9s ease-out,
        transform 0.9s ease-out;
    transition-delay: var(--reveal-delay, 0ms);
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 720px) {
    :root {
        --frame-w: 6px;
        --pad-side: 24px;
    }
    .corner { width: 50px; height: 50px; }
    .showcase-grid { grid-template-columns: 1fr; gap: 24px; }
    .title-eyebrow .rule { flex-basis: 40px; }
    .title-meta { gap: 8px; font-size: 0.7rem; }
    .col-row { flex-direction: column; gap: 4px; }
    .col-row dd { font-size: 0.95rem; }
    .dropcap { font-size: 3.2em; }
    .pull-quote::before,
    .pull-quote::after { display: none; }
}

/* =========================================================
   REDUCED MOTION
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
    .reveal { opacity: 1; transform: none; }
    .vine-left, .vine-right { transform: scaleX(1); }
    .rosette { transform: scale(1); }
    .frame-stroke-rect { stroke-dashoffset: 0; }
    .corner { opacity: 1; }
}
