/* daitoua.quest - Japanese Zen Portfolio */
/* Palette: #e8e4df, #2c2c2c, #1a1a1a, #8b4513, #b8860b, #7a7268 */

:root {
    --bg: #e8e4df;
    --text: #2c2c2c;
    --ink: #1a1a1a;
    --accent: #8b4513;
    --gold: #b8860b;
    --muted: #7a7268;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    line-height: 1.75;
    overflow-x: hidden;
}

/* ================================= */
/* Viewport Border Frame             */
/* ================================= */
body::before {
    content: '';
    position: fixed;
    inset: 8px;
    border: 0.5px solid var(--muted);
    pointer-events: none;
    z-index: 100;
    opacity: 0.5;
}

/* ================================= */
/* Waypoint Track                    */
/* ================================= */
.waypoint-track {
    position: fixed;
    left: 32px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    z-index: 50;
}

.waypoint-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 1px;
    background: rgba(122, 114, 104, 0.25);
    transform: translateX(-50%);
}

.waypoint {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 1px solid var(--muted);
    background: transparent;
    position: relative;
    z-index: 2;
    transition: background 0.6s ease, border-color 0.6s ease, box-shadow 0.6s ease;
}

.waypoint.filled {
    background: var(--gold);
    border-color: var(--gold);
    box-shadow: 0 0 6px rgba(184, 134, 11, 0.3);
}

/* ================================= */
/* Hero - Arrival                    */
/* ================================= */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    position: relative;
}

.hero-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.site-name {
    font-family: 'Cormorant', serif;
    font-weight: 400;
    font-size: clamp(2.2rem, 6vw, 4rem);
    color: var(--text);
    letter-spacing: 0.08em;
    margin-bottom: 0.5rem;
}

.brush-stroke {
    width: min(80%, 700px);
    height: 40px;
    margin-top: 1.5rem;
    overflow: visible;
}

.brush-path {
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    animation: drawBrush 2.5s cubic-bezier(0.4, 0, 0.2, 1) forwards 0.8s;
}

@keyframes drawBrush {
    to {
        stroke-dashoffset: 0;
    }
}

.hero-subtitle {
    font-family: 'Source Code Pro', monospace;
    font-size: 0.72rem;
    color: var(--muted);
    letter-spacing: 0.15em;
    text-transform: lowercase;
    margin-top: 2.5rem;
}

/* Scroll Hint */
.scroll-hint {
    position: absolute;
    bottom: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.scroll-hint-text {
    font-family: 'Source Code Pro', monospace;
    font-size: 0.6rem;
    color: var(--muted);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    opacity: 0.6;
}

.scroll-hint-line {
    width: 1px;
    height: 32px;
    background: var(--muted);
    opacity: 0.4;
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.1; transform: scaleY(0.6); }
    50% { opacity: 0.5; transform: scaleY(1); }
}

/* ================================= */
/* Section Rules                     */
/* ================================= */
.section-rule {
    width: min(60%, 400px);
    height: 1px;
    background: var(--muted);
    opacity: 0.2;
    margin: 0 auto;
}

/* ================================= */
/* Content Blocks - The Path         */
/* ================================= */
.content-block {
    max-width: 520px;
    margin: 0 auto;
    padding: 0 2rem;
    margin-top: clamp(120px, 15vh, 200px);
    margin-bottom: clamp(120px, 15vh, 200px);
    text-align: center;
    position: relative;
}

.block-label-vertical {
    font-family: 'Source Code Pro', monospace;
    font-size: 0.65rem;
    color: var(--gold);
    letter-spacing: 0.3em;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    position: absolute;
    left: -2rem;
    top: 0;
    opacity: 0.6;
}

.block-label {
    font-family: 'Source Code Pro', monospace;
    font-size: 0.7rem;
    color: var(--gold);
    letter-spacing: 0.2em;
    display: block;
    margin-bottom: 1.2rem;
}

.block-heading {
    font-family: 'Cormorant', serif;
    font-weight: 400;
    font-size: clamp(1.6rem, 3vw, 2rem);
    color: var(--text);
    margin-bottom: 1rem;
    letter-spacing: 0.02em;
}

.block-rule {
    width: 40px;
    height: 1px;
    background: var(--gold);
    margin: 0 auto 1.5rem;
    opacity: 0.5;
}

.block-text {
    font-size: 0.92rem;
    color: var(--muted);
    line-height: 1.85;
    max-width: 460px;
    margin: 0 auto;
}

/* ================================= */
/* Reflection                        */
/* ================================= */
.reflection {
    max-width: 560px;
    margin: 0 auto;
    padding: clamp(140px, 18vh, 220px) 2rem;
    text-align: center;
}

.reflection-text {
    font-family: 'Cormorant', serif;
    font-weight: 400;
    font-style: italic;
    font-size: clamp(1.4rem, 3.2vw, 2.2rem);
    color: var(--text);
    line-height: 1.55;
}

.reflection-attribution {
    display: block;
    font-family: 'Source Code Pro', monospace;
    font-size: 0.65rem;
    color: var(--muted);
    letter-spacing: 0.15em;
    margin-top: 2rem;
    opacity: 0.6;
}

/* ================================= */
/* Enso Section                      */
/* ================================= */
.enso-section {
    text-align: center;
    padding: clamp(80px, 10vh, 160px) 2rem clamp(100px, 12vh, 180px);
}

.enso {
    margin-bottom: 2rem;
    opacity: 0;
    transition: opacity 1.5s ease;
}

.enso-section.visible .enso {
    opacity: 0.5;
}

.enso-circle {
    stroke-dasharray: 280 22;
    stroke-dashoffset: 302;
    transition: stroke-dashoffset 2s cubic-bezier(0.4, 0, 0.2, 1);
}

.enso-section.visible .enso-circle {
    stroke-dashoffset: 0;
}

.enso-text {
    font-family: 'Source Code Pro', monospace;
    font-size: 0.72rem;
    color: var(--muted);
    letter-spacing: 0.12em;
    opacity: 0;
    transition: opacity 1.2s ease 0.8s;
}

.enso-section.visible .enso-text {
    opacity: 0.7;
}

/* ================================= */
/* Footer                            */
/* ================================= */
.site-footer {
    text-align: center;
    padding: 3rem 2rem 4rem;
}

.footer-mark {
    font-family: 'Cormorant', serif;
    font-size: 1rem;
    color: var(--muted);
    opacity: 0.3;
    letter-spacing: 0.15em;
}

/* ================================= */
/* Fade In System                    */
/* ================================= */
.fade-in {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 1s ease, transform 1s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ================================= */
/* Scroll-dependent effects          */
/* ================================= */
.hero.scrolled .scroll-hint {
    opacity: 0;
    transition: opacity 0.5s ease;
}

/* ================================= */
/* Responsive                        */
/* ================================= */
@media (max-width: 768px) {
    body::before {
        inset: 4px;
        opacity: 0.3;
    }

    .waypoint-track {
        display: none;
    }

    .block-label-vertical {
        display: none;
    }

    .content-block {
        padding: 0 1.5rem;
    }

    .reflection {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    .hero-subtitle {
        font-size: 0.65rem;
    }
}

@media (max-width: 480px) {
    body::before {
        display: none;
    }

    .site-name {
        font-size: 1.8rem;
    }

    .brush-stroke {
        width: 90%;
    }

    .content-block {
        padding: 0 1.2rem;
    }

    .block-heading {
        font-size: 1.4rem;
    }

    .reflection-text {
        font-size: 1.2rem;
    }
}
