/* quietjoon.net - Wabi-Sabi Ceramic Workshop */

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

:root {
    --clay-white: #F0E6D8;
    --warm-linen: #F7F2EA;
    --walnut-dark: #3B2F27;
    --kiln-gray: #7A6E63;
    --terracotta: #C8603C;
    --kintsugi-gold: #C9A84C;
    --moss-sage: #7A8B6E;
    --indigo-wash: #3D4F6A;
    --wood-grain-mid: #EDE2D4;
    --wood-grain-light: #F2E8DC;
    --stone-line: #C8BFB4;
}

html {
    scroll-behavior: smooth;
}

body {
    color: var(--walnut-dark);
    font-family: 'Lora', serif;
    font-weight: 400;
    font-size: 17px;
    line-height: 1.85;
    overflow-x: hidden;
    /* Wood-grain texture background */
    background:
        repeating-linear-gradient(
            180deg,
            var(--clay-white) 0px,
            var(--clay-white) 5px,
            var(--wood-grain-mid) 5px,
            var(--wood-grain-mid) 8px,
            var(--clay-white) 8px,
            var(--clay-white) 14px,
            var(--wood-grain-light) 14px,
            var(--wood-grain-light) 17px,
            var(--clay-white) 17px,
            var(--clay-white) 24px,
            var(--wood-grain-mid) 24px,
            var(--wood-grain-mid) 26px
        );
}

.svg-filters {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

/* =====================
   TIMELINE LINE
   ===================== */
.timeline-line {
    position: fixed;
    top: 0;
    left: 20px;
    width: 1px;
    height: var(--scroll-height, 0px);
    background: var(--stone-line);
    opacity: 0.4;
    z-index: 10;
    transition: height 0.1s linear;
}

.timeline-marker {
    position: absolute;
    left: -40px;
    top: 8px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid var(--terracotta);
    background: var(--warm-linen);
    z-index: 11;
    transform: scale(0);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.journal-entry.visible .timeline-marker {
    transform: scale(1);
}

/* =====================
   SECTION 1: THE BENCH
   ===================== */
.section-bench {
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.bench-content {
    text-align: center;
    opacity: 0;
    transform: scale(0.97);
    animation: benchFadeIn 1s ease forwards 0.5s;
}

@keyframes benchFadeIn {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.bench-name {
    font-family: 'Caveat', cursive;
    font-weight: 700;
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    color: var(--walnut-dark);
    margin-bottom: 8px;
}

.bench-subtitle {
    font-family: 'Inconsolata', monospace;
    font-size: 12px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--kiln-gray);
}

/* Scattered elements */
.scattered-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.scatter {
    position: absolute;
    opacity: 0;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.scatter.visible {
    opacity: 1;
    transform: translate(0, 0);
}

.scatter-circle {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--terracotta);
    top: 30%;
    right: 20%;
    transform: translate(8px, -5px);
}

.scatter-line {
    width: 80px;
    height: 1px;
    background: var(--moss-sage);
    bottom: 35%;
    left: 15%;
    transform: translate(-10px, 3px);
}

.scatter-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--kiln-gray);
    top: 55%;
    left: 65%;
    transform: translate(5px, -8px);
}

/* =====================
   SECTION 2: PROCESS JOURNAL
   ===================== */
.section-journal {
    padding: 80px 40px 80px 60px;
    max-width: 900px;
}

.journal-entry {
    position: relative;
    margin-bottom: 80px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.journal-entry.visible {
    opacity: 1;
    transform: translateY(0);
}

.entry-wide {
    width: 70%;
    margin-left: 8%;
}

.entry-narrow {
    width: 50%;
    margin-left: 15%;
}

.entry-content {
    padding: 24px;
    background: var(--warm-linen);
    border: 1px solid var(--kiln-gray);
    filter: url(#wavy-border);
}

.entry-date {
    font-family: 'Inconsolata', monospace;
    font-size: 12px;
    letter-spacing: 0.1em;
    color: var(--terracotta);
    display: block;
    margin-bottom: 8px;
}

.entry-title {
    font-family: 'Vollkorn', serif;
    font-weight: 600;
    font-size: 22px;
    color: var(--walnut-dark);
    margin-bottom: 12px;
}

.entry-text {
    font-family: 'Lora', serif;
    font-weight: 400;
    font-size: 17px;
    line-height: 1.85;
    color: var(--walnut-dark);
}

/* Inline sketches */
.entry-sketch {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    opacity: 0.5;
}

.sketch-circle {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1px dashed var(--kiln-gray);
}

.sketch-line-h {
    width: 60px;
    height: 1px;
    background: var(--kiln-gray);
}

.sketch-line-v {
    width: 1px;
    height: 30px;
    background: var(--kiln-gray);
}

.sketch-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--terracotta);
}

/* =====================
   SECTION 3: KINTSUGI GALLERY
   ===================== */
.section-kintsugi {
    padding: 80px 40px;
    max-width: 1000px;
    margin: 0 auto;
}

.kintsugi-heading {
    font-family: 'Vollkorn', serif;
    font-weight: 600;
    font-size: 28px;
    color: var(--walnut-dark);
    margin-bottom: 8px;
    text-align: center;
}

.kintsugi-subtext {
    font-family: 'Inconsolata', monospace;
    font-size: 12px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--kiln-gray);
    text-align: center;
    margin-bottom: 48px;
}

.kintsugi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
}

.kintsugi-card {
    position: relative;
    background: var(--warm-linen);
    border: 1px solid var(--kiln-gray);
    padding: 32px;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.kintsugi-card.visible {
    opacity: 1;
}

/* Gold crack lines */
.gold-crack {
    position: absolute;
    height: 1px;
    background: var(--kintsugi-gold);
    box-shadow: 0 0 4px rgba(201, 168, 76, 0.3);
    transform-origin: left center;
    width: 0;
    transition: width 0.4s ease;
}

.kintsugi-card.cracked .gold-crack {
    width: 100%;
}

.crack-1 { top: 30%; left: 0; transform: rotate(37deg); }
.crack-2 { top: 65%; left: 10%; transform: rotate(-15deg); }
.crack-3 { top: 25%; left: 5%; transform: rotate(142deg); }
.crack-4 { top: 70%; left: 0; transform: rotate(73deg); }
.crack-5 { top: 40%; left: 0; transform: rotate(-28deg); }
.crack-6 { top: 55%; left: 15%; transform: rotate(110deg); }

.kintsugi-title {
    font-family: 'Vollkorn', serif;
    font-weight: 600;
    font-size: 20px;
    color: var(--walnut-dark);
    margin-bottom: 8px;
    position: relative;
    z-index: 2;
}

.kintsugi-desc {
    font-family: 'Lora', serif;
    font-size: 15px;
    line-height: 1.75;
    color: var(--kiln-gray);
    margin-bottom: 12px;
    position: relative;
    z-index: 2;
}

.kintsugi-meta {
    font-family: 'Inconsolata', monospace;
    font-size: 12px;
    letter-spacing: 0.1em;
    color: var(--kintsugi-gold);
    position: relative;
    z-index: 2;
}

/* =====================
   SECTION 4: THREAD ENDS
   ===================== */
.section-threads {
    padding: 80px 40px 120px;
}

.threads-container {
    display: flex;
    justify-content: center;
    gap: 48px;
    align-items: flex-start;
    padding-top: 40px;
}

.thread {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.thread-line {
    width: 1px;
    height: 0;
    background: var(--thread-color, var(--kiln-gray));
    transition: height 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.thread.visible .thread-line {
    height: var(--thread-h, 200px);
}

.thread-end {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.4s ease 0.6s;
}

.thread.visible .thread-end {
    opacity: 1;
}

.thread-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--thread-color, var(--kiln-gray));
}

.thread-label {
    font-family: 'Inconsolata', monospace;
    font-size: 12px;
    letter-spacing: 0.1em;
    text-transform: lowercase;
    color: var(--kiln-gray);
    writing-mode: vertical-rl;
    text-orientation: mixed;
}

/* =====================
   RESPONSIVE
   ===================== */
@media (max-width: 768px) {
    .entry-wide,
    .entry-narrow {
        width: 90%;
        margin-left: 5%;
    }

    .timeline-line {
        display: none;
    }

    .timeline-marker {
        display: none;
    }

    .section-journal {
        padding-left: 20px;
    }

    .threads-container {
        gap: 24px;
        flex-wrap: wrap;
    }
}
