/* ========================================================================
   undo.cafe — cottagecore + wabi-sabi + single-column
   Palette: Terracotta-Warm Cafe
   ======================================================================== */

:root {
    /* Palette */
    --bg-primary: #F5EDE0;     /* Linen cream */
    --bg-warm: #F0E4D4;        /* Pastry warm */
    --bg-light: #F8F0E4;       /* Window light */
    --surface: #FFFAF4;        /* Napkin white */
    --text-primary: #3A2A1E;   /* Espresso dark */
    --text-body: #5A4A3A;      /* Mocha brown */
    --text-accent: #8A6A4A;    /* Cinnamon */
    --accent-primary: #B87A5A; /* Terracotta */
    --accent-secondary: #6A8A5A; /* Herb green */
    --divider: #D4C4A8;        /* Biscuit line */

    /* warmth scroll variable */
    --warmth: 0;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Lora', Georgia, serif;
    font-weight: 400;
    font-size: 17px;
    line-height: 1.8;
    color: var(--text-body);
    background-color: var(--bg-primary);
    background-image: linear-gradient(
        to bottom,
        var(--bg-primary) 0%,
        var(--bg-warm) 30%,
        var(--bg-warm) 55%,
        var(--bg-light) 75%,
        var(--bg-primary) 100%
    );
    background-attachment: fixed;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Subtle warmth shift driven by scroll variable */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    background: hsla(calc(35 + var(--warmth) * 5), 30%, calc(95 - var(--warmth) * 2), 0.18);
    transition: background 600ms ease-out;
}

.cafe {
    display: block;
    width: 100%;
}

/* ------------------------------------------------------------------------
   Container
   ------------------------------------------------------------------------ */

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 32px;
    position: relative;
    z-index: 1;
}

.container--narrow {
    max-width: 480px;
}

/* ------------------------------------------------------------------------
   Section Layout
   ------------------------------------------------------------------------ */

.section {
    position: relative;
    padding: 100px 0;
}

.section-doorbell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-primary);
    padding: 120px 0;
}

.section-menu {
    min-height: 180vh;
    background-color: var(--bg-primary);
    padding: 120px 0;
}

.section-corner {
    min-height: 100vh;
    background-color: var(--bg-warm);
    padding: 140px 0;
}

.section-window {
    min-height: 100vh;
    background-color: var(--bg-light);
    padding: 140px 0;
    position: relative;
}

/* Lace curtain pattern on window seat */
.section-window::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        repeating-conic-gradient(
            from 0deg at 50% 50%,
            #D4C4A8 0deg 4deg,
            transparent 4deg 18deg
        );
    background-size: 28px 28px;
    opacity: 0.02;
    pointer-events: none;
}

.section-goodbye {
    min-height: 20vh;
    background-color: var(--bg-primary);
    padding: 100px 0 140px;
    text-align: center;
}

/* ------------------------------------------------------------------------
   Watercolor Spots — soft radial gradient bleeds
   ------------------------------------------------------------------------ */

.watercolor-spot {
    position: absolute;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    background: radial-gradient(circle at center, rgba(184, 122, 90, 0.12) 0%, rgba(184, 122, 90, 0.04) 45%, transparent 70%);
    filter: blur(8px);
}

.watercolor-spot--terracotta {
    /* uses default */
}

.watercolor-spot--top-left {
    top: -80px;
    left: -120px;
    width: 420px;
    height: 420px;
}

.watercolor-spot--top-right {
    top: 40px;
    right: -120px;
    width: 380px;
    height: 380px;
}

.watercolor-spot--right {
    top: 30%;
    right: -180px;
    width: 460px;
    height: 460px;
    background: radial-gradient(circle at center, rgba(106, 138, 90, 0.07) 0%, rgba(106, 138, 90, 0.02) 50%, transparent 75%);
}

.watercolor-spot--left {
    top: 20%;
    left: -160px;
    width: 380px;
    height: 380px;
}

/* ------------------------------------------------------------------------
   Doorbell section
   ------------------------------------------------------------------------ */

.doorbell-inner {
    text-align: left;
    transform: translateX(-12px); /* slightly off-center to the left */
    margin-bottom: 60px;
}

.kicker {
    font-family: 'Caveat Brush', 'Lora', cursive;
    font-size: 18px;
    line-height: 1.3;
    color: var(--text-accent);
    margin: 0 0 18px 4px;
    letter-spacing: 0.5px;
}

.cafe-name {
    font-family: 'Caveat Brush', 'Lora', cursive;
    font-weight: 400;
    font-size: 88px;
    line-height: 1.0;
    color: var(--text-primary);
    margin: 0 0 18px 0;
    transform: rotate(-1.5deg);
    text-shadow: 0 1px 0 rgba(58, 42, 30, 0.04);
}

.tagline {
    font-family: 'Lora', Georgia, serif;
    font-style: italic;
    font-size: 19px;
    line-height: 1.7;
    color: var(--text-body);
    margin: 0;
    max-width: 460px;
}

.cup-illustration {
    position: relative;
    margin: 60px 0 0 auto;
    width: 160px;
    height: 220px;
    transform: translateX(-20px);
}

.cup-illustration .steam-svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.scroll-hint {
    font-family: 'Caveat Brush', cursive;
    font-size: 16px;
    color: var(--text-accent);
    margin-top: 40px;
    text-align: center;
    opacity: 0.6;
    letter-spacing: 0.5px;
}

/* Steam paths animation */
.steam-path {
    transform-origin: center;
    opacity: 0.4;
}

.steam-path--1 {
    animation: rise 4s ease-in-out infinite;
    animation-delay: 0s;
}

.steam-path--2 {
    animation: rise 4s ease-in-out infinite;
    animation-delay: 1.3s;
}

.steam-path--3 {
    animation: rise 4s ease-in-out infinite;
    animation-delay: 2.6s;
}

@keyframes rise {
    0% {
        transform: translateY(0);
        opacity: 0.4;
    }
    50% {
        opacity: 0.3;
    }
    100% {
        transform: translateY(-30px);
        opacity: 0;
    }
}

/* ------------------------------------------------------------------------
   Section labels & headings
   ------------------------------------------------------------------------ */

.section-label {
    font-family: 'Caveat Brush', cursive;
    font-weight: 400;
    font-size: 18px;
    line-height: 1.3;
    color: var(--text-accent);
    margin: 0 0 8px 0;
    letter-spacing: 0.6px;
}

.section-heading {
    font-family: 'Caveat Brush', 'Lora', cursive;
    font-weight: 400;
    font-size: 44px;
    line-height: 1.2;
    color: var(--text-primary);
    margin: 0 0 24px 0;
    transform: rotate(-0.6deg);
}

.section-intro {
    font-family: 'Lora', Georgia, serif;
    font-size: 17px;
    line-height: 1.8;
    color: var(--text-body);
    margin: 0 0 48px 0;
}

.section-note {
    font-family: 'Lora', Georgia, serif;
    font-style: italic;
    font-size: 15px;
    color: var(--text-accent);
    margin-top: 36px;
    text-align: center;
    opacity: 0.85;
}

/* ------------------------------------------------------------------------
   Squiggle dividers (hand-drawn waviness)
   ------------------------------------------------------------------------ */

.squiggle-divider {
    width: 120px;
    margin: 36px 0;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 900ms ease-out, transform 900ms ease-out;
}

.squiggle-divider svg {
    display: block;
    width: 100%;
    height: 12px;
    overflow: visible;
}

.squiggle-divider .squiggle-path {
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    transition: stroke-dashoffset 1400ms ease-out;
}

.squiggle-divider.in-view {
    opacity: 1;
    transform: translateY(0);
}

.squiggle-divider.in-view .squiggle-path {
    stroke-dashoffset: 0;
}

.squiggle-divider--soft {
    opacity: 0.6;
}

.squiggle-divider--soft.in-view {
    opacity: 0.6;
}

/* ------------------------------------------------------------------------
   Menu list — dotted leaders
   ------------------------------------------------------------------------ */

.menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.menu-item {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin: 0 0 26px 0;
    gap: 0;
}

.menu-item-name {
    font-family: 'Lora', Georgia, serif;
    font-style: italic;
    font-weight: 500;
    font-size: 17px;
    color: var(--text-primary);
    flex-shrink: 0;
}

.menu-leader {
    flex: 1;
    border-bottom: 1px dotted var(--divider);
    margin: 0 12px;
    transform: translateY(-4px);
    min-width: 24px;
}

.menu-item-desc {
    font-family: 'Lora', Georgia, serif;
    font-style: italic;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-body);
    text-align: right;
    flex-shrink: 0;
    max-width: 60%;
}

/* ------------------------------------------------------------------------
   Corner Table — reflective prose
   ------------------------------------------------------------------------ */

.section-corner .container--narrow {
    position: relative;
}

.reflective {
    font-family: 'Lora', Georgia, serif;
    font-size: 17px;
    line-height: 1.85;
    color: var(--text-body);
    margin: 0 0 28px 0;
}

.reflective:first-of-type::first-letter {
    font-family: 'Caveat Brush', cursive;
    font-size: 56px;
    line-height: 1;
    float: left;
    margin: 6px 10px 0 0;
    color: var(--accent-primary);
}

.botanical-leaf {
    position: absolute;
    bottom: -20px;
    right: -30px;
    width: 80px;
    height: 120px;
    opacity: 0.18;
    pointer-events: none;
    transform: rotate(8deg);
}

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

/* ------------------------------------------------------------------------
   Window Seat — contemplative
   ------------------------------------------------------------------------ */

.contemplative {
    font-family: 'Lora', Georgia, serif;
    font-size: 19px;
    line-height: 1.9;
    color: var(--text-body);
    margin: 0 0 56px 0;
    text-align: left;
}

.contemplative:nth-of-type(2) {
    padding-left: 32px;
    color: var(--text-primary);
    font-style: italic;
}

.contemplative:nth-of-type(3) {
    padding-left: 16px;
}

/* ------------------------------------------------------------------------
   Goodbye
   ------------------------------------------------------------------------ */

.goodbye-text {
    font-family: 'Caveat Brush', cursive;
    font-size: 36px;
    color: var(--text-primary);
    margin: 0 0 14px 0;
    transform: rotate(-1deg);
    display: inline-block;
}

.goodbye-sub {
    font-family: 'Lora', Georgia, serif;
    font-style: italic;
    font-size: 15px;
    color: var(--text-accent);
    margin: 0;
    opacity: 0.85;
}

/* ------------------------------------------------------------------------
   Reveal animation for sections (subtle)
   ------------------------------------------------------------------------ */

.section {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 1100ms ease-out, transform 1100ms ease-out;
}

.section.in-view,
.section-doorbell {
    opacity: 1;
    transform: translateY(0);
}

/* ------------------------------------------------------------------------
   Responsive
   ------------------------------------------------------------------------ */

@media (max-width: 640px) {
    body {
        font-size: 16px;
    }

    .container {
        padding: 0 24px;
    }

    .cafe-name {
        font-size: 64px;
    }

    .section-heading {
        font-size: 36px;
    }

    .tagline {
        font-size: 17px;
    }

    .menu-item {
        flex-wrap: wrap;
    }

    .menu-item-name {
        width: 100%;
        margin-bottom: 4px;
    }

    .menu-leader {
        display: none;
    }

    .menu-item-desc {
        max-width: 100%;
        text-align: left;
        font-size: 15px;
        opacity: 0.85;
    }

    .cup-illustration {
        width: 130px;
        height: 180px;
    }

    .contemplative {
        font-size: 18px;
    }

    .botanical-leaf {
        right: 0;
        bottom: -10px;
        width: 60px;
        height: 90px;
    }

    .goodbye-text {
        font-size: 30px;
    }
}
