/* gabs.quest - Japanese-Minimal Kakishibu Design */

/* CSS Custom Properties */
:root {
    --kakishibu: #c2703a;
    --persimmon-dark: #8b4513;
    --washi: #f5efe6;
    --charcoal-umber: #1e1710;
    --sumi: #3d2a1a;
    --aged-paper: #e8d5c0;
    --autumn-maple: #d4853a;
    --iron-black: #2a1c12;
    --moss-shadow: #5a6b4a;
    --kakishibu-gradient: linear-gradient(135deg, #c2703a 0%, #d4853a 40%, #8b4513 100%);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--washi);
    color: var(--sumi);
    font-family: 'Karla', sans-serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.8vw, 1.25rem);
    line-height: 1.85;
    letter-spacing: 0.02em;
    overflow-x: hidden;
}

/* Scroll Progress Indicator */
.scroll-progress {
    position: fixed;
    left: 24px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(194, 112, 58, 0.1);
    z-index: 100;
}

.scroll-progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0%;
    background: var(--kakishibu-gradient);
    transition: height 0.15s ease-out;
}

.waypoint {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(194, 112, 58, 0.3);
    transition: background 0.6s ease, box-shadow 0.6s ease;
}

.waypoint.active {
    background: var(--kakishibu);
    box-shadow: 0 0 12px rgba(194, 112, 58, 0.5);
}

.waypoint-1 { top: 10%; }
.waypoint-2 { top: 28%; }
.waypoint-3 { top: 46%; }
.waypoint-4 { top: 64%; }
.waypoint-5 { top: 82%; }

/* Reveal Animation */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 1.2s ease, transform 1.2s ease;
}

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

/* Zone Base */
.zone {
    position: relative;
    overflow: hidden;
}

/* ============================================
   ZONE 1: HERO (100vh)
   ============================================ */
.zone-hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 0 80px;
    background: var(--washi);
}

.hero-content {
    flex: 0 0 65%;
    max-width: 65%;
    padding-right: 48px;
    z-index: 2;
}

.hero-title {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-size: clamp(3rem, 8vw, 7rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--sumi);
    line-height: 1.1;
    margin-bottom: 48px;
}

.hero-subtitle {
    font-family: 'Karla', sans-serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.8vw, 1.25rem);
    color: var(--persimmon-dark);
    max-width: 480px;
    line-height: 1.85;
}

.hero-blob-container {
    flex: 0 0 35%;
    max-width: 35%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.blob {
    will-change: border-radius;
}

.blob-hero {
    width: 40vw;
    height: 40vw;
    max-width: 500px;
    max-height: 500px;
    background: var(--kakishibu);
    opacity: 0.2;
    filter: blur(40px);
    border-radius: 60% 40% 55% 45% / 55% 60% 40% 50%;
    animation: morph-blob-hero 18s ease-in-out infinite alternate;
}

@keyframes morph-blob-hero {
    0% { border-radius: 60% 40% 55% 45% / 55% 60% 40% 50%; }
    25% { border-radius: 45% 55% 40% 60% / 60% 45% 55% 40%; }
    50% { border-radius: 50% 50% 45% 55% / 45% 55% 50% 50%; }
    75% { border-radius: 40% 60% 50% 50% / 50% 40% 60% 45%; }
    100% { border-radius: 55% 45% 60% 40% / 40% 50% 45% 60%; }
}

/* ============================================
   ZONE 2: DISCOVERY (80vh)
   ============================================ */
.zone-discovery {
    min-height: 80vh;
    padding: 128px 80px 80px;
    background: var(--washi);
}

.section-label {
    display: block;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: clamp(0.7rem, 1vw, 0.85rem);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--kakishibu);
    margin-bottom: 16px;
}

.section-heading {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-style: italic;
    font-size: clamp(2rem, 5vw, 4rem);
    letter-spacing: 0.04em;
    color: var(--sumi);
    line-height: 1.2;
    margin-bottom: 64px;
}

.discovery-cards {
    display: flex;
    gap: 32px;
    perspective: 1200px;
}

.card {
    flex: 1;
    background: var(--washi);
    border: 1px solid rgba(194, 112, 58, 0.25);
    padding: 48px 36px;
    transform: perspective(1200px) rotateY(-3deg);
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1),
                border-color 0.6s ease,
                box-shadow 0.6s ease;
    box-shadow: 0 8px 32px rgba(42, 28, 18, 0.12);
    transform-style: preserve-3d;
}

.card:hover {
    transform: perspective(1200px) rotateY(0deg) translateZ(20px);
    border-color: rgba(194, 112, 58, 0.6);
    box-shadow: 0 16px 48px rgba(42, 28, 18, 0.18);
}

.card-label {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: clamp(0.7rem, 1vw, 0.85rem);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--kakishibu);
    display: block;
    margin-bottom: 24px;
}

.card-title {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-style: italic;
    font-size: clamp(1.4rem, 2.5vw, 1.8rem);
    color: var(--sumi);
    line-height: 1.3;
    margin-bottom: 20px;
}

.card-text {
    font-family: 'Karla', sans-serif;
    font-weight: 400;
    font-size: clamp(0.9rem, 1.4vw, 1rem);
    color: var(--sumi);
    line-height: 1.75;
}

/* ============================================
   ZONE 3-5: VIGNETTES (60vh each)
   ============================================ */
.zone-vignette {
    min-height: 60vh;
    display: flex;
    align-items: center;
    padding: 80px 80px 80px 80px;
    background: var(--washi);
}

.zone-vignette-dark {
    background: var(--charcoal-umber);
}

.zone-vignette-dark .section-label {
    color: var(--autumn-maple);
}

.zone-vignette-dark .section-heading {
    color: var(--aged-paper);
}

.zone-vignette-dark .vignette-text {
    color: var(--aged-paper);
}

.vignette-content {
    max-width: 580px;
    z-index: 2;
    position: relative;
}

.vignette-text {
    font-family: 'Karla', sans-serif;
    font-weight: 400;
    color: var(--sumi);
    line-height: 1.85;
    margin-bottom: 48px;
}

.branch-line {
    width: 120px;
    height: 1px;
    background: var(--kakishibu);
    opacity: 0.4;
    position: relative;
}

.branch-line::before {
    content: '';
    position: absolute;
    top: -12px;
    left: 60px;
    width: 60px;
    height: 1px;
    background: var(--kakishibu);
    opacity: 0.3;
    transform: rotate(25deg);
    transform-origin: left center;
}

.branch-line-light {
    background: var(--aged-paper);
}

.branch-line-light::before {
    background: var(--aged-paper);
}

.blob-section {
    position: absolute;
    right: 10%;
    width: 20vw;
    height: 20vw;
    max-width: 300px;
    max-height: 300px;
    opacity: 0.15;
    filter: blur(30px);
}

.blob-section-1 {
    background: var(--kakishibu);
    border-radius: 55% 45% 60% 40% / 40% 55% 45% 60%;
    animation: morph-blob-1 16s ease-in-out infinite alternate;
}

.blob-section-2 {
    background: var(--moss-shadow);
    border-radius: 45% 55% 40% 60% / 60% 40% 55% 45%;
    animation: morph-blob-2 20s ease-in-out infinite alternate;
}

.blob-section-3 {
    background: var(--kakishibu);
    border-radius: 50% 50% 45% 55% / 55% 45% 50% 50%;
    animation: morph-blob-3 14s ease-in-out infinite alternate;
}

@keyframes morph-blob-1 {
    0% { border-radius: 55% 45% 60% 40% / 40% 55% 45% 60%; }
    33% { border-radius: 40% 60% 45% 55% / 55% 45% 60% 40%; }
    66% { border-radius: 50% 50% 55% 45% / 45% 50% 40% 60%; }
    100% { border-radius: 60% 40% 50% 50% / 50% 60% 55% 45%; }
}

@keyframes morph-blob-2 {
    0% { border-radius: 45% 55% 40% 60% / 60% 40% 55% 45%; }
    33% { border-radius: 55% 45% 50% 50% / 45% 55% 40% 60%; }
    66% { border-radius: 40% 60% 55% 45% / 50% 50% 60% 40%; }
    100% { border-radius: 50% 50% 60% 40% / 55% 45% 45% 55%; }
}

@keyframes morph-blob-3 {
    0% { border-radius: 50% 50% 45% 55% / 55% 45% 50% 50%; }
    33% { border-radius: 60% 40% 55% 45% / 40% 60% 50% 50%; }
    66% { border-radius: 45% 55% 50% 50% / 50% 40% 55% 60%; }
    100% { border-radius: 55% 45% 40% 60% / 60% 50% 45% 55%; }
}

/* ============================================
   ZONE 6: TERMINUS / ENSO (100vh)
   ============================================ */
.zone-terminus {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--washi);
}

.enso-container {
    display: flex;
    align-items: center;
    justify-content: center;
}

.blob-enso {
    width: 8vw;
    height: 8vw;
    min-width: 80px;
    min-height: 80px;
    max-width: 120px;
    max-height: 120px;
    background: var(--kakishibu-gradient);
    opacity: 0.25;
    border-radius: 60% 40% 55% 45% / 55% 60% 40% 50%;
    animation: morph-enso 18s ease-in-out infinite alternate;
}

@keyframes morph-enso {
    0% { border-radius: 60% 40% 55% 45% / 55% 60% 40% 50%; }
    20% { border-radius: 52% 48% 50% 50% / 50% 52% 48% 50%; }
    40% { border-radius: 48% 52% 50% 50% / 50% 48% 52% 50%; }
    60% { border-radius: 50% 50% 52% 48% / 48% 50% 50% 52%; }
    80% { border-radius: 50% 50% 48% 52% / 52% 50% 50% 48%; }
    100% { border-radius: 55% 45% 50% 50% / 50% 55% 45% 50%; }
}

/* ============================================
   WATER RIPPLE EFFECT (cursor interaction)
   ============================================ */
.ripple {
    position: fixed;
    pointer-events: none;
    border-radius: 50%;
    border: 1px solid rgba(194, 112, 58, 0.2);
    width: 10px;
    height: 10px;
    animation: ripple-expand 1.2s ease-out forwards;
    z-index: 50;
}

@keyframes ripple-expand {
    0% {
        width: 10px;
        height: 10px;
        opacity: 0.4;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        width: 200px;
        height: 200px;
        opacity: 0;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
    .zone-hero {
        flex-direction: column;
        padding: 80px 40px;
        justify-content: center;
    }

    .hero-content {
        flex: none;
        max-width: 100%;
        padding-right: 0;
        margin-bottom: 48px;
    }

    .hero-blob-container {
        flex: none;
        max-width: 100%;
    }

    .blob-hero {
        width: 60vw;
        height: 60vw;
    }

    .zone-discovery {
        padding: 80px 40px;
    }

    .discovery-cards {
        flex-direction: column;
    }

    .card {
        transform: perspective(1200px) rotateY(0deg);
    }

    .zone-vignette {
        padding: 80px 40px;
    }

    .blob-section {
        right: 5%;
        width: 30vw;
        height: 30vw;
    }

    .scroll-progress {
        left: 12px;
    }
}

@media (max-width: 600px) {
    .zone-hero {
        padding: 60px 24px;
    }

    .zone-discovery {
        padding: 60px 24px;
    }

    .zone-vignette {
        padding: 60px 24px;
    }

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

    .section-heading {
        font-size: clamp(1.6rem, 6vw, 2.5rem);
    }

    .scroll-progress {
        display: none;
    }

    .blob-section {
        width: 40vw;
        height: 40vw;
        opacity: 0.1;
    }
}
