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

html {
    scroll-behavior: smooth;
    overflow: hidden;
    height: 100%;
}

body {
    font-family: 'Source Sans 3', sans-serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.2vw, 1.15rem);
    line-height: 1.75;
    letter-spacing: 0.01em;
    color: #E8DDD0;
    background: #2E2520;
    overflow: hidden;
    height: 100%;
    position: relative;
}

/* === GRAIN OVERLAY === */
.grain-overlay {
    position: fixed;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    z-index: 1000;
    pointer-events: none;
    mix-blend-mode: overlay;
    opacity: 0.1;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
    background-size: 256px 256px;
    animation: grainShift 0.4s steps(4) infinite;
}

@keyframes grainShift {
    0% { transform: translate(0, 0); }
    25% { transform: translate(-2px, 1px); }
    50% { transform: translate(1px, -2px); }
    75% { transform: translate(-1px, 2px); }
    100% { transform: translate(0, 0); }
}

/* === SPLIT CONTAINER === */
.split-container {
    display: flex;
    width: 100%;
    height: 100%;
    position: relative;
}

/* === LEFT PANE === */
.left-pane {
    width: 55%;
    height: 100%;
    background: #2E2520;
    position: relative;
    overflow: hidden;
    z-index: 2;
}

.left-scroll {
    height: 100%;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 0 clamp(2rem, 5vw, 6rem);
}

.left-scroll::-webkit-scrollbar {
    display: none;
}

/* === RIGHT PANE === */
.right-pane {
    width: 45%;
    height: 100%;
    background: #3D3028;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

#particleCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.right-gradient {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(242, 200, 126, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    animation: gradientRotate 20s linear infinite;
    opacity: 0;
    transition: opacity 2s ease;
}

@keyframes gradientRotate {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* === LUMINOUS SEAM === */
.luminous-seam {
    position: fixed;
    left: 55%;
    top: 0;
    bottom: 0;
    width: 2px;
    z-index: 10;
    pointer-events: none;
    transform: translateX(-50%);
}

.luminous-seam svg {
    width: 100%;
    height: 100%;
}

.luminous-seam path {
    stroke: #D4845A;
    stroke-width: 2;
    animation: seamPulse 4s ease-in-out infinite;
}

@keyframes seamPulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.8; }
}

.seam-quicken path {
    animation-duration: 3s;
}

/* === FACETS (SECTIONS) === */
.facet {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 4rem 0;
}

.facet-content {
    width: 100%;
    max-width: 640px;
}

/* === FACET 1: ORIGIN === */
.facet-origin {
    min-height: 100vh;
    align-items: center;
    justify-content: center;
}

.facet-origin .facet-content {
    text-align: left;
}

.site-title {
    font-family: 'Libre Baskerville', serif;
    font-weight: 700;
    font-size: clamp(3.5rem, 8vw, 7rem);
    line-height: 1.05;
    letter-spacing: -0.02em;
    color: #F2C87E;
    margin-bottom: 2rem;
}

.title-line {
    display: block;
    overflow: hidden;
}

.title-line span {
    display: inline-block;
    opacity: 0;
    transform: translateY(20px);
}

.title-line span.visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55),
                transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.origin-phrase {
    font-family: 'Source Sans 3', sans-serif;
    font-weight: 400;
    font-size: clamp(1.1rem, 1.5vw, 1.35rem);
    color: #C4A882;
    letter-spacing: 0.05em;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 1s ease 0.2s, transform 1s ease 0.2s;
}

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

/* === SECTION LABELS === */
.section-label {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2.5rem;
    font-family: 'DM Sans', sans-serif;
    font-weight: 500;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #D4845A;
}

.label-divider {
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, #D4845A40, transparent);
}

.label-name {
    color: #C4A882;
}

/* === NEOMORPHIC CARDS === */
.neo-card {
    padding: 2rem;
    border-radius: 16px;
    margin-bottom: 1.5rem;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55),
                transform 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55),
                box-shadow 0.15s ease;
}

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

.neo-raised {
    background: #352D26;
    box-shadow: 6px 6px 12px #1A1410, -6px -6px 12px rgba(255, 245, 230, 0.06);
    position: relative;
}

.neo-raised:active {
    box-shadow: inset 4px 4px 8px #1A1410, inset -4px -4px 8px rgba(255, 245, 230, 0.04);
    transition: box-shadow 0.15s ease;
}

.neo-inset {
    background: #2A221C;
    box-shadow: inset 4px 4px 10px #1A1410, inset -4px -4px 10px rgba(255, 245, 230, 0.04);
}

.neo-inset:active {
    box-shadow: 6px 6px 12px #1A1410, -6px -6px 12px rgba(255, 245, 230, 0.06);
    transition: box-shadow 0.15s ease;
}

.neo-card p {
    color: #E8DDD0;
    line-height: 1.75;
}

/* === TIDE MARKS === */
.tide-mark {
    height: 4px;
    margin: 1rem 0;
    background: repeating-conic-gradient(#1A1410 0% 25%, #3D3028 0% 50%) 50% / 8px 8px;
    opacity: 0;
    transition: opacity 1.2s ease;
}

.tide-mark.visible {
    opacity: 0.3;
}

/* === FACET 5: STILLNESS === */
.facet-stillness {
    min-height: 80vh;
    align-items: center;
}

.stillness-card {
    max-width: 420px;
}

.stillness-card p {
    font-family: 'Libre Baskerville', serif;
    font-weight: 400;
    font-size: clamp(1.1rem, 1.4vw, 1.3rem);
    line-height: 1.6;
    color: #C4A882;
    font-style: italic;
}

/* === END SPACE === */
.end-space {
    height: 40vh;
}

/* === RADIAL NAVIGATION === */
.nav-trigger {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    z-index: 100;
}

.nav-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #352D26;
    box-shadow: 4px 4px 8px #1A1410, -4px -4px 8px rgba(255, 245, 230, 0.06);
    cursor: pointer;
    transition: box-shadow 0.3s ease, transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
}

.nav-circle::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #D4845A;
    transform: translate(-50%, -50%);
}

.nav-circle:active {
    box-shadow: inset 3px 3px 6px #1A1410, inset -3px -3px 6px rgba(255, 245, 230, 0.04);
    transform: scale(0.95);
}

.nav-menu {
    position: absolute;
    bottom: 50%;
    left: 50%;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-trigger:hover .nav-menu,
.nav-trigger.active .nav-menu {
    opacity: 1;
    pointer-events: auto;
}

.nav-dot {
    position: absolute;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #352D26;
    box-shadow: 3px 3px 6px #1A1410, -3px -3px 6px rgba(255, 245, 230, 0.05);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: box-shadow 0.15s ease, transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.nav-dot::after {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #C4A882;
    transition: background 0.3s ease;
}

.nav-dot:hover::after {
    background: #D4845A;
}

.nav-dot:active {
    box-shadow: inset 2px 2px 4px #1A1410, inset -2px -2px 4px rgba(255, 245, 230, 0.03);
    transform: scale(0.9);
}

.nav-dot:nth-child(1) { transform: translate(-14px, -70px); }
.nav-dot:nth-child(2) { transform: translate(30px, -60px); }
.nav-dot:nth-child(3) { transform: translate(50px, -30px); }
.nav-dot:nth-child(4) { transform: translate(30px, 0px); }
.nav-dot:nth-child(5) { transform: translate(-14px, 10px); }

.nav-label {
    position: absolute;
    left: calc(100% + 10px);
    white-space: nowrap;
    font-family: 'DM Sans', sans-serif;
    font-weight: 500;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #C4A882;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.nav-dot:hover .nav-label {
    opacity: 1;
}

/* === TYPOGRAPHY HEADLINES === */
h1, h2, h3 {
    font-family: 'Libre Baskerville', serif;
    font-weight: 700;
    color: #F2C87E;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

h2 {
    font-size: clamp(2.2rem, 5vw, 4rem);
    margin-bottom: 1.5rem;
}

/* === SCROLLBAR HIDDEN EVERYWHERE === */
::-webkit-scrollbar {
    display: none;
}

/* === MOBILE LAYOUT === */
@media (max-width: 768px) {
    .split-container {
        flex-direction: column;
    }

    .left-pane {
        width: 100%;
        height: 100%;
        z-index: 2;
        background: rgba(46, 37, 32, 0.92);
    }

    .right-pane {
        width: 100%;
        height: 100%;
        position: fixed;
        top: 0;
        left: 0;
        z-index: 1;
    }

    .luminous-seam {
        display: none;
    }

    .left-scroll {
        padding: 0 clamp(1.5rem, 4vw, 3rem);
    }

    .nav-trigger {
        bottom: 1.5rem;
        left: 1.5rem;
    }

    .site-title {
        font-size: clamp(2.5rem, 12vw, 4.5rem);
    }

    .nav-dot:nth-child(1) { transform: translate(-14px, -65px); }
    .nav-dot:nth-child(2) { transform: translate(25px, -55px); }
    .nav-dot:nth-child(3) { transform: translate(45px, -25px); }
    .nav-dot:nth-child(4) { transform: translate(25px, 5px); }
    .nav-dot:nth-child(5) { transform: translate(-14px, 15px); }
}

/* === DUSK ROSE ACCENT (visited/secondary) === */
.neo-card:visited,
.facet-stillness .section-label .label-text {
    color: #A85C5C;
}

/* === SUNSET BONE HIGHLIGHT === */
.neo-raised::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 16px;
    pointer-events: none;
    box-shadow: inset 1px 1px 0 #FFF5E6;
    opacity: 0.04;
}

/* === FIREFLY AMBER PARTICLE GLOW === */
.right-pane::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 30%;
    background: linear-gradient(to top, #FFD494 0%, transparent 100%);
    opacity: 0.03;
    pointer-events: none;
}

/* === GRAIN FADE FOR STILLNESS === */
body.grain-fading .grain-overlay {
    transition: opacity 3s ease;
    opacity: 0.03;
}
