/* nonri.day v2 — Scandinavian, baskerville-refined, triadic, hand-drawn, edgy-rebellious-quiet */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Libre Baskerville', Georgia, serif;
    background-color: #E8E0F0;
    color: #2A3828;
    line-height: 1.9;
    overflow-x: hidden;
    transition: background-color 600ms ease;
}

/* Minimal navigation - corner placement, edgy-rebellious quietness */
.nav-minimal {
    position: fixed;
    top: 28px;
    right: 36px;
    z-index: 50;
}

.nav-link {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #4A5060;
    text-decoration: none;
    position: relative;
    padding-bottom: 2px;
}

.nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background-color: #7A6890;
    opacity: 0;
    transition: opacity 200ms ease;
}

.nav-link:hover::after {
    opacity: 1;
}

/* Mountain backdrop - persistent, parallax */
.mountain-backdrop {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 38vh;
    pointer-events: none;
    z-index: 0;
    will-change: transform;
}

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

.mountain {
    stroke-dasharray: 4000;
    stroke-dashoffset: 4000;
    animation: drawMountain 2000ms ease-out forwards;
}

.mountain-far {
    animation-delay: 400ms;
}

.mountain-near {
    animation-delay: 800ms;
}

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

.pine-tree {
    transform-origin: bottom center;
    transform: scale(0);
    animation: pineGrow 600ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.pine-tree[data-index="0"] { animation-delay: 2200ms; }
.pine-tree[data-index="1"] { animation-delay: 2300ms; }
.pine-tree[data-index="2"] { animation-delay: 2400ms; }
.pine-tree[data-index="3"] { animation-delay: 2500ms; }
.pine-tree[data-index="4"] { animation-delay: 2600ms; }
.pine-tree[data-index="5"] { animation-delay: 2700ms; }
.pine-tree[data-index="6"] { animation-delay: 2800ms; }
.pine-tree[data-index="7"] { animation-delay: 2900ms; }

@keyframes pineGrow {
    to {
        transform: scale(1);
    }
}

/* Wind oscillation on tree peaks - begins after grow */
.pine-tree.wind-active {
    animation: pineWind 8s ease-in-out infinite;
    animation-delay: 0s;
}

.pine-tree[data-index="0"].wind-active { animation-delay: 0s; }
.pine-tree[data-index="1"].wind-active { animation-delay: 0.5s; }
.pine-tree[data-index="2"].wind-active { animation-delay: 1s; }
.pine-tree[data-index="3"].wind-active { animation-delay: 1.5s; }
.pine-tree[data-index="4"].wind-active { animation-delay: 2s; }
.pine-tree[data-index="5"].wind-active { animation-delay: 2.5s; }
.pine-tree[data-index="6"].wind-active { animation-delay: 3s; }
.pine-tree[data-index="7"].wind-active { animation-delay: 3.5s; }

@keyframes pineWind {
    0%, 100% { transform: translateX(0) scale(1); }
    25% { transform: translateX(0.8px) scale(1); }
    50% { transform: translateX(0) scale(1); }
    75% { transform: translateX(-0.8px) scale(1); }
}

.pine-tree:hover {
    animation: pineWindHover 1s ease-in-out infinite;
}

@keyframes pineWindHover {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(2px); }
}

/* Hero section - 100vh full screen narrative entry */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    padding: 0 24px;
}

.hero-inner {
    text-align: center;
    max-width: 720px;
    margin-bottom: 12vh;
}

.domain-title {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-weight: 700;
    font-size: clamp(28px, 6vw, 76px);
    letter-spacing: 0.01em;
    color: #2A3828;
    opacity: 0;
    animation: fadeInTitle 800ms ease-out 200ms forwards;
}

.hero-sub {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-style: italic;
    font-weight: 400;
    font-size: 15px;
    color: #4A5060;
    margin-top: 28px;
    opacity: 0;
    animation: fadeInTitle 800ms ease-out 1200ms forwards;
}

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

/* Narrative body - single column, generous spacing */
.narrative {
    position: relative;
    z-index: 2;
    padding: 8vh 24px 0;
}

.entry {
    max-width: 640px;
    margin: 0 auto;
    padding: 96px 0 48px;
    position: relative;
    opacity: 0;
    transition: opacity 600ms ease, transform 600ms ease;
}

.entry[data-direction="left"] {
    transform: translateX(-20px);
}

.entry[data-direction="right"] {
    transform: translateX(20px);
}

.entry.in-view {
    opacity: 1;
    transform: translateX(0);
}

.entry-meta {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-style: italic;
    font-weight: 400;
    font-size: 13px;
    color: #7A6890;
    margin-bottom: 20px;
    letter-spacing: 0.02em;
}

.entry-title {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-weight: 700;
    font-size: clamp(22px, 2.4vw, 32px);
    line-height: 1.4;
    letter-spacing: 0.01em;
    color: #2A3828;
    margin-bottom: 24px;
}

.entry-body {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-weight: 400;
    font-size: clamp(16px, 1.1vw, 18px);
    line-height: 1.9;
    color: #4A5060;
}

.border-accent {
    width: 60px;
    height: 12px;
    margin-top: 36px;
    display: block;
    transition: transform 200ms ease;
    opacity: 0;
}

.entry.in-view .border-accent {
    opacity: 1;
    transition: opacity 800ms ease 300ms, transform 200ms ease;
}

.border-accent:hover {
    transform: rotate(2deg);
}

/* Triadic body backgrounds - applied via JS scroll, but base classes here for visibility */
body.bg-lavender { background-color: #E8E0F0; }
body.bg-sage { background-color: #D0E0D0; }
body.bg-peach { background-color: #F0DCD0; }

/* Closing footer */
.closing {
    max-width: 640px;
    margin: 96px auto 0;
    padding: 96px 0 160px;
    text-align: center;
}

.closing-line {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-style: italic;
    font-weight: 400;
    font-size: 15px;
    color: #7A6890;
    letter-spacing: 0.05em;
    opacity: 0;
    transition: opacity 800ms ease;
}

.closing.in-view .closing-line {
    opacity: 1;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-minimal {
        top: 20px;
        right: 24px;
    }

    .hero-inner {
        margin-bottom: 8vh;
    }

    .narrative {
        padding-top: 6vh;
    }

    .entry {
        padding: 72px 0 32px;
    }

    .mountain-backdrop {
        height: 32vh;
    }
}

@media (max-width: 480px) {
    .entry {
        padding: 56px 0 24px;
    }

    .entry-title {
        margin-bottom: 18px;
    }

    .border-accent {
        margin-top: 28px;
    }
}
