/* ============================================
   KNEAD — Semantic Zoom Microsite
   ============================================ */

:root {
    --white: #FFFFFF;
    --off-white: #FAF7F2;
    --charcoal: #2C2C2C;
    --stone: #B8A99A;
    --wheat: #D4A853;
    --font-heading: 'Helvetica Neue', 'Arial', sans-serif;
    --font-body: 'Georgia', serif;
    --zoom-duration: 0.6s;
    --zoom-ease: cubic-bezier(0.25, 0.1, 0.25, 1);
}

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

html {
    scroll-behavior: smooth;
}

html, body {
    width: 100%;
    min-height: 100%;
    background: var(--white);
    font-family: var(--font-body);
    color: var(--charcoal);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ---- PAGE LOAD FADE-IN ---- */
body {
    opacity: 0;
    transition: opacity 0.4s ease;
}

body.loaded {
    opacity: 1;
}

/* ---- CANVAS ---- */
#canvas {
    width: 100%;
    min-height: 100vh;
    position: relative;
}

.zoom-level-2#canvas {
    height: 100vh;
    overflow: hidden;
}

/* ---- CLOSE BUTTON ---- */
#close-btn {
    display: none;
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 200;
    background: none;
    border: none;
    font-size: 2rem;
    line-height: 1;
    color: var(--stone);
    cursor: pointer;
    padding: 4px 10px;
    transition: color 0.2s ease;
}

#close-btn:hover {
    color: var(--charcoal);
}

.zoom-level-2 #close-btn {
    display: block;
}

/* ---- LOGO ---- */
#logo {
    text-align: center;
    transition: all var(--zoom-duration) var(--zoom-ease);
    user-select: none;
    flex-shrink: 0;
}

/* Level 1: logo at top */
.zoom-level-1 #logo {
    padding: 30px 0;
}

.zoom-level-1 #logo h1 {
    font-family: var(--font-heading);
    font-size: 2.4rem;
    font-weight: 800;
    letter-spacing: 0.15em;
    color: var(--charcoal);
}

.zoom-level-1 #logo span {
    font-family: var(--font-heading);
    font-size: 0.65rem;
    letter-spacing: 0.3em;
    color: var(--stone);
    display: block;
    margin-top: 4px;
}

/* Level 2: logo shrinks to top-left */
.zoom-level-2 #logo {
    position: fixed;
    top: 20px;
    left: 20px;
    padding: 0;
    cursor: pointer;
    z-index: 100;
}

.zoom-level-2 #logo h1 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 0.12em;
}

.zoom-level-2 #logo span {
    display: none;
}

/* ---- CATALOGUE (Level 1) ---- */
#catalogue {
    display: block;
    padding: 40px 60px 120px;
    transition: all var(--zoom-duration) var(--zoom-ease);
}

.zoom-level-2 #catalogue {
    display: none;
}

/* ---- CATALOGUE SECTIONS ---- */
.catalogue-section {
    width: 100%;
    margin-bottom: 50px;
}

.catalogue-section:last-child {
    margin-bottom: 0;
}

.catalogue-heading {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--stone);
    text-align: center;
    margin-bottom: 30px;
    position: relative;
}

.catalogue-heading::after {
    content: '';
    display: block;
    width: 40px;
    height: 1px;
    background: var(--stone);
    margin: 22px auto 0;
    opacity: 0.4;
}

.catalogue-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
}

/* ---- PRODUCT THUMBNAILS ---- */
.product-thumb {
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    transform: translateY(12px);
}

.product-thumb.visible {
    opacity: 1;
    transform: translateY(0);
}

.product-thumb:hover {
    transform: scale(1.04);
}

.product-thumb img {
    width: 140px;
    height: 140px;
    object-fit: cover;
    border-radius: 2px;
    background: var(--off-white);
}

.product-thumb p {
    margin-top: 10px;
    font-family: var(--font-heading);
    font-size: 0.65rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--stone);
}

/* ---- OUR STORY ---- */
#our-story {
    max-width: 520px;
    margin: 0 auto;
    padding: 40px 30px 40px;
    text-align: center;
    opacity: 0;
    transition: opacity 1.6s ease;
}

#our-story.visible {
    opacity: 1;
}

.story-heading {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--stone);
    margin-bottom: 12px;
}

.story-heading::after {
    content: '';
    display: block;
    width: 40px;
    height: 1px;
    background: var(--stone);
    margin: 22px auto 0;
    opacity: 0.4;
}

.story-body p {
    font-family: var(--font-body);
    font-size: 1.1rem;
    line-height: 2.2;
    color: #888;
    margin-top: 22px;
    opacity: 0;
    transition: opacity 2.2s ease;
}

.story-body p.visible {
    opacity: 1;
}

.story-body p:first-child {
    margin-top: 24px;
}

.zoom-level-2 #our-story {
    display: none;
}

/* ---- HOW TO ORDER ---- */
#how-to-order {
    max-width: 700px;
    margin: 0 auto;
    padding: 20px 30px 60px;
    text-align: center;
    opacity: 0;
    transition: opacity 1.6s ease;
}

#how-to-order.visible {
    opacity: 1;
}

.zoom-level-2 #how-to-order {
    display: none;
}

.order-step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--stone);
    border-radius: 50%;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--charcoal);
    margin-bottom: 12px;
}

#how-to-order .column {
    text-align: center;
}

#how-to-order .column p {
    font-family: var(--font-body);
    font-size: 0.95rem;
    line-height: 1.7;
    color: #888;
}

#how-to-order .column p strong {
    color: var(--charcoal);
}

.order-link {
    color: var(--charcoal);
    text-decoration: none;
    font-weight: 700;
    border-bottom: 1px solid var(--stone);
    transition: border-color 0.2s ease;
    white-space: nowrap;
}

.order-link:hover {
    border-color: var(--charcoal);
}

/* ---- BACK TO TOP ---- */
#back-to-top {
    text-align: center;
    padding: 0px 0 40px;
}

.zoom-level-2 #back-to-top {
    display: none;
}

.back-to-top-link {
    display: inline-block;
    width: 36px;
    height: 36px;
    line-height: 34px;
    border: 1px solid var(--stone);
    border-radius: 50%;
    color: var(--stone);
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s ease, border-color 0.3s ease;
}

.back-to-top-link:hover {
    color: var(--charcoal);
    border-color: var(--charcoal);
}

/* ---- CATALOGUE FOOTER ---- */
#catalogue-footer {
    text-align: center;
    padding: 0 20px;
}

#catalogue-footer::before {
    content: '';
    display: block;
    width: 40px;
    height: 1px;
    background: var(--stone);
    margin: 0 auto 18px;
    opacity: 0.4;
}

#catalogue-footer p {
    font-family: var(--font-heading);
    font-size: 0.7rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--stone);
    line-height: 1.8;
}

.zoom-level-2 #catalogue-footer {
    display: none;
}

/* ---- PRODUCT VIEW (Level 2) ---- */
#product-view {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    opacity: 0;
    transform: scale(0.3);
    pointer-events: none;
    transition: all var(--zoom-duration) var(--zoom-ease);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 80px 30px 60px;
    background: var(--white);
    z-index: 50;
}

.zoom-level-2 #product-view {
    opacity: 1;
    transform: scale(1);
    pointer-events: all;
}

/* ---- BACK ZONE (click white space to zoom out) ---- */
.back-zone {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    cursor: zoom-out;
    pointer-events: none;
}

.zoom-level-2 .back-zone {
    pointer-events: auto;
}

/* ---- PRODUCT CONTENT ---- */
#product-content {
    max-width: 500px;
    width: 100%;
    text-align: center;
    position: relative;
    z-index: 1;
}

/* ---- PRODUCT HERO IMAGE ---- */
.product-hero {
    margin-bottom: 30px;
}

.product-hero img {
    width: 100%;
    max-width: 420px;
    border-radius: 2px;
    background: var(--off-white);
    transition: opacity 0.3s ease;
}

.product-hero img.loading {
    opacity: 0.4;
}

/* ---- PRODUCT INFO ---- */
.product-info h2 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    margin-bottom: 6px;
}

.product-info .product-short-desc {
    font-family: var(--font-heading);
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--stone);
    margin-bottom: 20px;
}

.product-info .product-description {
    font-family: var(--font-body);
    font-size: 0.95rem;
    line-height: 1.7;
    color: #555;
    margin-bottom: 24px;
}

/* ---- VARIATION SELECTOR ---- */
.variation-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin: 0 0 24px;
}

.variation-chip {
    padding: 8px 16px;
    border: 1px solid var(--stone);
    border-radius: 2px;
    font-family: var(--font-heading);
    font-size: 0.65rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--charcoal);
    cursor: pointer;
    transition: all 0.2s ease;
    background: transparent;
    outline: none;
}

.variation-chip:hover,
.variation-chip.active {
    background: var(--charcoal);
    color: var(--white);
    border-color: var(--charcoal);
}

.variation-swatch {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
    border: 1px solid #ddd;
}

/* ---- PRODUCT META ---- */
.product-meta {
    font-family: var(--font-heading);
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--stone);
    margin-bottom: 30px;
    line-height: 1.8;
}

.product-meta span {
    display: block;
}

.product-meta .product-price {
    font-size: 0.85rem;
    color: var(--charcoal);
    font-weight: 700;
    letter-spacing: 0.1em;
}

.product-meta .product-stock.in-stock {
    color: #5a8a5a;
}

.product-meta .product-stock.made-to-order {
    color: var(--wheat);
}

/* ---- CTA BUTTON ---- */
.cta-btn {
    display: inline-block;
    padding: 14px 36px;
    background: var(--charcoal);
    color: var(--white);
    text-decoration: none;
    font-family: var(--font-heading);
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    border-radius: 2px;
    transition: background 0.3s ease, color 0.3s ease;
}

.cta-btn:hover {
    background: var(--wheat);
    color: var(--charcoal);
}

/* ---- MOBILE ---- */
@media (max-width: 600px) {
    #catalogue {
        padding: 20px 20px 80px;
    }

    .catalogue-grid {
        gap: 24px;
    }

    #our-story {
        padding: 30px 20px 60px;
    }

    #how-to-order {
        padding: 20px 20px 40px;
    }

    .story-body p {
        font-size: 0.88rem;
    }

    .product-thumb img {
        width: 100px;
        height: 100px;
    }

    #product-view {
        padding: 70px 20px 40px;
    }

    .zoom-level-1 #logo h1 {
        font-size: 1.8rem;
    }

    .zoom-level-1 #logo span {
        font-size: 0.55rem;
    }

    .product-info h2 {
        font-size: 1.2rem;
    }

    .product-info .product-description {
        font-size: 0.9rem;
    }
}

@media (max-width: 380px) {
    .product-thumb img {
        width: 80px;
        height: 80px;
    }

    .product-thumb p {
        font-size: 0.55rem;
    }
}
