/* ===== RESET & BASE ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    background-color: #0b1628;
    color: #e8e2d8;
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    font-size: 1.125rem;
    line-height: 1.75;
    overflow-x: hidden;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3 {
    font-family: 'Archivo Black', sans-serif;
    font-weight: 400;
    color: #e8e2d8;
}

h2 {
    font-size: clamp(2rem, 5vw, 4rem);
    letter-spacing: -0.02em;
    line-height: 1.1;
}

h3 {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    letter-spacing: -0.01em;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.panel-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.2em;
    color: rgba(138,180,210,0.4);
    text-transform: uppercase;
    position: absolute;
    top: 24px;
    left: 32px;
}

/* ===== SECTION: THE BRIDGE (HERO) ===== */
.section-bridge {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.bridge-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 80%, rgba(42,84,112,0.3), transparent 60%),
        radial-gradient(ellipse at 70% 30%, rgba(138,180,210,0.1), transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(42,84,112,0.15), transparent 70%);
    background-size: 200% 200%, 200% 200%, 200% 200%;
    animation: bgDrift 30s cubic-bezier(0.37, 0, 0.63, 1) infinite;
    will-change: background-position;
}

@keyframes bgDrift {
    0% {
        background-position: 20% 80%, 70% 30%, 50% 50%;
    }
    33% {
        background-position: 60% 20%, 30% 70%, 80% 30%;
    }
    66% {
        background-position: 40% 60%, 80% 20%, 20% 70%;
    }
    100% {
        background-position: 20% 80%, 70% 30%, 50% 50%;
    }
}

.leather-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 30% 40%, rgba(61,46,31,0.08), transparent 70%);
    opacity: 0.03;
    pointer-events: none;
}

.hero-logotype {
    font-family: 'Archivo Black', sans-serif;
    font-size: clamp(5rem, 16vw, 14rem);
    font-weight: 400;
    letter-spacing: -0.03em;
    text-transform: uppercase;
    color: #e8e2d8;
    position: relative;
    z-index: 1;
    text-align: center;
}

.scroll-invite {
    position: absolute;
    bottom: 10vh;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
}

.scroll-line {
    width: 30vw;
    height: 1px;
    background-color: #8ab4d2;
    animation: pulse 3s ease-in-out infinite;
    transition: opacity 0.8s ease;
}

.scroll-line.hidden {
    opacity: 0;
    animation: none;
}

@keyframes pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* ===== SECTION: PANELS ===== */
.section-panel {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 10vh 0;
}

.panel-odd {
    justify-content: flex-start;
    padding-left: 8%;
}

.panel-even {
    justify-content: flex-end;
    padding-right: 8%;
}

.panel-card {
    position: relative;
    width: 80%;
    max-width: 1100px;
    padding: 80px 48px 48px;
    border-radius: 24px;
    border: 1px solid rgba(138,180,210,0.15);
    background: rgba(138,180,210,0.06);
    backdrop-filter: blur(12px) saturate(120%);
    -webkit-backdrop-filter: blur(12px) saturate(120%);
    box-shadow: inset 0 1px 0 rgba(232,226,216,0.05);
    transition: border-color 0.6s ease;
}

.panel-card:hover {
    border-color: rgba(138,180,210,0.35);
}

.panel-card:hover .panel-label {
    color: rgba(138,180,210,0.7);
    transition: color 0.6s ease;
}

.panel-inner {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.panel-heading {
    flex: 0 0 33%;
}

.panel-divider {
    width: 1px;
    align-self: stretch;
    background-color: #3d2e1f;
    flex-shrink: 0;
}

.panel-body {
    flex: 1;
}

.panel-body p {
    margin-bottom: 1rem;
}

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

/* ===== FADE REVEAL ===== */
.fade-reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
    transition-delay: calc(var(--stagger-index, 0) * 0.1s);
}

.fade-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ===== SECTION: TERRARIUM ===== */
.section-terrarium {
    position: relative;
    width: 100%;
    height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20vh 0;
}

.terrarium-container {
    display: flex;
    align-items: center;
    justify-content: center;
}

.leaf-svg {
    width: 40vw;
    max-width: 500px;
    height: auto;
    animation: leafRotate 720s linear infinite;
}

@keyframes leafRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.leaf-path {
    stroke-linecap: round;
    animation: breatheLeaf 20s ease-in-out infinite;
}

/* ===== SECTION: LEDGER ===== */
.section-ledger {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10vh 0;
}

.ledger-grid {
    display: grid;
    grid-template-columns: repeat(2, 45vw);
    grid-template-rows: repeat(2, 40vh);
    gap: 2vw;
    max-width: 94vw;
}

.ledger-module {
    position: relative;
    padding: 80px 32px 32px;
    border-radius: 24px;
    border: 1px solid rgba(138,180,210,0.15);
    background: rgba(138,180,210,0.06);
    backdrop-filter: blur(12px) saturate(120%);
    -webkit-backdrop-filter: blur(12px) saturate(120%);
    box-shadow: inset 0 1px 0 rgba(232,226,216,0.05);
    transition: border-color 0.6s ease;
    display: flex;
    flex-direction: column;
}

.ledger-module:hover {
    border-color: rgba(138,180,210,0.35);
}

.ledger-module:hover .panel-label {
    color: rgba(138,180,210,0.7);
    transition: color 0.6s ease;
}

.module-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Capability List */
.capability-list {
    list-style: none;
    padding: 0;
}

.capability-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    font-size: 1rem;
    border-bottom: 1px solid rgba(138,180,210,0.08);
}

.capability-list li:last-child {
    border-bottom: none;
}

.puzzle-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    fill: #7ecba1;
}

.puzzle-top { transform: rotate(0deg); }
.puzzle-right { transform: rotate(90deg); }
.puzzle-bottom { transform: rotate(180deg); }
.puzzle-left { transform: rotate(270deg); }

/* Timeline */
.timeline {
    margin-top: 1rem;
}

.timeline-bar {
    width: 100%;
    height: 4px;
    background: rgba(138,180,210,0.15);
    border-radius: 2px;
    overflow: hidden;
}

.timeline-fill {
    width: 85%;
    height: 100%;
    background: linear-gradient(90deg, #2a5470, #8ab4d2);
    border-radius: 2px;
}

.timeline-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 12px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    color: rgba(138,180,210,0.6);
}

.timeline-labels small {
    font-size: 0.65rem;
    color: rgba(138,180,210,0.4);
}

/* Signal Module */
.signal-email {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 1.25rem;
    color: #8ab4d2;
    margin-bottom: 0.5rem;
}

.signal-note {
    font-size: 0.875rem;
    color: rgba(232,226,216,0.5);
}

/* ===== SECTION: THE SIGNAL (CLOSING) ===== */
.section-signal {
    position: relative;
    width: 100%;
    height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.leather-overlay-closing {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 30% 40%, rgba(61,46,31,0.08), transparent 70%);
    pointer-events: none;
}

.leaf-ghost {
    position: absolute;
    width: 20vw;
    height: auto;
    opacity: 0.15;
    transform: rotate(15deg);
    right: 10%;
    top: 20%;
    pointer-events: none;
}

.signal-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 80vw;
}

.signal-statement {
    font-family: 'Archivo Black', sans-serif;
    font-size: clamp(2rem, 6vw, 5rem);
    font-weight: 400;
    letter-spacing: -0.02em;
    line-height: 1.1;
    color: #e8e2d8;
    margin-bottom: 3rem;
}

.signal-line {
    width: 0%;
    height: 1px;
    background-color: #8ab4d2;
    margin: 0 auto;
    transition: width 2s ease-in-out, opacity 1s ease 2.5s;
}

.signal-line.animate {
    width: 100%;
}

.signal-line.fade-out {
    opacity: 0;
}

/* ===== BACKDROP-FILTER FALLBACK ===== */
@supports not (backdrop-filter: blur(12px)) {
    .panel-card,
    .ledger-module {
        background: rgba(11,22,40,0.85);
    }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .panel-odd,
    .panel-even {
        padding-left: 5%;
        padding-right: 5%;
        justify-content: center;
    }

    .panel-card {
        width: 90%;
    }

    .panel-inner {
        flex-direction: column;
        gap: 20px;
    }

    .panel-heading {
        flex: none;
    }

    .panel-divider {
        width: 100%;
        height: 1px;
        align-self: auto;
    }

    .ledger-grid {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(4, auto);
        gap: 4vw;
        padding: 0 5%;
        max-width: 100%;
    }

    .ledger-module {
        min-height: 300px;
    }

    .leaf-svg {
        width: 80vw;
    }

    .hero-logotype {
        font-size: clamp(3rem, 14vw, 8rem);
    }
}
