/* ==========================================================================
   diplomatic.bar - Styles
   Coastal editorial broadsheet with bubble motifs
   ========================================================================== */

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-weight: 400;
    font-size: 18px;
    line-height: 1.7;
    letter-spacing: 0.005em;
    color: #2C3E3E;
    background-color: #FAFBFC;
    overflow-x: hidden;
}

/* --- Color Variables (for reference) ---
   Deep Teal:      #1A4F5C
   Coastal Blue:   #2B6A7C
   Sea Mist:       #B8D4D9
   Aperol Amber:   #D4956A
   Spritz Coral:   #E8855A
   Warm Sand:      #F5EFE6
   Foam White:     #FAFBFC
   Coastal Mist:   #E8F0F2
   Slate Teal:     #2C3E3E
--- */

/* ==========================================================================
   MASTHEAD
   ========================================================================== */

#masthead {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #2B6A7C;
    overflow: hidden;
}

#masthead-bubbles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

#masthead-title {
    position: relative;
    z-index: 1;
    font-family: 'Bebas Neue', Impact, 'Arial Narrow', sans-serif;
    font-weight: 400;
    font-size: clamp(80px, 15vw, 200px);
    letter-spacing: 0.12em;
    line-height: 0.95;
    text-transform: uppercase;
    color: #F5EFE6;
    text-align: center;
    padding: 0 20px;
}

/* ==========================================================================
   EDITORIAL COLUMN
   ========================================================================== */

.editorial-column {
    margin: 0 auto;
    max-width: 720px;
    padding: 0 24px;
}

/* --- Section Rules (Horizontal Lines) --- */

.section-rule {
    border: none;
    height: 1px;
    background-color: #B8D4D9;
    margin: 40px 0;
}

.section-rule--light {
    background-color: #B8D4D9;
}

.section-rule--colophon {
    border: none;
    height: 1px;
    background-color: #B8D4D9;
    margin: 0 auto 40px;
    max-width: 720px;
    opacity: 0.5;
}

/* --- Editorial Sections --- */

.editorial-section {
    padding: 80px 0;
}

.bg-white {
    background-color: #FAFBFC;
}

.bg-sand {
    background-color: #F5EFE6;
}

.bg-mist {
    background-color: #E8F0F2;
}

/* ==========================================================================
   EDITORIAL FOLD
   ========================================================================== */

#editorial-fold {
    background-color: #FAFBFC;
}

#editorial-fold .bg-sand {
    margin: 0 -9999px;
    padding-left: 9999px;
    padding-right: 9999px;
}

#editorial-fold .bg-sand .pull-quote-block,
#editorial-fold .bg-sand .body-text {
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

/* ==========================================================================
   TYPOGRAPHY
   ========================================================================== */

/* --- Pull Quotes --- */

.pull-quote-block {
    margin-bottom: 40px;
    padding: 24px;
    padding-left: 24px;
    border-left: 3px solid #D4956A;
    position: relative;
    overflow: hidden;
}

.pull-quote {
    margin: 0;
}

.pull-quote--bebas p {
    font-family: 'Bebas Neue', Impact, 'Arial Narrow', sans-serif;
    font-weight: 400;
    font-size: clamp(28px, 4vw, 48px);
    line-height: 1.1;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #1A4F5C;
}

.pull-quote--playfair p {
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    font-weight: 400;
    font-style: italic;
    font-size: clamp(24px, 3.5vw, 42px);
    line-height: 1.35;
    letter-spacing: 0.01em;
    color: #2B6A7C;
}

.pull-quote-attribution {
    display: block;
    margin-top: 16px;
    font-family: 'Bebas Neue', Impact, 'Arial Narrow', sans-serif;
    font-weight: 400;
    font-size: 14px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #D4956A;
    font-style: normal;
}

/* --- Body Text --- */

.body-text p {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-weight: 400;
    font-size: 18px;
    line-height: 1.7;
    letter-spacing: 0.005em;
    color: #2C3E3E;
    margin-bottom: 24px;
}

.body-text p:last-child {
    margin-bottom: 0;
}

.body-text strong {
    font-weight: 600;
}

/* --- Dispatch Titles --- */

.dispatch-title {
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    font-weight: 700;
    font-size: clamp(28px, 4vw, 48px);
    line-height: 1.15;
    letter-spacing: 0.01em;
    color: #1A4F5C;
    margin-bottom: 40px;
}

/* ==========================================================================
   BUBBLE DIVIDERS
   ========================================================================== */

.bubble-divider {
    text-align: center;
    padding: 20px 0;
}

.bubble-divider svg {
    width: 100%;
    max-width: 400px;
    height: auto;
}

/* ==========================================================================
   INTERSTITIAL BUBBLE FIELD
   ========================================================================== */

#interstitial {
    position: relative;
    width: 100%;
    height: 100vh;
    background-color: #1A4F5C;
    overflow: hidden;
}

#interstitial-bubbles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ==========================================================================
   DISPATCH COLUMN
   ========================================================================== */

#dispatch-column {
    background-color: #FAFBFC;
}

#dispatch-column .bg-sand {
    margin: 0 -9999px;
    padding-left: 9999px;
    padding-right: 9999px;
}

#dispatch-column .bg-sand .pull-quote-block,
#dispatch-column .bg-sand .body-text,
#dispatch-column .bg-sand .dispatch-title {
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

#dispatch-column .bg-mist {
    margin: 0 -9999px;
    padding-left: 9999px;
    padding-right: 9999px;
}

#dispatch-column .bg-mist .pull-quote-block,
#dispatch-column .bg-mist .body-text,
#dispatch-column .bg-mist .dispatch-title {
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

/* ==========================================================================
   COLOPHON
   ========================================================================== */

#colophon {
    background-color: #1A4F5C;
    padding: 80px 24px;
    text-align: center;
}

.colophon-content {
    max-width: 720px;
    margin: 0 auto;
}

.colophon-bubble {
    width: 60px;
    height: 60px;
    margin: 0 auto 24px;
}

.colophon-text {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-weight: 600;
    font-size: 11px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #B8D4D9;
    margin-bottom: 8px;
    font-variant: small-caps;
}

.colophon-subtext {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-weight: 400;
    font-size: 11px;
    letter-spacing: 0.08em;
    color: #B8D4D9;
    opacity: 0.6;
}

/* ==========================================================================
   BUBBLE ANIMATIONS (CSS-based)
   ========================================================================== */

/* Masthead and interstitial bubbles are generated via JS with these classes */

.bubble {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    will-change: transform, opacity;
}

.bubble--rising {
    animation: bubbleRise linear infinite;
}

@keyframes bubbleRise {
    0% {
        transform: translateY(0) translateX(0);
        opacity: 1;
    }
    85% {
        opacity: 1;
    }
    100% {
        transform: translateY(-110vh) translateX(var(--drift, 10px));
        opacity: 0;
    }
}

/* Interstitial popping bubbles */
.bubble--popping {
    animation: bubblePop linear infinite;
}

@keyframes bubblePop {
    0% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    65% {
        transform: translateY(-70vh) scale(1);
        opacity: 1;
    }
    70% {
        transform: translateY(-70vh) scale(1.2);
        opacity: 0.5;
    }
    72% {
        transform: translateY(-70vh) scale(1.3);
        opacity: 0;
    }
    100% {
        transform: translateY(-70vh) scale(1.3);
        opacity: 0;
    }
}

/* Pop flash effect */
.bubble--popping::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 50%;
    height: 50%;
    border-radius: 50%;
    background-color: #E8855A;
    transform: translate(-50%, -50%);
    opacity: 0;
    animation: popFlash linear infinite;
    animation-duration: inherit;
}

@keyframes popFlash {
    0%, 65% {
        opacity: 0;
    }
    70% {
        opacity: 0.6;
    }
    72% {
        opacity: 0;
    }
    100% {
        opacity: 0;
    }
}

/* ==========================================================================
   PULL-QUOTE HOVER BUBBLES
   ========================================================================== */

.pull-quote-block .hover-bubble {
    position: absolute;
    border-radius: 50%;
    background-color: rgba(212, 149, 106, 0.25);
    pointer-events: none;
    will-change: transform, opacity;
    opacity: 0;
}

.pull-quote-block:hover .hover-bubble {
    animation: hoverBubbleRise 2s ease-out forwards;
}

@keyframes hoverBubbleRise {
    0% {
        transform: translateY(0);
        opacity: 0.6;
    }
    100% {
        transform: translateY(-120px);
        opacity: 0;
    }
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 768px) {
    body {
        font-size: 16px;
    }

    .editorial-section {
        padding: 48px 0;
    }

    .body-text p {
        font-size: 16px;
    }

    .pull-quote-block {
        padding: 16px;
        padding-left: 16px;
    }

    #colophon {
        padding: 48px 24px;
    }
}
