/* ======================================
   diplomatic.boo - Styles
   Skeuomorphic + Neon-Electric Diagonal Slabs
   ====================================== */

/* --- CSS Custom Properties --- */
:root {
    /* Backgrounds */
    --bg-primary: #1A0A2E;
    --bg-secondary: #0D0620;
    --bg-tertiary: #3D2B1F;

    /* Neon Accents */
    --neon-magenta: #FF2D95;
    --neon-mint: #00F5D4;
    --neon-chartreuse: #B8FF00;
    --neon-orange: #FF6B2B;

    /* Diplomatic Gold */
    --gold: #FFD700;
    --gold-dark: #B8860B;
    --gold-light: #FFF8DC;

    /* Text */
    --text-light: #F0E6FF;
    --text-dark: #2A1A3E;
    --text-linen-light: #E8D8F0;

    /* Leather / Wood */
    --leather: #3D2B1F;
    --walnut-dark: #3D2B1F;
    --walnut-mid: #5C3D2E;
    --walnut-light: #4A3228;
    --wax-dark: #8B0000;
    --wax-light: #DC143C;

    /* Fonts */
    --font-display: 'Baloo 2', cursive;
    --font-sub: 'Nunito', sans-serif;
    --font-body: 'Quicksand', sans-serif;
    --font-mono: 'Poiret One', cursive;
}

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    background: var(--bg-primary);
    color: var(--text-light);
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 17px;
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* --- Slab System --- */
.slab {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    z-index: 7;
}

.slab-1 {
    clip-path: polygon(0 0, 100% 0, 100% 92%, 0 100%);
    z-index: 7;
}

.slab-2 {
    clip-path: polygon(0 5%, 100% 0, 100% 100%, 0 93%);
    margin-top: -100px;
    z-index: 6;
}

.slab-3 {
    clip-path: polygon(0 0, 100% 6%, 100% 94%, 0 100%);
    margin-top: -90px;
    z-index: 5;
}

.slab-4 {
    clip-path: polygon(0 7%, 100% 0, 100% 100%, 0 92%);
    margin-top: -100px;
    z-index: 4;
}

.slab-5 {
    clip-path: polygon(0 0, 100% 5%, 100% 93%, 0 100%);
    margin-top: -80px;
    z-index: 3;
}

.slab-6 {
    clip-path: polygon(0 6%, 100% 0, 100% 100%, 0 95%);
    margin-top: -100px;
    z-index: 2;
}

.slab-7 {
    clip-path: polygon(0 0, 100% 4%, 100% 100%, 0 100%);
    margin-top: -80px;
    z-index: 1;
}

/* --- Slab Textures --- */
.slab-texture {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

/* Embossed Leather */
.slab-texture.leather {
    background:
        /* Directional light highlight */
        linear-gradient(135deg, rgba(255,255,255,0.03) 0%, transparent 50%),
        /* Grain texture */
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 1px,
            rgba(74, 50, 40, 0.15) 1px,
            rgba(74, 50, 40, 0.15) 2px
        ),
        repeating-linear-gradient(
            -30deg,
            transparent,
            transparent 2px,
            rgba(61, 43, 31, 0.12) 2px,
            rgba(61, 43, 31, 0.12) 3px
        ),
        /* Base color */
        linear-gradient(180deg, #1A0A2E 0%, #1A0A2E 100%);
    box-shadow: inset 0 2px 20px rgba(0,0,0,0.5), inset 0 -2px 20px rgba(0,0,0,0.3);
}

/* Walnut Veneer */
.slab-texture.walnut {
    background:
        /* Highlight */
        linear-gradient(135deg, rgba(255,255,255,0.02) 0%, transparent 40%),
        /* Wood grain */
        repeating-linear-gradient(
            2deg,
            var(--walnut-dark) 0px,
            var(--walnut-mid) 2px,
            var(--walnut-light) 4px,
            var(--walnut-dark) 6px,
            var(--walnut-mid) 8px
        ),
        /* Base */
        linear-gradient(180deg, var(--walnut-dark), var(--walnut-light));
    box-shadow: inset 0 4px 30px rgba(0,0,0,0.6), inset 0 -2px 15px rgba(0,0,0,0.3);
}

/* Linen Stationery */
.slab-texture.linen {
    background:
        /* Highlight */
        linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 50%),
        /* Crosshatch */
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 3px,
            rgba(42, 26, 62, 0.06) 3px,
            rgba(42, 26, 62, 0.06) 4px
        ),
        repeating-linear-gradient(
            135deg,
            transparent,
            transparent 3px,
            rgba(42, 26, 62, 0.05) 3px,
            rgba(42, 26, 62, 0.05) 4px
        ),
        /* Floral watermark */
        radial-gradient(ellipse at 30% 50%, rgba(255, 215, 0, 0.04) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 30%, rgba(255, 215, 0, 0.03) 0%, transparent 40%),
        /* Base */
        linear-gradient(180deg, #F0E6FF, #E8D8F0);
    box-shadow: inset 0 1px 10px rgba(42, 26, 62, 0.1);
}

/* Brushed Brass Plate */
.slab-texture.brass {
    background:
        /* Brushing direction */
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 1px,
            rgba(255,255,255,0.03) 1px,
            rgba(255,255,255,0.03) 2px
        ),
        /* Metallic base */
        linear-gradient(
            135deg,
            #B8860B 0%,
            #DAA520 20%,
            #B8860B 40%,
            #DAA520 60%,
            #B8860B 80%,
            #DAA520 100%
        );
    box-shadow:
        inset 0 2px 20px rgba(0,0,0,0.3),
        inset 0 -1px 10px rgba(255,255,255,0.1);
}

/* --- Slab Content --- */
.slab-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 120px 60px;
}

.slab-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 60px;
    max-width: 1200px;
    width: 100%;
    align-items: center;
}

/* Diagonal content rotation based on slab angles */
.slab-1 .slab-grid { transform: rotate(-3deg); }
.slab-2 .slab-grid { transform: rotate(3deg); }
.slab-3 .slab-grid { transform: rotate(-2deg); }
.slab-4 .slab-grid { transform: rotate(4deg); }
.slab-5 .slab-grid { transform: rotate(-3deg); }
.slab-6 .slab-grid { transform: rotate(3deg); }
.slab-7 .slab-grid { transform: rotate(-2deg); }

.content-col {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.decor-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 30px;
}

/* --- Typography --- */
.display-title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(48px, 8vw, 96px);
    line-height: 1.1;
    color: var(--neon-magenta);
    letter-spacing: -0.02em;
    text-shadow:
        0 0 10px var(--neon-magenta),
        0 0 40px rgba(255, 45, 149, 0.5),
        0 0 80px rgba(255, 45, 149, 0.25);
}

.display-title .dot-boo {
    color: var(--neon-mint);
    text-shadow:
        0 0 10px var(--neon-mint),
        0 0 40px rgba(0, 245, 212, 0.5),
        0 0 80px rgba(0, 245, 212, 0.25);
}

.section-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(40px, 6vw, 72px);
    line-height: 1.15;
    color: var(--neon-mint);
    letter-spacing: -0.02em;
    text-shadow:
        0 0 10px var(--neon-mint),
        0 0 40px rgba(0, 245, 212, 0.5),
        0 0 80px rgba(0, 245, 212, 0.25);
}

.section-title.title-dark {
    color: var(--neon-magenta);
    text-shadow:
        0 0 8px var(--neon-magenta),
        0 0 30px rgba(255, 45, 149, 0.4);
}

.subsection-label {
    font-family: var(--font-sub);
    font-weight: 600;
    font-size: clamp(22px, 3vw, 36px);
    color: var(--neon-chartreuse);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-shadow:
        0 0 8px var(--neon-chartreuse),
        0 0 30px rgba(184, 255, 0, 0.4);
}

.subsection-label.label-dark {
    color: var(--bg-primary);
    text-shadow: none;
}

.body-text {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: clamp(16px, 1.8vw, 18px);
    line-height: 1.7;
    color: var(--text-light);
    max-width: 600px;
}

.body-text.text-dark {
    color: var(--text-dark);
}

/* --- Monogram Seals --- */
.monogram-seal {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 40% 35%, var(--wax-light), var(--wax-dark) 70%);
    box-shadow:
        0 0 8px var(--neon-magenta),
        0 0 20px rgba(255, 45, 149, 0.4),
        inset 0 2px 8px rgba(255, 255, 255, 0.15),
        inset 0 -3px 6px rgba(0, 0, 0, 0.4),
        0 4px 15px rgba(0, 0, 0, 0.5);
    position: relative;
}

.monogram-seal::before {
    content: '';
    position: absolute;
    inset: 4px;
    border-radius: 50%;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.monogram {
    font-family: var(--font-mono);
    font-size: 72px;
    color: var(--gold);
    text-shadow:
        1px 1px 0 var(--gold-dark),
        -1px -1px 0 var(--gold-light);
    line-height: 1;
}

.entrance-seal {
    margin-bottom: 20px;
}

.reception-seal {
    margin-top: 30px;
}

.reception-seal .monogram {
    font-size: 36px;
    letter-spacing: 0.05em;
}

.study-seal {
    margin-bottom: 15px;
}

/* --- Lens Flares --- */
.lens-flare {
    position: absolute;
    width: 300px;
    height: 200px;
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.lens-flare.visible {
    opacity: 1;
}

.flare-1 {
    top: -40px;
    right: 20%;
    background: radial-gradient(ellipse at 30% 50%, rgba(255, 45, 149, 0.35) 0%, rgba(0, 245, 212, 0.18) 25%, transparent 70%);
    transform: rotate(-8deg) scale(0.8);
}
.flare-1.visible { transform: rotate(-8deg) scale(1); }

.flare-2 {
    top: -30px;
    left: 15%;
    background: radial-gradient(ellipse at 60% 40%, rgba(0, 245, 212, 0.3) 0%, rgba(255, 45, 149, 0.15) 30%, transparent 70%);
    transform: rotate(10deg) scale(0.8);
}
.flare-2.visible { transform: rotate(10deg) scale(1); }

.flare-3 {
    top: -25px;
    right: 30%;
    background: radial-gradient(ellipse at 40% 50%, rgba(255, 45, 149, 0.25) 0%, rgba(255, 107, 43, 0.15) 30%, transparent 65%);
    transform: rotate(-6deg) scale(0.8);
}
.flare-3.visible { transform: rotate(-6deg) scale(1); }

.flare-4 {
    bottom: 10%;
    left: 25%;
    background: radial-gradient(ellipse at 50% 40%, rgba(255, 215, 0, 0.3) 0%, rgba(255, 45, 149, 0.15) 30%, transparent 70%);
    transform: rotate(12deg) scale(0.8);
}
.flare-4.visible { transform: rotate(12deg) scale(1); }

.flare-5 {
    top: 15%;
    right: 10%;
    background: radial-gradient(ellipse at 35% 55%, rgba(0, 245, 212, 0.3) 0%, rgba(184, 255, 0, 0.15) 30%, transparent 65%);
    transform: rotate(-8deg) scale(0.8);
}
.flare-5.visible { transform: rotate(-8deg) scale(1); }

.flare-6 {
    top: -20px;
    right: 20%;
    background: radial-gradient(ellipse at 55% 45%, rgba(255, 107, 43, 0.3) 0%, rgba(255, 45, 149, 0.15) 30%, transparent 70%);
    transform: rotate(10deg) scale(0.8);
}
.flare-6.visible { transform: rotate(10deg) scale(1); }

.flare-7 {
    bottom: 20%;
    left: 15%;
    background: radial-gradient(ellipse at 45% 50%, rgba(255, 215, 0, 0.35) 0%, rgba(0, 245, 212, 0.2) 25%, transparent 65%);
    transform: rotate(-6deg) scale(0.8);
}
.flare-7.visible { transform: rotate(-6deg) scale(1); }

/* --- Hero SVG Flare --- */
.hero-flare {
    position: fixed;
    top: -100px;
    right: -80px;
    width: 400px;
    height: 400px;
    z-index: 0;
    pointer-events: none;
    opacity: 0.6;
    animation: heroFlarePulse 4s ease-in-out infinite;
}

.hero-flare svg {
    width: 100%;
    height: 100%;
}

@keyframes heroFlarePulse {
    0%, 100% { transform: scale(0.95); opacity: 0.5; }
    50% { transform: scale(1.05); opacity: 0.7; }
}

/* --- Botanical SVGs --- */
.botanical {
    width: 120px;
    height: auto;
    filter: drop-shadow(0 0 6px currentColor);
    opacity: 0.85;
}

.botanical .stem,
.botanical .leaf,
.botanical .petal,
.botanical .wreath-path {
    stroke-dasharray: 500;
    stroke-dashoffset: 500;
    transition: stroke-dashoffset 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.botanical .leaf {
    transition-delay: 0.1s;
}

.slab.in-view .botanical .stem,
.slab.in-view .botanical .wreath-path {
    stroke-dashoffset: 0;
}

.slab.in-view .botanical .leaf-1 { stroke-dashoffset: 0; transition-delay: 0.2s; }
.slab.in-view .botanical .leaf-2 { stroke-dashoffset: 0; transition-delay: 0.3s; }
.slab.in-view .botanical .leaf-3 { stroke-dashoffset: 0; transition-delay: 0.4s; }
.slab.in-view .botanical .leaf-4 { stroke-dashoffset: 0; transition-delay: 0.5s; }
.slab.in-view .botanical .leaf-5 { stroke-dashoffset: 0; transition-delay: 0.6s; }
.slab.in-view .botanical .leaf-6 { stroke-dashoffset: 0; transition-delay: 0.7s; }
.slab.in-view .botanical .leaf-7 { stroke-dashoffset: 0; transition-delay: 0.8s; }

.slab.in-view .botanical .petal-1 { stroke-dashoffset: 0; transition-delay: 0.6s; }
.slab.in-view .botanical .petal-2 { stroke-dashoffset: 0; transition-delay: 0.7s; }
.slab.in-view .botanical .petal-3 { stroke-dashoffset: 0; transition-delay: 0.8s; }

/* Neon glow pulse on complete botanicals */
.slab.in-view .botanical {
    animation: botanicalGlow 2s ease-in-out 1s forwards;
}

@keyframes botanicalGlow {
    0% { filter: drop-shadow(0 0 4px currentColor); }
    100% { filter: drop-shadow(0 0 12px currentColor) drop-shadow(0 0 25px currentColor); }
}

/* --- Seal Navigation --- */
.seal-nav {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 100;
}

.seal-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 40% 35%, var(--wax-light), var(--wax-dark) 70%);
    box-shadow:
        0 0 4px rgba(255, 45, 149, 0.3),
        0 0 10px rgba(255, 45, 149, 0.15),
        inset 0 1px 4px rgba(255, 255, 255, 0.1),
        inset 0 -2px 4px rgba(0, 0, 0, 0.3);
    transition: box-shadow 0.3s ease, transform 0.2s ease;
    position: relative;
}

.seal-btn::before {
    content: '';
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    border: 1px solid rgba(255, 215, 0, 0.2);
}

.seal-btn:nth-child(1) { transform: rotate(3deg); }
.seal-btn:nth-child(2) { transform: rotate(-5deg); }
.seal-btn:nth-child(3) { transform: rotate(7deg); }
.seal-btn:nth-child(4) { transform: rotate(-3deg); }
.seal-btn:nth-child(5) { transform: rotate(6deg); }
.seal-btn:nth-child(6) { transform: rotate(-4deg); }
.seal-btn:nth-child(7) { transform: rotate(5deg); }

.seal-letter {
    font-family: var(--font-mono);
    font-size: 18px;
    color: var(--gold);
    text-shadow: 1px 1px 0 var(--gold-dark), -1px -1px 0 var(--gold-light);
    line-height: 1;
    pointer-events: none;
}

.seal-btn.active {
    box-shadow:
        0 0 8px var(--neon-magenta),
        0 0 20px rgba(255, 45, 149, 0.6),
        0 0 40px rgba(255, 45, 149, 0.3),
        inset 0 1px 4px rgba(255, 255, 255, 0.15),
        inset 0 -2px 4px rgba(0, 0, 0, 0.3);
    animation: sealPulse 2s ease-in-out infinite;
}

@keyframes sealPulse {
    0%, 100% {
        box-shadow:
            0 0 8px var(--neon-magenta),
            0 0 20px rgba(255, 45, 149, 0.5),
            0 0 40px rgba(255, 45, 149, 0.25),
            inset 0 1px 4px rgba(255, 255, 255, 0.15),
            inset 0 -2px 4px rgba(0, 0, 0, 0.3);
    }
    50% {
        box-shadow:
            0 0 12px var(--neon-magenta),
            0 0 30px rgba(255, 45, 149, 0.7),
            0 0 60px rgba(255, 45, 149, 0.4),
            inset 0 1px 4px rgba(255, 255, 255, 0.15),
            inset 0 -2px 4px rgba(0, 0, 0, 0.3);
    }
}

.seal-btn:hover {
    box-shadow:
        0 0 10px var(--neon-mint),
        0 0 25px rgba(0, 245, 212, 0.5),
        inset 0 1px 4px rgba(255, 255, 255, 0.15),
        inset 0 -2px 4px rgba(0, 0, 0, 0.3);
}

/* --- Cursor Flare --- */
.cursor-flare {
    position: fixed;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.6) 0%, rgba(255, 45, 149, 0.3) 40%, transparent 70%);
    pointer-events: none;
    z-index: 99;
    opacity: 0;
    transition: opacity 0.2s ease;
    transform: translate(-50%, -50%);
}

.cursor-flare.visible {
    opacity: 1;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .slab-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    /* Reduce slab angles on mobile */
    .slab-1 { clip-path: polygon(0 0, 100% 0, 100% 96%, 0 100%); }
    .slab-2 { clip-path: polygon(0 3%, 100% 0, 100% 100%, 0 97%); }
    .slab-3 { clip-path: polygon(0 0, 100% 3%, 100% 97%, 0 100%); }
    .slab-4 { clip-path: polygon(0 4%, 100% 0, 100% 100%, 0 96%); }
    .slab-5 { clip-path: polygon(0 0, 100% 3%, 100% 97%, 0 100%); }
    .slab-6 { clip-path: polygon(0 3%, 100% 0, 100% 100%, 0 97%); }
    .slab-7 { clip-path: polygon(0 0, 100% 2%, 100% 100%, 0 100%); }

    .slab-1 .slab-grid { transform: rotate(-1.5deg); }
    .slab-2 .slab-grid { transform: rotate(1.5deg); }
    .slab-3 .slab-grid { transform: rotate(-1deg); }
    .slab-4 .slab-grid { transform: rotate(2deg); }
    .slab-5 .slab-grid { transform: rotate(-1.5deg); }
    .slab-6 .slab-grid { transform: rotate(1.5deg); }
    .slab-7 .slab-grid { transform: rotate(-1deg); }

    .slab-content {
        padding: 80px 24px;
    }

    .slab-2, .slab-3, .slab-4, .slab-5, .slab-6, .slab-7 {
        margin-top: -50px;
    }

    .decor-col {
        order: -1;
    }

    .botanical {
        width: 80px;
    }

    .monogram-seal {
        width: 100px;
        height: 100px;
    }

    .monogram {
        font-size: 52px;
    }

    .seal-nav {
        bottom: 15px;
        right: 15px;
        gap: 8px;
    }

    .seal-btn {
        width: 36px;
        height: 36px;
    }

    .seal-letter {
        font-size: 14px;
    }

    .hero-flare {
        width: 200px;
        height: 200px;
        top: -50px;
        right: -50px;
    }

    .lens-flare {
        width: 180px;
        height: 120px;
    }
}

@media (max-width: 480px) {
    .display-title {
        font-size: 40px;
    }

    .section-title {
        font-size: 32px;
    }

    .subsection-label {
        font-size: 18px;
    }

    .slab-content {
        padding: 60px 16px;
    }
}
