/* archaic.works - Wabi-Sabi Imperfect Ceramic */
/* Palette: #e8d5b7, #c4956a, #3b2a1f, #8fae8b, #d9d2c5, #bf4a2a, #a09585 */

:root {
    --bisque: #e8d5b7;
    --shino: #c4956a;
    --tenmoku: #3b2a1f;
    --celadon: #8fae8b;
    --ash: #d9d2c5;
    --kiln-fire: #bf4a2a;
    --crackle: #a09585;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bisque);
    color: var(--tenmoku);
    font-family: 'Merriweather', serif;
    font-weight: 400;
    line-height: 1.75;
    overflow-x: hidden;
    /* Layered glaze texture background */
    background-image:
        radial-gradient(ellipse at 15% 20%, rgba(196, 149, 106, 0.12), transparent 45%),
        radial-gradient(ellipse at 75% 15%, rgba(217, 210, 197, 0.18), transparent 40%),
        radial-gradient(ellipse at 40% 60%, rgba(196, 149, 106, 0.08), transparent 50%),
        radial-gradient(ellipse at 85% 70%, rgba(217, 210, 197, 0.12), transparent 45%),
        radial-gradient(ellipse at 25% 85%, rgba(196, 149, 106, 0.1), transparent 40%),
        radial-gradient(ellipse at 60% 40%, rgba(232, 213, 183, 0.15), transparent 55%);
    background-attachment: fixed;
}


/* =========================
   Crackle Overlay
   ========================= */
.crackle-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: 0.3;
}

.crackle-group {
    opacity: 0;
    transition: opacity 2s ease;
}

.crackle-group.revealed {
    opacity: 1;
}

.crackle-group.revealed path {
    animation: crackle-draw 3s ease forwards;
}

@keyframes crackle-draw {
    to {
        stroke-dashoffset: 0;
    }
}


/* =========================
   Kiln Marks
   ========================= */
.kiln-marks {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.kiln-mark {
    position: absolute;
    border-radius: 50%;
    background: var(--tenmoku);
    opacity: 0.04;
}


/* =========================
   Sections - General
   ========================= */
.kiln-section {
    min-height: 100vh;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 5rem 2rem;
    gap: 2rem;
    z-index: 2;
}


/* =========================
   Section 1: Raw Clay
   ========================= */
.raw-clay {
    background: transparent;
    min-height: 100vh;
    padding-bottom: 6rem;
}

.stamp-brand {
    padding: 2.5rem 4rem;
    box-shadow:
        inset 3px 3px 6px rgba(59, 42, 31, 0.2),
        inset -2px -2px 4px rgba(255, 255, 255, 0.25);
    border-radius: 6px 10px 5px 12px;
    position: relative;
    transform: scale(1.02);
    animation: stamp-press 2s ease-out forwards;
}

@keyframes stamp-press {
    0% {
        transform: scale(1.02);
        box-shadow:
            inset 1px 1px 2px rgba(59, 42, 31, 0.1),
            inset -1px -1px 2px rgba(255, 255, 255, 0.15);
    }
    100% {
        transform: scale(1);
        box-shadow:
            inset 4px 4px 8px rgba(59, 42, 31, 0.3),
            inset -2px -2px 5px rgba(255, 255, 255, 0.2);
    }
}

.stamp-text {
    font-family: 'Sorts Mill Goudy', serif;
    font-weight: 400;
    font-size: clamp(2.5rem, 8vw, 5rem);
    color: var(--tenmoku);
    letter-spacing: 0.02em;
    text-shadow:
        1px 1px 0 rgba(255, 255, 255, 0.2),
        -1px -1px 0 rgba(59, 42, 31, 0.08);
}

.stamp-subtitle {
    font-family: 'Homemade Apple', cursive;
    font-size: 0.85rem;
    color: var(--crackle);
    letter-spacing: 0.3em;
    margin-top: 0.5rem;
    opacity: 0;
    animation: fade-up 1.5s ease 1.5s forwards;
}

@keyframes fade-up {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 0.6;
        transform: translateY(0);
    }
}


/* =========================
   Kiln Temperature Indicator
   ========================= */
.kiln-temp-indicator {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.15rem;
}

.kiln-temp-label {
    font-family: 'Homemade Apple', cursive;
    font-size: 0.6rem;
    color: var(--crackle);
    opacity: 0.5;
    letter-spacing: 0.05em;
}

.kiln-temp-value {
    font-family: 'Homemade Apple', cursive;
    font-size: 0.85rem;
    color: var(--crackle);
    opacity: 0.7;
}

.kiln-temp-hot .kiln-temp-value {
    color: var(--kiln-fire);
    opacity: 0.8;
}


/* =========================
   Kanji Transition Marks
   ========================= */
.kanji-mark {
    position: absolute;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 3rem;
    color: var(--tenmoku);
    opacity: 0.04;
    font-family: serif;
    pointer-events: none;
    user-select: none;
}


/* =========================
   Wobble Dividers & Connectors
   ========================= */
.wobble-divider {
    display: block;
    width: 100%;
    height: 12px;
    position: relative;
    z-index: 2;
}

.wobble-connector {
    width: 40px;
    height: 80px;
    display: block;
    z-index: 2;
}


/* =========================
   Slabs (Content Panels)
   ========================= */
.slab {
    background: var(--ash);
    padding: 2.5rem;
    max-width: 540px;
    width: 90%;
    position: relative;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s ease, transform 1.2s cubic-bezier(0.25, 0.1, 0.25, 1);
    /* Subtle glaze texture */
    background-image:
        radial-gradient(ellipse at 30% 20%, rgba(232, 213, 183, 0.3), transparent 60%),
        radial-gradient(ellipse at 70% 80%, rgba(196, 149, 106, 0.12), transparent 50%);
}

.slab.visible {
    opacity: 1;
    transform: translateY(0);
}

.slab-1 {
    background-color: var(--ash);
    align-self: flex-start;
    margin-left: 8%;
}

.slab-2 {
    background-color: rgba(232, 213, 183, 0.75);
    align-self: flex-end;
    margin-right: 8%;
}

.slab-3 {
    background-color: rgba(217, 210, 197, 0.85);
    align-self: flex-start;
    margin-left: 12%;
}


/* =========================
   Potter's Marks
   ========================= */
.potter-mark {
    display: block;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    box-shadow:
        inset 2px 2px 4px rgba(59, 42, 31, 0.25),
        inset -1px -1px 3px rgba(255, 255, 255, 0.15);
    margin-bottom: 1.2rem;
    background: transparent;
}

.fire-mark {
    background: rgba(191, 74, 42, 0.15);
    box-shadow:
        inset 2px 2px 4px rgba(191, 74, 42, 0.2),
        inset -1px -1px 3px rgba(255, 255, 255, 0.1);
}


/* =========================
   Slab Typography
   ========================= */
.slab-title {
    font-family: 'Sorts Mill Goudy', serif;
    font-weight: 400;
    font-size: 2rem;
    color: var(--tenmoku);
    margin-bottom: 0.8rem;
    letter-spacing: 0.01em;
}

.slab-body {
    font-family: 'Merriweather', serif;
    font-weight: 300;
    font-size: 0.92rem;
    line-height: 1.75;
    color: rgba(59, 42, 31, 0.72);
}

.annotation {
    font-family: 'Homemade Apple', cursive;
    font-size: 0.8rem;
    color: var(--shino);
    margin-top: 1.25rem;
    opacity: 0.55;
}


/* =========================
   Fade-In Animation
   ========================= */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s ease, transform 1.2s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}


/* =========================
   Section 2: Shaping
   ========================= */
.shaping {
    background: transparent;
    gap: 0.5rem;
    padding: 6rem 2rem;
    min-height: 150vh;
}


/* =========================
   Section 3: Firing
   ========================= */
.firing {
    background:
        linear-gradient(180deg,
            var(--bisque) 0%,
            rgba(196, 149, 106, 0.35) 40%,
            rgba(191, 74, 42, 0.08) 70%,
            rgba(196, 149, 106, 0.25) 100%);
    min-height: 120vh;
    padding: 6rem 2rem;
}

.slab-fired {
    background:
        linear-gradient(145deg,
            var(--shino),
            rgba(196, 149, 106, 0.8) 60%,
            rgba(191, 74, 42, 0.3));
    background-color: var(--shino);
    color: rgba(255, 255, 255, 0.88);
}

.slab-fired .slab-title {
    color: rgba(255, 255, 255, 0.92);
}

.slab-fired .slab-body {
    color: rgba(255, 255, 255, 0.68);
}

.slab-fired .annotation {
    color: rgba(255, 255, 255, 0.5);
}

.slab-ember {
    background:
        linear-gradient(135deg,
            rgba(196, 149, 106, 0.6),
            rgba(217, 210, 197, 0.7) 60%,
            rgba(191, 74, 42, 0.1));
    background-color: rgba(196, 149, 106, 0.5);
    align-self: flex-end;
    margin-right: 6%;
}


/* =========================
   Glow Background (Firing)
   ========================= */
.glow-bg {
    position: absolute;
    width: 450px;
    height: 450px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(191, 74, 42, 0.1), transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    animation: glow-pulse 4s ease-in-out infinite;
}

@keyframes glow-pulse {
    0%, 100% {
        opacity: 0.5;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.08);
    }
}


/* =========================
   Glaze Drip Elements
   ========================= */
.glaze-drip {
    position: absolute;
    top: 0;
    background: rgba(59, 42, 31, 0.07);
    border-radius: 0 0 50% 50%;
    transform: translateY(-100%);
    transition: transform 1.8s ease-in;
}

.glaze-drip.dripped {
    transform: translateY(0);
}

.drip-1 {
    left: 18%;
    width: 28px;
    height: 55px;
}

.drip-2 {
    right: 28%;
    width: 35px;
    height: 72px;
    background: rgba(59, 42, 31, 0.05);
}

.drip-3 {
    left: 42%;
    width: 22px;
    height: 40px;
    background: rgba(196, 149, 106, 0.1);
}

.drip-4 {
    right: 15%;
    width: 18px;
    height: 48px;
    background: rgba(59, 42, 31, 0.04);
}

.drip-5 {
    left: 65%;
    width: 25px;
    height: 62px;
    background: rgba(196, 149, 106, 0.08);
}


/* =========================
   Section 4: Finished
   ========================= */
.finished {
    background: transparent;
    min-height: 100vh;
    padding: 6rem 2rem 8rem;
    gap: 2.5rem;
}

.slab-celadon {
    background:
        linear-gradient(135deg,
            rgba(143, 174, 139, 0.22),
            var(--ash) 50%,
            rgba(143, 174, 139, 0.12));
    background-color: var(--ash);
}

.celadon-title {
    color: var(--celadon);
}

.celadon-annotation {
    color: var(--celadon);
    opacity: 0.5;
}

.slab-final {
    background-color: rgba(232, 213, 183, 0.5);
    background-image:
        radial-gradient(ellipse at 40% 30%, rgba(143, 174, 139, 0.08), transparent 50%),
        radial-gradient(ellipse at 60% 70%, rgba(196, 149, 106, 0.1), transparent 45%);
    max-width: 480px;
    align-self: flex-end;
    margin-right: 10%;
}


/* =========================
   Final Stamp
   ========================= */
.final-stamp {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    box-shadow:
        inset 3px 3px 6px rgba(59, 42, 31, 0.25),
        inset -2px -2px 4px rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2rem;
    position: relative;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s ease, transform 1.2s ease;
}

.final-stamp.visible {
    opacity: 1;
    transform: translateY(0);
}

.final-stamp-inner {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stamp-icon {
    width: 40px;
    height: 40px;
}


/* =========================
   Responsive
   ========================= */
@media (max-width: 768px) {
    .kiln-section {
        padding: 4rem 1.5rem;
    }

    .slab {
        max-width: 100%;
        width: 95%;
        padding: 2rem;
    }

    .slab-1 {
        align-self: center;
        margin-left: 0;
    }

    .slab-2 {
        align-self: center;
        margin-right: 0;
    }

    .slab-3 {
        align-self: center;
        margin-left: 0;
    }

    .slab-ember {
        align-self: center;
        margin-right: 0;
    }

    .slab-final {
        align-self: center;
        margin-right: 0;
    }

    .stamp-brand {
        padding: 1.5rem 2.5rem;
    }

    .glow-bg {
        width: 300px;
        height: 300px;
    }
}

@media (max-width: 480px) {
    .stamp-text {
        font-size: 2rem;
    }

    .slab-title {
        font-size: 1.6rem;
    }

    .slab-body {
        font-size: 0.85rem;
    }
}
