/* haru.club - Serene Graffiti Design */
/* Color Palette:
   Wall Base: #e8ddd0
   Deep Plaster: #c4b5a3
   Terracotta Tag: #c27856
   Ochre Warmth: #d4a574
   Dusk Rose: #c7956d
   Charcoal Ink: #3d3530
   Fog White: #f5f0ea
   Deep Umber: #5c4a3d
   Stone Gray: #8a7a6a
*/

:root {
    --wall-base: #e8ddd0;
    --deep-plaster: #c4b5a3;
    --terracotta: #c27856;
    --ochre: #d4a574;
    --dusk-rose: #c7956d;
    --charcoal: #3d3530;
    --fog-white: #f5f0ea;
    --deep-umber: #5c4a3d;
    --stone-gray: #8a7a6a;
    --atmosphere: 0;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--wall-base);
    color: var(--charcoal);
    font-family: 'Nunito', sans-serif;
    font-weight: 300;
    overflow-x: hidden;
    cursor: crosshair;
}

/* ========================
   PERSPECTIVE & LAYERS
======================== */

.perspective-container {
    position: relative;
    perspective: 1200px;
    min-height: 650vh;
}

.layer-back {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: translateZ(-100px) scale(1.08);
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.layer-mid {
    position: relative;
    z-index: 1;
    transform: translateZ(0);
}

.layer-front {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: translateZ(50px) scale(0.96);
    pointer-events: none;
    z-index: 2;
    overflow: hidden;
}

/* ========================
   BREATHING GRADIENT
======================== */

.breathing-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(168deg, #e8ddd0 0%, #c4b5a3 45%, #c7956d 100%);
    background-size: 400% 400%;
    animation: breathe 30s ease-in-out infinite;
}

@keyframes breathe {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Depth-of-field darkening */
.breathing-gradient::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent, rgba(92, 74, 61, 0.15));
}

/* ========================
   KANJI GHOST CHARACTERS
======================== */

.kanji-ghost {
    position: fixed;
    font-family: 'Varela Round', sans-serif;
    font-size: clamp(8rem, 20vw, 16rem);
    color: #c4b5a3;
    opacity: 0.07;
    pointer-events: none;
    user-select: none;
    line-height: 1;
}

.kanji-1 {
    top: 5vh;
    left: 10vw;
    opacity: 0.08;
}

.kanji-2 {
    top: 30vh;
    right: 8vw;
    left: auto;
    opacity: 0.05;
}

.kanji-3 {
    top: 55vh;
    left: 60vw;
    opacity: 0.06;
}

.kanji-4 {
    top: 15vh;
    left: 75vw;
    opacity: 0.04;
}

.kanji-5 {
    top: 70vh;
    left: 20vw;
    opacity: 0.05;
}

/* ========================
   BACKGROUND WAVES
======================== */

.bg-wave {
    position: fixed;
    width: 100%;
    height: 400px;
    opacity: 0.06;
    pointer-events: none;
}

.bg-wave-1 {
    top: 10%;
    animation: drift 120s linear infinite;
}

.bg-wave-2 {
    top: 40%;
    animation: drift 100s linear infinite reverse;
}

.bg-wave-3 {
    top: 70%;
    animation: drift 140s linear infinite;
}

@keyframes drift {
    from { transform: translateX(0); }
    to { transform: translateX(-200px); }
}

/* ========================
   NAVIGATION LINE
======================== */

.nav-line {
    position: fixed;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 24px;
    align-items: center;
}

.nav-line::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(212, 165, 116, 0.4);
    transform: translateX(-50%);
}

.nav-marker {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(212, 165, 116, 0.4);
    position: relative;
    cursor: pointer;
    transition: background 0.6s ease, transform 0.3s ease;
    pointer-events: all;
    z-index: 1;
}

.nav-marker.active {
    background: var(--terracotta);
    transform: scale(1.4);
}

.nav-marker:hover {
    background: var(--ochre);
    transform: scale(1.3);
}

.nav-label {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-family: 'Inclusive Sans', sans-serif;
    font-size: 11px;
    color: var(--stone-gray);
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.nav-marker:hover .nav-label {
    opacity: 1;
}

/* ========================
   ZONES
======================== */

.zone {
    position: relative;
    width: 100%;
}

/* Zone 1: The Approach */
.zone-approach {
    height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.approach-word {
    text-align: center;
}

.approach-letter {
    font-family: 'Varela Round', sans-serif;
    font-size: clamp(6rem, 18vw, 14rem);
    color: var(--terracotta);
    opacity: 0;
    display: block;
    letter-spacing: 0.04em;
    animation: fadeInSlow 3s ease-out 0.5s forwards;
}

.approach-subtitle {
    text-align: center;
    margin-top: 20px;
}

.approach-tag {
    font-size: 2rem;
    opacity: 0;
    animation: fadeInSlow 3s ease-out 1.5s forwards;
}

@keyframes fadeInSlow {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 0.8; transform: translateY(0); }
}

/* Zone 2: First Tags */
.zone-first-tags {
    min-height: 120vh;
    padding: 10vh 8vw;
}

/* Zone 3: The Mural */
.zone-mural {
    min-height: 200vh;
    padding: 10vh 6vw;
}

.mural-cluster {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px 40px;
    margin: 6vh 0;
    align-items: start;
}

/* Zone 4: The Fade */
.zone-fade {
    min-height: 150vh;
    padding: 10vh 10vw;
}

.fade-text {
    opacity: 0.65;
}

/* Zone 5: The Tag */
.zone-tag {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10vh 8vw;
}

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

.tag-domain {
    font-family: 'Varela Round', sans-serif;
    font-size: clamp(3rem, 10vw, 7rem);
    color: var(--terracotta);
    letter-spacing: 0.04em;
    opacity: 0.85;
    display: block;
}

.final-wave {
    width: clamp(200px, 40vw, 400px);
    margin-top: 30px;
    opacity: 0.5;
}

.final-wave svg {
    width: 100%;
    height: 60px;
}

/* ========================
   CONTENT BLOCKS
======================== */

.content-block {
    max-width: 640px;
    margin: 6vh auto;
    padding: 30px 40px;
    position: relative;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1.2s ease-out, transform 1.2s ease-out;
}

.content-block.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Deliberately imperfect positioning */
.content-block-1 {
    margin-left: 12%;
    margin-right: auto;
    max-width: 500px;
}

.content-block-2 {
    margin-left: auto;
    margin-right: 8%;
    max-width: 560px;
}

.content-block-3 {
    margin-left: 15%;
    max-width: 580px;
}

.content-block-4 {
    max-width: 520px;
    margin: 0;
}

.content-block-5 {
    margin-left: auto;
    margin-right: 12%;
    max-width: 550px;
}

.content-block-6 {
    margin-left: 20%;
    max-width: 480px;
}

.content-block-7 {
    margin-left: auto;
    margin-right: 6%;
    max-width: 600px;
}

.content-block-8 {
    margin-left: 15%;
    max-width: 520px;
}

.content-block-9 {
    margin-left: auto;
    margin-right: 15%;
    max-width: 500px;
}

/* Spray-paint edge treatment */
.spray-edge {
    filter: url(#spraynoise);
    background: rgba(232, 221, 208, 0.3);
    border-radius: 2px;
}

/* ========================
   TYPOGRAPHY
======================== */

.headline {
    font-family: 'Varela Round', sans-serif;
    font-weight: 400;
    font-size: clamp(2.2rem, 6vw, 4.8rem);
    letter-spacing: 0.04em;
    color: var(--charcoal);
    margin-bottom: 20px;
    line-height: 1.15;
}

.body-text {
    font-family: 'Nunito', sans-serif;
    font-weight: 300;
    font-size: clamp(0.95rem, 1.8vw, 1.15rem);
    line-height: 1.75;
    letter-spacing: 0.01em;
    color: var(--charcoal);
}

.caveat-tag {
    font-family: 'Caveat', cursive;
    font-weight: 400;
    color: var(--ochre);
    opacity: 0.7;
}

.meta-detail {
    font-family: 'Inclusive Sans', sans-serif;
    font-weight: 400;
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(138, 122, 106, 0.5);
    margin: 3vh 0;
    text-align: center;
}

/* ========================
   TAG ELEMENTS
======================== */

.tag-element {
    margin: 4vh 0;
    opacity: 0;
    transition: opacity 1.5s ease-out;
}

.tag-element.visible {
    opacity: 1;
}

.tag-1 {
    margin-left: 60%;
    transform: rotate(-2deg);
}

.tag-1 .caveat-tag {
    font-size: 1.6rem;
}

.tag-2 {
    margin-left: 25%;
    transform: rotate(3deg);
}

.tag-2 .caveat-tag {
    font-size: 1.2rem;
    color: var(--dusk-rose);
}

.tag-3 {
    transform: rotate(4deg);
}

.tag-3 .caveat-tag {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--terracotta);
    opacity: 0.6;
}

.tag-4 {
    margin-left: 55%;
    transform: rotate(-3deg);
}

.tag-4 .caveat-tag {
    font-size: 2rem;
    color: var(--ochre);
    opacity: 0.65;
}

.tag-5 {
    margin-left: 30%;
    transform: rotate(2deg);
}

.tag-5 .caveat-tag {
    font-size: 1.4rem;
}

.tag-6 {
    margin-left: 50%;
    transform: rotate(-1deg);
}

.tag-6 .caveat-tag {
    font-size: 1.3rem;
    opacity: 0.4;
}

/* ========================
   WAVE DIVIDERS & ACCENTS
======================== */

.wave-divider {
    width: clamp(300px, 60vw, 700px);
    height: 100px;
    margin: 4vh auto;
    display: block;
    opacity: 0.3;
}

.wave-divider.wave-3 {
    width: clamp(400px, 70vw, 800px);
    height: 120px;
    opacity: 0.35;
}

.wave-divider.wave-5 {
    width: clamp(450px, 75vw, 900px);
    opacity: 0.25;
}

.wave-divider.wave-7 {
    width: clamp(350px, 60vw, 700px);
    opacity: 0.25;
}

.wave-divider.wave-8 {
    width: clamp(250px, 50vw, 500px);
    height: 80px;
    opacity: 0.2;
}

.wave-accent {
    display: block;
    margin: 2vh 0;
    opacity: 0.3;
}

.wave-accent.wave-4 {
    width: 300px;
}

.wave-accent.wave-6 {
    width: 400px;
    margin: 3vh auto;
}

/* Wave path animation */
.wave-path {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    transition: stroke-dashoffset 5s cubic-bezier(0.25, 0.1, 0.25, 1.0);
}

.wave-path.drawn {
    stroke-dashoffset: 0;
}

/* ========================
   STENCIL FRAGMENTS
======================== */

.stencil {
    position: relative;
    margin: 4vh 0;
    opacity: 0.1;
}

.stencil-circle {
    width: 60px;
    height: 60px;
    border: 3px solid var(--charcoal);
    border-radius: 50%;
    margin-left: 70%;
    position: relative;
}

.stencil-circle::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    background: var(--wall-base);
    border-radius: 50%;
}

.stencil-triangle {
    width: 0;
    height: 0;
    border-left: 25px solid transparent;
    border-right: 25px solid transparent;
    border-bottom: 45px solid var(--charcoal);
    margin-left: 40%;
    opacity: 0.08;
}

.stencil-star {
    width: 40px;
    height: 40px;
    margin-left: 65%;
    background: var(--charcoal);
    opacity: 0.1;
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

/* ========================
   DRIP ELEMENTS
======================== */

.drip {
    position: absolute;
    width: 4px;
    pointer-events: none;
    opacity: 0.3;
}

.drip-1 {
    top: 25%;
    left: 18%;
    height: 120px;
}

.drip-2 {
    top: 40%;
    right: 22%;
    left: auto;
    height: 80px;
}

.drip-3 {
    top: 55%;
    left: 72%;
    height: 100px;
}

.drip-4 {
    top: 70%;
    left: 35%;
    height: 90px;
}

.drip-5 {
    top: 15%;
    right: 40%;
    left: auto;
    height: 70px;
}

.drip-path {
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    transition: stroke-dashoffset 4s ease-out;
}

.drip-path.animated {
    stroke-dashoffset: 0;
}

/* ========================
   FOREGROUND STENCILS
======================== */

.fg-stencil {
    position: absolute;
    pointer-events: none;
}

.fg-stencil-1 {
    top: 20%;
    left: 85%;
    width: 40px;
    height: 40px;
    border: 2px solid var(--charcoal);
    border-radius: 50%;
    opacity: 0.08;
}

.fg-stencil-2 {
    top: 45%;
    left: 5%;
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-bottom: 26px solid var(--charcoal);
    opacity: 0.1;
}

.fg-stencil-3 {
    top: 65%;
    left: 90%;
    width: 30px;
    height: 30px;
    background: var(--charcoal);
    opacity: 0.06;
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

.fg-stencil-4 {
    top: 80%;
    left: 15%;
    width: 50px;
    height: 50px;
    border: 2px solid var(--charcoal);
    border-radius: 50%;
    opacity: 0.05;
}

.fg-stencil-4::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 18px;
    height: 18px;
    background: transparent;
    border: 1px solid var(--charcoal);
    border-radius: 50%;
}

/* ========================
   RIPPLE EFFECT
======================== */

.ripple-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    overflow: hidden;
}

.ripple {
    position: absolute;
    border-radius: 50%;
    border: 2px solid var(--terracotta);
    width: 0;
    height: 0;
    opacity: 1;
    transform: translate(-50%, -50%);
    animation: rippleExpand 1.2s ease-out forwards;
    pointer-events: none;
}

@keyframes rippleExpand {
    0% {
        width: 0;
        height: 0;
        opacity: 0.8;
    }
    100% {
        width: 200px;
        height: 200px;
        opacity: 0;
    }
}

/* ========================
   SCROLL ATMOSPHERE
======================== */

body.atmosphere-approach {
    background-color: #e8ddd0;
}

body.atmosphere-first-tags {
    background-color: #e5d9cb;
}

body.atmosphere-mural {
    background-color: #e0d2c2;
}

body.atmosphere-fade {
    background-color: #e4d8ca;
}

body.atmosphere-tag {
    background-color: #eae0d4;
}

/* ========================
   RESPONSIVE
======================== */

@media (max-width: 768px) {
    .nav-line {
        left: 8px;
        gap: 18px;
    }

    .nav-marker {
        width: 6px;
        height: 6px;
    }

    .content-block {
        padding: 20px 24px;
        margin-left: 8% !important;
        margin-right: 8% !important;
        max-width: none !important;
    }

    .mural-cluster {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .tag-element {
        margin-left: 10% !important;
    }

    .stencil-circle {
        margin-left: 60% !important;
    }

    .stencil-triangle {
        margin-left: 30% !important;
    }

    .stencil-star {
        margin-left: 50% !important;
    }

    .zone-first-tags,
    .zone-mural,
    .zone-fade {
        padding: 8vh 5vw;
    }

    .headline {
        font-size: clamp(1.8rem, 8vw, 3rem);
    }

    .kanji-ghost {
        font-size: clamp(5rem, 15vw, 10rem);
    }
}

@media (max-width: 480px) {
    .approach-letter {
        font-size: clamp(4rem, 25vw, 8rem);
    }

    .tag-domain {
        font-size: clamp(2rem, 12vw, 4rem);
    }

    .wave-divider {
        width: 90vw;
    }
}
