/* --- 1. DESIGN TOKENS & VARIABLES --- */
:root {
    /* Primitives */
    --c-cream-50: #FFFBF7;
    --c-cream-100: #FFEFDE;
    --c-slate-800: #2F3B4C;
    --c-slate-900: #1A202C;
    --c-charcoal: #3E3E3E;
    --c-orange-sunrise: #FFB347;
    --c-orange-burnt: #C05621;
    
    /* Semantic */
    --bg-main: var(--c-cream-100);
    --text-primary: var(--c-charcoal);
    --text-on-dark: #F9F4EF;
    --glass-bg: rgba(255, 255, 255, 0.45);
    --glass-border: 1px solid rgba(255, 255, 255, 0.6);
    --glass-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.05);

    /* Typography */
    --font-serif: 'Playfair Display', serif;
    --font-sans: 'Montserrat', sans-serif;

    /* Mobile rhythm */
    --mobile-gutter: 1.25rem;
    --mobile-vertical: 5.5rem;
    --mobile-controls-offset: 6.5rem;
}

/* --- 2. GLOBAL RESET & BASE --- */
* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden; /* prevent horizontal drift */
    position: relative;
    touch-action: pan-y;
}

body {
    display: none; /* Hidden by default for UUID check */
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-sans);
    overflow: hidden; /* Hide scrollbars for presentation mode */
    line-height: 1.6;
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
    overscroll-behavior-x: none;
}

/* Animated Background Orbs */
.ambient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.6;
    animation: float 20s infinite ease-in-out;
}
.orb-1 { width: 600px; height: 600px; background: var(--c-orange-sunrise); top: -10%; right: -10%; animation-delay: 0s; }
.orb-2 { width: 500px; height: 500px; background: #DCD0FF; bottom: -10%; left: -10%; animation-delay: -5s; }

@keyframes float {
    0% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(30px, 50px) rotate(10deg); }
    100% { transform: translate(0, 0) rotate(0deg); }
}

/* --- 3. SLIDES ARCHITECTURE --- */
.slides-container {
    height: 100vh;
    width: 100%; /* avoid scrollbar-inclusive width */
    max-width: 100vw;
    position: relative;
    overflow-x: hidden;
    touch-action: pan-y;
}

.slide {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    max-width: 100vw;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 4rem 6rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transform: scale(0.98);
    touch-action: pan-y;
}

.slide.active {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
    z-index: 10;
}

/* --- 4. UI COMPONENTS (Glassmorphism) --- */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: var(--glass-border);
    border-radius: 24px;
    box-shadow: var(--glass-shadow);
    padding: 2rem;
}

/* --- 5. TYPOGRAPHY --- */
h1, h2, h3, h4 { font-family: var(--font-serif); color: var(--c-slate-800); }

h1 { font-size: 4rem; line-height: 1.1; margin-bottom: 1rem; }
h2 { font-size: 2.5rem; margin-bottom: 2rem; position: relative; display: inline-block; }
h2::after {
    content: ''; position: absolute; bottom: -10px; left: 0;
    width: 60px; height: 3px; background: var(--c-orange-burnt);
}
h3 { font-size: 1.5rem; margin-bottom: 1rem; }
p { font-size: 1rem; color: var(--c-charcoal); margin-bottom: 1rem; }

.accent-text { color: var(--c-orange-burnt); font-style: italic; }
.text-muted { opacity: 0.7; font-size: 0.9rem; }

/* --- 6. LAYOUT UTILITIES --- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; height: 100%; align-items: center; }
.col-flex { display: flex; flex-direction: column; gap: 1.5rem; }

/* --- 7. NAVIGATION CONTROLS --- */
.controls {
    position: fixed;
    bottom: 2rem;
    right: 3rem;
    display: flex;
    gap: 1rem;
    z-index: 100;
    background: rgba(255,255,255,0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 0.35rem 0.5rem;
    border-radius: 999px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    border: 1px solid rgba(0,0,0,0.04);
}
.control-btn {
    width: 50px; height: 50px;
    border-radius: 50%;
    background: rgba(255,255,255,0.6);
    border: 1px solid rgba(0,0,0,0.05);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s;
    color: var(--c-slate-800);
}
.control-btn:hover { background: rgba(255,255,255,0.95); }

.page-number {
    position: fixed;
    bottom: 2.5rem;
    left: 3rem;
    font-family: var(--font-serif);
    font-size: 1.2rem;
    opacity: 0.5;
}

/* --- 8. SPECIFIC SLIDE STYLES --- */

/* Slide 1: Cover */
.cover-content { text-align: left; max-width: 800px; }
.logo-area { font-family: var(--font-serif); font-size: 1.5rem; margin-bottom: 4rem; letter-spacing: 0.05em;}

/* Slide 2: Executive Summary */
.outcome-badges { display: flex; gap: 1rem; margin-top: 1rem; }
.badge { 
    padding: 0.5rem 1.5rem; 
    background: rgba(255,255,255,0.5); 
    border-radius: 99px; 
    font-size: 0.9rem; 
    font-weight: 600;
    border: 1px solid white;
    color: var(--c-slate-800);
}

/* Slide 4: Roadmap */
.roadmap-container { display: flex; justify-content: space-between; position: relative; margin-top: 3rem; }
.roadmap-line { position: absolute; top: 20px; left: 0; width: 100%; height: 2px; background: #ddd; z-index: -1; }
.phase { width: 19%; position: relative; }
.phase-dot { width: 40px; height: 40px; background: var(--c-slate-800); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-bottom: 1rem; font-weight: bold; border: 4px solid var(--c-cream-100); }
.phase h4 { font-family: var(--font-serif); margin-bottom: 0.5rem; color: var(--c-orange-burnt); font-size: 1.1rem;}
.phase ul { list-style: none; font-size: 0.85rem; }
.phase ul li { margin-bottom: 6px; padding-left: 10px; border-left: 2px solid rgba(0,0,0,0.1); line-height: 1.3; }

/* Slide 5: Table */
.pricing-table { width: 100%; border-collapse: collapse; margin-top: 1rem; }
.pricing-table th { text-align: left; padding: 1rem; border-bottom: 2px solid var(--c-slate-800); font-family: var(--font-serif); }
.pricing-table td { padding: 1rem; border-bottom: 1px solid rgba(0,0,0,0.1); }
.pricing-table tr:last-child td { border-bottom: none; font-weight: bold; font-size: 1.2rem; color: var(--c-orange-burnt); padding-top: 2rem;}
/* Slide 5: Value Stack */
.value-list { list-style: none; margin-top: 1rem; }
.value-list li { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 1.2rem; font-size: 1.1rem; }
.check-icon { color: var(--c-orange-burnt); background: rgba(192, 86, 33, 0.1); padding: 4px; border-radius: 50%; flex-shrink: 0; }
.price-display { text-align: center; padding: 3rem 1.5rem; border: 1px solid rgba(255,255,255,0.8); }
.price-tag { font-family: var(--font-serif); font-size: 4rem; color: var(--c-slate-800); line-height: 1; margin: 1.5rem 0; }
.price-display button { width: 100%; padding: 16px; border-radius: 12px; border: 1px solid rgba(0,0,0,0.08); background: var(--c-slate-800); color: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }

/* --- PRINT STYLES (PDF EXPORT) --- */
@media print {
    body { background-color: var(--c-cream-50); -webkit-print-color-adjust: exact; overflow: visible; }
    .controls, .ambient-orb { display: none; }
    .slides-container { height: auto; display: block; }
    .slide {
        position: relative;
        opacity: 1;
        visibility: visible;
        transform: none;
        height: 100vh;
        page-break-after: always;
        break-after: page;
        padding: 4rem;
    }
    .glass-card {
        background: rgba(255, 255, 255, 0.8);
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* --- 9. MOBILE OPTIMIZATION --- */
@media (max-width: 768px) {
    /* Viewport + scrolling */
    body { overflow: auto; overscroll-behavior-y: none; }
    .slides-container { min-height: 100dvh; width: 100%; }
    .slide {
        min-height: 100dvh;
        width: 100%;
        max-width: 100%;
        padding: calc(var(--mobile-vertical) + env(safe-area-inset-top)) var(--mobile-gutter) calc(var(--mobile-vertical) + env(safe-area-inset-bottom) + var(--mobile-controls-offset)) var(--mobile-gutter); /* breathing room + safe-area + controls */
        overflow-y: auto;
        overflow-x: hidden;
        display: block; /* unset flex centering */
        left: 0;
        right: 0;
        margin: 0 auto;
    }
    .slide::-webkit-scrollbar { display: none; }
    .slide { -ms-overflow-style: none; scrollbar-width: none; }

    /* Logo and page number positions */
    .logo-area {
        position: absolute;
        top: calc(2rem + env(safe-area-inset-top));
        left: calc(var(--mobile-gutter) + env(safe-area-inset-left));
        margin: 0;
    }
    .page-number {
        top: calc(2rem + env(safe-area-inset-top));
        right: calc(var(--mobile-gutter) + env(safe-area-inset-right));
        left: auto;
        bottom: auto;
        font-size: 1rem;
    }

    /* Typography scaling */
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    p { font-size: 0.95rem; }

    /* Grids & columns */
    .grid-2 { grid-template-columns: 1fr; gap: 1.5rem; height: auto; }
    .col-flex { gap: 1rem; }

    /* Roadmap vertical */
    .roadmap-container { display: flex; flex-direction: column; align-items: flex-start; gap: 1.5rem; }
    .roadmap-line { position: absolute; top: 0; left: 20px; width: 2px; height: 100%; background: #ddd; z-index: -1; }
    .phase { width: 100%; display: flex; align-items: flex-start; gap: 1rem; }
    .phase-dot { margin: 0; min-width: 36px; min-height: 36px; width: 36px; height: 36px; font-size: 0.9rem; }
    .phase h4 { margin-top: 4px; }
    .phase ul { margin-left: 0; }

    /* Controls as bottom bar */
    .controls {
        left: 0; right: 0;
        bottom: env(safe-area-inset-bottom);
        width: 100%;
        padding: 0.75rem calc(var(--mobile-gutter) + env(safe-area-inset-left)) calc(0.75rem + env(safe-area-inset-bottom)) calc(var(--mobile-gutter) + env(safe-area-inset-right));
        background: rgba(255,255,255,0.8);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        justify-content: center;
        gap: 1rem;
        border-top: 1px solid rgba(0,0,0,0.05);
        border-radius: 16px 16px 0 0;
        box-sizing: border-box;
    }
    .control-btn { width: 56px; height: 56px; }

    /* Ambient performance tweaks */
    .ambient-orb { opacity: 0.4; filter: blur(60px); }

    /* Dosha grid stacking */
    .dosha-grid { flex-wrap: wrap; gap: 0.75rem !important; }
    .dosha-grid .dosha-box { flex: 1 1 100%; margin-bottom: 0.5rem; }
    /* Slide 5 Price Stack tweaks */
    .price-tag { font-size: 3.5rem; }
    .value-list li { font-size: 1rem; }

    /* Pricing table as cards */
    .pricing-table, .pricing-table tbody, .pricing-table tr, .pricing-table td { display: block; width: 100%; }
    .pricing-table thead { display: none; }
    .pricing-table tr { margin-bottom: 1.5rem; border-bottom: 1px solid rgba(0,0,0,0.1); padding-bottom: 1rem; }
    .pricing-table td { padding: 0.25rem 0; border: none; text-align: left; }
    .pricing-table td:last-child { font-weight: bold; color: var(--c-slate-800); margin-top: 0.5rem; }
}
