:root {
    --bg-primary: #f2e8d9;
    --bg-alt: #c8b8db;
    --text-ink: #2a2a2a;
    --accent-pink: #e8446a;
    --accent-teal: #00b4cc;
    --accent-yellow: #f5c842;
    --accent-violet: #7b4daa;
    --border-clay: #c4956a;
    --hover-lime: #a8e04a;
}

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

body {
    font-family: 'Work Sans', sans-serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.1vw, 1.2rem);
    line-height: 1.65;
    color: var(--text-ink);
    background-color: var(--bg-primary);
    overflow-x: hidden;
    transition: background-color 0.8s ease;
}

/* Dot Grid Underlay */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: radial-gradient(circle, var(--text-ink) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.08;
    pointer-events: none;
    z-index: 0;
}

/* Navigation */
#radial-nav {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
}

#nav-trigger {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid var(--text-ink);
    background: var(--accent-yellow);
    font-size: 20px;
    cursor: pointer;
    transition: transform 0.3s ease, width 0.3s, height 0.3s;
    position: relative;
    z-index: 1001;
}

#nav-trigger:hover {
    transform: scale(1.1) rotate(45deg);
    background: var(--hover-lime);
}

.nav-links {
    position: absolute;
    top: 0;
    left: 0;
    width: 200px;
    height: 200px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-links.active {
    pointer-events: all;
    opacity: 1;
}

.nav-link {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 70px;
    height: 70px;
    margin: -35px 0 0 -35px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-yellow);
    border-radius: 50%;
    text-decoration: none;
    color: var(--text-ink);
    font-family: 'Caveat', cursive;
    font-size: 0.75rem;
    text-align: center;
    transform: scale(0);
    transition: transform 0.3s ease, background 0.2s;
}

.nav-links.active .nav-link {
    transform: rotate(calc(var(--angle) * 1deg)) translateX(85px) rotate(calc(var(--angle) * -1deg)) scale(1);
}

.nav-link:hover {
    background: var(--hover-lime);
}

/* Confetti Layer */
#confetti-layer {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.confetti-shape {
    position: absolute;
    opacity: 0.18;
}

@keyframes confetti-rotate {
    to { transform: rotate(360deg); }
}

/* Page Sections */
.page-section {
    min-height: 100vh;
    position: relative;
    z-index: 2;
    padding: 80px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    perspective: 1000px;
}

.section-inner {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    transform-style: preserve-3d;
    transition: transform 0.3s ease-out;
}

/* Zigzag Border */
.zigzag-border {
    width: 100%;
    height: 24px;
    position: absolute;
    bottom: 0;
    left: 0;
}

/* Typography */
.kinetic-headline {
    font-family: 'Rubik', sans-serif;
    font-weight: 800;
    font-size: clamp(2.8rem, 7vw, 6rem);
    letter-spacing: -0.03em;
    line-height: 1.05;
    margin-bottom: 0.5em;
}

.kinetic-headline .char {
    display: inline-block;
    opacity: 0;
    transform: translateY(40px) rotate(12deg);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.kinetic-headline.animated .char {
    opacity: 1;
    transform: translateY(0) rotate(0deg);
}

.kinetic-headline.animated .char.vibrate {
    animation: char-vibrate 3s ease-in-out infinite;
}

@keyframes char-vibrate {
    0%, 100% { transform: rotate(-1deg); }
    50% { transform: rotate(1deg); }
}

.kinetic-headline:hover .char {
    transform: rotate(0deg) !important;
    animation: none !important;
}

.caveat-text {
    font-family: 'Caveat', cursive;
}

.body-text {
    margin-bottom: 1em;
    max-width: 600px;
}

.light-text {
    color: var(--bg-primary);
}

.pull-quote {
    font-family: 'Caveat', cursive;
    font-size: clamp(1.4rem, 2.5vw, 2rem);
    border-left: 3px solid var(--accent-pink);
    padding-left: 1em;
    margin: 1.5em 0;
}

/* Section 1: Hero Grid */
.hero-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-template-rows: auto auto;
    gap: 40px;
    transform: rotate(-1deg);
}

.hero-headline-area {
    grid-column: 1 / -1;
}

.hero-subtitle {
    font-size: clamp(1.4rem, 2.5vw, 2rem);
    color: var(--accent-violet);
    margin-top: 0.3em;
}

.hero-decoration {
    display: flex;
    align-items: center;
}

/* Section 2: Archetypes Grid */
.archetypes-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.archetype-card {
    background: rgba(242, 232, 217, 0.7);
    padding: 30px;
    border: 2px solid var(--text-ink);
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.3s ease-out;
}

.archetype-card .card-decoration {
    position: absolute;
    bottom: 15px;
    right: 15px;
    opacity: 0.6;
}

.pull-quote-area {
    grid-column: 1 / -1;
    text-align: center;
    padding: 20px;
}

/* Section 3: Creation Grid */
.creation-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 60px;
    align-items: center;
}

.creation-illustration {
    display: flex;
    justify-content: center;
}

/* Section 4: Shadow Grid */
.shadow-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.shadow-grid .kinetic-headline {
    grid-column: 1 / -1;
}

/* Section 5: Becoming Grid */
.becoming-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    text-align: center;
    justify-items: center;
}

.becoming-content {
    max-width: 700px;
}

.scroll-arrow {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
    font-size: 1.2rem;
}

/* Memphis Totems */
.totem {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.totem-right {
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
}

.totem-left {
    left: 30px;
    top: 50%;
    transform: translateY(-50%);
}

.totem-circle {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--accent-pink);
}

.totem-triangle {
    width: 0;
    height: 0;
    border-left: 18px solid transparent;
    border-right: 18px solid transparent;
    border-bottom: 32px solid var(--accent-teal);
}

.totem-rect {
    width: 24px;
    height: 50px;
    background: var(--accent-yellow);
}

/* Tilt Card */
.tilt-card {
    transform-style: preserve-3d;
    transition: transform 0.3s ease-out;
}

/* Squiggle */
.squiggle-accent {
    display: block;
    margin: 10px 0;
}

/* Responsive */
@media (max-width: 768px) {
    .page-section {
        padding: 60px 20px;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        transform: rotate(0);
    }

    .archetypes-grid {
        grid-template-columns: 1fr;
    }

    .creation-grid {
        grid-template-columns: 1fr;
    }

    .shadow-grid {
        grid-template-columns: 1fr;
    }

    .totem {
        display: none;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .kinetic-headline .char {
        opacity: 1;
        transform: none;
        animation: none !important;
    }

    .confetti-shape {
        animation: none !important;
    }

    .tilt-card, .section-inner {
        transition: none !important;
        transform: none !important;
    }
}
