/* gabs.cafe -- wabi-sabi ceramic cafe */

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background: rgba(139, 165, 158, 0.3);
    color: inherit;
}

body {
    background: #F2EDE7;
    color: #4A4039;
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-size: 20px;
    line-height: 1.9;
    letter-spacing: 0.01em;
    overflow-x: hidden;
    position: relative;
}

/* ===== Grain Overlay ===== */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23g)' opacity='0.03'/%3E%3C/svg%3E");
    background-repeat: repeat;
}

/* ===== Craquelure Overlay ===== */
.craquelure-overlay {
    position: fixed;
    top: 0;
    left: -10%;
    width: 220%;
    height: 400%;
    pointer-events: none;
    z-index: 1;
    opacity: 1;
}

/* ===== Glaze Drip ===== */
.glaze-drip {
    width: 100%;
    height: 40px;
    background: linear-gradient(to bottom, #E8DFD4, #F2EDE7);
    position: relative;
    z-index: 2;
}

/* ===== Breathing Space ===== */
.breath {
    position: relative;
}

.breath-after-1 {
    height: 60vh;
}

.breath-before-2 {
    height: 30vh;
}

.breath-between-2-3 {
    height: 40vh;
}

.breath-before-kintsugi {
    height: 20vh;
}

.breath-before-4 {
    height: 30vh;
}

.breath-before-5 {
    height: 40vh;
}

/* ===== Layout Track ===== */
.passage {
    position: relative;
    max-width: 960px;
    margin: 0 auto;
    padding: 0 40px;
    z-index: 2;
}

/* ===== Passage 1 -- The Name ===== */
.passage-1 {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.passage-1-content {
    position: relative;
    text-align: center;
    margin-top: -10vh;
}

.hero-name {
    font-family: 'Instrument Serif', serif;
    font-weight: 400;
    font-size: 14vw;
    color: #5C4033;
    letter-spacing: -0.03em;
    text-transform: lowercase;
    line-height: 1;
    opacity: 0;
    transition: opacity 1.8s ease-out 0.4s;
}

.hero-name.visible {
    opacity: 1;
}

/* ===== Cup Rings ===== */
.cup-ring {
    position: absolute;
    pointer-events: none;
    opacity: 0;
    transition: opacity 1.4s ease-out;
    z-index: 1;
}

.cup-ring.visible {
    opacity: 1;
}

.cup-ring-1 {
    width: 280px;
    height: 280px;
    bottom: 10vh;
    right: -40px;
}

/* ===== Craquelure Band ===== */
.craquelure-band {
    width: 100vw;
    height: 80px;
    position: relative;
    overflow: hidden;
    z-index: 2;
}

.craquelure-band svg {
    width: 100%;
    height: 100%;
}

/* ===== Section Headings ===== */
.section-heading {
    font-family: 'Instrument Serif', serif;
    font-weight: 400;
    font-size: 6vw;
    color: #5C4033;
    letter-spacing: -0.03em;
    text-transform: lowercase;
    line-height: 1.2;
    margin-bottom: 2rem;
}

/* ===== Body Text ===== */
.body-text {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-size: 20px;
    line-height: 1.9;
    color: #4A4039;
    letter-spacing: 0.01em;
}

/* ===== Passage 2 -- The Place ===== */
.passage-2 {
    position: relative;
    min-height: 60vh;
    display: flex;
    align-items: flex-start;
    padding-top: 10vh;
}

.passage-2-content {
    width: 520px;
    max-width: 100%;
    position: relative;
    z-index: 2;
    opacity: 0;
    transition: opacity 1.5s ease-out;
}

.passage-2-content.visible {
    opacity: 1;
}

.cup-ring-2 {
    width: 240px;
    height: 240px;
    left: -30px;
    top: 8vh;
    z-index: 1;
}

/* ===== Passage 3 -- The Craft ===== */
.passage-3 {
    min-height: 60vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 10vh;
}

.passage-3-content {
    width: 480px;
    max-width: 100%;
    text-align: left;
    opacity: 0;
    transition: opacity 1.5s ease-out;
}

.passage-3-content.visible {
    opacity: 1;
}

/* ===== Kintsugi Lines ===== */
.kintsugi-lines {
    width: 100vw;
    height: 60px;
    position: relative;
    overflow: hidden;
    z-index: 2;
}

.kintsugi-lines svg {
    width: 100%;
    height: 100%;
}

.kintsugi-path {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    transition: stroke-dashoffset 2s ease-out;
}

.kintsugi-path.animate {
    stroke-dashoffset: 0;
}

/* ===== Passage 4 -- The Pause ===== */
.passage-4 {
    position: relative;
    min-height: 60vh;
    display: flex;
    align-items: flex-start;
    padding-top: 10vh;
}

.passage-4-content {
    width: 440px;
    max-width: 100%;
    margin-left: auto;
    margin-right: calc(50% - 280px);
    position: relative;
    z-index: 2;
    opacity: 0;
    transition: opacity 1.5s ease-out;
}

.passage-4-content.visible {
    opacity: 1;
}

.cup-ring-3 {
    width: 220px;
    height: 220px;
    left: 60px;
    top: 2vh;
    z-index: 1;
}

/* ===== Passage 5 -- The Close ===== */
.passage-5 {
    min-height: 40vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.passage-5-content {
    text-align: center;
    opacity: 0;
    transition: opacity 1.8s ease-out;
}

.passage-5-content.visible {
    opacity: 1;
}

.closing-line {
    font-family: 'Instrument Serif', serif;
    font-weight: 400;
    font-size: 4vw;
    color: #5C4033;
    letter-spacing: -0.03em;
    text-transform: lowercase;
    line-height: 1.3;
}

/* ===== Contact ===== */
.contact {
    text-align: center;
    padding: 10vh 0;
    position: relative;
    z-index: 2;
    opacity: 0;
    transition: opacity 1.2s ease-out;
}

.contact.visible {
    opacity: 1;
}

.contact-email {
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    font-size: 13px;
    color: #8A7E74;
    letter-spacing: 0.06em;
}

/* ===== Palette-referenced utility styles ===== */
/* Kiln Black #2C2420 -- thinnest rule lines */
.rule-line {
    border-top: 0.5px solid #2C2420;
}

/* Celadon Mist #8BA59E -- subtle accent */
.cup-ring svg circle {
    stroke: #8BA59E;
}

/* Shino Rust #B5654A -- warm decorative accent */
.shino-accent {
    color: #B5654A;
}

/* Crackle Gold #C4A265 -- kintsugi repair */
.kintsugi-path {
    stroke: #C4A265;
}

/* ===== Final Silence ===== */
.final-silence {
    height: 80vh;
}

/* ===== Mobile Responsive ===== */
@media (max-width: 768px) {
    .passage {
        padding: 0 24px 0 40px;
    }

    .hero-name {
        font-size: 16vw;
    }

    .section-heading {
        font-size: 10vw;
    }

    .closing-line {
        font-size: 7vw;
    }

    .passage-2-content,
    .passage-3-content,
    .passage-4-content {
        width: 100%;
        margin-left: 0;
        margin-right: 0;
    }

    .cup-ring-1 {
        width: 200px;
        height: 200px;
        right: -20px;
        bottom: 15vh;
    }

    .cup-ring-2 {
        width: 170px;
        height: 170px;
        left: -20px;
    }

    .cup-ring-3 {
        width: 160px;
        height: 160px;
        left: 20px;
    }

    .body-text {
        font-size: 18px;
        line-height: 1.8;
    }

    .breath-after-1 {
        height: 40vh;
    }

    .breath-between-2-3 {
        height: 30vh;
    }

    .breath-before-4 {
        height: 25vh;
    }

    .breath-before-5 {
        height: 30vh;
    }
}

@media (max-width: 480px) {
    .hero-name {
        font-size: 18vw;
    }

    .section-heading {
        font-size: 12vw;
    }

    .closing-line {
        font-size: 9vw;
    }
}
