/* monopole.one v2 — minimalist Japanese aesthetic */
/* Single column. Monochromatic. Ma as primary material. */

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

/* ---------- Tokens (DESIGN.md palette) ---------- */
:root {
    --warm-white: #F8F6F2;
    --paper-warm: #F0EDE8;
    --ink-black: #1A1A1A;
    --ink-mid: #4A4A4A;
    --ink-light: #8A8A8A;
    --wash-gray: #C0C0C0;
    --enso-stroke: #2A2A2A;

    --font-headline: 'Cormorant Garamond', serif;
    --font-body: 'Noto Serif', serif;
    --font-annotation: 'Josefin Sans', sans-serif;

    --reveal-duration: 800ms;
    --reveal-duration-slow: 1200ms;
    --section-spacing: 15vh;
    --column-max: 600px;
}

/* ---------- Base ---------- */
html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--warm-white);
    color: var(--ink-mid);
    font-family: var(--font-body);
    font-weight: 300;
    font-size: clamp(15px, 1.1vw, 17px);
    line-height: 1.9;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.filter-defs {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

/* ---------- Single column constraint ---------- */
.content-section,
.closing {
    max-width: var(--column-max);
    margin: 0 auto;
    padding: 0 clamp(24px, 6vw, 48px);
}

/* ---------- Hero / Opening Viewport ---------- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: var(--warm-white);
    text-align: center;
    padding: 0 clamp(20px, 5vw, 48px);
}

.hero-enso {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: clamp(220px, 32vw, 380px);
    height: clamp(220px, 32vw, 380px);
    opacity: 0;
    pointer-events: none;
    animation: heroEnsoFadeIn 1.6s ease forwards;
    animation-delay: 0.2s;
}

.enso-hero {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.enso-hero-path {
    stroke-dasharray: 720;
    stroke-dashoffset: 720;
    animation: ensoDraw 2s ease forwards;
    animation-delay: 0.4s;
}

.logotype {
    position: relative;
    font-family: var(--font-headline);
    font-weight: 300;
    font-size: clamp(30px, 4.2vw, 52px);
    color: var(--ink-black);
    letter-spacing: 0.06em;
    line-height: 1;
    opacity: 0;
    animation: logotypeFadeIn 1.5s ease forwards;
    animation-delay: 0.5s;
}

.hero-tagline {
    position: relative;
    margin-top: clamp(20px, 3vh, 32px);
    color: var(--ink-light);
    opacity: 0;
    animation: logotypeFadeIn 1.4s ease forwards;
    animation-delay: 1.4s;
}

.scroll-cue {
    position: absolute;
    bottom: clamp(24px, 6vh, 56px);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    opacity: 0;
    animation: logotypeFadeIn 1.6s ease forwards;
    animation-delay: 2.2s;
}

.scroll-cue .annotation {
    color: var(--ink-light);
}

.scroll-line {
    width: 1px;
    height: 36px;
    background: linear-gradient(to bottom, var(--ink-light), transparent);
    animation: scrollPulse 2.6s ease-in-out infinite;
}

/* ---------- Typography ---------- */
.section-heading {
    font-family: var(--font-headline);
    font-weight: 300;
    font-size: clamp(26px, 3vw, 38px);
    color: var(--ink-black);
    line-height: 1.2;
    letter-spacing: 0.02em;
    margin-bottom: 1.2em;
}

.body-text {
    color: var(--ink-mid);
    margin-bottom: 1.6em;
}

.annotation {
    display: inline-block;
    font-family: var(--font-annotation);
    font-weight: 300;
    font-size: clamp(10px, 0.7vw, 12px);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink-light);
}

.annotation-quiet {
    opacity: 0.65;
}

.section-tag {
    display: block;
    color: var(--ink-light);
    margin-bottom: 1.4em;
}

/* ---------- Sections ---------- */
.content-section {
    padding-top: var(--section-spacing);
    padding-bottom: 2vh;
}

.content-section .body-text + .annotation {
    margin-top: 0.6em;
}

/* ---------- Ink-wash illustration block ---------- */
.inkwash-illustration {
    margin-top: 3em;
    width: 100%;
    opacity: 0.85;
}

.inkwash-svg {
    display: block;
    width: 100%;
    height: auto;
}

/* ---------- Enso dividers ---------- */
.enso-divider {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 9vh 0 9vh;
}

.enso-marker {
    width: clamp(60px, 8vw, 96px);
    height: clamp(60px, 8vw, 96px);
    overflow: visible;
}

.enso-path {
    stroke-dasharray: 360;
    stroke-dashoffset: 360;
    transition: stroke-dashoffset 1.6s ease;
}

.enso-divider.visible .enso-path {
    stroke-dashoffset: 0;
}

.enso-final .enso-path {
    stroke-dasharray: 380;
    stroke-dashoffset: 380;
    transition: stroke-dashoffset 2.2s ease;
}

/* ---------- Reveal animation (fade-reveal) ---------- */
.section {
    opacity: 0;
    transform: translateY(20px);
    transition:
        opacity var(--reveal-duration) ease,
        transform var(--reveal-duration) ease;
    will-change: opacity, transform;
}

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

/* Slower reveal for ink-wash illustrations */
.section .inkwash-illustration {
    opacity: 0;
    transform: translateY(14px);
    transition:
        opacity var(--reveal-duration-slow) ease,
        transform var(--reveal-duration-slow) ease;
    transition-delay: 200ms;
}

.section.visible .inkwash-illustration {
    opacity: 0.9;
    transform: translateY(0);
}

/* ---------- Closing ---------- */
.closing {
    padding-top: 6vh;
    padding-bottom: 18vh;
    text-align: center;
}

.closing-mark {
    font-family: var(--font-headline);
    font-weight: 300;
    font-size: clamp(20px, 2.4vw, 28px);
    color: var(--ink-black);
    letter-spacing: 0.08em;
    margin-bottom: 1.4em;
}

/* ---------- Subtle paper variation on alternating sections ---------- */
.content-section:nth-of-type(even) {
    background: linear-gradient(
        180deg,
        var(--warm-white) 0%,
        var(--paper-warm) 50%,
        var(--warm-white) 100%
    );
}

/* ---------- Keyframes ---------- */
@keyframes ensoDraw {
    from {
        stroke-dashoffset: 720;
    }
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes logotypeFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes heroEnsoFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 0.08;
    }
}

@keyframes scrollPulse {
    0%, 100% {
        opacity: 0.3;
        transform: scaleY(0.7);
    }
    50% {
        opacity: 1;
        transform: scaleY(1);
    }
}

/* ---------- Responsive refinements ---------- */
@media (max-width: 640px) {
    :root {
        --section-spacing: 12vh;
    }

    .enso-divider {
        padding: 7vh 0;
    }

    .inkwash-illustration {
        margin-top: 2.4em;
    }
}

/* ---------- Reduced motion respect (no ARIA per spec, but motion safety preserved) ---------- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .section {
        opacity: 1;
        transform: none;
    }

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