@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Space+Grotesk:wght@500;600;700;800&display=swap');

/* ========================================
   DESIGN TOKENS
   ======================================== */
:root {
    --pres-bg: #e8f4fb;
    --pres-bg-deep: #d4ecf8;
    --pres-ink: #0f172a;
    --pres-ink-soft: #475569;
    --pres-ink-muted: #94a3b8;
    --pres-surface: rgba(255, 255, 255, 0.82);
    --pres-surface-strong: rgba(255, 255, 255, 0.94);
    --pres-border: rgba(148, 163, 184, 0.22);
    --pres-accent: #0284c7;
    --pres-accent-strong: #0369a1;
    --pres-accent-soft: rgba(14, 165, 233, 0.12);
    --pres-accent-glow: rgba(14, 165, 233, 0.35);
    --pres-dark: rgba(15, 23, 42, 0.82);
    --pres-dark-soft: rgba(15, 23, 42, 0.68);
    --pres-radius: 16px;
    --pres-radius-sm: 12px;
    --pres-radius-pill: 999px;
    --pres-transition: 200ms ease;
    --pres-anim-dur: 0.6s;
    --pres-anim-ease: cubic-bezier(0.16, 1, 0.3, 1);
    --pres-font: 'Inter', system-ui, -apple-system, sans-serif;
    --pres-font-heading: 'Space Grotesk', 'Inter', system-ui, sans-serif;
}

/* ========================================
   RESET
   ======================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
}

body {
    font-family: var(--pres-font);
    color: var(--pres-ink);
    background:
        radial-gradient(ellipse at 20% 0%, rgba(125, 211, 252, 0.4), transparent 50%),
        radial-gradient(ellipse at 80% 100%, rgba(147, 197, 253, 0.3), transparent 50%),
        linear-gradient(180deg, #eef6fc 0%, var(--pres-bg) 40%, var(--pres-bg-deep) 100%);
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
}

button,
a {
    font: inherit;
}

button {
    color: inherit;
    cursor: pointer;
}

/* ========================================
   FLOATING SLIDE COUNTER (top-left)
   ======================================== */
.pres-counter {
    position: fixed;
    top: 1.1rem;
    left: 1.1rem;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.6rem 0.9rem;
    border-radius: var(--pres-radius);
    background: var(--pres-dark);
    backdrop-filter: blur(16px);
    color: #fff;
    font-size: 0.82rem;
    line-height: 1.4;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
}

.pres-counter__text {
    font-weight: 500;
    opacity: 0.85;
}

.pres-counter__text strong {
    font-weight: 800;
    color: #fff;
    opacity: 1;
}

.pres-counter__section {
    font-size: 0.72rem;
    opacity: 0.55;
    max-width: 14rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ========================================
   CHAPTER BAR (top area, below counter)
   ======================================== */
.pres-chapter-bar {
    position: fixed;
    top: 1.1rem;
    left: 9rem;
    z-index: 90;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: opacity var(--pres-transition);
}

.pres-chapter-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: var(--pres-radius-pill);
    background: var(--pres-accent);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
    box-shadow: 0 4px 18px var(--pres-accent-glow);
}

.pres-chapter-title {
    color: var(--pres-accent-strong);
    font-size: 0.88rem;
    font-weight: 600;
    max-width: 40rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ========================================
   FLOATING CONTROLS (top-right)
   ======================================== */
.pres-controls {
    position: fixed;
    top: 1.1rem;
    right: 1.1rem;
    z-index: 100;
    display: flex;
    gap: 0.45rem;
}

.pres-ctrl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.6rem;
    height: 2.6rem;
    min-width: 2.6rem;
    min-height: 2.6rem;
    max-width: 2.6rem;
    max-height: 2.6rem;
    flex-shrink: 0;
    border: none;
    border-radius: var(--pres-radius);
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    color: #fff;
    text-decoration: none;
    cursor: pointer;
    overflow: hidden;
    transition: transform var(--pres-transition), background var(--pres-transition);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

.pres-ctrl-btn svg {
    width: 1.1rem;
    height: 1.1rem;
    min-width: 1.1rem;
    min-height: 1.1rem;
    max-width: 1.1rem;
    max-height: 1.1rem;
    flex-shrink: 0;
}

.pres-ctrl-btn:hover:not(:disabled) {
    transform: scale(1.08);
    background: var(--pres-accent);
}

.pres-ctrl-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

/* ========================================
   MAIN STAGE (full screen)
   ======================================== */
.pres-stage {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

.pres-track {
    position: relative;
    width: 100%;
    height: 100%;
}

/* ========================================
   SLIDE
   ======================================== */
.pres-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 6rem 3rem 6.5rem;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity var(--pres-anim-dur) var(--pres-anim-ease), visibility 0s var(--pres-anim-dur);
}

.pres-slide--active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    z-index: 1;
    transition: opacity var(--pres-anim-dur) var(--pres-anim-ease), visibility 0s 0s;
}

.pres-slide__frame {
    width: 100%;
    max-width: 1200px;
    height: 100%;
    overflow: hidden;
}

.pres-slide__canvas {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* ========================================
   ARTICLE (slide content)
   ======================================== */
.pres-article {
    width: 100%;
    height: 100%;
    overflow: auto;
    padding: 0;
}

.pres-article::-webkit-scrollbar {
    width: 6px;
}

.pres-article::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.3);
    border-radius: var(--pres-radius-pill);
}

.pres-article__header {
    margin-bottom: 1.5rem;
}

.pres-article__kicker {
    display: inline-block;
    margin-bottom: 0.6rem;
    color: var(--pres-accent-strong);
    background: linear-gradient(135deg, var(--pres-accent-strong), #38bdf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.pres-article__title {
    margin: 0;
    font-family: var(--pres-font-heading);
    font-size: clamp(1.8rem, 3.5vw, 3rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.025em;
    color: var(--pres-ink);
}

.pres-article__lead {
    margin: 0.8rem 0 0;
    max-width: 52rem;
    color: var(--pres-ink-soft);
    font-size: 1.05rem;
    line-height: 1.7;
}

/* Staggered Animations Container */
.pres-anim-stagger>* {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity var(--pres-anim-dur) var(--pres-anim-ease),
        transform var(--pres-anim-dur) var(--pres-anim-ease);
}

.pres-slide--active .pres-anim-stagger>* {
    opacity: 1;
    transform: translateY(0);
}

.pres-slide--active .pres-anim-stagger>*:nth-child(1) {
    transition-delay: 0.05s;
}

.pres-slide--active .pres-anim-stagger>*:nth-child(2) {
    transition-delay: 0.15s;
}

.pres-slide--active .pres-anim-stagger>*:nth-child(3) {
    transition-delay: 0.25s;
}

.pres-slide--active .pres-anim-stagger>*:nth-child(4) {
    transition-delay: 0.35s;
}

.pres-slide--active .pres-anim-stagger>*:nth-child(5) {
    transition-delay: 0.45s;
}

.pres-slide--active .pres-anim-stagger>*:nth-child(6) {
    transition-delay: 0.55s;
}

/* ========================================
   BADGES
   ======================================== */
.pres-badge-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 1.2rem;
}

.pres-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.8rem;
    border-radius: var(--pres-radius-pill);
    background: var(--pres-accent-soft);
    border: 1px solid rgba(14, 165, 233, 0.18);
    color: var(--pres-accent-strong);
    font-size: 0.78rem;
    font-weight: 700;
}

/* ========================================
   STAT CARDS
   ======================================== */
.pres-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.8rem;
    margin-bottom: 1.2rem;
}

.pres-stat {
    padding: 1rem 1.1rem;
    border-radius: var(--pres-radius);
    border: 1px solid var(--pres-border);
    background: var(--pres-surface-strong);
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05);
    transition: transform var(--pres-transition), box-shadow var(--pres-transition);
}

.pres-stat:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.1);
}

.pres-stat__value {
    display: block;
    font-family: var(--pres-font-heading);
    font-size: clamp(1.1rem, 1.6vw, 1.5rem);
    font-weight: 800;
    line-height: 1.1;
    color: var(--pres-accent-strong);
}

.pres-stat__label {
    display: block;
    margin-top: 0.35rem;
    color: var(--pres-ink-soft);
    font-size: 0.78rem;
    line-height: 1.5;
}

/* ========================================
   PANEL CARDS (content blocks)
   ======================================== */
.pres-panels {
    display: grid;
    gap: 0.8rem;
}

.pres-panels--two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pres-panels--three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pres-panel-card {
    min-width: 0;
    padding: 1.1rem 1.2rem;
    border-radius: var(--pres-radius);
    border: 1px solid var(--pres-border);
    background: var(--pres-surface);
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
    transition: transform var(--pres-transition), box-shadow var(--pres-transition);
}

.pres-panel-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
}

.pres-block__title {
    margin: 0;
    font-family: var(--pres-font-heading);
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--pres-ink);
}

.pres-list {
    margin: 0.7rem 0 0;
    padding-left: 1.1rem;
    color: var(--pres-ink-soft);
    font-size: 0.88rem;
    line-height: 1.7;
}

.pres-list li+li {
    margin-top: 0.35rem;
}

.pres-list li::marker {
    color: var(--pres-accent);
}

/* ========================================
   MINI TABLE
   ======================================== */
.pres-mini-table {
    display: grid;
    gap: 0.4rem;
    margin-top: 0.7rem;
}

.pres-mini-table__row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.6rem;
    padding: 0.6rem 0.8rem;
    border-radius: var(--pres-radius-sm);
    background: rgba(248, 250, 252, 0.9);
    border: 1px solid rgba(226, 232, 240, 0.8);
    font-size: 0.84rem;
    line-height: 1.4;
}

.pres-mini-table__row span {
    color: var(--pres-ink-soft);
}

.pres-mini-table__row strong {
    text-align: right;
    color: var(--pres-ink);
    font-weight: 700;
}

/* ========================================
   COMPARE SECTION
   ======================================== */
.pres-compare {
    display: grid;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.pres-compare__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
}

.pres-compare__card {
    padding: 1rem 1.1rem;
    border-radius: var(--pres-radius);
    border: 1px solid var(--pres-border);
    background: var(--pres-surface-strong);
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
    transition: transform var(--pres-transition);
}

.pres-compare__card:hover {
    transform: translateY(-2px);
}

.pres-compare__card--accent {
    border-left: 3px solid var(--pres-accent);
}

.pres-compare__card--warm {
    border-left: 3px solid #f59e0b;
}

.pres-compare__label {
    display: inline-block;
    margin-bottom: 0.6rem;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--pres-ink);
}

.pres-compare__metrics {
    display: grid;
    gap: 0.4rem;
}

.pres-compare__metric {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.6rem;
    padding: 0.55rem 0.7rem;
    border-radius: var(--pres-radius-sm);
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(226, 232, 240, 0.8);
}

.pres-compare__metric span {
    color: var(--pres-ink-soft);
    font-size: 0.82rem;
}

.pres-compare__metric strong {
    font-family: var(--pres-font-heading);
    font-size: 0.95rem;
    font-weight: 700;
}

.pres-compare__summary {
    padding: 0.85rem 1rem;
    border-radius: var(--pres-radius);
    background: rgba(14, 165, 233, 0.06);
    border: 1px solid rgba(14, 165, 233, 0.14);
    color: var(--pres-ink-soft);
    font-size: 0.86rem;
    line-height: 1.65;
}

/* ========================================
   FIGURES
   ======================================== */
.pres-figure-grid {
    display: grid;
    gap: 0.8rem;
    margin-top: 1rem;
}

.pres-figure-grid--single {
    grid-template-columns: 1fr;
}

.pres-figure-grid--double {
    grid-template-columns: repeat(2, 1fr);
}

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

.pres-figure {
    margin: 0;
    padding: 0.6rem;
    border-radius: var(--pres-radius);
    border: 1px solid var(--pres-border);
    background: var(--pres-surface-strong);
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
    transition: transform var(--pres-transition);
}

.pres-figure:hover {
    transform: translateY(-2px);
}

.pres-figure__image {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--pres-radius-sm);
}

.pres-figure__caption {
    margin-top: 0.5rem;
    color: var(--pres-ink-muted);
    font-size: 0.76rem;
    line-height: 1.45;
}

/* ========================================
   NOTE
   ======================================== */
.pres-note {
    margin-top: 1rem;
    padding: 0.85rem 1rem;
    border-radius: var(--pres-radius);
    background: rgba(14, 165, 233, 0.07);
    border: 1px solid rgba(14, 165, 233, 0.16);
    color: var(--pres-accent-strong);
    font-size: 0.85rem;
    line-height: 1.6;
    font-weight: 600;
}

/* ========================================
   BOTTOM DOTS
   ======================================== */
.pres-bottom {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
}

.pres-dots {
    display: flex;
    gap: 0.35rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--pres-radius-pill);
    background: var(--pres-dark);
    backdrop-filter: blur(16px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
}

.pres-dot {
    width: 0.55rem;
    height: 0.55rem;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: transform var(--pres-transition), background var(--pres-transition);
    padding: 0;
}

.pres-dot:hover {
    background: rgba(255, 255, 255, 0.55);
    transform: scale(1.2);
}

.pres-dot--active {
    background: #0284c7;
    /* sky-600 */
    transform: scale(1.4);
    box-shadow: 0 0 12px rgba(2, 132, 199, 0.6);
}

/* ========================================
   PROGRESS BAR
   ======================================== */
#presProgressLine {
    position: fixed;
    bottom: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, #0284c7, #38bdf8);
    width: 0%;
    z-index: 101;
    transition: width var(--pres-transition);
}

/* ========================================
   SHORTCUT HINT (bottom-right)
   ======================================== */
.pres-shortcuts {
    position: fixed;
    bottom: 1.5rem;
    right: 1.1rem;
    z-index: 100;
    padding: 0.45rem 0.75rem;
    border-radius: var(--pres-radius-sm);
    background: var(--pres-dark-soft);
    backdrop-filter: blur(16px);
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.68rem;
    line-height: 1.5;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.12);
}

/* ========================================
   RESPONSIVE: Tablets
   ======================================== */
@media (max-width: 1024px) {
    .pres-slide {
        padding: 5rem 2rem 5rem;
    }

    .pres-stat-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .pres-panels--three {
        grid-template-columns: 1fr;
    }

    .pres-chapter-bar {
        left: 1.1rem;
        top: 5rem;
    }

    .pres-chapter-title {
        max-width: 24rem;
    }
}

/* ========================================
   RESPONSIVE: Mobile
   ======================================== */
@media (max-width: 720px) {
    .pres-counter {
        top: 0.75rem;
        left: 0.75rem;
        padding: 0.45rem 0.7rem;
        font-size: 0.75rem;
    }

    .pres-chapter-bar {
        top: 4rem;
        left: 0.75rem;
        gap: 0.5rem;
    }

    .pres-chapter-badge {
        font-size: 0.65rem;
        padding: 0.4rem 0.7rem;
    }

    .pres-chapter-title {
        font-size: 0.78rem;
        max-width: 14rem;
    }

    .pres-controls {
        top: 0.75rem;
        right: 0.75rem;
        gap: 0.35rem;
    }

    .pres-ctrl-btn {
        width: 2.2rem;
        height: 2.2rem;
    }

    .pres-ctrl-btn svg {
        width: 0.9rem;
        height: 0.9rem;
    }

    .pres-slide {
        padding: 6rem 1.2rem 4.5rem;
    }

    .pres-article__title {
        font-size: 1.3rem;
    }

    .pres-stat-grid,
    .pres-compare__grid,
    .pres-panels--two,
    .pres-panels--three,
    .pres-figure-grid--double,
    .pres-figure-grid--triple {
        grid-template-columns: 1fr;
    }

    .pres-shortcuts {
        display: none;
    }

    .pres-bottom {
        bottom: 1rem;
    }
}

@media (max-width: 480px) {
    .pres-chapter-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.3rem;
    }

    .pres-slide {
        padding: 7rem 1rem 4rem;
    }

    .pres-stat-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ========================================
   PRINT
   ======================================== */
@media print {
    body {
        overflow: visible;
        background: #fff;
    }

    .pres-counter,
    .pres-chapter-bar,
    .pres-controls,
    .pres-bottom,
    .pres-shortcuts {
        display: none;
    }

    .pres-stage {
        height: auto;
        overflow: visible;
    }

    .pres-track {
        height: auto;
    }

    .pres-slide {
        position: static;
        opacity: 1;
        transform: none;
        pointer-events: auto;
        padding: 1rem;
        page-break-after: always;
    }

    .pres-slide__frame,
    .pres-slide__canvas {
        border: 0;
        box-shadow: none;
    }
}