:root {
    --charcoal: #2D2A26;
    --peach: #E8C4A0;
    --cream: #F5F0E8;
    --lavender: #D6C7E0;
    --sand: #E8DCC8;
    --sage: #A8B5A0;
    --rose: #C4A4AC;
    --warm-gray: #9B9590;
}

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

html {
    font-size: 16px;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--charcoal);
    color: var(--cream);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Wall Texture Overlay */
.wall-texture {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    background-image:
        radial-gradient(ellipse at 20% 50%, rgba(232, 196, 160, 0.03) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 30%, rgba(214, 199, 224, 0.03) 0%, transparent 50%);
    mix-blend-mode: overlay;
}

/* Wall Sections */
.wall-section {
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Depth Layers */
.depth-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.depth-layer--back {
    z-index: 1;
}

.depth-layer--mid {
    z-index: 2;
}

.depth-layer--front {
    z-index: 3;
    position: relative;
    flex-direction: column;
    padding: 2rem;
}

/* Hero Typography */
.hero-title {
    font-family: 'Recursive', sans-serif;
    font-size: clamp(3rem, 8vw, 7rem);
    font-weight: 800;
    font-variation-settings: 'CASL' 1, 'MONO' 0;
    letter-spacing: -0.04em;
    color: var(--cream);
    text-shadow: 3px 3px 0 var(--lavender), -1px -1px 0 var(--rose);
    text-align: center;
}

.hero-sub {
    font-family: 'JetBrains Mono', monospace;
    font-size: clamp(0.9rem, 1.8vw, 1.2rem);
    font-weight: 300;
    color: var(--warm-gray);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    text-align: center;
    margin-top: 0.5rem;
}

/* Graffiti Tag */
.graffiti-tag {
    font-family: 'Recursive', sans-serif;
    font-variation-settings: 'CASL' 1, 'MONO' 0;
    font-weight: 800;
    opacity: 0.08;
    color: var(--lavender);
    pointer-events: none;
    user-select: none;
}

.tag-kakuritsu {
    font-size: clamp(10rem, 30vw, 25rem);
    transform: rotate(-8deg);
}

/* Section Title */
.section-title {
    font-family: 'Recursive', sans-serif;
    font-size: clamp(1.6rem, 3.5vw, 2.8rem);
    font-weight: 700;
    font-variation-settings: 'CASL' 0.7, 'MONO' 0;
    color: var(--peach);
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

/* Body Text */
.body-text {
    font-family: 'Inter', sans-serif;
    font-size: clamp(0.95rem, 1.4vw, 1.1rem);
    font-weight: 400;
    color: var(--sand);
    line-height: 1.8;
    max-width: 600px;
}

/* Content Card */
.content-card {
    background: rgba(45, 42, 38, 0.85);
    border: 2px solid rgba(232, 196, 160, 0.15);
    border-radius: 4px;
    padding: 2.5rem;
    max-width: 650px;
    backdrop-filter: blur(8px);
}

/* Math Notation */
.math-notation {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.1rem;
    color: var(--lavender);
    margin-top: 1.5rem;
    padding: 1rem;
    border-left: 3px solid var(--rose);
    background: rgba(214, 199, 224, 0.08);
}

/* Stencil Shapes */
.stencil-shape {
    position: absolute;
    pointer-events: none;
}

.stencil-circle {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--lavender) 0%, var(--lavender) 48%, transparent 49%, transparent 52%, var(--lavender) 53%, var(--lavender) 55%, transparent 56%);
    opacity: 0.12;
    top: 15%;
    right: 10%;
}

.stencil-triangle {
    width: 0;
    height: 0;
    border-left: 150px solid transparent;
    border-right: 150px solid transparent;
    border-bottom: 260px solid var(--sage);
    opacity: 0.08;
    bottom: 20%;
    left: 8%;
}

.stencil-bell-curve {
    width: 500px;
    height: 200px;
    background: radial-gradient(ellipse 100% 80% at 50% 100%, var(--peach) 0%, transparent 70%);
    opacity: 0.1;
    top: 30%;
    left: 50%;
    transform: translateX(-50%);
}

.stencil-dice {
    width: 120px;
    height: 120px;
    border: 3px solid var(--rose);
    border-radius: 12px;
    opacity: 0.15;
    top: 20%;
    right: 15%;
    transform: rotate(15deg);
}

.stencil-coin {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 3px solid var(--sage);
    opacity: 0.12;
    bottom: 25%;
    left: 12%;
}

.stencil-moon {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle at 65% 40%, transparent 40%, var(--peach) 41%);
    opacity: 0.15;
    top: 15%;
    right: 20%;
}

/* Wheat Paste Posters */
.wheat-paste {
    position: absolute;
    border: 1px solid rgba(232, 220, 200, 0.1);
    background: rgba(232, 220, 200, 0.04);
    transform: rotate(-3deg);
}

.paste-1 {
    width: 250px;
    height: 350px;
    top: 10%;
    left: 5%;
}

.paste-2 {
    width: 200px;
    height: 280px;
    top: 5%;
    right: 8%;
    transform: rotate(2deg);
}

.paste-3 {
    width: 180px;
    height: 250px;
    bottom: 15%;
    left: 15%;
    transform: rotate(-5deg);
}

/* Probability Grid */
.probability-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 1.5rem;
    max-width: 300px;
}

.prob-cell {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    padding: 0.6rem;
    text-align: center;
    border: 1px solid rgba(232, 196, 160, 0.2);
    background: rgba(232, 196, 160, 0.05);
    color: var(--peach);
    transition: background 0.3s ease, transform 0.3s ease;
}

.prob-cell:hover {
    background: rgba(232, 196, 160, 0.15);
    transform: scale(1.05);
}

/* Constellation SVG */
.constellation-svg {
    width: 100%;
    max-width: 600px;
    height: 400px;
    opacity: 0.3;
}

/* Star Field */
.star-field {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

/* Drip Marks */
.drip-marks {
    position: absolute;
    top: 0;
    left: 30%;
    width: 3px;
    height: 100%;
    background: linear-gradient(to bottom, var(--rose) 0%, transparent 60%);
    opacity: 0.1;
}

.drip-marks::after {
    content: '';
    position: absolute;
    top: 0;
    left: 40px;
    width: 2px;
    height: 70%;
    background: linear-gradient(to bottom, var(--lavender) 0%, transparent 50%);
}

/* Exit Section */
.exit-wall {
    min-height: 50vh;
    background: var(--charcoal);
}

.exit-tag {
    text-align: center;
}

.exit-text {
    font-family: 'JetBrains Mono', monospace;
    font-size: clamp(1.4rem, 3vw, 2.2rem);
    color: var(--warm-gray);
    letter-spacing: 0.05em;
    opacity: 0.6;
}

/* Reveal Animation */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.34, 1.56, 0.64, 1),
                transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
    .content-card {
        padding: 1.8rem;
        margin: 0 1rem;
    }

    .stencil-circle {
        width: 180px;
        height: 180px;
    }

    .tag-kakuritsu {
        font-size: clamp(6rem, 20vw, 12rem);
    }

    .probability-grid {
        max-width: 240px;
    }
}

@media (max-width: 480px) {
    .content-card {
        padding: 1.2rem;
    }

    .stencil-shape {
        display: none;
    }

    .wheat-paste {
        display: none;
    }

    .hero-title {
        font-size: clamp(2.2rem, 10vw, 3.5rem);
    }
}
