:root {
    --deep-void: #080808;
    --lacquer-black: #0D0D0D;
    --kintsugi-gold: #C9A84C;
    --burnished-gold: #D4AF37;
    --warm-parchment: #E8DCC8;
    --warm-stone: #B8A88A;
    --aged-bronze: #7A6B52;
    --charcoal-silk: #1A1A1A;
    --ember-glow: #8B4513;
}

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

html { scroll-behavior: smooth; }

body {
    background: var(--deep-void);
    color: var(--warm-stone);
    font-family: 'Noto Sans JP', sans-serif;
    font-weight: 300;
    font-size: clamp(0.95rem, 1.8vw, 1.1rem);
    line-height: 2.0;
    overflow-x: hidden;
}

/* Sand Pattern */
.sand-pattern {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.sand-rect {
    animation: sandDrift 60s linear infinite;
}

@keyframes sandDrift {
    from { transform: translateX(0); }
    to { transform: translateX(-96px); }
}

/* Bubble Field */
.bubble-field {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.bubble {
    position: absolute;
    border: 1.5px solid rgba(201, 168, 76, 0.4);
    border-radius: 50%;
    background: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bubble-kanji {
    font-family: 'Caveat', cursive;
    font-size: 0.7rem;
    color: var(--kintsugi-gold);
    opacity: 0.6;
}

/* Zones */
.zone {
    position: relative;
    z-index: 2;
    min-height: 100vh;
}

/* Zone 1: Threshold */
.zone-threshold {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.threshold-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.gold-line {
    width: 0;
    height: 1px;
    background: var(--kintsugi-gold);
    transition: width 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.gold-line.drawn {
    width: 60vw;
}

.hero-title {
    font-family: 'Caveat', cursive;
    font-weight: 700;
    font-size: clamp(2.5rem, 5.5vw, 4.5rem);
    color: var(--kintsugi-gold);
    letter-spacing: 0.03em;
    line-height: 1.3;
}

.title-letter {
    display: inline-block;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}

.title-letter.visible {
    opacity: 1;
    transform: translateY(0);
}

.kanji-ri {
    width: 80px;
    height: 100px;
    opacity: 0;
    transition: opacity 1s ease-out;
}

.kanji-ri.visible {
    opacity: 1;
}

/* Zone 2: Descent */
.zone-descent {
    min-height: 200vh;
    padding: 20vh 0;
    position: relative;
}

.descent-text {
    max-width: 420px;
    position: relative;
    padding: 0 8vw;
}

.descent-body {
    font-family: 'Noto Sans JP', sans-serif;
    font-weight: 300;
    color: var(--warm-stone);
    margin-bottom: 3rem;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.descent-body.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Zone 3: Garden */
.zone-garden {
    min-height: auto;
    padding: 16rem 0;
}

.garden-cards {
    display: flex;
    flex-direction: column;
    gap: 8rem;
}

.garden-card {
    background: var(--lacquer-black);
    padding: clamp(2rem, 4vw, 3.5rem);
    max-width: 480px;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.garden-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.card-left {
    margin-left: 15vw;
    border-left: 1px solid var(--kintsugi-gold);
}

.card-right {
    margin-left: auto;
    margin-right: 15vw;
    border-top: 1px solid var(--kintsugi-gold);
}

.card-heading {
    font-family: 'Caveat', cursive;
    font-weight: 700;
    font-size: clamp(1.6rem, 3.5vw, 2.8rem);
    color: var(--warm-parchment);
    letter-spacing: 0.03em;
    line-height: 1.3;
    margin-bottom: 1rem;
}

.card-body {
    font-family: 'Noto Sans JP', sans-serif;
    font-weight: 300;
    color: var(--warm-stone);
    line-height: 2.0;
}

/* Zone 4: Return */
.zone-return {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    gap: 4rem;
    padding: 10vh 8vw;
}

.enso-container {
    position: relative;
    width: clamp(200px, 30vw, 300px);
    height: clamp(200px, 30vw, 300px);
}

.enso-svg {
    width: 100%;
    height: 100%;
}

.enso-path {
    stroke-dasharray: 800;
    stroke-dashoffset: 800;
    transition: stroke-dashoffset 2.5s cubic-bezier(0.65, 0, 0.35, 1);
    filter: drop-shadow(0 0 2px rgba(201, 168, 76, 0.3));
}

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

.enso-counter {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Caveat', cursive;
    font-weight: 700;
    font-size: clamp(2rem, 4vw, 3.5rem);
    color: var(--burnished-gold);
}

.counter-display {
    display: inline-block;
    transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}

.closing-thought {
    font-family: 'Caveat', cursive;
    font-weight: 400;
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    color: var(--warm-parchment);
    opacity: 0.7;
    text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
    .card-left { margin-left: 5vw; }
    .card-right { margin-right: 5vw; }
}

@media (prefers-reduced-motion: reduce) {
    .sand-rect { animation: none; }
    .bubble { animation: none !important; }
}
