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

:root {
    --obsidian: #0f0f0f;
    --smoke: #1a1a1a;
    --bone: #e8e0d0;
    --parchment: #c4b896;
    --emerald: #0b6e4f;
    --purple: #6b2fa0;
    --gold: #b8860b;
    --garnet: #8b1a2b;
    --graphite: #3a3a3a;
    --walnut: #2a1f14;
    --concrete: #2a2a2a;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--obsidian);
    color: var(--bone);
    font-family: 'Libre Baskerville', serif;
    font-size: clamp(0.95rem, 1.2vw, 1.15rem);
    line-height: 1.7;
    letter-spacing: 0.01em;
    overflow-x: hidden;
}

main {
    scroll-snap-type: y proximity;
    overflow-y: auto;
    height: 100vh;
}

.panel {
    height: 100vh;
    width: 100%;
    position: relative;
    overflow: hidden;
    scroll-snap-align: start;
}

/* Dot Navigation */
.dot-nav {
    position: fixed;
    right: 2vw;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    border: 1px solid #555;
    background: transparent;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.dot.active:nth-child(1) { background: var(--emerald); border-color: var(--emerald); }
.dot.active:nth-child(2) { background: var(--parchment); border-color: var(--parchment); }
.dot.active:nth-child(3) { background: var(--purple); border-color: var(--purple); }
.dot.active:nth-child(4) { background: var(--gold); border-color: var(--gold); }
.dot.active:nth-child(5) { background: var(--garnet); border-color: var(--garnet); }

/* Layers */
.bg-layer {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.content-layer {
    position: relative;
    z-index: 1;
    height: 100%;
    width: 100%;
}

.fg-layer {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
}

/* === MANIFESTO PANEL === */
.panel-manifesto {
    background: var(--obsidian);
}

.starburst {
    position: absolute;
    width: 200px;
    height: 200px;
    background: conic-gradient(from 0deg, var(--smoke) 0deg, transparent 15deg, transparent 30deg, var(--smoke) 30deg, transparent 45deg, transparent 60deg, var(--smoke) 60deg, transparent 75deg, transparent 90deg, var(--smoke) 90deg, transparent 105deg, transparent 120deg, var(--smoke) 120deg, transparent 135deg, transparent 150deg, var(--smoke) 150deg, transparent 165deg, transparent 180deg, var(--smoke) 180deg, transparent 195deg, transparent 210deg, var(--smoke) 210deg, transparent 225deg, transparent 240deg, var(--smoke) 240deg, transparent 255deg, transparent 270deg, var(--smoke) 270deg, transparent 285deg, transparent 300deg, var(--smoke) 300deg, transparent 315deg, transparent 330deg, var(--smoke) 330deg, transparent 345deg, transparent 360deg);
    border-radius: 50%;
    opacity: 0.3;
}

.starburst-1 { top: 10%; left: 15%; }
.starburst-2 { top: 60%; right: 20%; width: 150px; height: 150px; }
.starburst-3 { bottom: 20%; left: 50%; width: 100px; height: 100px; }

.fern-spiral {
    position: absolute;
    width: 400px;
    height: 400px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.1;
    animation: slowRotate 120s linear infinite;
}

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

.manifesto-title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(3rem, 8vw, 8rem);
    letter-spacing: -0.04em;
    line-height: 0.9;
    text-transform: uppercase;
    position: absolute;
    left: 8vw;
    top: 50%;
    transform: translateY(-50%);
}

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

.char {
    display: inline-block;
    opacity: 0;
    transform: translateY(100%) rotate(8deg);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.panel-manifesto.in-view .char {
    opacity: 1;
    transform: translateY(0) rotate(0deg);
}

.panel-manifesto.in-view .char-line:nth-child(1) .char:nth-child(1) { transition-delay: 0s; }
.panel-manifesto.in-view .char-line:nth-child(1) .char:nth-child(2) { transition-delay: 0.06s; }
.panel-manifesto.in-view .char-line:nth-child(1) .char:nth-child(3) { transition-delay: 0.12s; }
.panel-manifesto.in-view .char-line:nth-child(2) .char:nth-child(1) { transition-delay: 0.18s; }
.panel-manifesto.in-view .char-line:nth-child(2) .char:nth-child(2) { transition-delay: 0.24s; }
.panel-manifesto.in-view .char-line:nth-child(2) .char:nth-child(3) { transition-delay: 0.30s; }

.accent-bar {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 8vw;
    height: 60vh;
    background: var(--emerald);
    opacity: 0;
    transition: opacity 0.8s ease 0.4s;
}

.panel-manifesto.in-view .accent-bar {
    opacity: 1;
}

.torn-edge-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--obsidian);
    clip-path: polygon(0% 40%, 3% 60%, 7% 35%, 12% 55%, 18% 30%, 24% 50%, 30% 25%, 36% 55%, 42% 35%, 48% 60%, 54% 30%, 60% 50%, 66% 20%, 72% 55%, 78% 35%, 84% 60%, 90% 40%, 95% 55%, 100% 30%, 100% 100%, 0% 100%);
}

/* === ETHOS PANEL === */
.panel-ethos {
    background: var(--smoke);
}

.monstera-outline {
    position: absolute;
    right: -50px;
    top: 0;
    height: 100%;
    opacity: 0.08;
}

.panel-ethos.in-view .monstera-outline {
    opacity: 0.15;
    transition: opacity 1s ease;
}

.ethos-content {
    display: flex;
    align-items: flex-start;
    padding: 0 8vw;
    height: 100%;
}

.ethos-left {
    width: 38%;
    padding-top: 30vh;
    clip-path: inset(100% 0 0 0);
    transition: clip-path 0.8s ease;
}

.panel-ethos.in-view .ethos-left {
    clip-path: inset(0 0 0 0);
}

.ethos-statement {
    font-family: 'Libre Baskerville', serif;
    font-style: italic;
    font-size: clamp(2rem, 4vw, 3.5rem);
    line-height: 1.3;
    color: var(--parchment);
}

.ethos-right {
    width: 62%;
    height: 100%;
    position: relative;
    padding-top: 15vh;
}

.collage-layer {
    position: absolute;
    width: 60%;
    height: 50%;
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.panel-ethos.in-view .collage-layer {
    opacity: 1;
    transform: translateX(0);
}

.collage-wood {
    top: 20%;
    left: 10%;
    background: repeating-linear-gradient(90deg, #2a1f14 0px, #1a1510 3px, #2a1f14 6px);
    clip-path: polygon(5% 0%, 95% 3%, 100% 92%, 8% 100%);
    mix-blend-mode: lighten;
    transform: rotate(-2deg) translateX(40px);
    transition-delay: 0s;
}

.panel-ethos.in-view .collage-wood {
    transform: rotate(-2deg) translateX(0);
}

.collage-concrete {
    top: 30%;
    left: 25%;
    background: repeating-linear-gradient(180deg, #2a2a2a 0px, #252525 2px, #2a2a2a 4px);
    clip-path: polygon(0% 5%, 92% 0%, 97% 95%, 3% 100%);
    mix-blend-mode: lighten;
    transform: rotate(1deg) translateX(60px);
    transition-delay: 0.15s;
}

.panel-ethos.in-view .collage-concrete {
    transform: rotate(1deg) translateX(0);
}

.collage-textile {
    top: 15%;
    left: 35%;
    background: repeating-conic-gradient(#2a2a2a 0deg, #1f1f1f 5deg, #2a2a2a 10deg);
    clip-path: polygon(10% 2%, 88% 8%, 95% 90%, 5% 95%);
    mix-blend-mode: lighten;
    transform: rotate(3deg) translateX(80px);
    transition-delay: 0.3s;
}

.panel-ethos.in-view .collage-textile {
    transform: rotate(3deg) translateX(0);
}

/* === PROCESS PANEL === */
.panel-process {
    background: var(--obsidian);
}

.root-network {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0.1;
}

.process-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 10vh;
    height: 100%;
    overflow: hidden;
}

.process-card {
    position: sticky;
    top: 10vh;
    width: 70vw;
    min-height: 50vh;
    padding: 5vh 5vw;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-bottom: 5vh;
    transform: scale(0.92);
    transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.panel-process.in-view .process-card {
    transform: scale(1) rotate(var(--card-rotate, 0deg));
}

.card-1 {
    background: var(--emerald);
    --card-rotate: -2deg;
    clip-path: polygon(0% 0%, 100% 0%, 100% 90%, 95% 92%, 90% 88%, 85% 93%, 80% 89%, 75% 94%, 70% 90%, 65% 93%, 60% 88%, 55% 92%, 50% 89%, 45% 93%, 40% 90%, 35% 94%, 30% 89%, 25% 92%, 20% 88%, 15% 93%, 10% 90%, 5% 94%, 0% 90%);
    z-index: 1;
}

.card-2 {
    background: var(--gold);
    --card-rotate: 2deg;
    clip-path: polygon(0% 0%, 100% 0%, 100% 90%, 97% 93%, 92% 88%, 87% 92%, 82% 89%, 77% 93%, 72% 88%, 67% 92%, 62% 89%, 57% 93%, 52% 88%, 47% 92%, 42% 89%, 37% 93%, 32% 88%, 27% 92%, 22% 89%, 17% 93%, 12% 88%, 7% 92%, 2% 89%, 0% 90%);
    z-index: 2;
}

.card-3 {
    background: var(--purple);
    --card-rotate: -1deg;
    clip-path: polygon(0% 0%, 100% 0%, 100% 91%, 94% 88%, 88% 93%, 82% 89%, 76% 92%, 70% 88%, 64% 93%, 58% 89%, 52% 92%, 46% 88%, 40% 93%, 34% 89%, 28% 92%, 22% 88%, 16% 93%, 10% 89%, 4% 92%, 0% 89%);
    z-index: 3;
}

.card-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: clamp(0.7rem, 0.9vw, 0.85rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(232, 224, 208, 0.7);
    margin-bottom: 2vh;
}

.process-card h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(2.5rem, 5vw, 5rem);
    letter-spacing: -0.04em;
    line-height: 0.9;
    text-transform: uppercase;
    margin-bottom: 2vh;
}

.process-card p {
    font-size: clamp(1rem, 1.3vw, 1.2rem);
    max-width: 500px;
    color: rgba(232, 224, 208, 0.85);
}

/* === WORKS PANEL === */
.panel-works {
    background: var(--obsidian);
}

.works-content {
    position: relative;
    width: 100%;
    height: 100%;
}

.works-item {
    position: absolute;
    left: var(--x);
    top: var(--y);
    width: var(--w);
    transform: rotate(var(--r));
    cursor: pointer;
    transition: all 0.5s ease;
    opacity: 0;
}

.panel-works.in-view .works-item {
    opacity: 1;
    transition: all 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.works-item.dimmed {
    filter: blur(3px);
    opacity: 0.4;
}

.work-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: clamp(0.7rem, 0.9vw, 0.85rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #666666;
    display: block;
    margin-bottom: 8px;
}

.work-thumb {
    width: 100%;
    padding-bottom: 65%;
    position: relative;
}

.thumb-emerald {
    background: var(--emerald);
    clip-path: polygon(0% 2%, 98% 0%, 100% 95%, 3% 100%);
}

.thumb-purple {
    background: var(--purple);
    clip-path: polygon(2% 0%, 100% 3%, 97% 100%, 0% 97%);
}

.thumb-gold {
    background: var(--gold);
    clip-path: polygon(0% 0%, 95% 4%, 100% 98%, 5% 100%);
}

.thumb-garnet {
    background: var(--garnet);
    clip-path: polygon(3% 0%, 100% 2%, 98% 100%, 0% 95%);
}

/* === CONTACT PANEL === */
.panel-contact {
    background: var(--obsidian);
}

.botanical-drift {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0.15;
    animation: drift 60s ease-in-out infinite alternate;
}

@keyframes drift {
    from { transform: translate(0, 0); }
    to { transform: translate(-20px, -15px); }
}

.contact-content {
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    padding: 8vh 8vw;
}

.contact-email {
    font-family: 'Libre Baskerville', serif;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    color: var(--bone);
}

.typewriter {
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
    width: 0;
    border-right: none;
}

.panel-contact.in-view .typewriter {
    animation: typing 2s steps(19) 0.5s forwards;
}

.cursor {
    animation: blink 1s step-end infinite;
    color: var(--emerald);
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .char {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .fern-spiral { animation: none; }
    .botanical-drift { animation: none; }
    .panel-contact.in-view .typewriter { animation: none; width: 100%; }
    .process-card { transform: none; }
    .collage-layer { opacity: 1; transform: none; }
    .ethos-left { clip-path: none; }
}
