/* diplomatic.day - Styles */
/* Honeyed-Neutral Diplomatic Spectrum */

:root {
    --bg-primary: #1C1610;
    --bg-secondary: #241E17;
    --sidebar-glass: rgba(42, 34, 24, 0.85); /* #2A2218 at 85% */
    --sidebar-glass-hex: #2A2218;
    --text-display: #D4A857;
    --text-subtitle: #C4A06B;
    --text-sidebar-label: #B8956A;
    --text-body: #A89278;
    --text-muted: #7A6B58;
    --accent-honey: #E8B84D;
    --blur-corridor: #3D3224;
    --hover-lantern: #F0C660;
    --angle-skew: -4deg;
    --blur-redact: 3px;
    --blur-enter: 6px;
    --transition-focus: 800ms ease-out;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-body);
    font-family: 'Quicksand', sans-serif;
    font-size: 16px;
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Bubble Layer */
#bubble-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.bubble {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    background: radial-gradient(circle at 35% 35%, rgba(61, 50, 36, 0.15), transparent 70%);
    box-shadow: inset -2px -2px 6px rgba(0, 0, 0, 0.1), inset 2px 2px 4px rgba(212, 168, 87, 0.05);
}

.bubble::before {
    content: '';
    position: absolute;
    width: 30%;
    height: 30%;
    top: 15%;
    left: 20%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08), transparent 70%);
    border-radius: 50%;
}

/* Sidebar */
#sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    z-index: 10;
    background: var(--sidebar-glass);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    display: flex;
    flex-direction: column;
}

.sidebar-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 40px 24px;
}

.sidebar-header {
    margin-bottom: 60px;
}

.sidebar-monogram {
    font-family: 'Fredoka', sans-serif;
    font-weight: 700;
    font-size: 28px;
    color: var(--text-display);
    letter-spacing: 0.04em;
}

.sidebar-nav {
    list-style: none;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.3s ease;
    position: relative;
}

.sidebar-item:hover {
    background: rgba(232, 184, 77, 0.06);
}

.sidebar-indicator {
    width: 0;
    height: 0;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-left: 7px solid transparent;
    transition: border-color 0.4s ease;
    flex-shrink: 0;
}

.sidebar-item.active .sidebar-indicator {
    border-left-color: var(--accent-honey);
    animation: pulse-indicator 2.5s ease-in-out infinite;
}

@keyframes pulse-indicator {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.sidebar-label {
    font-family: 'Nunito', sans-serif;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #B8956A;
    transition: filter var(--transition-focus), opacity var(--transition-focus);
}

.sidebar-label.blurred {
    filter: blur(4px);
    opacity: 0.5;
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 40px;
}

.sidebar-meta {
    font-family: 'Inconsolata', monospace;
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: 0.06em;
}

/* Blur Corridor */
#blur-corridor {
    position: fixed;
    top: 0;
    left: 280px;
    width: 40px;
    height: 100vh;
    z-index: 9;
    background: linear-gradient(to right, var(--blur-corridor), transparent);
    pointer-events: none;
}

/* Main Content */
#main-content {
    margin-left: 320px;
    position: relative;
    z-index: 2;
}

/* Zone Base */
.zone {
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
}

.zone-content {
    width: 100%;
    padding: 80px 60px;
    max-width: 1100px;
}

/* Zone 1: The Anteroom */
.zone-anteroom {
    background-color: var(--bg-primary);
}

.anteroom-content {
    padding-left: 15%;
}

.anteroom-title {
    font-family: 'Fredoka', sans-serif;
    font-weight: 700;
    font-size: clamp(48px, 8vw, 96px);
    color: var(--text-display);
    letter-spacing: 0.04em;
    line-height: 1.05;
    margin-bottom: 40px;
}

.anteroom-title .letter {
    display: inline-block;
    filter: blur(12px);
    opacity: 0;
    transition: filter 0.6s ease-out, opacity 0.6s ease-out;
}

.anteroom-title .letter.revealed {
    filter: blur(0);
    opacity: 1;
}

.anteroom-epigraph {
    font-family: 'Quicksand', sans-serif;
    font-size: 18px;
    color: var(--text-body);
    max-width: 580px;
    line-height: 1.7;
    opacity: 0;
    filter: blur(6px);
    transition: filter 1s ease-out 0.3s, opacity 1s ease-out 0.3s;
}

.anteroom-epigraph.revealed {
    filter: blur(0);
    opacity: 1;
}

/* Zone 2: The Corridor */
.zone-corridor {
    background-color: var(--bg-secondary);
}

.corridor-content {
    display: flex;
    gap: 0;
    position: relative;
    align-items: flex-start;
}

.corridor-left {
    width: 40%;
    padding-left: 10%;
    padding-right: 40px;
}

.corridor-divider {
    position: absolute;
    left: 48%;
    top: 0;
    width: 1px;
    height: 100%;
    background: var(--text-muted);
    transform: rotate(7deg);
    transform-origin: top center;
    opacity: 0.4;
}

.corridor-right {
    width: 45%;
    margin-left: 15%;
    padding-right: 40px;
}

.body-text {
    font-family: 'Quicksand', sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-body);
    max-width: 580px;
    margin-bottom: 24px;
}

/* Redaction */
.redacted {
    filter: blur(var(--blur-redact));
    user-select: none;
    transition: filter 0.6s ease;
    color: var(--text-display);
    cursor: default;
}

.redacted:hover {
    filter: blur(0);
}

/* Zone 3: The Archive */
.zone-archive {
    background-color: var(--bg-primary);
    min-height: 120vh;
}

.archive-content {
    display: flex;
    flex-direction: column;
    gap: 60px;
    padding-top: 100px;
    padding-bottom: 100px;
}

.archive-card {
    transform: skewX(var(--angle-skew));
    border: 1px solid rgba(212, 168, 87, 0.3);
    max-width: 480px;
    overflow: hidden;
    filter: blur(8px);
    opacity: 0.4;
    transition: filter var(--transition-focus), opacity var(--transition-focus);
}

.archive-card.in-view {
    filter: blur(0);
    opacity: 1;
}

.archive-card:nth-child(1) { margin-left: 0; }
.archive-card:nth-child(2) { margin-left: 40px; }
.archive-card:nth-child(3) { margin-left: 80px; }
.archive-card:nth-child(4) { margin-left: 120px; }
.archive-card:nth-child(5) { margin-left: 160px; }

.archive-card-inner {
    transform: skewX(4deg);
    overflow: hidden;
}

.archive-image {
    width: 100%;
    aspect-ratio: 4/3;
    display: flex;
    align-items: center;
    justify-content: center;
}

.archive-image svg {
    width: 100%;
    height: 100%;
}

.archive-timestamp {
    display: block;
    font-family: 'Inconsolata', monospace;
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: 0.06em;
    padding: 12px 16px;
    transform: skewX(4deg);
}

/* Zone 4: The Signal */
.zone-signal {
    background-color: var(--bg-secondary);
}

.signal-content {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 80px 40px;
}

.signal-communique {
    font-family: 'Fredoka', sans-serif;
    font-weight: 600;
    font-size: clamp(36px, 5vw, 72px);
    color: var(--text-display);
    line-height: 1.3;
    max-width: 900px;
    border: none;
}

.signal-word {
    display: inline;
    transition: filter 0.8s ease-out, opacity 0.8s ease-out;
}

.signal-redacted {
    filter: blur(6px);
    opacity: 0.5;
    cursor: default;
}

.signal-redacted.revealed {
    filter: blur(0);
    opacity: 1;
}

/* Zone 5: The Protocol */
.zone-protocol {
    background-color: #161210;
}

.protocol-content {
    padding-top: 120px;
    padding-bottom: 120px;
    padding-left: 15%;
}

.protocol-text {
    font-family: 'Quicksand', sans-serif;
    font-size: 18px;
    line-height: 1.7;
    color: var(--text-body);
    max-width: 580px;
    margin-bottom: 60px;
}

.protocol-line-container {
    width: 100%;
    max-width: 700px;
    height: 1px;
    position: relative;
    margin-bottom: 30px;
    overflow: hidden;
}

.protocol-line {
    width: 0;
    height: 1px;
    background: var(--text-display);
    transform: rotate(7deg);
    transform-origin: left center;
    transition: width 3s ease-out;
}

.protocol-line.extended {
    width: 100%;
}

.protocol-date {
    font-family: 'Inconsolata', monospace;
    font-size: 12px;
    color: var(--text-muted);
    letter-spacing: 0.06em;
    opacity: 0;
    transition: opacity 1s ease-out;
}

.protocol-date.visible {
    opacity: 1;
}

/* Blur-Focus Animation Classes */
.blur-enter {
    filter: blur(var(--blur-enter));
    opacity: 0.4;
    transition: filter var(--transition-focus), opacity var(--transition-focus);
}

.blur-enter.in-view {
    filter: blur(0);
    opacity: 1;
}

/* Mobile Bottom Nav */
#mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 56px;
    z-index: 20;
    background: var(--sidebar-glass);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
}

.mobile-nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-around;
    height: 100%;
    padding: 0 16px;
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px 16px;
    position: relative;
}

.mobile-indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: transparent;
    transition: background 0.3s ease;
}

.mobile-nav-item.active .mobile-indicator {
    background: var(--accent-honey);
    animation: pulse-indicator 2.5s ease-in-out infinite;
}

.mobile-label {
    font-family: 'Nunito', sans-serif;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-subtitle);
    letter-spacing: 0.06em;
}

/* Mobile blur corridor */
#mobile-nav::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 0;
    width: 100%;
    height: 20px;
    background: linear-gradient(to top, var(--blur-corridor), transparent);
    pointer-events: none;
}

/* Responsive */
@media (max-width: 1024px) {
    #sidebar {
        width: 220px;
    }

    #blur-corridor {
        left: 220px;
    }

    #main-content {
        margin-left: 260px;
    }

    .zone-content {
        padding: 60px 40px;
    }

    .corridor-left {
        padding-left: 0;
    }

    .signal-communique {
        font-size: clamp(28px, 4vw, 56px);
    }
}

@media (max-width: 768px) {
    #sidebar {
        display: none;
    }

    #blur-corridor {
        display: none;
    }

    #main-content {
        margin-left: 0;
    }

    #mobile-nav {
        display: block;
    }

    .zone-content {
        padding: 60px 24px;
    }

    .anteroom-content {
        padding-left: 5%;
    }

    .anteroom-title {
        font-size: clamp(36px, 10vw, 64px);
    }

    .corridor-content {
        flex-direction: column;
        gap: 40px;
    }

    .corridor-left,
    .corridor-right {
        width: 100%;
        padding-left: 0;
        padding-right: 0;
        margin-left: 0;
    }

    .corridor-divider {
        display: none;
    }

    .archive-card {
        max-width: 100%;
    }

    .archive-card:nth-child(1),
    .archive-card:nth-child(2),
    .archive-card:nth-child(3),
    .archive-card:nth-child(4),
    .archive-card:nth-child(5) {
        margin-left: 0;
    }

    .signal-communique {
        font-size: clamp(24px, 7vw, 48px);
    }

    .protocol-content {
        padding-left: 5%;
    }

    body {
        padding-bottom: 56px;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--text-muted);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-subtitle);
}

/* Selection */
::selection {
    background: rgba(212, 168, 87, 0.3);
    color: var(--text-display);
}
