/* ========== VARIABLES ========== */
:root {
    --bg-primary: #F0F4F8;
    --bg-card: #FFFFFF;
    --text-primary: #0a1628;
    --text-secondary: #64748B;
    --accent: #61F393;
    --accent-muted: #E8FFF0;
    --border: #E2E8F0;
    --danger: #EF4444;
    --danger-muted: #FEE2E2;
}

/* ========== NAV MENU ========== */
#nav-menu {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1001;
    display: flex;
    align-items: center;
}

#nav-trigger {
    width: 20px;
    height: 120px;
    background: linear-gradient(90deg, rgba(10, 22, 40, 0.1), transparent);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: width 0.2s;
}

#nav-trigger:hover {
    width: 24px;
    background: linear-gradient(90deg, rgba(10, 22, 40, 0.15), transparent);
}

#nav-trigger::after {
    content: '\203A';
    color: var(--text-secondary);
    font-size: 1.2rem;
    opacity: 0.5;
}

#nav-panel {
    background: var(--text-primary);
    border-radius: 0 16px 16px 0;
    padding: 20px 24px;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    box-shadow: 4px 0 20px rgba(0,0,0,0.15);
    pointer-events: none;
}

#nav-menu:hover #nav-panel {
    transform: translateX(0);
    pointer-events: auto;
}

#nav-menu:hover #nav-trigger::after {
    content: '\2039';
}

#nav-panel h4 {
    color: var(--accent);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 16px;
    opacity: 0.8;
}

#nav-panel a {
    display: block;
    color: white;
    text-decoration: none;
    padding: 10px 0;
    font-size: 0.95rem;
    font-weight: 500;
    opacity: 0.7;
    transition: all 0.2s;
    border-left: 2px solid transparent;
    padding-left: 12px;
    margin-left: -12px;
}

#nav-panel a:hover {
    opacity: 1;
    border-left-color: var(--accent);
    padding-left: 16px;
}

#nav-panel a.active {
    opacity: 1;
    border-left-color: var(--accent);
    color: var(--accent);
}

#nav-panel a.nav-home {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,0.1);
    border-left: none;
    padding-left: 0;
    margin-left: 0;
    font-size: 0.8rem;
    opacity: 0.5;
}

#nav-panel a.nav-home:hover {
    opacity: 0.9;
    border-left: none;
    padding-left: 0;
}

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

body {
    font-family: 'Manrope', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    scroll-snap-type: y mandatory;
    overflow-y: scroll;
    height: 100vh;
}

body::-webkit-scrollbar { display: none; }
body { -ms-overflow-style: none; scrollbar-width: none; }

/* ========== SLIDE LAYOUT ========== */
.slide {
    min-height: 100vh;
    height: 100vh;
    padding: 36px 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

#slide-indicator {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(10, 22, 40, 0.8);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}
#slide-indicator.visible { opacity: 1; }

#nav-hint {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(10, 22, 40, 0.6);
    color: white;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.7rem;
    z-index: 1000;
    opacity: 0.7;
}
#nav-hint kbd {
    background: rgba(255,255,255,0.2);
    padding: 2px 6px;
    border-radius: 4px;
    margin: 0 2px;
}

/* ========== SLIDE DECORATIONS ========== */
.slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 20% 80%, rgba(97, 243, 147, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(10, 22, 40, 0.02) 0%, transparent 50%);
    pointer-events: none;
}

.slide::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    border: 1px solid rgba(97, 243, 147, 0.1);
    border-radius: 50%;
    top: -200px;
    right: -200px;
    pointer-events: none;
}

.slide-grid-bg::before {
    background-image:
        linear-gradient(rgba(10, 22, 40, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(10, 22, 40, 0.02) 1px, transparent 1px),
        radial-gradient(circle at 20% 80%, rgba(97, 243, 147, 0.03) 0%, transparent 50%);
    background-size: 50px 50px, 50px 50px, 100% 100%;
}

.slide-number {
    position: absolute;
    bottom: 30px;
    right: 40px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    opacity: 0.5;
}

.accent-shape {
    position: absolute;
    width: 120px;
    height: 120px;
    opacity: 0.05;
    pointer-events: none;
}

.accent-shape-1 { top: 10%; left: 5%; transform: rotate(15deg); }
.accent-shape-2 { bottom: 15%; right: 8%; transform: rotate(-20deg); }

.accent-line {
    position: absolute;
    width: 200px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), transparent);
    border-radius: 2px;
}

.accent-line-top { top: 64px; left: 64px; }
.accent-line-bottom { bottom: 64px; right: 64px; transform: rotate(180deg); }

/* ========== TYPOGRAPHY ========== */
h1 { font-size: 4.5rem; font-weight: 800; line-height: 1.1; margin-bottom: 24px; }
h2 { font-size: 3.4rem; font-weight: 700; line-height: 1.2; margin-bottom: 20px; }
h3 { font-size: 2.2rem; font-weight: 700; margin-bottom: 16px; }

.subtitle { font-size: 1.5rem; color: var(--text-secondary); font-weight: 500; }
.accent { color: var(--accent); }
.danger { color: var(--danger); }

/* ========== COMPONENTS ========== */
.badge {
    display: inline-block;
    background: var(--accent-muted);
    color: var(--text-primary);
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid var(--accent);
    position: relative;
    overflow: hidden;
}

.badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: badge-shine 3s infinite;
}

.badge-danger {
    background: var(--danger-muted);
    border-color: var(--danger);
}

/* Title slide */
.slide-title {
    align-items: center;
    text-align: center;
}

.slide-title .logo { margin-bottom: 60px; }
.slide-title .logo svg { height: 60px; }

.slide-title::after {
    width: 600px;
    height: 600px;
    top: -300px;
    right: -300px;
    border-width: 2px;
}

.slide-title h1 {
    position: relative;
}

.slide-title h1::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    border-radius: 2px;
}

/* Quote slides */
.slide-quote {
    align-items: center;
    text-align: center;
}

.slide-quote::before {
    background-image:
        radial-gradient(circle at 50% 50%, rgba(97, 243, 147, 0.04) 0%, transparent 70%);
}

.quote {
    font-size: 2.8rem;
    font-weight: 600;
    line-height: 1.3;
    max-width: 1200px;
    margin-bottom: 30px;
    position: relative;
}

.quote::before {
    content: '\201C';
    position: absolute;
    top: -40px;
    left: -40px;
    font-size: 8rem;
    color: var(--accent);
    opacity: 0.1;
    font-family: Georgia, serif;
    line-height: 1;
}

/* Two column */
.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

/* Cards */
.card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 40px;
    border: 1px solid var(--border);
    box-shadow:
        0 4px 20px rgba(10, 22, 40, 0.04),
        0 1px 3px rgba(10, 22, 40, 0.02);
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(97, 243, 147, 0.3), transparent);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow:
        0 8px 30px rgba(10, 22, 40, 0.08),
        0 2px 6px rgba(10, 22, 40, 0.04);
}

.card:hover::before {
    opacity: 1;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.card-decorated::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, transparent 50%, rgba(97, 243, 147, 0.05) 50%);
    border-radius: 0 0 16px 0;
}

/* Profile card */
.profile-card {
    background: var(--bg-card);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(10, 22, 40, 0.1);
    max-width: 400px;
    position: relative;
}

.profile-card::after {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, var(--accent), transparent, transparent, var(--border));
    border-radius: 22px;
    z-index: -1;
    opacity: 0.5;
}

.profile-header {
    background: linear-gradient(135deg, #0a66c2, #004182);
    height: 80px;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid white;
    margin: -60px auto 16px;
    display: block;
    object-fit: cover;
    background: #ddd;
}

.profile-body {
    padding: 0 30px 30px;
    text-align: center;
}

.profile-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.profile-title {
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.profile-company {
    font-weight: 600;
    color: var(--text-primary);
}

/* Check list */
.check-list {
    list-style: none;
}

.check-list li {
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1rem;
}

.check-list li:last-child {
    border-bottom: none;
}

.check-pass {
    color: var(--accent);
    font-weight: 700;
}

/* Big reveal text */
.reveal-text {
    font-size: 2.4rem;
    font-weight: 600;
    line-height: 1.4;
    max-width: 1100px;
}

/* Demo embed */
.demo-frame {
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(10, 22, 40, 0.08);
    position: relative;
}

.demo-frame::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 20px;
    right: 20px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    border-radius: 2px;
    opacity: 0.5;
}

.demo-frame img {
    width: 100%;
    display: block;
}

/* Emphasis box */
.emphasis-box {
    background: var(--text-primary);
    color: white;
    padding: 60px;
    border-radius: 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.emphasis-box::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(97, 243, 147, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.emphasis-box h2 {
    color: white;
    margin-bottom: 16px;
}

.emphasis-box .accent {
    color: var(--accent);
}

/* Divider */
.slide + .slide {
    border-top: 1px solid var(--border);
}

/* Stat numbers with glow */
.stat-glow {
    text-shadow: 0 0 60px rgba(97, 243, 147, 0.2);
}

/* Dark slide enhancements */
.slide[style*="background: var(--text-primary)"]::after {
    border-color: rgba(97, 243, 147, 0.2);
}

.slide[style*="background: var(--text-primary)"]::before {
    background-image:
        radial-gradient(circle at 30% 70%, rgba(97, 243, 147, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 70% 30%, rgba(97, 243, 147, 0.05) 0%, transparent 50%);
}

/* === Utility & Component Classes === */

/* Layout utilities */
.flex-center { display: flex; align-items: center; }
.flex-center-gap { display: flex; align-items: center; gap: 12px; }
.flex-col-center { display: flex; flex-direction: column; align-items: center; }
.text-center { text-align: center; }

/* Pill badges */
.badge-muted {
    background: var(--border);
    color: var(--text-secondary);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}
.badge-success {
    background: var(--accent);
    color: var(--text-primary);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Stat cards */
.stat-card {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 16px;
    padding: 25px 35px;
    text-align: center;
}

/* Divider lines */
.divider { width: 30px; height: 2px; background: var(--border); }
.divider-accent { width: 30px; height: 2px; background: var(--accent); }

/* Small tag/chip */
.tag {
    font-size: 0.75rem;
    color: var(--text-secondary);
    background: var(--bg-surface);
    padding: 4px 10px;
    border-radius: 4px;
}

/* Stat label */
.stat-label { font-size: 0.8rem; color: var(--text-secondary); }

/* Text utilities */
.text-secondary { color: var(--text-secondary); }
.text-secondary-sm { font-size: 0.85rem; color: var(--text-secondary); }
.text-danger { color: var(--danger); }

/* === Bottom Toolbar === */
#bottom-toolbar {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    background: rgba(15, 23, 42, 0.95);
    padding: 6px 10px;
    border-radius: 14px;
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 24px rgba(0,0,0,0.25);
    border: 1px solid rgba(255,255,255,0.08);
    opacity: 1;
    transition: opacity 0.3s ease;
}
#bottom-toolbar.toolbar-hidden {
    opacity: 0;
    pointer-events: none;
}
/* Button ordering inside toolbar */
#bottom-toolbar #start-presentation-btn { order: 1; }
#bottom-toolbar #pdf-download-btn { order: 2; }
#bottom-toolbar #narration-toggle { order: 3; }
#bottom-toolbar #dev-mode-toggle { order: 4; }
/* Shared styles for toolbar children */
#bottom-toolbar > button {
    box-shadow: none !important;
    backdrop-filter: none !important;
    border: none !important;
}
/* Dev mode toggle — override inline styles for toolbar context */
#bottom-toolbar #dev-mode-toggle {
    width: 36px !important;
    height: 36px !important;
    border-radius: 8px !important;
    background: transparent !important;
    font-size: 1.2rem !important;
}
#bottom-toolbar #dev-mode-toggle:hover {
    background: rgba(255,255,255,0.1) !important;
}

/* === Version Badge === */
.version-badge {
    position: fixed;
    bottom: 10px;
    right: 14px;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.6rem;
    font-weight: 500;
    letter-spacing: 0.3px;
    font-family: 'Courier New', monospace;
    color: var(--text-secondary);
    opacity: 0.35;
    transition: opacity 0.3s ease;
    z-index: 999;
    cursor: default;
    user-select: all;
}

.version-badge:hover {
    opacity: 0.85;
}

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

/* Tablet and below */
@media (max-width: 1024px) {
    .slide {
        padding: 50px 60px;
    }
    
    h1 { font-size: 3rem; }
    h2 { font-size: 2.4rem; }
    h3 { font-size: 1.6rem; }
    
    .subtitle { font-size: 1.2rem; }
    .quote { font-size: 2.2rem; }
    
    .two-col {
        gap: 40px;
    }
    
    .card {
        padding: 30px;
    }
    
    .card-grid {
        gap: 20px;
    }
    
    .emphasis-box {
        padding: 40px;
    }
    
    .accent-line-top { left: 60px; }
    .accent-line-bottom { right: 60px; }
}

/* Mobile landscape and small tablets */
@media (max-width: 768px) {
    .slide {
        padding: 40px 30px;
        min-height: 100vh;
        height: auto;
    }
    
    h1 { font-size: 2.2rem; margin-bottom: 16px; }
    h2 { font-size: 1.8rem; margin-bottom: 14px; }
    h3 { font-size: 1.3rem; margin-bottom: 12px; }
    
    .subtitle { font-size: 1rem; }
    .quote { font-size: 1.6rem; }
    .quote::before { font-size: 5rem; top: -30px; left: -20px; }
    
    .reveal-text { font-size: 1.6rem; }
    
    /* Stack two columns */
    .two-col {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .card-grid {
        grid-template-columns: 1fr;
    }
    
    .card {
        padding: 24px;
    }
    
    .badge {
        padding: 6px 14px;
        font-size: 0.8rem;
    }
    
    .emphasis-box {
        padding: 30px 24px;
    }
    
    .emphasis-box h2 {
        font-size: 1.6rem;
    }
    
    .demo-frame {
        border-radius: 8px;
    }
    
    .profile-card {
        max-width: 100%;
    }
    
    .profile-avatar {
        width: 100px;
        height: 100px;
        margin-top: -50px;
    }
    
    .check-list li {
        font-size: 1rem;
        padding: 12px 0;
    }
    
    .stat-card {
        padding: 20px 24px;
    }
    
    /* Accent decorations */
    .accent-shape { width: 80px; height: 80px; }
    .accent-line { width: 120px; }
    .accent-line-top { top: 50px; left: 30px; }
    .accent-line-bottom { bottom: 50px; right: 30px; }
    
    .slide::after {
        width: 250px;
        height: 250px;
        top: -125px;
        right: -125px;
    }
    
    .slide-title h1::after {
        width: 60px;
        height: 3px;
        bottom: -14px;
    }
    
    .slide-number {
        bottom: 20px;
        right: 30px;
        font-size: 0.75rem;
    }
    
    /* Nav menu - hide on mobile or make it a hamburger-style */
    #nav-menu {
        display: none;
    }
    
    /* Bottom toolbar adjustments */
    #bottom-toolbar {
        bottom: 15px;
        right: 15px;
        padding: 5px 8px;
        border-radius: 12px;
    }
    
    #bottom-toolbar > button {
        transform: scale(0.9);
    }
    
    /* Dividers in funnel progress */
    .divider, .divider-accent {
        width: 15px;
    }
    
    .badge-muted, .badge-success {
        padding: 4px 10px;
        font-size: 0.65rem;
    }
    
    /* Stat values */
    .stat-glow {
        font-size: 2.5rem !important;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .slide {
        padding: 30px 20px;
    }
    
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.2rem; }
    
    .subtitle { font-size: 0.9rem; }
    .quote { font-size: 1.3rem; max-width: 100%; }
    .quote::before { font-size: 4rem; top: -20px; left: -10px; }
    
    .reveal-text { font-size: 1.3rem; }
    
    .card {
        padding: 20px;
        border-radius: 12px;
    }
    
    .badge {
        padding: 5px 12px;
        font-size: 0.75rem;
    }
    
    .emphasis-box {
        padding: 24px 20px;
        border-radius: 14px;
    }
    
    .profile-body {
        padding: 0 20px 24px;
    }
    
    .profile-name {
        font-size: 1.3rem;
    }
    
    .accent-shape { display: none; }
    .accent-line { display: none; }
    
    .slide::after { display: none; }
    .slide::before { opacity: 0.5; }
    
    /* Funnel badges - stack or hide on very small screens */
    .badge-muted, .badge-success {
        padding: 3px 8px;
        font-size: 0.55rem;
    }
    
    .divider, .divider-accent {
        width: 8px;
    }
    
    .stat-card {
        padding: 16px 20px;
    }
    
    .check-list li {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}

/* Height-based adjustments for landscape mobile */
@media (max-height: 600px) and (max-width: 900px) {
    .slide {
        padding-top: 30px;
        padding-bottom: 30px;
    }
    
    h1 { font-size: 2rem; margin-bottom: 12px; }
    h2 { font-size: 1.6rem; }
    
    .card { padding: 20px; }
    .emphasis-box { padding: 24px; }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Larger tap targets */
    .badge, .badge-muted, .badge-success {
        min-height: 36px;
        display: inline-flex;
        align-items: center;
    }
    
    #nav-panel a {
        padding: 14px 0;
        min-height: 48px;
    }
    
    /* Remove hover effects that don't make sense on touch */
    .card:hover {
        transform: none;
    }

    .card:active {
        transform: scale(0.98);
    }
}

/* ========== PRINT / PDF EXPORT ========== */
@media print {
    /* Force ALL elements visible — animations leave things at opacity:0 */
    * {
        animation: none !important;
        transition: none !important;
    }
    .anim, .anim *, [class*="d1"], [class*="d2"], [class*="d3"],
    [class*="d4"], [class*="d5"], [class*="d6"], [class*="d7"] {
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
    }

    /* Proper page layout */
    body {
        scroll-snap-type: none !important;
        overflow: visible !important;
        height: auto !important;
    }

    .slide {
        page-break-after: always;
        page-break-inside: avoid;
        break-after: page;
        break-inside: avoid;
        min-height: 100vh;
        height: 100vh;
        overflow: hidden;
    }
    .slide:last-of-type {
        page-break-after: auto;
        break-after: auto;
    }

    /* Hide all UI chrome */
    #slide-indicator, #nav-hint, #bottom-toolbar,
    .version-badge, [data-pdf-hide], #nav-menu {
        display: none !important;
    }

    /* Remove decorative pseudo-elements */
    .slide::after {
        display: none !important;
    }
}

