/* LLITTL.com — wabi-sabi ceramic, ma-negative-space */

:root {
    --bg-clay: #F5F0EA;
    --bg-bisque: #EDE5D8;
    --text-char: #2C2622;
    --text-ash: #7A7068;
    --gold-kintsugi: #C4A265;
    --terracotta: #B8705A;
    --raku-depth: #3A322C;
    --celadon: #A8B5A0;

    --font-display: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'Karla', 'Inter', system-ui, sans-serif;
    --font-mono: 'IBM Plex Mono', 'Menlo', monospace;
}

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

html {
    scroll-behavior: smooth;
    background-color: var(--bg-clay);
}

body {
    background-color: var(--bg-clay);
    color: var(--text-char);
    font-family: var(--font-body);
    font-weight: 400;
    overflow-x: hidden;
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
}

main {
    display: block;
    position: relative;
    z-index: 2;
}

/* Paper grain — washi overlay */
.paper-grain {
    position: fixed;
    top: -10%;
    left: 0;
    width: 100%;
    height: 120%;
    pointer-events: none;
    z-index: 900;
    opacity: 0.045;
    mix-blend-mode: multiply;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 240 240' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch' seed='7'/%3E%3CfeColorMatrix values='0 0 0 0 0.55  0 0 0 0 0.45  0 0 0 0 0.35  0 0 0 0.9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    will-change: transform;
}

/* Fingerprint whorls — subliminal maker's hand */
.fingerprint-whorls {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.whorl {
    position: absolute;
    width: 220px;
    height: 220px;
    opacity: 0.04;
}

.whorl-a { top: 18vh; right: 6vw; transform: rotate(12deg); }
.whorl-b { top: 120vh; left: 4vw; transform: rotate(-22deg); width: 280px; height: 280px; }
.whorl-c { top: 250vh; right: 14vw; transform: rotate(38deg); width: 180px; height: 180px; }

/* Potter's stamp navigation trigger */
.potter-stamp {
    position: fixed;
    top: 32px;
    left: 32px;
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1000;
    padding: 0;
    transition: transform 600ms ease-out, opacity 600ms ease-out;
    opacity: 0.85;
}

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

.potter-stamp:hover { transform: rotate(8deg) scale(1.05); opacity: 1; }

/* Nav dialog */
.nav-dialog {
    border: none;
    background: var(--bg-clay);
    color: var(--text-char);
    padding: 0;
    margin: 0;
    width: min(420px, 90vw);
    max-height: 100vh;
    height: 100vh;
    inset: 0 auto 0 0;
    position: fixed;
    box-shadow: 1px 0 0 rgba(196, 162, 101, 0.18);
}

.nav-dialog::backdrop {
    background: rgba(58, 50, 44, 0.35);
}

.nav-dialog[open] {
    animation: nav-fade 700ms ease-out;
}

@keyframes nav-fade {
    from { opacity: 0; transform: translateX(-12px); }
    to { opacity: 1; transform: translateX(0); }
}

.nav-inner {
    padding: 80px 56px 56px;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 28px;
    position: relative;
}

.nav-close {
    position: absolute;
    top: 28px;
    right: 28px;
    width: 28px;
    height: 28px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    opacity: 0.7;
    transition: opacity 400ms ease-out;
}
.nav-close:hover { opacity: 1; }
.nav-close svg { width: 100%; height: 100%; }

.nav-mark {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 300;
    color: var(--text-ash);
    letter-spacing: 0.18em;
    text-transform: lowercase;
}

.nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 8px;
}

.nav-link {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 300;
    font-size: 1.5rem;
    color: var(--text-char);
    text-decoration: none;
    letter-spacing: 0.02em;
    position: relative;
    display: inline-block;
    padding-bottom: 2px;
    transition: color 400ms ease-out;
}

.nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 1px;
    background: var(--gold-kintsugi);
    transition: width 400ms ease-out;
}

.nav-link:hover { color: var(--terracotta); }
.nav-link:hover::after { width: 100%; }

.nav-meta {
    margin-top: auto;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 300;
    color: var(--text-ash);
    letter-spacing: 0.16em;
    opacity: 0.7;
}

/* Rooms — each viewport a meditation */
.room {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    position: relative;
    padding: clamp(60px, 10vh, 120px) clamp(30px, 8vw, 120px);
}

/* Hero */
.hero-room {
    min-height: 100vh;
    align-items: center;
}

.hero-content {
    position: relative;
    margin-left: 12vw;
    margin-top: -4vh;
    max-width: 520px;
    z-index: 3;
}

.hero-eyebrow {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 300;
    color: var(--text-ash);
    letter-spacing: 0.22em;
    text-transform: lowercase;
    margin-bottom: 28px;
    opacity: 0;
    animation: gentle-reveal 1600ms ease-out 200ms forwards;
}

.hero-title {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 300;
    font-size: clamp(3.2rem, 9vw, 7rem);
    line-height: 0.95;
    color: var(--text-char);
    letter-spacing: 0.04em;
    opacity: 0;
    animation: gentle-reveal 1800ms ease-out 500ms forwards;
}

.hero-sub {
    display: block;
    margin-top: 36px;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 300;
    color: var(--text-ash);
    letter-spacing: 0.18em;
    opacity: 0;
    animation: gentle-reveal 1800ms ease-out 1200ms forwards;
}

.hero-circle {
    position: absolute;
    right: 14vw;
    top: 22vh;
    width: clamp(160px, 22vw, 260px);
    height: clamp(160px, 22vw, 260px);
    opacity: 0;
    animation: gentle-reveal 2200ms ease-out 800ms forwards;
    z-index: 2;
}
.hero-circle svg { width: 100%; height: 100%; display: block; }

@keyframes gentle-reveal {
    0% { opacity: 0; transform: translateY(15px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* Kintsugi dividers */
.kintsugi-divider {
    width: 100%;
    height: 30px;
    overflow: visible;
    padding: 0 5%;
    position: relative;
    z-index: 2;
}

.tall-divider { height: 60px; }

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

.kintsugi-path {
    stroke-dasharray: 1400;
    stroke-dashoffset: 1400;
    transition: stroke-dashoffset 2000ms ease-out;
    opacity: 0.55;
}

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

.kintsugi-branch {
    stroke-dasharray: 30;
    stroke-dashoffset: 30;
    transition: stroke-dashoffset 1200ms ease-out 800ms;
    opacity: 0.55;
}

.kintsugi-divider .kintsugi-path.drawn ~ .kintsugi-branch {
    stroke-dashoffset: 0;
}

.kintsugi-mote {
    opacity: 0;
    transition: opacity 1200ms ease-out 1400ms;
}

.kintsugi-divider .kintsugi-path.drawn ~ .kintsugi-mote {
    opacity: 0.7;
}

/* Room content — left third asymmetric */
.room-content {
    max-width: 480px;
    width: 100%;
    margin-left: 8vw;
    position: relative;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1200ms ease-out, transform 1200ms ease-out;
}

.room-content.visible {
    opacity: 1;
    transform: translateY(0);
}

.room-content > * {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 900ms ease-out, transform 900ms ease-out;
}

.room-content.visible > *:nth-child(1) { transition-delay: 0ms; opacity: 1; transform: translateY(0); }
.room-content.visible > *:nth-child(2) { transition-delay: 150ms; opacity: 1; transform: translateY(0); }
.room-content.visible > *:nth-child(3) { transition-delay: 300ms; opacity: 1; transform: translateY(0); }
.room-content.visible > *:nth-child(4) { transition-delay: 450ms; opacity: 1; transform: translateY(0); }
.room-content.visible > *:nth-child(5) { transition-delay: 600ms; opacity: 1; transform: translateY(0); }

.offset-right {
    margin-left: auto;
    margin-right: 10vw;
}

.offset-left {
    margin-left: 14vw;
    margin-right: auto;
}

.centered-content {
    text-align: center;
    margin: 0 auto;
}

.room-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 300;
    color: var(--gold-kintsugi);
    display: block;
    margin-bottom: 24px;
    letter-spacing: 0.22em;
    text-transform: lowercase;
}

.room-title {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 300;
    font-size: clamp(1.8rem, 3.6vw, 2.8rem);
    line-height: 1.05;
    color: var(--text-char);
    letter-spacing: 0.03em;
    margin-bottom: 28px;
}

.room-text {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: clamp(1rem, 1.2vw, 1.1rem);
    line-height: 1.85;
    color: var(--raku-depth);
    margin-bottom: 24px;
}

.room-caption {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 300;
    color: var(--text-ash);
    letter-spacing: 0.16em;
    margin-top: 20px;
    text-transform: lowercase;
}

.room-quote {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 300;
    font-size: 1.15rem;
    color: var(--text-ash);
    border-left: 1px solid var(--gold-kintsugi);
    padding: 6px 0 6px 18px;
    margin-top: 28px;
    letter-spacing: 0.02em;
}

.room-marks {
    list-style: none;
    display: flex;
    gap: 22px;
    margin-top: 18px;
    flex-wrap: wrap;
}

.room-marks li {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 300;
    color: var(--text-ash);
    letter-spacing: 0.14em;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.mark-dot {
    width: 6px;
    height: 6px;
    background: var(--gold-kintsugi);
    border-radius: 48% 52% 51% 49%;
    display: inline-block;
    opacity: 0.75;
}

/* Ceramic forms */
.ceramic-form {
    margin-top: 36px;
    display: flex;
    justify-content: flex-start;
}

.ceramic-svg {
    width: 160px;
    height: auto;
    transform: scale(0.97);
    transition: transform 1400ms ease-out;
}

.room-content.visible .ceramic-svg {
    transform: scale(1);
}

.bowl-crack {
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    transition: stroke-dashoffset 1800ms ease-out 700ms;
}

.room-content.visible .bowl-crack {
    stroke-dashoffset: 0;
}

.bowl-crack-branch {
    stroke-dasharray: 20;
    stroke-dashoffset: 20;
    transition: stroke-dashoffset 1200ms ease-out 1500ms;
}

.room-content.visible .bowl-crack-branch {
    stroke-dashoffset: 0;
}

/* Seed */
.seed-form {
    margin: 36px auto 0;
    width: 80px;
    transform: scale(0.97);
    transition: transform 1400ms ease-out 400ms;
}

.room-content.visible .seed-form {
    transform: scale(1);
}

.seed-form svg { width: 100%; height: auto; display: block; }

/* Rest room — visual rest stop */
.rest-room {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: var(--bg-clay);
}

.rest-band {
    width: 100%;
    text-align: center;
    padding: 60px 0;
}

.rest-svg {
    width: min(600px, 80vw);
    height: auto;
    display: block;
    margin: 0 auto 28px;
    opacity: 0;
    transform: scale(0.97);
    transition: opacity 1600ms ease-out, transform 1600ms ease-out;
}

.rest-room.visible .rest-svg {
    opacity: 1;
    transform: scale(1);
}

.rest-caption {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 300;
    font-size: 0.95rem;
    color: var(--text-ash);
    letter-spacing: 0.18em;
    opacity: 0;
    transition: opacity 1400ms ease-out 600ms;
}

.rest-room.visible .rest-caption { opacity: 1; }

/* Closing room — Raku Depth */
.closing-room {
    min-height: 80vh;
    background-color: var(--raku-depth);
    align-items: center;
    justify-content: center;
}

.closing-content {
    text-align: center;
    max-width: 520px;
    padding: 0 24px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1500ms ease-out, transform 1500ms ease-out;
}

.closing-content.visible {
    opacity: 1;
    transform: translateY(0);
}

.closing-title {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 300;
    font-size: clamp(2.6rem, 6vw, 4.4rem);
    color: var(--bg-clay);
    letter-spacing: 0.04em;
    margin-bottom: 18px;
}

.closing-text {
    font-family: var(--font-display);
    font-weight: 400;
    font-style: italic;
    font-size: 1.1rem;
    color: var(--celadon);
    letter-spacing: 0.06em;
    margin-bottom: 36px;
}

.closing-mark {
    width: 60px;
    height: 60px;
    margin: 0 auto 28px;
}

.closing-mark svg { width: 100%; height: 100%; }

.closing-meta {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 300;
    color: var(--text-ash);
    letter-spacing: 0.22em;
    opacity: 0.75;
    text-transform: uppercase;
}

/* Section background alternation — subtle bisque shifts */
#room-1 { background-color: var(--bg-clay); }
#room-2 { background-color: var(--bg-bisque); }
#rest-1 { background-color: var(--bg-clay); }
#room-3 { background-color: var(--bg-clay); }
#room-4 { background-color: var(--bg-bisque); }
#room-5 { background-color: var(--bg-clay); }
#room-6 { background-color: var(--bg-bisque); }

/* Hand-torn 1px border on bisque sections */
#room-2::before,
#room-4::before,
#room-6::before {
    content: '';
    position: absolute;
    inset: 0;
    border-top: 1px solid rgba(122, 112, 104, 0.18);
    border-bottom: 1px solid rgba(122, 112, 104, 0.12);
    pointer-events: none;
}

/* Mobile */
@media (max-width: 768px) {
    .room {
        padding: 70px 28px;
    }
    .hero-content {
        margin-left: 0;
        margin-top: 0;
        text-align: center;
    }
    .hero-circle {
        right: 8vw;
        top: 14vh;
        width: 140px;
        height: 140px;
    }
    .room-content,
    .offset-right,
    .offset-left {
        margin-left: auto;
        margin-right: auto;
    }
    .nav-inner {
        padding: 70px 36px 40px;
    }
    .nav-link {
        font-size: 1.3rem;
    }
    .whorl-a, .whorl-b, .whorl-c {
        width: 160px;
        height: 160px;
    }
}

@media (max-width: 480px) {
    .room { padding: 60px 22px; }
    .hero-eyebrow { font-size: 0.65rem; }
    .room-text { font-size: 0.98rem; }
}
