@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
    --bg-primary: #080C14;
    --bg-secondary: #0F1626;
    --card-bg: rgba(15, 22, 38, 0.7);
    --border-color: rgba(255, 255, 255, 0.08);
    
    --text-primary: #F3F4F6;
    --text-secondary: #9CA3AF;
    --text-muted: #6B7280;
    
    /* Brand Colors / Premium Gradients */
    --accent-blue: #00D2FF;
    --accent-indigo: #4F46E5;
    --accent-violet: #8B5CF6;
    --accent-emerald: #10B981;
    --accent-rose: #F43F5E;
    
    --grad-primary: linear-gradient(135deg, #00D2FF 0%, #4F46E5 100%);
    --grad-accent: linear-gradient(135deg, #8B5CF6 0%, #EC4899 100%);
    --grad-emerald: linear-gradient(135deg, #34D399 0%, #059669 100%);
    --grad-dark: linear-gradient(180deg, #0C111D 0%, #080C14 100%);
    
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: all 0.2s ease;
}

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

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-primary);
    background-image: 
        radial-gradient(at 0% 0%, rgba(79, 70, 229, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(0, 210, 255, 0.1) 0px, transparent 50%),
        radial-gradient(at 50% 50%, rgba(139, 92, 246, 0.05) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-primary);
    min-height: 100vh;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

/* Base Presentation Layout */
.presentation-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    height: 100dvh; /* handles mobile browser chrome correctly */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Header & Brand */
header {
    padding: 24px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
    border-bottom: 1px solid var(--border-color);
    background: rgba(8, 12, 20, 0.6);
    backdrop-filter: blur(12px);
}

.brand-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo {
    font-family: 'Outfit', sans-serif;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 0.1em;
    background: var(--grad-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
}

.brand-badge {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    color: var(--accent-blue);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.slide-counter {
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.03);
    padding: 6px 16px;
    border-radius: 30px;
    border: 1px solid var(--border-color);
}

/* Slides Workspace */
.slides-wrapper {
    position: relative;
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 40px;
}

.slide {
    position: absolute;
    width: 100%;
    max-width: 1280px;
    height: 100%;
    max-height: 700px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(30px) scale(0.98);
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    justify-content: center;
    z-index: 1;
}

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

/* Slide Content Typology */
.slide-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 40px;
    align-items: center;
    height: 100%;
}

.slide-grid.equal {
    grid-template-columns: 1fr 1fr;
}

.slide-full {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.slide-title-area {
    margin-bottom: 24px;
}

.slide-subtitle {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--accent-blue);
    letter-spacing: 0.1em;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.slide-subtitle::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--accent-blue);
    border-radius: 50%;
}

.slide-title {
    font-size: 40px;
    font-weight: 800;
    color: var(--text-primary);
}

.slide-title span {
    background: var(--grad-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.slide-desc {
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-top: 10px;
    max-width: 800px;
}

/* Decorative Glass Cards */
.glass-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 30px;
    backdrop-filter: blur(16px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    transition: var(--transition-smooth);
}

.glass-card:hover {
    border-color: rgba(0, 210, 255, 0.2);
    box-shadow: 0 24px 50px rgba(0, 210, 255, 0.05);
    transform: translateY(-4px);
}

/* Lists and Highlights */
.bullet-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.bullet-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    font-size: 15px;
    line-height: 1.5;
    color: var(--text-primary);
}

.bullet-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(0, 210, 255, 0.1);
    color: var(--accent-blue);
    font-weight: bold;
    font-size: 14px;
    flex-shrink: 0;
    border: 1px solid rgba(0, 210, 255, 0.2);
}

.bullet-content strong {
    color: #FFF;
    display: block;
    font-size: 16px;
    margin-bottom: 2px;
}

.bullet-content span {
    color: var(--text-secondary);
}

/* Slide specific visuals */

/* Slide 1: Cover */
.cover-content {
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.cover-badge {
    background: rgba(0, 210, 255, 0.1);
    border: 1px solid rgba(0, 210, 255, 0.2);
    color: var(--accent-blue);
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.cover-title {
    font-size: 60px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.cover-title span {
    background: var(--grad-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.cover-meta {
    margin-top: 40px;
    display: flex;
    gap: 40px;
    border-top: 1px solid var(--border-color);
    padding-top: 30px;
    width: 100%;
    justify-content: center;
}

.meta-item {
    text-align: left;
}

.meta-label {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.1em;
}

.meta-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 4px;
}

/* Grid layout for cards */
.cards-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 20px;
}

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

.mini-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    transition: var(--transition-smooth);
}

.mini-card:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.card-icon-wrapper {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.icon-blue {
    background: rgba(0, 210, 255, 0.1);
    color: var(--accent-blue);
    border: 1px solid rgba(0, 210, 255, 0.2);
}

.icon-purple {
    background: rgba(139, 92, 246, 0.1);
    color: var(--accent-violet);
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.icon-emerald {
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-emerald);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.icon-rose {
    background: rgba(244, 63, 94, 0.1);
    color: var(--accent-rose);
    border: 1px solid rgba(244, 63, 94, 0.2);
}

.mini-card h3 {
    font-size: 18px;
    margin-bottom: 8px;
    color: #FFF;
}

.mini-card p {
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-secondary);
}

/* Triage Interactive Diagram (Slide 4) */
.triage-container {
    background: rgba(8, 12, 20, 0.5);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 24px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 16px;
    position: relative;
    overflow: hidden;
}

.triage-title {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--accent-blue);
    letter-spacing: 0.05em;
    margin-bottom: 10px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.triage-flow {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
    position: relative;
}

.triage-node {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px 20px;
    width: 90%;
    text-align: center;
    font-size: 13px;
    font-weight: 500;
    transition: var(--transition-smooth);
    position: relative;
}

.triage-node.active {
    background: rgba(0, 210, 255, 0.08);
    border-color: var(--accent-blue);
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.2);
}

.triage-node.success {
    background: rgba(16, 185, 129, 0.08);
    border-color: var(--accent-emerald);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.2);
}

.triage-node.warning {
    background: rgba(79, 70, 229, 0.1);
    border-color: var(--accent-indigo);
    box-shadow: 0 0 15px rgba(79, 70, 229, 0.2);
}

.triage-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    width: 100%;
}

.triage-split .triage-node {
    width: 100%;
}

.flow-arrow {
    width: 2px;
    height: 16px;
    background: var(--text-muted);
    position: relative;
}

.flow-arrow::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid var(--text-muted);
}

.triage-node.active + .flow-arrow {
    background: var(--accent-blue);
}

.triage-node.active + .flow-arrow::after {
    border-top-color: var(--accent-blue);
}

/* Camera Dashboard Visualization (Slide 5) */
.camera-vis-card {
    background: rgba(8, 12, 20, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 24px;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.vis-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
}

.vis-title {
    font-size: 15px;
    font-weight: 700;
    color: #FFF;
    display: flex;
    align-items: center;
    gap: 8px;
}

.live-indicator {
    width: 8px;
    height: 8px;
    background: var(--accent-rose);
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

.metric-bar-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.metric-bar-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.metric-bar-label {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-secondary);
}

.metric-bar-label span:last-child {
    font-weight: 600;
    color: #FFF;
}

.metric-bar-bg {
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
}

.metric-bar-fill {
    height: 100%;
    background: var(--grad-primary);
    border-radius: 4px;
    transition: width 1s ease-out;
}

.metric-bar-fill.purple {
    background: var(--accent-violet);
}

.metric-bar-fill.emerald {
    background: var(--accent-emerald);
}

.metric-bar-fill.rose {
    background: var(--accent-rose);
}

.vis-kpi-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 10px;
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
}

.vis-kpi-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    padding: 12px;
    border-radius: 12px;
    text-align: center;
}

.vis-kpi-val {
    font-size: 18px;
    font-weight: 700;
    color: var(--accent-blue);
    font-family: 'Outfit', sans-serif;
}

.vis-kpi-val.emerald {
    color: var(--accent-emerald);
}

.vis-kpi-lbl {
    font-size: 10px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Interactive Navigation controls */
footer {
    padding: 24px 40px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(8, 12, 20, 0.8);
    backdrop-filter: blur(12px);
    z-index: 10;
}

.nav-buttons {
    display: flex;
    gap: 12px;
}

.btn-nav {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-fast);
    outline: none;
}

.btn-nav:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.btn-nav:active:not(:disabled) {
    transform: translateY(0);
}

.btn-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.btn-nav-primary {
    background: var(--grad-primary);
    border: none;
    color: #FFF;
    box-shadow: 0 4px 14px rgba(0, 210, 255, 0.3);
}

.btn-nav-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #00E1FF 0%, #5F56F5 100%);
    box-shadow: 0 6px 20px rgba(0, 210, 255, 0.4);
}

/* Dots indicator */
.nav-dots {
    display: flex;
    gap: 8px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    cursor: pointer;
    transition: var(--transition-fast);
}

.dot:hover {
    background: rgba(255, 255, 255, 0.3);
}

.dot.active {
    background: var(--accent-blue);
    width: 28px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 210, 255, 0.4);
}

/* Keyboard Shortcut Tip Overlay */
.keyboard-tip {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.kbd {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    padding: 2px 6px;
    font-family: monospace;
    color: var(--text-secondary);
}

/* Concept links bar (shown at bottom of slides) */
.concept-links-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border-color);
}

.concept-link-label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
    white-space: nowrap;
}

.concept-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    padding: 4px 12px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.02);
    transition: var(--transition-fast);
    white-space: nowrap;
}

.concept-link-btn:hover {
    color: var(--accent-blue);
    border-color: rgba(0, 210, 255, 0.35);
    background: rgba(0, 210, 255, 0.06);
    transform: translateY(-1px);
}

/* Keyframes */
@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(244, 63, 94, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(244, 63, 94, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(244, 63, 94, 0);
    }
}

/* ── Desktop compact (short screens) ── */
@media (max-height: 800px) and (min-width: 769px) {
    header, footer { padding: 16px 30px; }
    .slide-title { font-size: 32px; }
    .slide-subtitle { font-size: 12px; margin-bottom: 4px; }
    .slide { max-height: 520px; }
    .glass-card { padding: 20px; }
    .mini-card { padding: 16px; }
    .cover-title { font-size: 46px; }
    .triage-node { padding: 8px 12px; font-size: 11px; }
}

/* ── Mobile ── */
@media (max-width: 768px) {

    /* svh = small viewport height: siempre el área visible real, nunca tapa la barra nativa */
    .presentation-container {
        height: 100vh;   /* fallback para browsers viejos */
        height: 100svh;  /* garantiza que el footer queda dentro del área visible */
    }

    /* ── Header ── */
    header {
        padding: 12px 16px;
    }
    .brand-badge { display: none; }
    .brand-logo { font-size: 17px; letter-spacing: 0.06em; }
    .slide-counter { font-size: 12px; padding: 4px 10px; }

    /* ── Slides workspace ── */
    .slides-wrapper {
        padding: 14px 16px;
        align-items: flex-start;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* ── Slide system: swap absolute/opacity animation for display none/flex ── */
    .slide {
        position: relative;
        display: none;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        transition: none;
        width: 100%;
        max-width: 100%;
        height: auto;
        max-height: none;
        justify-content: flex-start;
    }
    .slide.active {
        display: flex;
        z-index: auto;
    }

    /* ── Grids → single column ── */
    .slide-grid,
    .slide-grid.equal {
        grid-template-columns: 1fr;
        gap: 14px;
        height: auto;
    }
    .cards-grid-3 { grid-template-columns: 1fr; gap: 10px; }
    .cards-grid-2 { grid-template-columns: 1fr; gap: 12px; }

    /* 4-col stats (slide 2) → 2×2 */
    .stats-grid-4 {
        grid-template-columns: 1fr 1fr !important;
        gap: 10px !important;
        margin-bottom: 14px !important;
    }

    /* ── Typography ── */
    .cover-title { font-size: 28px; letter-spacing: -0.02em; }
    .slide-title { font-size: 22px; }
    .slide-subtitle { font-size: 11px; margin-bottom: 6px; }
    .slide-desc { font-size: 13px; line-height: 1.55; }
    .slide-title-area { margin-bottom: 12px; }

    /* ── Cover ── */
    .cover-content { gap: 12px; }
    .cover-badge { font-size: 10px; padding: 5px 12px; }
    .cover-meta {
        flex-direction: column;
        gap: 12px;
        padding-top: 16px;
        margin-top: 10px;
    }
    .meta-label { font-size: 10px; }
    .meta-value { font-size: 13px; }

    /* ── Cards ── */
    .glass-card { padding: 16px; border-radius: 14px; }
    .mini-card { padding: 14px; }
    .card-icon-wrapper { width: 36px; height: 36px; border-radius: 10px; margin-bottom: 10px; }

    /* ── Bullet lists ── */
    .bullet-list { gap: 10px; }
    .bullet-item { font-size: 13px; gap: 10px; }
    .bullet-icon { width: 24px; height: 24px; font-size: 12px; }
    .bullet-content strong { font-size: 13px; }
    .bullet-content span { font-size: 12px; }

    /* ── Hide triage flow diagram (replaced by text) ── */
    .triage-container { display: none; }

    /* ── KPI vis card (slide 6) ── */
    .camera-vis-card { padding: 14px; gap: 12px; }
    .metric-bar-label { font-size: 11px; }
    .vis-kpi-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; padding-top: 12px; }
    .vis-kpi-val { font-size: 15px; }
    .vis-kpi-lbl { font-size: 9px; }
    .vis-kpi-card { padding: 8px; }

    /* ── Concept links ── */
    .concept-links-bar { margin-top: 8px; padding-top: 8px; gap: 6px; }
    .concept-link-label { display: none; }
    .concept-link-btn { font-size: 10px; padding: 3px 8px; }

    /* ── Footer ── */
    footer {
        padding: 10px 16px;
        /* safe-area cubre el home indicator de iPhone; svh ya cubre Android */
        padding-bottom: max(10px, env(safe-area-inset-bottom));
        flex-wrap: wrap;
        gap: 8px;
        justify-content: space-between;
    }
    .keyboard-tip { display: none; }
    .nav-dots { order: -1; width: 100%; justify-content: center; }
    .dot { width: 8px; height: 8px; }
    .dot.active { width: 22px; }
    .nav-buttons { display: flex; width: 100%; gap: 8px; }
    .btn-nav { flex: 1; justify-content: center; font-size: 13px; padding: 8px 10px; }
}
