/* mujun.cafe — philosophical cafe menu scroll
   Palette:
     #f5ede0  Latte Cream    (primary background)
     #2c2417  Espresso Dark  (primary text)
     #a67c52  Coffee Brown   (primary accent)
     #7a9e7e  Matcha Green   (secondary accent)
     #e8ddd0  Foam White     (secondary background)
     #c1473a  Berry Red      (sparse emphasis)
     #8b7d6b  Steam Gray     (metadata)
*/

:root {
    --latte-cream: #f5ede0;
    --espresso-dark: #2c2417;
    --coffee-brown: #a67c52;
    --matcha-green: #7a9e7e;
    --foam-white: #e8ddd0;
    --berry-red: #c1473a;
    --steam-gray: #8b7d6b;

    --font-display: "DM Serif Display", Georgia, "Times New Roman", serif;
    --font-body: "Karla", "Helvetica Neue", Arial, sans-serif;
    --font-menu: "Courier Prime", "Courier New", Courier, monospace;

    --measure: 600px;
    --gutter: clamp(1.25rem, 4vw, 2.25rem);
    --section-gap: clamp(4.5rem, 10vw, 7rem);
}

* {
    box-sizing: border-box;
}

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body {
    margin: 0;
    padding: 0;
    background: var(--latte-cream);
    color: var(--espresso-dark);
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 1rem;
    line-height: 1.85;
    /* very subtle ceramic-paper grain */
    background-image:
        radial-gradient(rgba(44, 36, 23, 0.025) 1px, transparent 1px),
        radial-gradient(rgba(166, 124, 82, 0.02) 1px, transparent 1px);
    background-size: 3px 3px, 7px 7px;
    background-position: 0 0, 1px 2px;
}

p {
    margin: 0 0 1em 0;
}

p:last-child {
    margin-bottom: 0;
}

ul, ol {
    margin: 0;
    padding: 0;
}

button {
    font: inherit;
    color: inherit;
    background: transparent;
    border: none;
    cursor: pointer;
}

/* ------------------------------------------------------------ */
/* Page container — narrow column, generous ma negative space    */
/* ------------------------------------------------------------ */
.page {
    max-width: var(--measure);
    margin: 0 auto;
    padding: clamp(3rem, 9vw, 6rem) var(--gutter) clamp(3rem, 7vw, 5rem);
}

/* ------------------------------------------------------------ */
/* Hero                                                           */
/* ------------------------------------------------------------ */
.hero {
    position: relative;
    text-align: center;
    padding: clamp(3rem, 8vw, 5rem) 0 clamp(3.5rem, 9vw, 5.5rem);
    margin-bottom: var(--section-gap);
}

.hero-ring {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 2rem;
    border: 2px solid rgba(166, 124, 82, 0.32);
    border-radius: 50%;
    background: radial-gradient(
        circle at 60% 40%,
        rgba(166, 124, 82, 0.05) 0%,
        rgba(166, 124, 82, 0.02) 55%,
        transparent 75%
    );
    box-shadow:
        inset 0 0 0 1px rgba(166, 124, 82, 0.08),
        0 0 0 6px rgba(166, 124, 82, 0.04);
    transform: rotate(-7deg);
    transition: transform 1.4s cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* Three uneven arcs to simulate an imperfect coffee stain */
.ring-arc {
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    border: 2px solid transparent;
    pointer-events: none;
}

.ring-arc-1 {
    border-top-color: rgba(166, 124, 82, 0.55);
    border-right-color: rgba(166, 124, 82, 0.18);
    transform: rotate(18deg);
}

.ring-arc-2 {
    border-bottom-color: rgba(166, 124, 82, 0.42);
    border-left-color: rgba(166, 124, 82, 0.10);
    inset: 4px;
    transform: rotate(-32deg);
}

.ring-arc-3 {
    border-top-color: rgba(193, 71, 58, 0.18);
    inset: -6px;
    transform: rotate(56deg);
    opacity: 0.7;
}

.hero-ring.is-poured {
    transform: rotate(2deg) scale(1.04);
}

.hero-kanji {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3vw, 1.85rem);
    color: var(--coffee-brown);
    letter-spacing: 0.18em;
    margin: 0 0 0.75rem;
    opacity: 0.85;
}

.hero-title {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(2rem, 5vw, 3rem);
    line-height: 1.1;
    margin: 0 0 1.25rem;
    color: var(--espresso-dark);
    letter-spacing: -0.005em;
}

.hero-tagline {
    font-family: var(--font-body);
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--espresso-dark);
    max-width: 32ch;
    margin: 0 auto 1.5rem;
}

.hero-meta {
    font-family: var(--font-menu);
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    color: var(--steam-gray);
    text-transform: lowercase;
    margin: 0;
}

/* ------------------------------------------------------------ */
/* Generic block / section                                        */
/* ------------------------------------------------------------ */
.block {
    position: relative;
    padding: 0 0 var(--section-gap);
}

.block:last-of-type {
    padding-bottom: clamp(3rem, 6vw, 4rem);
}

.menu-label {
    font-family: var(--font-menu);
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    color: var(--steam-gray);
    text-transform: lowercase;
    margin: 0 0 0.75rem;
}

.block-title {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(1.45rem, 3.2vw, 1.85rem);
    line-height: 1.25;
    color: var(--espresso-dark);
    margin: 0 0 1.75rem;
    padding-bottom: 0.65rem;
    font-variant: small-caps;
    letter-spacing: 0.08em;
    border-bottom: 1px dotted var(--coffee-brown);
}

/* ------------------------------------------------------------ */
/* Dialectic — thesis / em-dash / antithesis                     */
/* ------------------------------------------------------------ */
.dialectic {
    margin: 0 0 1.75rem;
    padding: 1.5rem clamp(1rem, 4vw, 2rem);
    background: var(--foam-white);
    border-radius: 2px;
    box-shadow:
        inset 0 0 0 1px rgba(166, 124, 82, 0.08),
        0 1px 0 rgba(44, 36, 23, 0.02);
}

.dialectic .thesis,
.dialectic .antithesis {
    margin: 0;
    text-align: center;
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--espresso-dark);
    font-style: italic;
}

.dialectic .antithesis {
    color: var(--espresso-dark);
}

.dialectic .dash {
    text-align: center;
    color: var(--coffee-brown);
    font-family: var(--font-display);
    font-size: 1.6rem;
    line-height: 1;
    margin: 0.9rem 0;
    letter-spacing: 0.4em;
    user-select: none;
}

.resolution {
    color: var(--steam-gray);
    font-size: 0.98rem;
    line-height: 1.8;
}

/* ------------------------------------------------------------ */
/* Menu list (cafe-menu styling with dotted leaders)             */
/* ------------------------------------------------------------ */
.menu-list {
    list-style: none;
    margin: 0 0 1.5rem;
    padding: 0;
}

.menu-row {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    padding: 0.55rem 0;
    border-bottom: 1px dotted rgba(166, 124, 82, 0.25);
    font-family: var(--font-menu);
    font-size: 0.92rem;
    letter-spacing: 0.02em;
    color: var(--espresso-dark);
    transition: color 0.4s ease, transform 0.4s ease;
}

.menu-row:last-child {
    border-bottom: none;
}

.menu-row:hover {
    color: var(--coffee-brown);
    transform: translateX(2px);
}

.menu-name {
    flex: 0 0 auto;
}

.menu-dots {
    flex: 1 1 auto;
    align-self: end;
    height: 1em;
    background-image: radial-gradient(
        circle,
        rgba(166, 124, 82, 0.5) 1px,
        transparent 1.2px
    );
    background-size: 7px 7px;
    background-position: bottom center;
    background-repeat: repeat-x;
    transform: translateY(-0.35em);
    opacity: 0.8;
}

.menu-price {
    flex: 0 0 auto;
    color: var(--matcha-green);
    font-style: italic;
}

.menu-footnote {
    font-family: var(--font-menu);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    color: var(--steam-gray);
    text-align: center;
    margin: 0;
}

/* ------------------------------------------------------------ */
/* Hours                                                          */
/* ------------------------------------------------------------ */
.hours-grid {
    display: flex;
    flex-direction: column;
    margin: 0 0 1.5rem;
}

.hours-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    padding: 0.5rem 0;
    border-bottom: 1px dotted rgba(166, 124, 82, 0.2);
    font-family: var(--font-menu);
    font-size: 0.9rem;
    letter-spacing: 0.04em;
}

.hours-row:last-child {
    border-bottom: none;
}

.hours-day {
    color: var(--espresso-dark);
    text-transform: lowercase;
    letter-spacing: 0.1em;
}

.hours-time {
    color: var(--coffee-brown);
}

.hours-row:nth-child(3) .hours-time {
    color: var(--berry-red);
    font-style: italic;
}

.hours-note {
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--steam-gray);
    text-align: center;
    margin: 0;
    font-style: italic;
}

/* ------------------------------------------------------------ */
/* Koan                                                           */
/* ------------------------------------------------------------ */
.koan {
    margin: 0;
    padding: 2rem clamp(1rem, 4vw, 2rem);
    background: var(--foam-white);
    border-left: 2px solid var(--matcha-green);
    border-radius: 2px;
    position: relative;
}

.koan::before {
    content: "\201C";
    position: absolute;
    top: -0.4rem;
    left: 0.6rem;
    font-family: var(--font-display);
    font-size: 4rem;
    line-height: 1;
    color: var(--coffee-brown);
    opacity: 0.3;
}

.koan-text {
    font-family: var(--font-display);
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    line-height: 1.45;
    color: var(--espresso-dark);
    margin: 0 0 1.25rem;
    font-style: italic;
    transition: opacity 0.5s ease;
}

.koan-text.is-fading {
    opacity: 0;
}

.koan-attribution {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    flex-wrap: wrap;
}

.koan-byline {
    font-family: var(--font-menu);
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    color: var(--steam-gray);
    text-transform: lowercase;
}

.koan-button {
    font-family: var(--font-menu);
    font-size: 0.78rem;
    letter-spacing: 0.14em;
    color: var(--coffee-brown);
    text-transform: lowercase;
    padding: 0.35rem 0.65rem;
    border-bottom: 1px dotted var(--coffee-brown);
    transition: color 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.koan-button:hover {
    color: var(--berry-red);
    border-bottom-color: var(--berry-red);
    transform: translateY(-1px);
}

/* ------------------------------------------------------------ */
/* House rules                                                    */
/* ------------------------------------------------------------ */
.rules-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.rules-list li {
    display: flex;
    gap: 0.85rem;
    align-items: baseline;
    font-size: 1rem;
    line-height: 1.7;
    color: var(--espresso-dark);
    padding: 0.4rem 0;
    border-bottom: 1px dotted rgba(166, 124, 82, 0.18);
}

.rules-list li:last-child {
    border-bottom: none;
}

.rule-num {
    flex: 0 0 auto;
    font-family: var(--font-display);
    font-size: 1.05rem;
    color: var(--coffee-brown);
    min-width: 2.4ch;
}

/* ------------------------------------------------------------ */
/* Find us                                                        */
/* ------------------------------------------------------------ */
.find-line {
    text-align: center;
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.85;
    color: var(--espresso-dark);
    margin: 0 0 0.4rem;
}

.find-coords {
    text-align: center;
    font-family: var(--font-menu);
    font-size: 0.82rem;
    letter-spacing: 0.14em;
    color: var(--steam-gray);
    margin: 1.5rem 0 0;
    text-transform: lowercase;
}

/* ------------------------------------------------------------ */
/* Footer                                                         */
/* ------------------------------------------------------------ */
.page-footer {
    text-align: center;
    padding-top: clamp(2rem, 5vw, 3rem);
    border-top: 1px dotted rgba(166, 124, 82, 0.3);
}

.footer-mark {
    font-family: var(--font-display);
    font-size: 1.25rem;
    color: var(--espresso-dark);
    margin: 0 0 0.4rem;
}

.footer-text {
    font-family: var(--font-body);
    font-style: italic;
    font-size: 0.95rem;
    color: var(--steam-gray);
    margin: 0 0 0.75rem;
}

.footer-meta {
    font-family: var(--font-menu);
    font-size: 0.74rem;
    letter-spacing: 0.14em;
    color: var(--steam-gray);
    text-transform: lowercase;
    margin: 0;
}

/* ------------------------------------------------------------ */
/* Steam wisps — animated rising vapor over certain sections      */
/* ------------------------------------------------------------ */
.steam-host {
    position: relative;
}

.steam-host::before,
.steam-host::after {
    content: "";
    position: absolute;
    top: -0.5rem;
    width: 8px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(
        to top,
        rgba(139, 125, 107, 0) 0%,
        rgba(139, 125, 107, 0.18) 45%,
        rgba(139, 125, 107, 0) 100%
    );
    filter: blur(3px);
    pointer-events: none;
    opacity: 0;
    transform: translateY(0) scale(1);
    animation: steam-rise 5.5s ease-in-out infinite;
}

.steam-host::before {
    left: calc(50% - 18px);
    animation-delay: 0s;
}

.steam-host::after {
    left: calc(50% + 10px);
    animation-delay: 2.4s;
    animation-duration: 6.8s;
    width: 6px;
    height: 30px;
}

@keyframes steam-rise {
    0% {
        opacity: 0;
        transform: translateY(8px) scale(0.85) translateX(0);
    }
    25% {
        opacity: 0.7;
    }
    60% {
        opacity: 0.5;
        transform: translateY(-22px) scale(1.05) translateX(4px);
    }
    100% {
        opacity: 0;
        transform: translateY(-44px) scale(1.2) translateX(-3px);
    }
}

/* Subtle entrance for blocks as they scroll in */
.block,
.hero {
    opacity: 1;
    transition: opacity 1s ease, transform 1s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.block.is-pending,
.hero.is-pending {
    opacity: 0;
    transform: translateY(14px);
}

/* ------------------------------------------------------------ */
/* Small viewport tweaks                                          */
/* ------------------------------------------------------------ */
@media (max-width: 480px) {
    body {
        font-size: 0.98rem;
    }

    .hero {
        padding: 2rem 0 3rem;
    }

    .menu-row {
        font-size: 0.86rem;
        gap: 0.5rem;
    }

    .hours-row {
        font-size: 0.85rem;
    }

    .dialectic {
        padding: 1.25rem 1rem;
    }

    .koan {
        padding: 1.5rem 1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .block.is-pending,
    .hero.is-pending {
        opacity: 1;
        transform: none;
    }

    .steam-host::before,
    .steam-host::after {
        animation: none;
        opacity: 0.35;
    }

    .hero-ring {
        transition: none;
    }
}
