/* HHASSL.com - Wabi-Sabi Ceramic Design Language */
/* Palette: #f5f0e8, #ebe4d4, #2c2a26, #6b6459, #c4856a, #8a9e8b, #3d3024, #c9a84c */

:root {
    --bisque: #f5f0e8;
    --rice-paper: #ebe4d4;
    --kiln-charcoal: #2c2a26;
    --iron-wash: #6b6459;
    --shino-blush: #c4856a;
    --celadon: #8a9e8b;
    --tenmoku: #3d3024;
    --kintsugi-gold: #c9a84c;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bisque);
    color: var(--kiln-charcoal);
    font-family: 'Karla', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.75;
    overflow-x: hidden;
}

/* ======================================
   TYPOGRAPHY - Minor Third Scale (1.2)
   16 / 19.2 / 23 / 27.6 / 33.2 / 39.8
   ====================================== */

h1, h2, h3 {
    font-family: 'Cormorant Garamond', serif;
    letter-spacing: 0.04em;
    line-height: 1.2;
}

/* ======================================
   CLAY TEXTURE OVERLAY
   ====================================== */

.clay-texture-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.015' numOctaves='4' seed='5'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 1;
}

.clay-texture-dark {
    opacity: 0.08;
}

/* ======================================
   ENSO NAVIGATION
   ====================================== */

.enso-nav {
    position: fixed;
    top: 24px;
    left: 24px;
    width: 48px;
    height: 48px;
    z-index: 1000;
    cursor: pointer;
}

.enso-nav-svg {
    width: 48px;
    height: 48px;
    color: var(--kiln-charcoal);
    transition: color 0.6s ease;
}

.enso-nav:hover .enso-nav-svg {
    color: var(--kintsugi-gold);
}

.enso-nav-path {
    stroke-dasharray: 130;
    stroke-dashoffset: 130;
    transition: stroke-dashoffset 1.8s ease;
}

.enso-nav-path.drawn {
    stroke-dashoffset: 8;
}

.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(44, 42, 38, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease;
    z-index: 999;
}

.nav-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.nav-links {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    text-align: center;
}

.nav-link {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-size: 2rem;
    letter-spacing: 0.08em;
    color: var(--rice-paper);
    text-decoration: none;
    opacity: 0.7;
    transition: opacity 0.4s ease, color 0.4s ease;
}

.nav-link:hover {
    opacity: 1;
    color: var(--kintsugi-gold);
}

/* ======================================
   KILN STAGES (Sections)
   ====================================== */

.kiln-stage {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 120px 2rem;
    min-height: 100vh;
    overflow: hidden;
}

.stage-content {
    max-width: 720px;
    width: 100%;
    position: relative;
    z-index: 2;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Asymmetric offsets */
.offset-left {
    margin-left: 8%;
    margin-right: auto;
}

.offset-right {
    margin-left: auto;
    margin-right: 12%;
}

.offset-center {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

/* ======================================
   SECTION ENSO MARKERS
   ====================================== */

.section-enso {
    width: 24px;
    height: 24px;
    display: block;
    margin-bottom: 1.5rem;
    opacity: 0.4;
}

/* ======================================
   STAGE LABELS
   ====================================== */

.stage-label {
    font-family: 'EB Garamond', serif;
    font-style: italic;
    font-size: 14px;
    letter-spacing: 0.12em;
    color: var(--iron-wash);
    display: block;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
}

.stage-label-light {
    color: var(--rice-paper);
    opacity: 0.6;
}

/* ======================================
   STAGE TITLES
   ====================================== */

.stage-title {
    font-weight: 300;
    font-size: clamp(27.6px, 4vw, 39.8px);
    color: var(--kiln-charcoal);
    margin-bottom: 1.5rem;
}

/* ======================================
   STAGE BODY TEXT
   ====================================== */

.stage-body {
    font-family: 'Karla', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.75;
    color: var(--iron-wash);
    margin-bottom: 2rem;
}

/* ======================================
   STAGE 1: OPENING
   ====================================== */

.stage-opening {
    background-color: var(--bisque);
    min-height: 100vh;
    justify-content: center;
    align-items: center;
}

.opening-content {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
    opacity: 1;
    transform: none;
}

.enso-hero {
    width: 160px;
    height: 160px;
    margin: 0 auto 3rem auto;
    display: block;
}

.enso-hero-path {
    stroke-dasharray: 580;
    stroke-dashoffset: 580;
    transition: stroke-dashoffset 3s ease;
}

.enso-hero-path.drawn {
    stroke-dashoffset: 30;
}

.site-title {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-size: clamp(39.8px, 8vw, 56px);
    letter-spacing: 0.04em;
    color: var(--kiln-charcoal);
    line-height: 1;
    margin-bottom: 1.5rem;
}

.title-letter {
    display: inline-block;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.site-subtitle {
    font-family: 'EB Garamond', serif;
    font-style: italic;
    font-size: 16px;
    letter-spacing: 0.08em;
    color: var(--iron-wash);
    opacity: 0;
    transition: opacity 1.2s ease;
}

.site-subtitle.visible {
    opacity: 0.6;
}

/* ======================================
   STAGE 2: SHAPING
   ====================================== */

.stage-shaping {
    background-color: var(--bisque);
    padding: 160px 2rem;
    gap: 60px;
}

.texture-block {
    border-left: 2px solid var(--shino-blush);
    padding-left: 1.5rem;
    margin-top: 1rem;
}

.texture-quote {
    font-family: 'EB Garamond', serif;
    font-style: italic;
    font-size: 19.2px;
    color: var(--kiln-charcoal);
    line-height: 1.6;
}

/* Glaze Palette Swatches */
.glaze-palette {
    display: flex;
    gap: 1.25rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.glaze-swatch {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 1px solid rgba(44, 42, 38, 0.08);
    position: relative;
    transition: transform 0.4s ease;
    cursor: default;
}

.glaze-swatch:hover {
    transform: scale(1.15);
}

.swatch-label {
    position: absolute;
    bottom: -22px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'EB Garamond', serif;
    font-style: italic;
    font-size: 11px;
    color: var(--iron-wash);
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.glaze-swatch:hover .swatch-label {
    opacity: 1;
}

/* ======================================
   KINTSUGI SVG DIVIDERS
   ====================================== */

.kintsugi-divider {
    width: 100%;
    height: 8px;
    position: relative;
    z-index: 2;
    overflow: visible;
}

.kintsugi-path {
    stroke-dasharray: 1800;
    stroke-dashoffset: 1800;
    transition: stroke-dashoffset 2.5s ease;
    filter: drop-shadow(0 0 3px rgba(201, 168, 76, 0));
}

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

.kintsugi-divider:hover .kintsugi-path {
    filter: drop-shadow(0 0 6px rgba(201, 168, 76, 0.4));
    stroke: #d4b85e;
}

/* ======================================
   STAGE 3: FIRING (Dark Transformation)
   ====================================== */

.stage-firing {
    background-color: var(--tenmoku);
    min-height: 100vh;
    transition: background-color 0.1s ease;
}

.firing-quote {
    max-width: 600px;
    margin: 0 auto;
}

.firing-text {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-size: clamp(23px, 3.5vw, 33.2px);
    color: var(--rice-paper);
    line-height: 1.5;
    letter-spacing: 0.04em;
    text-align: center;
}

.kiln-temperature {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 4rem;
}

.temp-value {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-size: clamp(56px, 12vw, 96px);
    color: var(--shino-blush);
    line-height: 1;
}

.temp-unit {
    font-family: 'EB Garamond', serif;
    font-style: italic;
    font-size: 19.2px;
    color: var(--iron-wash);
}

/* ======================================
   STAGE 4: EMERGENCE
   ====================================== */

.stage-emergence {
    background-color: var(--rice-paper);
    padding: 160px 2rem;
    gap: 80px;
}

/* Crackle card with celadon accent */
.crackle-card {
    border: 1px solid var(--celadon);
    padding: 2.5rem;
    position: relative;
    background-color: rgba(245, 240, 232, 0.5);
}

.crackle-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cdefs%3E%3Cpattern id='c' patternUnits='userSpaceOnUse' width='60' height='60'%3E%3Cpath d='M0 30 L20 10 L40 35 L60 15' fill='none' stroke='%238a9e8b' stroke-width='0.3'/%3E%3Cpath d='M10 0 L25 25 L15 60' fill='none' stroke='%238a9e8b' stroke-width='0.3'/%3E%3Cpath d='M50 0 L35 30 L55 60' fill='none' stroke='%238a9e8b' stroke-width='0.3'/%3E%3C/pattern%3E%3C/defs%3E%3Crect width='200' height='200' fill='url(%23c)'/%3E%3C/svg%3E");
    opacity: 0.15;
    pointer-events: none;
}

.card-title {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 400;
    font-size: 23px;
    color: var(--kintsugi-gold);
    margin-bottom: 1rem;
    letter-spacing: 0.04em;
}

/* Kintsugi Art (vessel with gold veins) */
.kintsugi-art {
    width: 240px;
    height: 240px;
    margin: 1rem 0 2rem 0;
}

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

.gold-vein {
    stroke-dasharray: 300;
    stroke-dashoffset: 300;
    transition: stroke-dashoffset 2.2s ease;
}

.gold-vein.drawn {
    stroke-dashoffset: 0;
}

/* ======================================
   STAGE 5: CLOSING
   ====================================== */

.stage-closing {
    background-color: var(--bisque);
    min-height: 80vh;
    padding: 200px 2rem;
}

.closing-content {
    margin-left: auto;
    margin-right: auto;
}

.enso-closing {
    width: 200px;
    height: 200px;
    margin: 0 auto 3rem auto;
    display: block;
}

.enso-closing-path {
    stroke-dasharray: 580;
    stroke-dashoffset: 580;
    transition: stroke-dashoffset 3s ease;
}

.enso-closing-path.drawn {
    stroke-dashoffset: 30;
}

.closing-thought {
    font-family: 'EB Garamond', serif;
    font-style: italic;
    font-size: 16px;
    letter-spacing: 0.05em;
    color: var(--iron-wash);
    opacity: 0.7;
    margin-top: 1rem;
}

/* ======================================
   FOOTER
   ====================================== */

.site-footer {
    padding: 200px 2rem 80px 2rem;
    text-align: center;
    background-color: var(--bisque);
}

.footer-text {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-size: 14px;
    letter-spacing: 0.12em;
    color: var(--iron-wash);
    opacity: 0.4;
}

/* ======================================
   SCROLL-DRIVEN BACKGROUND TRANSITIONS
   ====================================== */

.stage-firing.bg-transition-in {
    background-color: var(--tenmoku);
}

/* ======================================
   RESPONSIVE
   ====================================== */

@media (max-width: 768px) {
    .kiln-stage {
        padding: 80px 1.5rem;
    }

    .stage-shaping,
    .stage-emergence {
        padding: 100px 1.5rem;
        gap: 40px;
    }

    .offset-left,
    .offset-right {
        margin-left: auto;
        margin-right: auto;
        padding: 0 0.5rem;
    }

    .enso-hero {
        width: 120px;
        height: 120px;
    }

    .enso-closing {
        width: 150px;
        height: 150px;
    }

    .kintsugi-art {
        width: 180px;
        height: 180px;
    }

    .glaze-palette {
        gap: 0.75rem;
    }

    .glaze-swatch {
        width: 42px;
        height: 42px;
    }

    .site-footer {
        padding: 120px 1.5rem 60px 1.5rem;
    }

    .stage-closing {
        padding: 120px 1.5rem;
    }
}

@media (min-width: 1200px) {
    .kiln-stage {
        padding: 200px 4rem;
    }

    .stage-shaping,
    .stage-emergence {
        padding: 200px 4rem;
        gap: 100px;
    }
}
