/* ============================
   diplomatic.bar - Styles
   ============================ */

:root {
    --espresso: #2c1e12;
    --olive: #1a1f16;
    --embassy-black: #0e0b08;
    --linen: #f0e8d6;
    --terrazzo: #d4c5a9;
    --brass: #c4a265;
    --bronze: #8a7d6a;
    --sienna: #9e5a3c;

    --font-display: 'DM Serif Display', serif;
    --font-body: 'Commissioner', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --ease-door: cubic-bezier(0.25, 0.1, 0.25, 1);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    background: var(--espresso);
    color: var(--linen);
    font-family: var(--font-body);
    font-weight: 300;
    font-size: clamp(16px, 1.8vw, 19px);
    line-height: 1.72;
    overflow-x: hidden;
}

::selection { background: var(--brass); color: var(--espresso); }

/* Walnut grain texture */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: 0.03;
    background: repeating-linear-gradient(
        0deg,
        rgba(255,255,255,0.01) 0px,
        transparent 1px,
        transparent 4px
    );
}

/* ============================
   The Anteroom (Hero)
   ============================ */
.anteroom {
    height: 100vh;
    display: grid;
    grid-template-columns: 55% 3px 1fr;
    overflow: hidden;
}

.anteroom-left {
    background: var(--espresso);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(40px, 8vw, 120px);
    background-image: repeating-linear-gradient(
        0deg,
        rgba(255,255,255,0.008) 0px,
        transparent 1px,
        transparent 8px
    );
}

.site-title {
    font-family: var(--font-display);
    font-size: clamp(36px, 5vw, 80px);
    letter-spacing: 0.14em;
    color: var(--linen);
    line-height: 1.1;
    opacity: 0.2;
    transition: opacity 0.6s ease;
}

.site-title.visible { opacity: 1; }

.site-premise {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: clamp(16px, 2vw, 20px);
    color: var(--terrazzo);
    margin-top: 1.5rem;
    max-width: 400px;
    opacity: 0;
    transition: opacity 0.4s ease 0.4s;
}

.anteroom.active .site-premise { opacity: 1; }

.brass-divider-hero {
    display: flex;
    align-items: center;
}

.brass-divider-hero svg { width: 3px; height: 100%; }

.brass-draw {
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    transition: stroke-dashoffset 1.8s ease-in-out;
}

.anteroom.active .brass-draw { stroke-dashoffset: 0; }

.anteroom-right {
    overflow: hidden;
}

.terrazzo {
    width: 100%;
    height: 100%;
    background-color: var(--terrazzo);
    background-image:
        radial-gradient(ellipse 18px 12px at 20% 30%, #b8a07a 0%, transparent 100%),
        radial-gradient(ellipse 25px 15px at 60% 15%, #967d5a 0%, transparent 100%),
        radial-gradient(ellipse 12px 20px at 80% 50%, #e8dcc8 0%, transparent 100%),
        radial-gradient(ellipse 30px 10px at 35% 70%, #b8a07a 0%, transparent 100%),
        radial-gradient(ellipse 15px 25px at 70% 80%, #967d5a 0%, transparent 100%),
        radial-gradient(ellipse 20px 8px at 10% 90%, #e8dcc8 0%, transparent 100%),
        radial-gradient(ellipse 22px 14px at 50% 45%, #b8a07a 0%, transparent 100%),
        radial-gradient(ellipse 10px 30px at 90% 25%, #967d5a 0%, transparent 100%),
        radial-gradient(ellipse 28px 12px at 25% 55%, #e8dcc8 0%, transparent 100%);
    filter: saturate(0.5);
    transition: filter 2s ease;
}

.anteroom.active .terrazzo { filter: saturate(1); }

/* ============================
   Exchanges
   ============================ */
.exchange {
    display: grid;
    min-height: 100vh;
    align-items: center;
}

.exchange-1 {
    grid-template-columns: 40% 60%;
}

.exchange-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.7s var(--ease-door), transform 0.7s var(--ease-door);
}

.exchange-visual.visible {
    opacity: 1;
    transform: translateX(0);
}

.exchange-text {
    padding: clamp(40px, 8vw, 120px);
    max-width: 680px;
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.7s var(--ease-door) 0.2s, transform 0.7s var(--ease-door) 0.2s;
}

.exchange-text.visible {
    opacity: 1;
    transform: translateX(0);
}

.protocol-label {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--bronze);
    display: block;
    margin-bottom: 1rem;
}

.section-heading {
    font-family: var(--font-display);
    font-size: clamp(28px, 4vw, 48px);
    letter-spacing: 0.05em;
    color: var(--linen);
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.body-text {
    color: var(--terrazzo);
    margin-bottom: 1rem;
    line-height: 1.72;
}

.rt-arc {
    transition: stroke-dashoffset 2s ease;
}

.exchange-visual.visible .rt-arc {
    stroke-dashoffset: 0;
}

/* ============================
   The Accord
   ============================ */
.accord {
    background: var(--olive);
    padding: clamp(80px, 12vw, 160px) 20px;
    display: flex;
    justify-content: center;
}

.accord-content {
    max-width: 680px;
    text-align: center;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.accord-content.visible { opacity: 1; }

.accord-heading {
    font-family: var(--font-display);
    font-size: clamp(32px, 5vw, 56px);
    letter-spacing: 0.05em;
    color: var(--linen);
    margin-bottom: 2rem;
    line-height: 1.15;
}

.brass-rule {
    height: 1px;
    background: var(--brass);
    margin: 0 auto 2rem;
    width: 0;
    transition: width 0.8s ease;
}

.brass-rule.centered { max-width: 60%; }

.accord-content.visible .brass-rule { width: 60%; }

.accord-body {
    color: var(--terrazzo);
    line-height: 1.72;
    margin-bottom: 1.25rem;
    font-size: clamp(17px, 2vw, 21px);
}

/* ============================
   The Archive
   ============================ */
.archive {
    background: var(--linen);
    padding: 100px 20px;
}

.archive-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 24px;
    max-width: 1100px;
    margin: 0 auto;
}

.archive-block {
    border: 1px solid var(--brass);
    padding: 32px;
    background: var(--linen);
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.5s ease, transform 0.5s ease, border-width 0.3s ease, background-color 0.3s ease;
}

.archive-block.visible {
    opacity: 1;
    transform: translateY(0);
}

.archive-block:hover {
    border-width: 2px;
    background-color: #f2ebd9;
    transform: scale(1.01);
}

.block-top-left { grid-column: 1; grid-row: 1; }
.block-bottom-left { grid-column: 1; grid-row: 2; transition-delay: 0.15s; }
.block-right { grid-column: 2; grid-row: 1 / 3; transition-delay: 0.3s; }

.archive-heading {
    font-family: var(--font-display);
    font-size: clamp(22px, 3vw, 32px);
    letter-spacing: 0.03em;
    color: var(--espresso);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.body-text-light {
    color: var(--espresso);
    font-size: 16px;
    line-height: 1.7;
    opacity: 0.8;
}

.archive .protocol-label {
    color: var(--bronze);
}

/* ============================
   The Departure
   ============================ */
.departure {
    background: var(--embassy-black);
    padding: 80px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-height: 40vh;
    justify-content: center;
}

.embassy-seal {
    margin-bottom: 2rem;
}

.seal-draw {
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    transition: stroke-dashoffset 2s ease;
}

.departure.visible .seal-draw { stroke-dashoffset: 0; }

.departure-text {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 16px;
    color: var(--bronze);
    letter-spacing: 0.04em;
    opacity: 0;
    transition: opacity 0.6s ease 2s;
}

.departure.visible .departure-text { opacity: 1; }

/* ============================
   Mobile
   ============================ */
@media (max-width: 768px) {
    .anteroom {
        grid-template-columns: 1fr;
        grid-template-rows: 60vh auto;
        height: auto;
    }

    .brass-divider-hero { display: none; }

    .anteroom-right { min-height: 40vh; }

    .exchange-1 { grid-template-columns: 1fr; }

    .exchange-visual { padding: 20px; }

    .archive-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .block-right { grid-column: 1; grid-row: 3; }
}

/* Scrollbar */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--embassy-black); }
::-webkit-scrollbar-thumb { background: var(--brass); border-radius: 2px; }
