/* ========================================
   mujun.studio — styles.css
   Cool-grays editorial flow with organic blobs
   ======================================== */

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

:root {
    --bg-primary: #f0f2f5;
    --bg-zones: #e2e5eb;
    --text-headline: #2b2d33;
    --text-body: #44474f;
    --text-meta: #8891a3;
    --accent-blue: #5b7aa2;
    --accent-coral: #d4776a;
    --blob-fill: #c8cfd9;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg-primary);
    color: var(--text-body);
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.15vw, 1.2rem);
    letter-spacing: 0.005em;
    line-height: 1.72;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ========================================
   Typography
   ======================================== */

h1, h2, .zone-heading, .studio-name {
    font-family: 'Cormorant Garamond', 'Times New Roman', serif;
    font-weight: 600;
    color: var(--text-headline);
    letter-spacing: -0.015em;
    line-height: 1.12;
}

.studio-name {
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    margin-top: 1.5rem;
}

.zone-heading {
    font-size: clamp(2.2rem, 4.5vw, 4rem);
    margin-bottom: 1.5rem;
}

.tagline {
    font-family: 'Source Serif 4', Georgia, serif;
    font-style: italic;
    color: var(--text-meta);
    font-size: clamp(1rem, 1.4vw, 1.3rem);
    margin-top: 0.75rem;
}

.body-text {
    color: var(--text-body);
    margin-bottom: 1.5em;
    max-width: 38rem;
}

.work-label {
    font-family: 'DM Mono', monospace;
    font-weight: 400;
    font-size: clamp(0.7rem, 0.85vw, 0.85rem);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-meta);
    display: block;
    margin-bottom: 0.5rem;
}

.meta-text {
    font-family: 'DM Mono', monospace;
    font-weight: 400;
    font-size: clamp(0.7rem, 0.85vw, 0.85rem);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-meta);
}

/* ========================================
   Paradox Compass — Navigation
   ======================================== */

.compass-nav {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--accent-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100;
    background: rgba(240, 242, 245, 0.85);
    backdrop-filter: blur(8px);
    transition: border-color 0.3s ease, background 0.3s ease;
}

.compass-nav:hover {
    border-color: var(--accent-coral);
    background: rgba(240, 242, 245, 0.95);
}

.compass-nav .compass-spear,
.compass-nav .compass-shield {
    font-family: 'Cormorant Garamond', serif;
    font-size: 14px;
    color: var(--accent-blue);
    position: absolute;
}

.compass-nav .compass-spear {
    animation: rotate-cw 60s linear infinite;
}

.compass-nav .compass-shield {
    animation: rotate-ccw 60s linear infinite;
    font-size: 11px;
    opacity: 0.6;
}

/* ========================================
   Paradox Compass — Hero (200px)
   ======================================== */

.compass-hero {
    width: 200px;
    height: 200px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    animation: fade-in 1s ease 0.3s forwards;
}

.compass-hero-spear,
.compass-hero-shield {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-weight: 500;
    position: absolute;
    color: var(--text-headline);
}

.compass-hero-spear {
    font-size: 4rem;
    animation: rotate-cw 60s linear infinite;
    opacity: 0.08;
}

.compass-hero-shield {
    font-size: 3rem;
    animation: rotate-ccw 60s linear infinite;
    opacity: 0.08;
}

/* ========================================
   Paradox Compass — Footer (60px)
   ======================================== */

.compass-footer {
    width: 60px;
    height: 60px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 2rem auto;
}

.compass-footer-spear,
.compass-footer-shield {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    position: absolute;
    color: var(--accent-blue);
}

.compass-footer-spear {
    font-size: 1.5rem;
    animation: rotate-cw-decel 60s ease-out infinite;
}

.compass-footer-shield {
    font-size: 1.1rem;
    animation: rotate-ccw-decel 60s ease-out infinite;
    opacity: 0.6;
}

/* ========================================
   TOC Overlay
   ======================================== */

.toc-overlay {
    position: fixed;
    inset: 0;
    z-index: 90;
    background: rgba(226, 229, 235, 0.92);
    backdrop-filter: blur(16px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.toc-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.toc-content {
    text-align: center;
}

.toc-title {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    margin-bottom: 2rem;
    color: var(--text-headline);
}

.toc-list {
    list-style: none;
}

.toc-list li {
    margin-bottom: 1rem;
}

.toc-link {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-size: clamp(1.2rem, 2vw, 1.8rem);
    color: var(--text-headline);
    text-decoration: none;
    transition: color 0.3s ease;
}

.toc-link:hover {
    color: var(--accent-blue);
}

/* ========================================
   Background Blob Layer
   ======================================== */

.blob-layer {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ========================================
   Zone Layout
   ======================================== */

.zone {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 4rem 2rem;
}

.zone-1 {
    min-height: 100vh;
    flex-direction: column;
    justify-content: center;
}

.zone-2 {
    min-height: 90vh;
}

.zone-3 {
    min-height: 100vh;
}

.zone-4 {
    min-height: 80vh;
}

.zone-5 {
    min-height: 60vh;
    flex-direction: column;
    justify-content: center;
}

/* Zone content positioning — editorial zigzag */
.zone-content {
    position: relative;
    z-index: 2;
    max-width: 38rem;
}

.zone-content--center {
    margin-inline: auto;
    text-align: center;
}

.zone-content--left {
    margin-inline-start: 8vw;
    margin-inline-end: auto;
}

.zone-content--right {
    margin-inline-start: auto;
    margin-inline-end: 8vw;
}

.zone-content--narrow {
    max-width: 28rem;
    margin-inline: auto;
}

/* ========================================
   Zone Data Visualizations
   ======================================== */

.zone-viz {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: visible;
}

/* ========================================
   Work Items
   ======================================== */

.work-item {
    margin-bottom: 2.5rem;
}

/* ========================================
   Contact
   ======================================== */

.contact-email {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-weight: 500;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    color: var(--accent-blue);
    margin: 1rem 0;
    text-decoration: none;
}

.contact-invite {
    font-family: 'Source Serif 4', Georgia, serif;
    font-style: italic;
    color: var(--text-meta);
    margin-bottom: 1.5rem;
}

.footer-meta {
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin-top: 2rem;
}

/* ========================================
   Progressive Disclosure — Reveal
   ======================================== */

.reveal-el {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-el.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   Keyframe Animations
   ======================================== */

@keyframes rotate-cw {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes rotate-ccw {
    from { transform: rotate(0deg); }
    to { transform: rotate(-360deg); }
}

@keyframes rotate-cw-decel {
    0% { transform: rotate(0deg); }
    50% { transform: rotate(270deg); }
    100% { transform: rotate(360deg); }
}

@keyframes rotate-ccw-decel {
    0% { transform: rotate(0deg); }
    50% { transform: rotate(-270deg); }
    100% { transform: rotate(-360deg); }
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 768px) {
    .zone-content--left,
    .zone-content--right {
        margin-inline: 1.5rem;
    }

    .footer-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
}
