/* ========================================
   diplomatic.boo -- Styles
   Ethereal Blue / Japanese-Minimal Futurism
   ======================================== */

/* --- CSS Custom Properties --- */
:root {
    /* Palette */
    --frost-white: #F0F4F8;
    --ice-breath: #E0EBF5;
    --halo-blue: #D6E6F2;
    --still-water: #A8C4E0;
    --deep-pond: #8FB8D4;
    --diplomatic-navy: #1B3A5C;
    --slate-ink: #2C3E50;
    --steel-grey: #5D6D7E;
    --protocol-blue: #5B8DB8;
    --midnight-seal: #0F2840;
    --aurora-whisper: #C9DFF0;
    --horizon-line: #B8C9DA;
    --muted-blue: #7B9BB5;
    --light-pond: #B8D4E8;

    /* Typography */
    --font-display: 'Zilla Slab', serif;
    --font-body: 'Source Serif 4', serif;
    --font-mono: 'IBM Plex Mono', monospace;

    /* Breathing Column */
    --column-width: 40%;

    /* Scroll */
    --scroll-progress: 0;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: linear-gradient(180deg, var(--frost-white) 0%, var(--ice-breath) 100%);
    background-attachment: fixed;
    color: var(--slate-ink);
    font-family: var(--font-body);
    font-weight: 400;
    font-size: clamp(1rem, 1.2vw, 1.25rem);
    line-height: 1.85;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background: var(--aurora-whisper);
    color: var(--diplomatic-navy);
}

/* --- Cursor Aura --- */
#cursor-aura {
    position: fixed;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(214, 230, 242, 0.12) 0%, transparent 70%);
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

body:hover #cursor-aura {
    opacity: 1;
}

/* --- Scroll Progress Bar --- */
#progress-bar {
    position: fixed;
    top: 0;
    right: 0;
    width: 2px;
    height: 0%;
    background: var(--protocol-blue);
    box-shadow: 0 0 8px rgba(91, 141, 184, 0.4);
    z-index: 1000;
    transition: height 0.1s linear;
}

/* --- Breathing Column --- */
#breathing-column {
    width: var(--column-width);
    margin: 0 auto;
    position: relative;
    transition: width 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* --- Sections --- */
.section {
    position: relative;
    overflow: visible;
}

.section-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* --- THE ARRIVAL --- */
#arrival {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

#arrival .section-inner {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-top: 61.8vh;
    padding-bottom: 20vh;
}

#domain-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2.4rem, 7vw, 6rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--diplomatic-navy);
    text-align: center;
    position: relative;
    z-index: 2;
    cursor: default;
}

#arrival-blob {
    width: 18vw;
    height: 16vw;
    background: var(--still-water);
    opacity: 0.35;
    margin-top: 6vh;
    animation: blobMorph var(--blob-duration) var(--blob-delay) infinite alternate cubic-bezier(0.45, 0.05, 0.55, 0.95),
               blobBreathe 8s ease-in-out infinite;
}

@keyframes blobBreathe {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.03); }
}

/* --- THE CORRIDOR --- */
#corridor {
    min-height: 200vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15vh 0;
    position: relative;
}

.communique {
    max-width: 38em;
    margin: 15vh 0;
    padding: 0 1.5rem;
}

.body-text {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: clamp(1rem, 1.2vw, 1.25rem);
    line-height: 1.85;
    color: var(--slate-ink);
}

.secondary-text {
    color: var(--steel-grey);
    font-weight: 300;
    margin-top: 1.5em;
}

/* --- THE CHAMBER --- */
#chamber {
    min-height: 200vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10vh 0;
}

.chamber-block {
    position: relative;
    width: 100%;
    padding: 8vh 2rem;
    margin: 4vh 0;
}

.heading-halo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -60%);
    width: 60%;
    height: 40%;
    background: radial-gradient(ellipse, var(--halo-blue) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
    opacity: 0.6;
}

.section-heading {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.8rem, 4vw, 3.2rem);
    letter-spacing: 0.08em;
    color: var(--diplomatic-navy);
    text-align: center;
    position: relative;
    z-index: 1;
    margin-bottom: 3vh;
    cursor: default;
}

.blob-divider {
    width: 100%;
    height: 3px;
    background: var(--horizon-line);
    border-radius: 40% 60% 55% 45% / 55% 40% 60% 45%;
    margin: 2vh 0 4vh;
    animation: dividerWobble 8s ease-in-out infinite alternate;
    opacity: 0.7;
}

@keyframes dividerWobble {
    0% { border-radius: 40% 60% 55% 45% / 55% 40% 60% 45%; }
    33% { border-radius: 50% 50% 45% 55% / 60% 50% 50% 40%; }
    66% { border-radius: 60% 40% 50% 50% / 45% 55% 45% 55%; }
    100% { border-radius: 45% 55% 60% 40% / 50% 45% 55% 50%; }
}

.chamber-block .body-text {
    max-width: 38em;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 1;
}

/* --- THE SEAL --- */
#seal {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.seal-inner {
    width: 100%;
    min-height: 100vh;
    padding: 10vh 1rem;
}

.seal-text {
    text-align: center;
    font-weight: 300;
    font-style: italic;
    font-size: clamp(1.1rem, 1.5vw, 1.4rem);
    color: var(--steel-grey);
    margin-bottom: 8vh;
}

.seal-blob-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 4vh 0;
}

.seal-blob {
    width: 40vw;
    height: 40vw;
    background:
        radial-gradient(circle at 50% 50%, rgba(15, 40, 64, 0.6) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, var(--still-water) 30%, transparent 70%);
    animation: blobMorph var(--blob-duration) var(--blob-delay) infinite alternate cubic-bezier(0.45, 0.05, 0.55, 0.95),
               sealRotate 120s linear infinite;
    opacity: 0.75;
}

@keyframes sealRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.seal-label {
    display: block;
    text-align: center;
    font-family: var(--font-mono);
    font-weight: 400;
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--muted-blue);
    margin-top: 6vh;
    opacity: 0.6;
}

/* --- BLOB BASE STYLES --- */
.blob {
    border-radius: 40% 60% 55% 45% / 55% 40% 60% 45%;
    pointer-events: none;
    position: relative;
    flex-shrink: 0;
    animation: blobMorph var(--blob-duration, 12s) var(--blob-delay, 0s) infinite alternate cubic-bezier(0.45, 0.05, 0.55, 0.95);
    transition: transform 600ms ease-out, box-shadow 600ms ease-out;
}

.blob.pulse-active {
    transform: scale(1.08);
    box-shadow: 0 0 80px 30px rgba(91, 141, 184, 0.25);
    transition: transform 600ms ease-out, box-shadow 600ms ease-out;
}

@keyframes blobMorph {
    0% { border-radius: 40% 60% 55% 45% / 55% 40% 60% 45%; }
    33% { border-radius: 60% 40% 45% 55% / 45% 60% 40% 55%; }
    66% { border-radius: 50% 50% 40% 60% / 60% 50% 50% 40%; }
    100% { border-radius: 45% 55% 60% 40% / 50% 45% 55% 50%; }
}

/* Sentinel Blobs */
.sentinel-blob {
    background: var(--still-water);
    opacity: 0.2;
}

/* Margin blobs - positioned absolutely in section */
.margin-blob {
    position: absolute;
    z-index: 0;
}

/* Corridor section sentinel blobs use light-pond */
#corridor .sentinel-blob {
    background: var(--light-pond);
    opacity: 0.3;
}

/* Courier Blobs */
.courier-blob {
    background: var(--deep-pond);
    opacity: 0.3;
    box-shadow: 0 0 60px 20px rgba(143, 184, 212, 0.15);
}

/* --- REVEAL TEXT ANIMATION --- */
.reveal-text {
    opacity: 0;
    filter: blur(6px);
    transform: translateY(20px);
    transition: opacity 1200ms ease, filter 800ms ease 200ms, transform 1000ms ease;
}

.reveal-text.visible {
    opacity: 1;
    filter: blur(0px);
    transform: translateY(0);
}

/* --- LINK STYLES --- */
a {
    color: var(--protocol-blue);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--diplomatic-navy);
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    #breathing-column {
        --column-width: 85% !important;
        width: 85% !important;
    }

    #domain-title {
        font-size: clamp(1.8rem, 8vw, 3.5rem);
    }

    .section-heading {
        font-size: clamp(1.4rem, 5vw, 2.2rem);
    }

    .communique {
        margin: 8vh 0;
    }

    .seal-blob {
        width: 60vw;
        height: 60vw;
    }

    .margin-blob {
        display: none;
    }

    #arrival .section-inner {
        padding-top: 50vh;
    }
}

@media (max-width: 480px) {
    #domain-title {
        font-size: clamp(1.4rem, 9vw, 2.5rem);
    }

    .communique {
        margin: 6vh 0;
        padding: 0 1rem;
    }

    .chamber-block {
        padding: 4vh 1rem;
    }
}
