/* ========================================
   cbdc.studio - McBling Finance Aesthetic
   Muted Vintage Palette + Garamond Classic
   ======================================== */

:root {
    --dark-walnut: #2a2621;
    --warm-umber: #3d3832;
    --burnished-gold: #c4a87c;
    --parchment-cream: #d6cfc4;
    --aged-pewter: #8a7e6c;
    --faded-amethyst: #b8a9d4;
    --tarnished-teal: #89c4c8;
    --dusty-rose: #d4a9b8;
    --oxidized-copper: #a67c52;
    --warm-charcoal: #4a443c;
    --nav-dark: #3d3832;
    --nav-light: #5a5147;

    --stagger-base: 80ms;
    --stagger-increment: 120ms;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--dark-walnut);
    color: var(--parchment-cream);
    font-family: 'Cormorant Garamond', 'Georgia', serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.2vw, 1.15rem);
    line-height: 1.72;
    letter-spacing: 0.01em;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ========================================
   Guilloche Background Layer (z: 0)
   ======================================== */
.guilloche-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

#guilloche-svg {
    width: 100%;
    height: 100%;
    opacity: 0.08;
}

.guilloche-rotate-cw {
    animation: rotate-cw 180s linear infinite;
    transform-origin: 600px 400px;
}

.guilloche-rotate-ccw {
    animation: rotate-ccw 180s linear infinite;
    transform-origin: 600px 400px;
}

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

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

/* ========================================
   Holographic Overlay Layer (z: 2)
   ======================================== */
.holo-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    pointer-events: none;
    overflow: hidden;
}

.holo-seal {
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    mix-blend-mode: overlay;
    opacity: 0.15;
}

.holo-seal-1 {
    top: 15%;
    right: 8%;
    background: radial-gradient(circle, var(--faded-amethyst) 0%, transparent 70%);
    animation: holo-drift-1 25s ease-in-out infinite;
}

.holo-seal-2 {
    top: 55%;
    left: 5%;
    background: radial-gradient(circle, var(--tarnished-teal) 0%, transparent 70%);
    animation: holo-drift-2 30s ease-in-out infinite;
}

.holo-seal-3 {
    bottom: 20%;
    right: 15%;
    background: radial-gradient(circle, var(--dusty-rose) 0%, transparent 70%);
    animation: holo-drift-3 22s ease-in-out infinite;
}

.holo-numeral {
    position: absolute;
    font-family: 'EB Garamond', serif;
    font-weight: 800;
    font-size: clamp(4rem, 10vw, 9rem);
    color: var(--burnished-gold);
    opacity: 0.06;
    mix-blend-mode: overlay;
    pointer-events: none;
}

.holo-num-1 {
    top: 10%;
    left: 10%;
    animation: holo-drift-1 35s ease-in-out infinite;
}

.holo-num-2 {
    top: 45%;
    right: 12%;
    animation: holo-drift-2 40s ease-in-out infinite;
}

.holo-num-3 {
    bottom: 15%;
    left: 20%;
    animation: holo-drift-3 32s ease-in-out infinite;
}

@keyframes holo-drift-1 {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(30px, -20px); }
    50% { transform: translate(-15px, 25px); }
    75% { transform: translate(20px, 10px); }
}

@keyframes holo-drift-2 {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(-25px, 15px); }
    50% { transform: translate(20px, -30px); }
    75% { transform: translate(-10px, -15px); }
}

@keyframes holo-drift-3 {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(15px, 25px); }
    50% { transform: translate(-30px, -10px); }
    75% { transform: translate(25px, -20px); }
}

/* ========================================
   Navigation Bar
   ======================================== */
.nav-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 52px;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    background: linear-gradient(135deg, var(--nav-dark) 0%, var(--nav-light) 100%);
    border-bottom: 1px solid rgba(196, 168, 124, 0.15);
    backdrop-filter: blur(10px);
}

.nav-item {
    font-family: 'EB Garamond', serif;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--parchment-cream);
    text-decoration: none;
    padding: 0.5rem 1rem;
    transition: box-shadow 0.4s ease, color 0.4s ease;
    font-variant: small-caps;
}

.nav-item:hover {
    color: var(--burnished-gold);
    box-shadow: 0 0 20px rgba(196, 168, 124, 0.4);
}

/* ========================================
   Chambers (Sections)
   ======================================== */
.chamber {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    padding: 80px 5vw;
    overflow: hidden;
}

.chamber-vault {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 52px;
}

.chamber-engraving {
    min-height: 120vh;
    padding-top: 100px;
}

.chamber-mint {
    min-height: 140vh;
    padding-top: 100px;
}

.chamber-circulation {
    min-height: 120vh;
    padding-top: 100px;
}

.chamber-archive {
    min-height: 100vh;
    padding-top: 100px;
    padding-bottom: 120px;
}

/* ========================================
   Denomination Watermarks
   ======================================== */
.denomination-watermark {
    position: absolute;
    font-family: 'EB Garamond', serif;
    font-weight: 800;
    font-size: clamp(8rem, 20vw, 16rem);
    color: var(--burnished-gold);
    opacity: 0.06;
    pointer-events: none;
    user-select: none;
    line-height: 1;
}

.watermark-01 {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.04;
}

.watermark-01-bg {
    top: 10%;
    right: 5%;
}

.watermark-02 {
    top: 5%;
    left: 5%;
}

.watermark-03 {
    top: 15%;
    right: 8%;
}

.watermark-04 {
    bottom: 10%;
    left: 8%;
}

/* ========================================
   Vault Door (Chamber 1)
   ======================================== */
.vault-center {
    text-align: center;
    position: relative;
    z-index: 2;
}

.guilloche-center-motif {
    width: 280px;
    height: 280px;
    margin: 0 auto 2rem;
    opacity: 0;
    animation: vault-guilloche-in 2s ease-out 1.2s forwards;
}

.center-guilloche {
    width: 100%;
    height: 100%;
    animation: rotate-cw 120s linear infinite;
}

@keyframes vault-guilloche-in {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.domain-name {
    font-family: 'EB Garamond', serif;
    font-weight: 700;
    font-size: clamp(2.4rem, 5.5vw, 4.8rem);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--burnished-gold);
    margin-bottom: 1.2rem;
}

.char {
    display: inline-block;
    opacity: 0;
    transform: translateY(4px);
    animation: char-reveal 0.4s ease-out forwards;
    animation-delay: calc(1.2s + var(--i) * 80ms);
}

@keyframes char-reveal {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.subtitle {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 400;
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    color: var(--parchment-cream);
    opacity: 0;
    animation: fade-in 1s ease-out 2.4s forwards;
    letter-spacing: 0.02em;
    font-style: italic;
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 0.85; }
}

.scroll-indicator {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
    opacity: 0;
    animation: fade-in 1s ease-out 3s forwards;
}

.scroll-line {
    width: 1px;
    height: 0;
    background: var(--burnished-gold);
    animation: scroll-grow 2s ease-in-out 3.2s forwards, scroll-pulse 3s ease-in-out 5.2s infinite;
}

@keyframes scroll-grow {
    from { height: 0; opacity: 0; }
    to { height: 60px; opacity: 0.5; }
}

@keyframes scroll-pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 0.15; }
}

/* ========================================
   Security Thread Divider
   ======================================== */
.security-thread {
    position: relative;
    z-index: 5;
    width: 100%;
    height: 4px;
    background: linear-gradient(
        90deg,
        var(--faded-amethyst),
        var(--tarnished-teal),
        var(--dusty-rose),
        var(--faded-amethyst),
        var(--tarnished-teal)
    );
    background-size: 300% 100%;
    animation: thread-shimmer 8s ease-in-out infinite;
}

@keyframes thread-shimmer {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ========================================
   Currency Plate Cards
   ======================================== */
.chamber-content {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.currency-plate {
    position: relative;
    background: rgba(42, 38, 33, 0.85);
    border: 1px solid var(--burnished-gold);
    border-radius: 8px;
    padding: 2.5rem 3rem;
    margin-bottom: 2.5rem;
    backdrop-filter: blur(4px);
    transition: transform 0.6s ease, opacity 0.6s ease;
}

.currency-plate:nth-child(2) {
    margin-left: 60px;
}

.currency-plate:nth-child(3) {
    margin-left: 120px;
}

/* Mint plates have thicker gold borders and inner glow */
.mint-plate {
    border-width: 2px;
    box-shadow: inset 0 0 40px rgba(196, 168, 124, 0.06);
}

/* Archive plates have sepia */
.archive-plate {
    filter: sepia(0.08);
}

/* Bracket Frame (corner brackets) */
.bracket-frame {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.bracket-frame::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    width: 20px;
    height: 20px;
    border-left: 1px solid rgba(196, 168, 124, 0.4);
    border-top: 1px solid rgba(196, 168, 124, 0.4);
    opacity: 0;
    transition: opacity 0.3s ease, width 0.3s ease, height 0.3s ease;
}

.bracket-frame::after {
    content: '';
    position: absolute;
    bottom: -4px;
    right: -4px;
    width: 20px;
    height: 20px;
    border-right: 1px solid rgba(196, 168, 124, 0.4);
    border-bottom: 1px solid rgba(196, 168, 124, 0.4);
    opacity: 0;
    transition: opacity 0.3s ease, width 0.3s ease, height 0.3s ease;
}

.currency-plate:hover .bracket-frame::before,
.currency-plate:hover .bracket-frame::after {
    opacity: 1;
    width: 30px;
    height: 30px;
}

/* ========================================
   Typography
   ======================================== */
.section-heading {
    font-family: 'EB Garamond', serif;
    font-weight: 600;
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    color: var(--burnished-gold);
    letter-spacing: 0.04em;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.body-text {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.2vw, 1.15rem);
    line-height: 1.72;
    letter-spacing: 0.01em;
    color: var(--parchment-cream);
    margin-bottom: 1.2rem;
}

.caption-meta {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 400;
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--aged-pewter);
    display: block;
    margin-top: 0.5rem;
}

/* ========================================
   Reveal Animations
   ======================================== */
.reveal-panel {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    transition-delay: calc(var(--panel-delay) * var(--stagger-increment));
}

.reveal-panel.revealed {
    opacity: 1;
    transform: translateX(0);
}

/* ========================================
   Organic Blobs
   ======================================== */
.blob {
    position: absolute;
    pointer-events: none;
    z-index: 0;
}

.blob-1 {
    width: 400px;
    height: 400px;
    top: 10%;
    left: -10%;
    background: rgba(184, 169, 212, 0.08);
    border-radius: 30% 70% 65% 35% / 50% 40% 60% 50%;
    animation: blob-morph 20s ease-in-out infinite;
}

.blob-2 {
    width: 350px;
    height: 350px;
    top: 40%;
    right: -5%;
    background: rgba(137, 196, 200, 0.06);
    border-radius: 60% 40% 35% 65% / 45% 55% 45% 55%;
    animation: blob-morph 20s ease-in-out infinite 5s;
}

.blob-3 {
    width: 300px;
    height: 300px;
    bottom: 5%;
    left: 20%;
    background: rgba(212, 169, 184, 0.07);
    border-radius: 45% 55% 50% 50% / 60% 35% 65% 40%;
    animation: blob-morph 20s ease-in-out infinite 10s;
}

.blob-4 {
    width: 450px;
    height: 450px;
    top: 5%;
    right: -8%;
    background: rgba(184, 169, 212, 0.08);
    border-radius: 55% 45% 60% 40% / 40% 60% 40% 60%;
    animation: blob-morph 20s ease-in-out infinite 3s;
}

.blob-5 {
    width: 380px;
    height: 380px;
    bottom: 10%;
    left: -12%;
    background: rgba(137, 196, 200, 0.06);
    border-radius: 40% 60% 45% 55% / 55% 45% 55% 45%;
    animation: blob-morph 20s ease-in-out infinite 8s;
}

.blob-6 {
    width: 500px;
    height: 500px;
    top: 0;
    left: -15%;
    background: rgba(184, 169, 212, 0.10);
    border-radius: 35% 65% 55% 45% / 50% 50% 50% 50%;
    animation: blob-morph 20s ease-in-out infinite;
}

.blob-7 {
    width: 420px;
    height: 420px;
    top: 30%;
    right: -10%;
    background: rgba(137, 196, 200, 0.08);
    border-radius: 65% 35% 40% 60% / 45% 55% 45% 55%;
    animation: blob-morph 20s ease-in-out infinite 7s;
}

.blob-8 {
    width: 360px;
    height: 360px;
    bottom: 5%;
    left: 30%;
    background: rgba(212, 169, 184, 0.09);
    border-radius: 50% 50% 60% 40% / 35% 65% 35% 65%;
    animation: blob-morph 20s ease-in-out infinite 13s;
}

@keyframes blob-morph {
    0% {
        border-radius: 30% 70% 65% 35% / 50% 40% 60% 50%;
        transform: translate(0, 0) scale(1);
    }
    25% {
        border-radius: 55% 45% 40% 60% / 65% 35% 55% 45%;
        transform: translate(15px, -10px) scale(1.03);
    }
    50% {
        border-radius: 40% 60% 55% 45% / 35% 65% 40% 60%;
        transform: translate(-10px, 20px) scale(0.97);
    }
    75% {
        border-radius: 65% 35% 45% 55% / 50% 50% 65% 35%;
        transform: translate(8px, 5px) scale(1.02);
    }
    100% {
        border-radius: 30% 70% 65% 35% / 50% 40% 60% 50%;
        transform: translate(0, 0) scale(1);
    }
}

/* ========================================
   HUD Reticle
   ======================================== */
.hud-reticle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    height: 400px;
    pointer-events: none;
    z-index: 1;
}

.hud-reticle-2 {
    top: 40%;
    left: 70%;
}

.hud-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    border: 1px solid var(--tarnished-teal);
    border-radius: 50%;
    opacity: 0.15;
}

.hud-ring-1 {
    width: 200px;
    height: 200px;
    margin: -100px 0 0 -100px;
    animation: hud-rotate 6s linear infinite;
    border-style: dashed;
}

.hud-ring-2 {
    width: 280px;
    height: 280px;
    margin: -140px 0 0 -140px;
    animation: hud-rotate 10s linear infinite reverse;
    border-style: dotted;
}

.hud-ring-3 {
    width: 360px;
    height: 360px;
    margin: -180px 0 0 -180px;
    animation: hud-rotate 16s linear infinite;
    opacity: 0.1;
}

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

/* ========================================
   HUD Chart
   ======================================== */
.hud-chart {
    position: relative;
    max-width: 600px;
    margin: 2rem auto;
    padding: 1.5rem;
    border: 1px solid rgba(137, 196, 200, 0.2);
    border-radius: 8px;
    background: rgba(42, 38, 33, 0.6);
}

.chart-svg {
    width: 100%;
    height: auto;
}

.chart-line {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    transition: stroke-dashoffset 2s ease-out;
}

.hud-chart.revealed .chart-line {
    stroke-dashoffset: 0;
}

.chart-labels {
    text-align: center;
    margin-top: 1rem;
}

/* ========================================
   Final Stamp
   ======================================== */
.final-stamp {
    text-align: center;
    padding: 4rem 2rem;
    margin-top: 4rem;
    position: relative;
}

.stamp-text {
    font-family: 'EB Garamond', serif;
    font-weight: 800;
    font-size: clamp(3rem, 8vw, 7rem);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: linear-gradient(
        135deg,
        var(--faded-amethyst),
        var(--burnished-gold),
        var(--tarnished-teal),
        var(--dusty-rose),
        var(--burnished-gold)
    );
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: stamp-shimmer 8s ease-in-out infinite;
}

@keyframes stamp-shimmer {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.stamp-sub {
    margin-top: 1rem;
}

/* ========================================
   Responsive (below 768px)
   ======================================== */
@media (max-width: 768px) {
    .holo-layer {
        display: none;
    }

    #guilloche-svg {
        opacity: 0.04;
    }

    .nav-bar {
        gap: 1rem;
    }

    .nav-item {
        font-size: 0.72rem;
        letter-spacing: 0.1em;
        padding: 0.5rem 0.5rem;
    }

    .chamber {
        padding: 80px 16px;
    }

    .currency-plate {
        padding: 1.5rem 1.2rem;
        border-radius: 8px;
    }

    .currency-plate:nth-child(2),
    .currency-plate:nth-child(3) {
        margin-left: 0;
    }

    .hud-reticle,
    .hud-reticle-2 {
        display: none;
    }

    .blob {
        display: none;
    }

    .guilloche-center-motif {
        width: 180px;
        height: 180px;
    }

    .denomination-watermark {
        font-size: clamp(5rem, 15vw, 10rem);
    }
}

/* ========================================
   Clip-path text reveal
   ======================================== */
.text-clip-reveal {
    clip-path: inset(0 0 100% 0);
    transition: clip-path 0.6s ease-out;
}

.text-clip-reveal.revealed {
    clip-path: inset(0 0 0% 0);
}

/* Warm charcoal for light surface text */
.light-surface {
    color: #4a443c;
}
