/* === Custom Properties === */
:root {
    --bg-deep: #f6f1eb;
    --card-surface: #faf7f3;
    --text-primary: #2c2c2c;
    --text-body: #3d3833;
    --text-accent: #6b6560;
    --wash-ochre: #c4a882;
    --wash-sage: #8a9a8e;
    --strip-bg: #e8e2da;
    --highlight: #b89b78;
    --scroll-progress: 0;
}

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

html {
    scroll-behavior: smooth;
}

body.mujun-studio {
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 400;
    font-size: clamp(0.95rem, 1.8vw, 1.15rem);
    line-height: 1.72;
    color: var(--text-body);
    background-color: var(--bg-deep);
    overflow-x: hidden;
    position: relative;
}

/* === Botanical Background Layer === */
.botanical-layer {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.botanical {
    position: absolute;
    opacity: 0.1;
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    transition: stroke-dashoffset 3.5s ease-out;
}

.botanical.visible {
    stroke-dashoffset: 0;
}

.botanical-bamboo {
    width: 120px;
    top: 10%;
    right: 8%;
}

.botanical-fern {
    width: 180px;
    top: 45%;
    left: 5%;
}

.botanical-cherry {
    width: 250px;
    bottom: 15%;
    right: 12%;
}

/* === Kanji Watermarks === */
.kanji-watermark {
    position: fixed;
    font-size: clamp(15rem, 25vw, 30rem);
    font-weight: 100;
    color: var(--wash-ochre);
    opacity: 0.04;
    z-index: 1;
    pointer-events: none;
    line-height: 1;
    user-select: none;
}

.kanji-spear {
    top: 10%;
    left: 5%;
    transform: rotate(-8deg);
}

.kanji-shield {
    bottom: 5%;
    right: 5%;
    transform: rotate(6deg);
}

/* === Opening Wash (Hero) === */
.opening-wash {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    z-index: 2;
}

.wash {
    position: absolute;
    top: 0;
    width: 50%;
    height: 100%;
}

.wash-left {
    left: 0;
    transform-origin: left center;
    transform: scaleX(0);
    animation: wash-in-left 2.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.wash-right {
    right: 0;
    transform-origin: right center;
    transform: scaleX(0);
    animation: wash-in-right 2.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes wash-in-left {
    0% { transform: scaleX(0); }
    100% { transform: scaleX(1); }
}

@keyframes wash-in-right {
    0% { transform: scaleX(0); }
    100% { transform: scaleX(1); }
}

.hero-content {
    position: relative;
    z-index: 4;
    text-align: center;
    opacity: 0;
    animation: hero-fade 1.2s ease-out 1.8s forwards;
}

@keyframes hero-fade {
    0% { opacity: 0; transform: translateY(12px); }
    100% { opacity: 1; transform: translateY(0); }
}

.site-title {
    font-family: 'Libre Franklin', sans-serif;
    font-weight: 100;
    font-size: clamp(2rem, 5vw, 4rem);
    letter-spacing: 0.06em;
    color: var(--text-primary);
    margin-bottom: 0.5em;
}

.site-subtitle {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: clamp(0.7rem, 1.2vw, 0.85rem);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-accent);
}

/* Lens Flare */
.lens-flare {
    position: absolute;
    pointer-events: none;
    z-index: 3;
}

.hero-flare {
    width: 300px;
    height: 180px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-15deg);
    background: radial-gradient(ellipse at center,
        rgba(184, 155, 120, 0.25) 0%,
        rgba(184, 155, 120, 0.08) 35%,
        transparent 70%);
    animation: flare-pulse 4s ease-in-out infinite alternate;
}

@keyframes flare-pulse {
    0% { opacity: 0.15; }
    100% { opacity: 0.35; }
}

/* === Paradox Gallery === */
.paradox-gallery {
    position: relative;
    z-index: 3;
    max-width: 720px;
    margin: 0 auto;
    padding: 10vh 1.5rem 20vh;
}

/* === Paradox Card === */
.paradox-card {
    position: relative;
    background: var(--card-surface);
    border-radius: 2px;
    padding: 2.5rem 2rem;
    margin-top: -12vh;
    transform: rotate(var(--tilt, 0deg)) scale(1);
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.6s ease,
                box-shadow 0.6s ease;
    box-shadow: 0 2px 20px rgba(60, 56, 51, 0.06);
    overflow: hidden;
    cursor: pointer;
}

.paradox-card:first-child {
    margin-top: 0;
}

.paradox-card.in-focus {
    transform: rotate(var(--tilt, 0deg)) scale(1.02);
    z-index: 10;
    box-shadow: 0 8px 40px rgba(60, 56, 51, 0.1);
}

.paradox-card:not(.in-focus) {
    opacity: 0.85;
    transform: rotate(var(--tilt, 0deg)) scale(0.98);
}

.paradox-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center,
        rgba(184, 155, 120, 0.15) 0%,
        rgba(184, 155, 120, 0.04) 40%,
        transparent 70%);
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none;
}

.paradox-card.in-focus::after {
    opacity: 1;
    animation: flare-pulse 4s ease-in-out infinite alternate;
}

.card-wash {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.card-content {
    position: relative;
    z-index: 2;
}

.card-category {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: clamp(0.7rem, 1.2vw, 0.85rem);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-accent);
    display: block;
    margin-bottom: 0.75em;
}

.card-title {
    font-family: 'Libre Franklin', sans-serif;
    font-weight: 100;
    font-size: clamp(1.5rem, 3.5vw, 2.5rem);
    letter-spacing: 0.06em;
    color: var(--text-primary);
    margin-bottom: 0.5em;
    line-height: 1.2;
}

.card-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.5s ease;
    opacity: 0;
}

.paradox-card.expanded .card-body {
    max-height: 500px;
    opacity: 1;
}

.card-body p {
    margin-bottom: 1em;
    color: var(--text-body);
}

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

/* === Workshop Strip === */
.workshop-strip {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: rgba(232, 226, 218, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
}

.strip-swatches {
    display: flex;
    gap: 12px;
    align-items: center;
}

.swatch {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.swatch:hover {
    transform: scale(1.2);
    border-color: var(--highlight);
}

.swatch.active {
    border-color: var(--text-primary);
    transform: scale(1.15);
}

.scroll-indicator {
    flex: 1;
    max-width: 200px;
    height: 4px;
    background: rgba(107, 101, 96, 0.15);
    border-radius: 2px;
    margin-left: 2rem;
    overflow: hidden;
}

.scroll-brush {
    height: 100%;
    width: calc(var(--scroll-progress) * 100%);
    background: linear-gradient(90deg, var(--wash-ochre), var(--highlight));
    border-radius: 2px;
    transition: width 0.15s ease-out;
}

/* === Responsive === */
@media (max-width: 600px) {
    .paradox-card {
        padding: 1.5rem 1.25rem;
        margin-top: -8vh;
    }

    .paradox-gallery {
        padding: 6vh 1rem 16vh;
    }

    .workshop-strip {
        padding: 0 1rem;
    }

    .swatch {
        width: 20px;
        height: 20px;
    }

    .kanji-watermark {
        font-size: clamp(8rem, 20vw, 15rem);
    }
}
