/* gur.al - Wabi-Sabi Ceramic */

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

:root {
    --kiln-dark: #2a1e17;
    --raw-clay: #a8826a;
    --bisque-table: #d4c4b0;
    --bone-ash: #e8ddd0;
    --crackle-ground: #c9b99a;
    --iron-red: #c4713a;
    --celadon: #6b8f71;
    --tenmoku: #8b7355;
    --ash-cool: #9a948c;
    --charcoal-slip: #3a3028;
    --slate-kiln: #5a5650;
}

body {
    font-family: 'Literata', serif;
    font-weight: 350;
    background-color: var(--kiln-dark);
    color: var(--charcoal-slip);
    overflow-x: hidden;
    line-height: 1.72;
    letter-spacing: 0.015em;
    transition: background-color 0.3s ease;
}

/* Progress Indicator */
.progress-track {
    position: fixed;
    right: 12px;
    top: 10vh;
    height: 80vh;
    width: 2px;
    background: rgba(154, 148, 140, 0.2);
    z-index: 100;
}

.progress-fill {
    width: 100%;
    height: 0%;
    background: rgba(196, 113, 58, 0.4);
    transition: height 0.1s linear;
}

/* ==================== ZONE 1: THE SEALED KILN ==================== */
.zone {
    position: relative;
    min-height: 100vh;
}

.zone-kiln {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--kiln-dark);
}

.kiln-crack-container {
    position: relative;
    width: 80%;
    max-width: 800px;
}

.kiln-crack-svg {
    width: 100%;
    height: 20px;
}

.crack-path {
    stroke-dasharray: 1500;
    stroke-dashoffset: 1500;
    transition: stroke-dashoffset 2.5s ease-in-out;
}

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

.crack-glow {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 4px;
    transform: translateY(-50%);
    box-shadow: 0 0 30px 10px rgba(196, 113, 58, 0.3);
    opacity: 0;
    animation: glowPulse 4s ease-in-out infinite;
    animation-delay: 2s;
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 0.5; }
}

.kiln-title {
    font-family: 'Cormorant Infant', serif;
    font-weight: 300;
    font-size: clamp(3rem, 8vw, 5rem);
    letter-spacing: 0.12em;
    color: var(--bone-ash);
    text-transform: lowercase;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 1.2s cubic-bezier(0.25, 0.1, 0.25, 1), transform 1.2s cubic-bezier(0.25, 0.1, 0.25, 1);
    margin-top: 24px;
}

.kiln-title.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==================== ZONE 2: FIRST LIGHT ==================== */
.zone-light {
    padding: 80px 20px;
    min-height: 150vh;
}

.content-cluster {
    margin-bottom: 100px;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 700ms cubic-bezier(0.25, 0.1, 0.25, 1), transform 700ms cubic-bezier(0.25, 0.1, 0.25, 1);
}

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

.text-block {
    position: relative;
    padding-left: 16px;
}

.text-block .drip-mark {
    position: absolute;
    left: 0;
    top: 0;
    width: 2px;
    height: 60px;
    background: var(--iron-red);
    opacity: 0.3;
    border-radius: 1px;
}

.cluster-1 .text-block { border-left: 2px solid var(--celadon); }
.cluster-2 .text-block { border-left: 2px solid var(--iron-red); }
.cluster-3 .text-block { border-left: 2px solid var(--tenmoku); }

.prose {
    font-family: 'Literata', serif;
    font-weight: 350;
    font-size: clamp(1rem, 2vw, 1.15rem);
    line-height: 1.72;
    color: var(--charcoal-slip);
}

.zone-kiln .prose,
.zone-light .prose {
    color: var(--bisque-table);
}

.kiln-tag {
    display: inline-block;
    padding: 6px 14px;
    border: 1px solid var(--tenmoku);
    margin: 12px 0;
}

.kiln-tag span {
    font-family: 'Caveat', cursive;
    font-size: 15px;
    color: var(--tenmoku);
}

/* ==================== ZONE 3: THE TABLE ==================== */
.zone-table {
    min-height: 120vh;
    padding: 80px 20px;
}

.table-surface {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    min-height: 600px;
}

.table-card {
    position: absolute;
    background: var(--bisque-table);
    padding: 28px;
    max-width: 300px;
    box-shadow: 2px 3px 8px rgba(0,0,0,0.06);
    opacity: 0;
    transition: opacity 700ms cubic-bezier(0.25, 0.1, 0.25, 1);
}

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

.table-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cpolygon points='20,10 80,5 90,50 50,60 10,40' fill='none' stroke='%233a3028' stroke-width='0.3' opacity='0.15'/%3E%3Cpolygon points='100,20 160,15 170,70 120,80 90,50' fill='none' stroke='%233a3028' stroke-width='0.3' opacity='0.15'/%3E%3Cpolygon points='50,70 100,80 110,130 70,140 30,110' fill='none' stroke='%233a3028' stroke-width='0.3' opacity='0.15'/%3E%3Cpolygon points='120,85 180,75 190,130 140,145 110,120' fill='none' stroke='%233a3028' stroke-width='0.3' opacity='0.15'/%3E%3Cpolygon points='10,120 60,130 70,180 30,190 5,160' fill='none' stroke='%233a3028' stroke-width='0.3' opacity='0.15'/%3E%3Cpolygon points='80,140 140,150 150,195 100,200 70,175' fill='none' stroke='%233a3028' stroke-width='0.3' opacity='0.15'/%3E%3C/svg%3E");
    background-size: 200px 200px;
    opacity: 0.05;
    pointer-events: none;
}

.card-prose {
    font-family: 'Literata', serif;
    font-weight: 350;
    font-size: 0.95rem;
    line-height: 1.72;
    color: var(--charcoal-slip);
}

.card-glyph {
    display: block;
    margin: 0 auto;
}

.thumb-impression {
    position: absolute;
    top: -20px;
    right: -15px;
    width: 60px;
    height: 50px;
    border-radius: 45% 55% 50% 50%;
    background: var(--bone-ash);
    opacity: 0.08;
    transform: rotate(15deg);
    pointer-events: none;
}

/* ==================== ZONE 4: THE SHARD ==================== */
.zone-shard {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

.crackle-overlay {
    position: absolute;
    inset: 0;
    background-color: var(--crackle-ground);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cpolygon points='20,10 80,5 90,50 50,60 10,40' fill='none' stroke='%233a3028' stroke-width='0.5' opacity='0.15'/%3E%3Cpolygon points='100,20 160,15 170,70 120,80 90,50' fill='none' stroke='%233a3028' stroke-width='0.5' opacity='0.15'/%3E%3Cpolygon points='50,70 100,80 110,130 70,140 30,110' fill='none' stroke='%233a3028' stroke-width='0.5' opacity='0.15'/%3E%3Cpolygon points='120,85 180,75 190,130 140,145 110,120' fill='none' stroke='%233a3028' stroke-width='0.5' opacity='0.15'/%3E%3Cpolygon points='10,120 60,130 70,180 30,190 5,160' fill='none' stroke='%233a3028' stroke-width='0.5' opacity='0.15'/%3E%3Cpolygon points='80,140 140,150 150,195 100,200 70,175' fill='none' stroke='%233a3028' stroke-width='0.5' opacity='0.15'/%3E%3Cpolygon points='160,140 195,155 190,195 155,190 145,165' fill='none' stroke='%233a3028' stroke-width='0.5' opacity='0.15'/%3E%3C/svg%3E");
    background-size: 200px 200px;
}

.shard-text {
    position: relative;
    z-index: 2;
    font-family: 'Cormorant Infant', serif;
    font-weight: 300;
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    color: var(--celadon);
    letter-spacing: 0.08em;
    text-align: center;
    max-width: 700px;
    padding: 0 20px;
    min-height: 1.5em;
}

.shard-cursor {
    position: relative;
    z-index: 2;
    font-family: 'DM Mono', monospace;
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    color: var(--iron-red);
    animation: cursorBlink 800ms step-end infinite;
    opacity: 0;
}

.shard-cursor.active {
    opacity: 1;
}

.shard-cursor.hidden {
    opacity: 0;
    animation: none;
}

@keyframes cursorBlink {
    50% { opacity: 0; }
}

/* ==================== ZONE 5: THE COOLING ==================== */
.zone-cooling {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 80px 20px;
}

.cooling-column {
    max-width: 420px;
    margin-left: 30px;
}

.cooling-prose {
    font-family: 'Literata', serif;
    font-weight: 350;
    font-size: 1.05rem;
    line-height: 1.72;
    color: var(--bone-ash);
    margin-bottom: 28px;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 700ms cubic-bezier(0.25, 0.1, 0.25, 1), transform 700ms cubic-bezier(0.25, 0.1, 0.25, 1);
}

.cooling-prose.visible {
    opacity: 1;
    transform: translateY(0);
}

.cooling-quiet {
    font-style: italic;
    color: var(--ash-cool);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    .table-card {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        max-width: 100%;
        margin-bottom: 20px;
        transform: none !important;
    }

    .table-card:nth-child(odd) { margin-left: -8px; }
    .table-card:nth-child(even) { margin-left: 8px; }

    .table-surface {
        min-height: auto;
    }

    .text-block {
        margin-left: 5% !important;
        max-width: 90% !important;
    }

    .cooling-column {
        margin-left: 0;
    }
}
