/* ============================================
   KINTSUGI WORKSHOP — PREMIUM GOLD EDITION
   Mobile-First | Fluid Typography | Glassmorphism
   ============================================ */

:root {
    /* --- COLOR PALETTE (Light Theme) --- */
    --bg-cream: #FFFFFF;
    --bg-dark: #121212;
    --bg-gold-light: #FBF7F0;

    --text-primary: #121212;
    --text-secondary: #404040;
    --text-muted: #737373;
    --text-light: #FFFFFF;
    --text-gold: #D4AF37;

    /* Gold Gradients & Accents */
    --gold-primary: #D4AF37;
    --gold-dark: #B8960C;
    --gold-light: #F4E4BC;
    --gold-gradient: linear-gradient(135deg, #DFBD69 0%, #B88A44 100%);
    --gold-glow: rgba(212, 175, 55, 0.4);

    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(0, 0, 0, 0.05);
    --glass-blur: blur(12px);
    --shadow-soft: 0 10px 40px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 20px 40px rgba(212, 175, 55, 0.15);

    /* Functional Colors */
    --success: #2A7D4B;
    --danger: #8B3A3A;

    /* --- TYPOGRAPHY (Fluid) --- */
    --font-serif: 'Cormorant Garamond', Georgia, serif;
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;

    /* Type Scale: 1.25 Ratio */
    --h1-size: clamp(2.5rem, 5vw + 1rem, 4.5rem);
    --h2-size: clamp(2rem, 4vw + 1rem, 3rem);
    --h3-size: clamp(1.5rem, 3vw + 0.5rem, 2rem);
    --body-size: clamp(1rem, 2vw, 1.125rem);
    --small-size: clamp(0.875rem, 1.5vw, 1rem);

    /* --- LAYOUT & ANIMATION --- */
    --plate-size: min(80vw, 45vh, 400px);
    --container-max: 1200px;
    --section-padding: clamp(4rem, 8vh, 8rem) 1.5rem;
    --ease-out: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --ease-elastic: cubic-bezier(0.33, 1, 0.68, 1);
}

/* ============================================
   BASE STYLES & UTILITIES
   ============================================ */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* --- PREMIUM NAVIGATION --- */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 0;
    transition: all 0.3s var(--ease-out);
    background: rgba(255, 255, 255, 0.9);
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.nav__inner {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav__logo {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.nav__logo span {
    color: var(--gold-primary);
    font-style: italic;
}

.nav__links {
    display: flex;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav__link {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: color 0.3s;
}

.nav__link:hover {
    color: var(--gold-primary);
}

.nav__toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 1001;
}

.nav__toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Mobile Nav */
@media (max-width: 768px) {
    .nav__links {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        width: 100%;
        background: var(--bg-cream);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        transform: translateY(-100%);
        transition: transform 0.5s var(--ease-elastic);
        z-index: 999;
    }

    .nav__links.nav-active {
        transform: translateY(0);
    }

    .nav__toggle {
        display: flex;
    }

    /* Hamburger Animation */
    .toggle-active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 6px);
    }

    .toggle-active span:nth-child(2) {
        opacity: 0;
    }

    .toggle-active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -6px);
    }

    .nav__link {
        font-size: 1.25rem;
    }
}

.pricing-card {
    /* Extending glass-card logic manually for specificity */
    background: #FFFFFF;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    padding: 3rem 2rem;
    text-align: center;
    box-shadow: var(--shadow-soft);
    position: relative;
    transition: all 0.3s ease;
}

.pricing-featured {
    background: linear-gradient(145deg, #2a2a2a 0%, #1a1a1a 100%);
    color: var(--text-light);
    border: 1px solid var(--gold-primary);
    transform: scale(1.05);
    z-index: 2;
}

.pricing-featured h3,
.pricing-featured .amount,
.pricing-featured p,
.pricing-featured li,
.pricing-featured strong {
    color: var(--text-light);
}

.testimonial-card {
    background: #FFFFFF;
    border: 1px solid rgba(0, 0, 0, 0.08);
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: var(--shadow-soft);
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-cream);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    position: relative;
}

/* Texture Overlay (Washi Paper Effect) */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: multiply;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-serif);
    line-height: 1.2;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

h1 {
    font-size: var(--h1-size);
    font-weight: 400;
}

h2 {
    font-size: var(--h2-size);
    font-weight: 400;
}

h3 {
    font-size: var(--h3-size);
    font-weight: 500;
}

p {
    font-size: var(--body-size);
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

a {
    color: inherit;
    text-decoration: none;
    transition: all 0.3s var(--ease-out);
}

.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* --- PREMIUM UTILITIES --- */
.text-gold {
    color: var(--gold-primary);
}

.text-gradient {
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.gold-seam {
    height: 1px;
    width: 100px;
    background: var(--gold-gradient);
    margin: 2rem auto;
    position: relative;
}

.gold-seam::after {
    content: "✦";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -55%);
    background: var(--bg-cream);
    padding: 0 0.5rem;
    color: var(--gold-primary);
    font-size: 0.8rem;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-soft);
    border-radius: 16px;
    padding: 2rem;
    transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--gold-primary);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.8s var(--ease-out) forwards;
}

.section-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gold-dark);
    margin-bottom: 1rem;
    padding: 0.5em 1.5em;
    border: 1px solid var(--gold-primary);
    border-radius: 50px;
    background: rgba(212, 175, 55, 0.05);
}

/* ============================================
   SCROLL ANIMATION ENGINE (The Core)
   ============================================ */
.scroll-container {
    position: relative;
    height: 500vh;
    width: 100%;
}

.sticky-scene {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 5rem;
    overflow: hidden;
    /* Background managed by global theme */
}

.sticky-scene h1,
.sticky-scene h2,
.sticky-scene h3,
.sticky-scene h4,
.sticky-scene p {
    color: #121212;
}

.sticky-scene .hero-subtitle {
    color: #404040;
}

/* Plate */
.plate-container {
    position: relative;
    width: var(--plate-size);
    height: var(--plate-size);
    z-index: 10;
    flex-shrink: 0;
    margin-bottom: 2rem;
    transition: all 0.5s ease;
}

.plate-piece,
.plate-image,
.plate-joining-1,
.plate-joining-2,
.plate-cracked,
.plate-complete,
.gold-glow-layer {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    will-change: transform, opacity;
}

.plate-image {
    object-fit: contain;
    pointer-events: none;
}

.gold-glow-layer .plate-image {
    filter: brightness(1.3) contrast(1.1) saturate(1.4) drop-shadow(0 0 30px var(--gold-glow));
}

/* Content Layer */
.content-layer {
    position: relative;
    width: 100%;
    flex: 1;
    z-index: 20;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    pointer-events: none;
    padding: 0 1.5rem;
}

.content-section {
    position: absolute;
    width: 100%;
    max-width: 550px;
    text-align: center;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
    pointer-events: auto;
}

.content-section.active {
    opacity: 1;
    transform: translateY(0);
}

/* Hero Specifics */
.hero-title {
    font-size: var(--h1-size);
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-family: var(--font-serif);
    font-size: var(--h3-size);
    font-style: italic;
    color: var(--text-muted);
}

.scroll-hint {
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gold-dark);
    margin-top: 2rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.4;
        transform: translateY(0);
    }

    50% {
        opacity: 1;
        transform: translateY(5px);
    }
}

/* ============================================
   SECTIONS & COMPONENTS
   ============================================ */

/* Stakes Grid */
.stakes-section {
    background: var(--bg-dark);
    color: var(--text-light);
    padding: var(--section-padding);
    position: relative;
}

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

.stakes-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 2rem;
}

.stakes-fail {
    border-left: 3px solid var(--danger);
}

.stakes-success {
    border-left: 3px solid var(--success);
}

.stakes-card h3 {
    color: var(--text-light);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.stakes-card li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.75rem 0;
    font-size: 0.95rem;
}

/* Pricing */
.pricing-section {
    padding: var(--section-padding);
    background: var(--bg-cream);
}

.pricing-grid {
    display: grid;
    gap: 2rem;
    max-width: 900px;
    margin: 3rem auto 0;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.pricing-card {
    /* Extending glass-card logic manually for specificity */
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 3rem 2rem;
    text-align: center;
    box-shadow: var(--shadow-soft);
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.pricing-featured {
    background: linear-gradient(145deg, #2a2a2a 0%, #1a1a1a 100%);
    color: var(--text-light);
    border: 1px solid var(--gold-primary);
    transform: scale(1.05);
    z-index: 2;
}

.pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gold-gradient);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.5em 1.5em;
    border-radius: 50px;
    box-shadow: 0 4px 10px rgba(212, 175, 55, 0.3);
}

.amount {
    font-size: 3.5rem;
    font-weight: 400;
    font-family: var(--font-serif);
}

.pricing-card h3 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.pricing-features li {
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.pricing-featured .pricing-features li {
    border-color: rgba(255, 255, 255, 0.1);
}

/* CTA Buttons */
.cta-button {
    display: inline-block;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: white;
    background: var(--gold-gradient);
    padding: 1.25em 2.5em;
    border-radius: 50px;
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.3);
    transition: all 0.3s var(--ease-out);
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.cta-button::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(255, 255, 255, 0.2), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(212, 175, 55, 0.5);
}

.cta-button:hover::after {
    opacity: 1;
}

.pricing-cta {
    display: block;
    width: 100%;
    padding: 1em;
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-primary);
    border-radius: 8px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: background 0.3s;
}

.cta-featured {
    background: var(--gold-gradient);
    color: white;
}

/* Testimonials */
.testimonials-section {
    padding: var(--section-padding);
    background: linear-gradient(to bottom, var(--bg-cream), var(--bg-gold-light));
}

.testimonials-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    margin-top: 3rem;
}

.testimonial-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(212, 175, 55, 0.1);
}

.testimonial-card p {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-style: italic;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.testimonial-card cite {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gold-dark);
    font-style: normal;
    display: block;
}

/* Footer */
.footer {
    background: var(--bg-dark);
    color: var(--text-muted);
    padding: 4rem 1.5rem;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-quote {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    color: var(--gold-light);
    margin-bottom: 2rem;
    font-style: italic;
}

/* Progress Bar */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: transparent;
    z-index: 9999;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: var(--gold-gradient);
    box-shadow: 0 0 10px var(--gold-primary);
    transition: width 0.1s linear;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (min-width: 768px) {
    :root {
        --plate-size: min(45vw, 60vh, 500px);
    }

    .sticky-scene {
        flex-direction: row;
        gap: 5vw;
        padding-top: 0;
        justify-content: center;
    }

    .plate-container {
        margin-bottom: 0;
    }

    .content-layer {
        max-width: 50vw;
        justify-content: flex-start;
        text-align: left;
    }

    .content-section {
        text-align: left;
        align-items: flex-start;
    }

    .problem-grid,
    .who-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }

    .stakes-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Make the plate sticky relative to content on Desktop */
    .hero-title {
        margin-top: 0;
    }
}

@media (min-width: 1024px) {
    .container {
        padding: 0 2rem;
    }
}