:root {
    --ground: #F0EBE3;
    --sumi: #2C2825;
    --stone: #8A7E72;
    --persimmon: #B5654A;
    --oxide: #6B4C3B;
    --ash: #D4CCC2;
    --ink: #1E1B18;
    --moss: #7A8B6F;
    --reveal-duration: 1.6s;
    --reveal-ease: cubic-bezier(0.25, 0.1, 0.25, 1.0);
    --content-width: min(55ch, 90vw);
    --section-gap: clamp(12rem, 25vh, 20rem);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--ground);
    color: var(--sumi);
    font-family: 'Libre Baskerville', serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.1vw, 1.15rem);
    line-height: 1.85;
    letter-spacing: 0.01em;
    overflow-x: hidden;
    position: relative;
}

/* ==============================
   GRAIN TEXTURE OVERLAY
   ============================== */

#grain-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 1000;
    mix-blend-mode: multiply;
    opacity: 0.035;
}

/* ==============================
   ENSO BLOBS
   ============================== */

.enso-blob {
    position: absolute;
    pointer-events: none;
    z-index: 1;
}

.enso-blob-1 {
    width: 280px;
    height: 280px;
    top: 15vh;
    right: 5vw;
    opacity: 0.07;
}

.enso-blob-2 {
    width: 380px;
    height: 380px;
    top: 440vh;
    left: 3vw;
    opacity: 0.15;
}

.enso-blob-3 {
    width: 220px;
    height: 220px;
    top: 700vh;
    right: 12vw;
    opacity: 0.06;
}

/* ==============================
   CRACK LINES
   ============================== */

.crack-lines {
    position: absolute;
    pointer-events: none;
    opacity: 0.15;
    z-index: 1;
}

.crack-lines-1 {
    width: 200px;
    height: 400px;
    top: 680vh;
    left: 15vw;
}

.crack-lines-2 {
    width: 150px;
    height: 300px;
    top: 720vh;
    right: 20vw;
}

/* ==============================
   STEPPING STONES
   ============================== */

#stepping-stones {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

.stone {
    position: absolute;
    width: 40px;
    height: 8px;
    background-color: var(--ash);
    opacity: 0;
    transition: opacity 1.2s var(--reveal-ease);
}

.stone.visible {
    opacity: 0.6;
}

/* ==============================
   MAIN CONTENT LAYOUT
   ============================== */

#content {
    position: relative;
    z-index: 10;
    display: grid;
    grid-template-columns: 1fr var(--content-width) 1fr;
}

.content-column {
    grid-column: 2;
}

.section {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr var(--content-width) 1fr;
    position: relative;
}

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

h1, h2, h3, h4 {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    text-transform: lowercase;
}

h1 {
    font-size: clamp(2.2rem, 5vw, 4rem);
    letter-spacing: 0.08em;
    color: var(--sumi);
}

h2 {
    font-size: clamp(1.6rem, 3.5vw, 2.8rem);
    letter-spacing: 0.06em;
    color: var(--sumi);
    margin-bottom: clamp(2rem, 4vh, 3.5rem);
}

p {
    max-width: 55ch;
}

p + p {
    margin-top: 1.85em;
}

/* Accent text style */
.accent-text {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-weight: 300;
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--stone);
}

/* ==============================
   REVEAL ANIMATION
   ============================== */

.reveal {
    opacity: 0;
    transition: opacity var(--reveal-duration) var(--reveal-ease);
}

.reveal.revealed {
    opacity: 1;
}

/* Stagger delays for siblings */
.reveal.revealed:nth-child(2) {
    transition-delay: 0.35s;
}

.reveal.revealed:nth-child(3) {
    transition-delay: 0.7s;
}

.reveal.revealed:nth-child(4) {
    transition-delay: 1.05s;
}

/* ==============================
   SECTION 1: ARRIVAL
   ============================== */

.section-arrival {
    min-height: 100vh;
    padding-top: 35vh;
    padding-bottom: 10vh;
}

.section-arrival .domain-name {
    text-align: center;
    opacity: 0;
}

.section-arrival .domain-name.revealed {
    opacity: 0.6;
}

/* ==============================
   SECTION 2: FIRST TEXT
   ============================== */

.section-first-text {
    padding-top: clamp(8rem, 18vh, 16rem);
    padding-bottom: clamp(12rem, 25vh, 20rem);
}

.section-first-text p {
    color: var(--sumi);
}

/* ==============================
   SECTION 3: BREATH
   ============================== */

.section-breath {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
}

.breath-mark {
    width: 70px;
    height: 1px;
    background-color: var(--stone);
    opacity: 0;
    transition: opacity 1.6s var(--reveal-ease);
}

.breath-mark.revealed {
    opacity: 0.3;
}

/* ==============================
   SECTION 4: SECOND MOMENT
   ============================== */

.section-second {
    padding-top: clamp(8rem, 18vh, 16rem);
    padding-bottom: clamp(12rem, 25vh, 20rem);
}

/* ==============================
   SECTION 5: THE DESCENT (INK WASH)
   ============================== */

.section-descent {
    position: relative;
    min-height: 140vh;
    padding-top: clamp(8rem, 18vh, 16rem);
    padding-bottom: clamp(12rem, 25vh, 20rem);
}

.ink-wash-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        var(--ground) 0%,
        #D4CCC2 10%,
        #8A7E72 25%,
        #6B4C3B 40%,
        #2C2825 55%,
        var(--ink) 70%,
        var(--ink) 85%,
        #2C2825 95%,
        var(--ground) 100%
    );
    z-index: -1;
    grid-column: 1 / -1;
}

.content-inverted {
    padding-top: 40vh;
}

.content-inverted h2,
.content-inverted p {
    color: var(--ground);
}

/* ==============================
   SECTION 6: RETURN TO LIGHT
   ============================== */

.section-return {
    padding-top: clamp(12rem, 25vh, 20rem);
    padding-bottom: clamp(12rem, 25vh, 20rem);
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr var(--content-width) 1fr;
    align-items: center;
}

.return-sentence {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-size: clamp(1.4rem, 2.8vw, 2.2rem);
    letter-spacing: 0.06em;
    text-transform: lowercase;
    text-align: center;
    display: block;
    color: var(--sumi);
}

/* ==============================
   SECTION 7: DEPARTURE
   ============================== */

.section-departure {
    min-height: 120vh;
    padding-top: 40vh;
    padding-bottom: 20vh;
    display: grid;
    grid-template-columns: 1fr var(--content-width) 1fr;
    align-items: start;
}

.domain-name-end {
    display: block;
    text-align: center;
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-size: clamp(1.4rem, 2.5vw, 2rem);
    letter-spacing: 0.08em;
    text-transform: lowercase;
    color: var(--sumi);
    opacity: 0;
}

.domain-name-end.revealed {
    opacity: 0.3;
}

/* ==============================
   HORIZONTAL RULE BREATH MARKS
   ============================== */

.breath-mark-hr {
    width: 70px;
    height: 1px;
    background-color: var(--stone);
    margin: 0 auto;
    opacity: 0.2;
    transition: opacity 1.2s var(--reveal-ease);
}

/* ==============================
   LINK STYLES (minimal)
   ============================== */

a {
    color: var(--sumi);
    text-decoration: none;
    transition: color 0.6s var(--reveal-ease);
}

a:hover {
    color: var(--persimmon);
}

a:visited {
    color: var(--oxide);
}

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

@media (max-width: 768px) {
    .enso-blob-1 {
        width: 180px;
        height: 180px;
        right: -2vw;
    }

    .enso-blob-2 {
        width: 250px;
        height: 250px;
        left: -5vw;
    }

    .enso-blob-3 {
        width: 150px;
        height: 150px;
    }

    .section-arrival {
        padding-top: 30vh;
    }

    .stone {
        width: 30px;
        height: 6px;
    }
}

@media (min-width: 1400px) {
    :root {
        --content-width: 600px;
    }
}
