/* ============================================
   diplomatic.bar - Design System
   Colors: #5C4033, #F4EDE4, #1A0E12, #8B0000, #B8860B, #e8ddd0, #8B6914, #ddd2c5, #2D1820, #1C0F13, #D4A853
   Fonts: Space Mono (display), Lora (body), Inter (UI)
   ============================================ */

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: #1A0E12;
    color: #F4EDE4;
    font-family: 'Lora', Georgia, serif;
    line-height: 1.7;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3 {
    font-family: 'Space Mono', 'Courier New', monospace;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* ============================================
   SPREAD LAYOUT (Magazine-style sections)
   ============================================ */

.spread {
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 40px;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

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

.spread-col {
    position: relative;
}

/* ============================================
   SECTION 1: DOSSIER COVER (HERO)
   ============================================ */

#dossier-cover {
    min-height: 100vh;
    background-color: #1C0F13;
    flex-direction: column;
    overflow: hidden;
    --mouse-x: 0.5;
    --mouse-y: 0.5;
}

/* Leather texture overlay */
.leather-texture {
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(92, 64, 51, 0.03) 2px,
            rgba(92, 64, 51, 0.03) 4px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 3px,
            rgba(92, 64, 51, 0.02) 3px,
            rgba(92, 64, 51, 0.02) 6px
        ),
        radial-gradient(
            ellipse at calc(var(--mouse-x, 0.5) * 100%) calc(var(--mouse-y, 0.5) * 100%),
            rgba(184, 134, 11, 0.08) 0%,
            transparent 50%
        );
    pointer-events: none;
    z-index: 1;
}

/* Brass corners */
.brass-corners {
    position: absolute;
    inset: 20px;
    pointer-events: none;
    z-index: 2;
}

.corner {
    position: absolute;
    width: 60px;
    height: 60px;
}

.corner-tl {
    top: 0;
    left: 0;
    border-top: 2px solid #B8860B;
    border-left: 2px solid #B8860B;
}

.corner-tr {
    top: 0;
    right: 0;
    border-top: 2px solid #B8860B;
    border-right: 2px solid #B8860B;
}

.corner-bl {
    bottom: 0;
    left: 0;
    border-bottom: 2px solid #B8860B;
    border-left: 2px solid #B8860B;
}

.corner-br {
    bottom: 0;
    right: 0;
    border-bottom: 2px solid #B8860B;
    border-right: 2px solid #B8860B;
}

/* Dossier emboss content */
.dossier-emboss {
    position: relative;
    z-index: 3;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.seal {
    width: 150px;
    height: 150px;
    margin-bottom: 20px;
}

.seal-svg {
    width: 100%;
    height: 100%;
    transition: transform 0.1s linear;
}

.site-title {
    font-size: clamp(48px, 8vw, 96px);
    letter-spacing: 0.15em;
    line-height: 1;
    color: #F4EDE4;
    display: flex;
    align-items: baseline;
    gap: 0;
}

.title-dot {
    color: #B8860B;
    font-size: clamp(48px, 8vw, 96px);
}

.tagline {
    font-family: 'Lora', Georgia, serif;
    font-style: italic;
    font-size: 1.1rem;
    color: #ddd2c5;
    letter-spacing: 0.05em;
    opacity: 0.8;
}

.classification-stamp {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin-top: 20px;
    padding: 12px 30px;
    border: 2px solid #8B0000;
    transform: rotate(-3deg) scale(0);
    opacity: 0;
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
}

.classification-stamp.stamp-visible {
    transform: rotate(-3deg) scale(1);
    opacity: 1;
}

.stamp-text {
    font-family: 'Space Mono', monospace;
    font-size: 1.4rem;
    color: #8B0000;
    letter-spacing: 0.2em;
    font-weight: 700;
}

.stamp-date {
    font-family: 'Space Mono', monospace;
    font-size: 0.7rem;
    color: #8B0000;
    letter-spacing: 0.15em;
    opacity: 0.7;
}

/* Scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    opacity: 1;
    transition: opacity 0.5s ease;
}

.scroll-indicator.hidden {
    opacity: 0;
    pointer-events: none;
}

.scroll-text {
    font-family: 'Space Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #B8860B;
}

.scroll-arrow {
    font-size: 1.2rem;
    color: #B8860B;
    animation: bobArrow 2s ease-in-out infinite;
}

@keyframes bobArrow {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(8px); }
}

/* ============================================
   SECTION NUMBERS
   ============================================ */

.section-number {
    font-family: 'Space Mono', monospace;
    font-size: 0.75rem;
    color: #B8860B;
    letter-spacing: 0.3em;
    display: block;
    margin-bottom: 12px;
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.section-number.number-visible {
    opacity: 0.6;
    transform: translateX(0);
}

/* ============================================
   SECTION TITLES
   ============================================ */

.section-title {
    font-size: clamp(28px, 4vw, 48px);
    color: #F4EDE4;
    margin-bottom: 30px;
    position: relative;
    display: inline-block;
}

/* ============================================
   UNDERLINE-DRAW ANIMATION
   ============================================ */

.underline-draw {
    position: relative;
    display: inline;
    cursor: default;
}

.underline-draw::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #B8860B, #D4A853);
    transition: width 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.underline-draw.visible::after,
.underline-draw:hover::after {
    width: 100%;
}

/* ============================================
   BODY TEXT
   ============================================ */

.body-text {
    font-family: 'Lora', Georgia, serif;
    font-size: 1.05rem;
    line-height: 1.8;
    color: #ddd2c5;
    margin-bottom: 20px;
}

.body-text em {
    color: #D4A853;
    font-style: italic;
}

.small-text {
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    color: #8B6914;
    opacity: 0.7;
}

/* ============================================
   CAPTIONS
   ============================================ */

.caption {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    color: #8B6914;
    letter-spacing: 0.05em;
    margin-top: 16px;
    text-align: center;
    font-weight: 300;
}

/* ============================================
   ISOMETRIC SCENES
   ============================================ */

.isometric-scene {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    transition: transform 0.1s linear;
}

.iso-svg {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.3));
}

/* ============================================
   MENU STYLES
   ============================================ */

.menu-category {
    margin-bottom: 36px;
}

.menu-heading {
    font-family: 'Space Mono', monospace;
    font-size: 0.8rem;
    color: #B8860B;
    letter-spacing: 0.2em;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(184, 134, 11, 0.3);
}

.menu-item {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(92, 64, 51, 0.15);
    transition: background-color 0.3s ease, padding-left 0.3s ease;
}

.menu-item.menu-item-hover {
    background-color: rgba(184, 134, 11, 0.05);
    padding-left: 8px;
}

.menu-name {
    font-family: 'Lora', Georgia, serif;
    font-size: 1rem;
    color: #F4EDE4;
    white-space: nowrap;
}

.menu-dots {
    flex: 1;
    border-bottom: 1px dotted rgba(139, 105, 20, 0.4);
    min-width: 20px;
    margin-bottom: 4px;
}

.menu-designation {
    font-family: 'Space Mono', monospace;
    font-size: 0.7rem;
    color: #8B0000;
    letter-spacing: 0.1em;
    white-space: nowrap;
}

/* ============================================
   PROTOCOL LIST
   ============================================ */

.protocol-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.protocol-item {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.protocol-item:nth-child(1) { transition-delay: 0.1s; }
.protocol-item:nth-child(2) { transition-delay: 0.2s; }
.protocol-item:nth-child(3) { transition-delay: 0.3s; }
.protocol-item:nth-child(4) { transition-delay: 0.4s; }
.protocol-item:nth-child(5) { transition-delay: 0.5s; }

.protocol-item.protocol-visible {
    opacity: 1;
    transform: translateX(0);
}

.protocol-numeral {
    font-family: 'Space Mono', monospace;
    font-size: 1.2rem;
    color: #B8860B;
    min-width: 30px;
    line-height: 1.7;
}

.protocol-text {
    font-family: 'Lora', Georgia, serif;
    font-size: 1rem;
    color: #ddd2c5;
    line-height: 1.7;
}

/* ============================================
   REDACTED BLOCK
   ============================================ */

.redacted-block {
    margin-top: 30px;
    padding: 20px;
    background-color: rgba(26, 14, 18, 0.5);
    border: 1px solid rgba(92, 64, 51, 0.2);
}

.redacted-label {
    font-family: 'Space Mono', monospace;
    font-size: 0.65rem;
    color: #8B0000;
    letter-spacing: 0.15em;
    display: block;
    margin-bottom: 12px;
}

.redacted-lines {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.redacted-line {
    display: block;
    height: 14px;
    background-color: #1A0E12;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.redacted-line:nth-child(1) { transition-delay: 0.1s; }
.redacted-line:nth-child(2) { transition-delay: 0.2s; }
.redacted-line:nth-child(3) { transition-delay: 0.3s; }
.redacted-line:nth-child(4) { transition-delay: 0.4s; }
.redacted-line:nth-child(5) { transition-delay: 0.5s; }

.redacted-block.redacted-visible .redacted-line {
    transform: scaleX(1);
}

/* ============================================
   SECTION 5: COMMUNIQUE (FOOTER)
   ============================================ */

#the-communique {
    background: linear-gradient(180deg, #1A0E12 0%, #1C0F13 50%, #2D1820 100%);
    flex-direction: column;
}

.communique-content {
    max-width: 1000px;
    width: 100%;
    text-align: center;
}

.communique-content .section-title {
    margin-bottom: 50px;
}

.communique-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 60px;
}

.communique-col {
    text-align: center;
}

.communique-col .menu-heading {
    border-bottom: none;
    text-align: center;
}

.communique-col .body-text {
    margin-bottom: 8px;
}

.footer-seal {
    width: 80px;
    height: 80px;
    margin: 40px auto;
    opacity: 0.6;
}

.footer-seal-svg {
    width: 100%;
    height: 100%;
}

.footer-note {
    font-family: 'Inter', sans-serif;
    font-size: 0.65rem;
    color: #5C4033;
    letter-spacing: 0.05em;
    line-height: 1.6;
    max-width: 600px;
    margin: 20px auto 0;
}

/* ============================================
   SECTION BACKGROUNDS / SEPARATORS
   ============================================ */

#intelligence-briefing {
    background: linear-gradient(180deg, #1C0F13 0%, #1A0E12 100%);
}

#dossier-contents {
    background: linear-gradient(180deg, #1A0E12 0%, #1C0F13 100%);
}

#the-protocol {
    background: linear-gradient(180deg, #1C0F13 0%, #1A0E12 100%);
}

/* Horizontal brass rule between sections */
.spread::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 1px;
    background: linear-gradient(90deg, transparent, #B8860B, transparent);
}

#dossier-cover::before {
    display: none;
}

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

@media (max-width: 900px) {
    .spread-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .spread {
        padding: 60px 24px;
    }

    .communique-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .site-title {
        flex-direction: column;
        align-items: center;
    }

    .brass-corners {
        inset: 10px;
    }

    .corner {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 600px) {
    .spread {
        padding: 40px 16px;
    }

    .menu-item {
        flex-wrap: wrap;
    }

    .menu-dots {
        display: none;
    }

    .menu-designation {
        width: 100%;
        text-align: right;
        margin-top: -4px;
    }
}

/* Additional palette colors */
#intelligence-briefing .spread-col-left {
    border-left: 3px solid transparent;
    padding-left: 20px;
    border-image: linear-gradient(to bottom, #6B1D3A, transparent) 1;
}

#dossier-contents .spread-col-right {
    border-right: 3px solid transparent;
    padding-right: 20px;
    border-image: linear-gradient(to bottom, #2F4F4F, transparent) 1;
}

.menu-item.menu-item-hover .menu-name {
    color: #6B1D3A;
}

.protocol-numeral {
    text-shadow: 0 0 20px rgba(47, 79, 79, 0.3);
}
