@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;600;700&family=DM+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400;1,500&display=swap');

/* ═══════════ Design Tokens ═══════════ */
:root {
    --bg: #f8f5ef;
    --bg-warm: #f3ede4;
    --surface: #ffffff;
    --dark: #1a1a1a;
    --dark-soft: #3a3a3a;
    --muted: #8a8578;
    --accent: #d97757;
    --accent-soft: rgba(217, 119, 87, 0.12);
    --accent-glow: rgba(217, 119, 87, 0.25);
    --blue: #4a7fd4;
    --green: #4da67a;
    --purple: #8b6cc1;
    --radius-sm: 10px;
    --radius-md: 18px;
    --radius-lg: 28px;
    --radius-xl: 40px;
    --shadow-soft: 0 4px 24px rgba(26, 26, 26, 0.04);
    --shadow-elevated: 0 16px 48px rgba(26, 26, 26, 0.08);
}

/* ═══════════ Reset & Base ═══════════ */
html {
    font-size: 20px;
    /* 投屏基准：16px → 20px，rem 整体放大 25% */
}

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

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--dark);
    overflow: hidden;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ═══════════ Typography Scale ═══════════ */
.font-serif {
    font-family: 'Noto Serif SC', 'Georgia', serif;
}

.font-mono {
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
}

.text-hero {
    font-size: clamp(3rem, 6vw, 5.5rem);
    line-height: 1.08;
    letter-spacing: -0.03em;
}

.text-title {
    font-size: clamp(2rem, 3.5vw, 3.2rem);
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.text-heading {
    font-size: clamp(1.4rem, 2vw, 1.8rem);
    line-height: 1.3;
}

.text-body {
    font-size: 1.125rem;
    line-height: 1.65;
}

.text-small {
    font-size: 0.9375rem;
    line-height: 1.5;
}

.text-caption {
    font-size: 0.8125rem;
    line-height: 1.4;
    letter-spacing: 0.02em;
}

.text-micro {
    font-size: 0.6875rem;
    line-height: 1.3;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.fw-300 {
    font-weight: 300;
}

.fw-400 {
    font-weight: 400;
}

.fw-500 {
    font-weight: 500;
}

.fw-600 {
    font-weight: 600;
}

.fw-700 {
    font-weight: 700;
}

.fw-800 {
    font-weight: 800;
}

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

.color-muted {
    color: var(--muted);
}

.color-soft {
    color: var(--dark-soft);
}

/* ═══════════ Slide System ═══════════ */
.slide {
    display: none;
    height: 100dvh;
    width: 100vw;
    padding: 3.5rem 5rem;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.slide.active {
    display: flex;
}

/* ═══════════ Animations ═══════════ */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(28px);
    }

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.92);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes drawLine {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.4;
    }

    50% {
        opacity: 1;
    }
}

@keyframes float {

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

    50% {
        transform: translateY(-8px);
    }
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.slide.active .anim-up {
    animation: slideUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.slide.active .anim-fade {
    animation: fadeIn 0.6s ease both;
}

.slide.active .anim-scale {
    animation: scaleIn 0.65s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.delay-1 {
    animation-delay: 0.1s !important;
}

.delay-2 {
    animation-delay: 0.2s !important;
}

.delay-3 {
    animation-delay: 0.35s !important;
}

.delay-4 {
    animation-delay: 0.5s !important;
}

.delay-5 {
    animation-delay: 0.65s !important;
}

.delay-6 {
    animation-delay: 0.8s !important;
}

.delay-7 {
    animation-delay: 0.95s !important;
}

.delay-8 {
    animation-delay: 1.1s !important;
}

/* ═══════════ Layout Helpers ═══════════ */
.container {
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.container-sm {
    max-width: 960px;
    margin: 0 auto;
    width: 100%;
}

.container-xs {
    max-width: 720px;
    margin: 0 auto;
    width: 100%;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.grid-2x2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flex-col {
    display: flex;
    flex-direction: column;
}

.gap-1 {
    gap: 0.5rem;
}

.gap-2 {
    gap: 1rem;
}

.gap-3 {
    gap: 1.5rem;
}

.gap-4 {
    gap: 2rem;
}

.gap-6 {
    gap: 3rem;
}

.gap-8 {
    gap: 4rem;
}

.text-center {
    text-align: center;
}

/* ═══════════ Components ═══════════ */

/* Tag */
.tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: var(--accent-soft);
    color: var(--accent);
    padding: 0.3rem 0.85rem;
    border-radius: 20px;
    font-size: 0.8125rem;
    font-weight: 600;
}

/* Card */
.card {
    background: var(--surface);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: var(--radius-md);
    padding: 1.75rem;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-elevated);
}

.card-flat {
    background: var(--surface);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: var(--radius-md);
    padding: 1.5rem;
}

/* ── Prompt chat bubble ── */
.prompt-bubble {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    background: rgba(217, 119, 87, 0.07);
    border: 1.5px solid rgba(217, 119, 87, 0.22);
    border-radius: 16px 16px 16px 4px;
    padding: 0.75rem 1rem;
    max-width: 380px;
    position: relative;
}

.prompt-bubble-icon {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    background: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
}

.prompt-bubble-icon svg {
    color: #fff;
}

.prompt-bubble-text {
    font-size: 0.875rem;
    line-height: 1.55;
    color: var(--dark-soft);
    font-style: normal;
}

/* ── Flow steps ── */
.flow-steps {
    display: flex;
    align-items: flex-start;
    gap: 0.3rem;
    flex-wrap: nowrap;
    margin: 1.25rem 0 1.75rem;
}

.flow-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.45rem;
    flex-shrink: 0;
}

.flow-step-icon {
    width: 42px;
    height: 42px;
    background: #fff;
    border: 1.5px solid rgba(26, 26, 26, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.flow-step-icon svg {
    width: 18px;
    height: 18px;
    stroke: var(--dark);
    fill: none;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.flow-step-label {
    font-size: 0.67rem;
    font-weight: 600;
    color: var(--muted);
    white-space: nowrap;
    text-align: center;
    letter-spacing: 0.01em;
}

.flow-arrow {
    flex-shrink: 0;
    padding-top: 13px;
    /* vertically center with icons */
    color: var(--muted);
    opacity: 0.35;
    font-size: 14px;
    line-height: 1;
}

/* Accent divider */
.accent-line {
    width: 48px;
    height: 4px;
    background: var(--accent);
    border-radius: 2px;
}

/* Large step number watermark */
.watermark {
    position: absolute;
    left: -0.5rem;
    top: -2rem;
    font-family: 'DM Sans', sans-serif;
    font-weight: 800;
    font-size: 11rem;
    color: var(--dark);
    opacity: 0.03;
    line-height: 1;
    pointer-events: none;
    user-select: none;
}

/* Blockquote */
blockquote {
    border-left: 5px solid var(--accent);
    background: rgba(217, 119, 87, 0.05);
    padding: 1.5rem 2rem;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

/* Icon base */
.icon {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.icon-lg {
    width: 40px;
    height: 40px;
}

.icon-xl {
    width: 56px;
    height: 56px;
}

/* Progress bar */
.progress {
    position: fixed;
    bottom: 0;
    left: 0;
    z-index: 200;
    height: 3px;
    background: var(--accent);
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Navigation */
.nav {
    position: fixed;
    bottom: 1.5rem;
    right: 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 200;
}

.nav-btn {
    width: 44px;
    height: 44px;
    background: var(--surface);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 1.1rem;
    color: var(--dark);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.nav-btn:hover {
    background: var(--dark);
    color: white;
}

.nav-btn:active {
    transform: scale(0.93);
}

.page-num {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--muted);
    min-width: 3rem;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

/* Keyboard hint */
.kbd-hint {
    position: fixed;
    bottom: 1.5rem;
    left: 2rem;
    font-size: 0.7rem;
    color: rgba(138, 133, 120, 0.5);
    letter-spacing: 0.04em;
    z-index: 200;
}

.kbd-hint kbd {
    display: inline-block;
    padding: 0.15rem 0.4rem;
    background: rgba(0, 0, 0, 0.04);
    border-radius: 4px;
    font-family: inherit;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

/* ═══════════ Illustrations (CSS-only) ═══════════ */

/* Cover geometric */
.cover-geo {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cover-geo .orbit {
    position: absolute;
    border: 1.5px solid rgba(217, 119, 87, 0.15);
    border-radius: 50%;
}

.cover-geo .orbit-1 {
    width: 280px;
    height: 280px;
    animation: float 6s ease-in-out infinite;
}

.cover-geo .orbit-2 {
    width: 380px;
    height: 380px;
    animation: float 8s ease-in-out infinite 1s;
    border-style: dashed;
}

.cover-geo .orbit-3 {
    width: 460px;
    height: 460px;
    animation: float 10s ease-in-out infinite 2s;
    opacity: 0.5;
}

.cover-geo .center-shape {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--accent), #e8956e);
    border-radius: 28px;
    transform: rotate(45deg);
    box-shadow: 0 20px 60px var(--accent-glow);
    animation: float 4s ease-in-out infinite;
}

.cover-geo .dot-accent {
    position: absolute;
    width: 12px;
    height: 12px;
    background: var(--accent);
    border-radius: 50%;
}

.cover-geo .dot-accent:nth-child(5) {
    top: 15%;
    left: 20%;
    animation: pulse 3s infinite;
}

.cover-geo .dot-accent:nth-child(6) {
    top: 70%;
    right: 15%;
    animation: pulse 3s infinite 1s;
}

.cover-geo .dot-accent:nth-child(7) {
    bottom: 20%;
    left: 35%;
    animation: pulse 3s infinite 2s;
    width: 8px;
    height: 8px;
    opacity: 0.6;
}

/* Pain point icons */
.pain-icon-wrap {
    width: 72px;
    height: 72px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Case card illustration frames */
.case-illus {
    height: 100px;
    border-radius: var(--radius-sm);
    background: var(--bg-warm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    overflow: hidden;
    position: relative;
}

/* Component preview illus */
.illus-component {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    width: 80%;
    height: 70%;
}

.illus-component div {
    background: rgba(217, 119, 87, 0.08);
    border: 1.5px solid rgba(217, 119, 87, 0.2);
    border-radius: 8px;
}

.illus-component div:first-child {
    grid-row: span 2;
}

/* Architecture illus */
.illus-arch {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    width: 85%;
}

.illus-arch-row {
    display: flex;
    gap: 6px;
    width: 100%;
    justify-content: center;
}

.illus-arch-box {
    width: 52px;
    height: 28px;
    border-radius: 6px;
    border: 1.5px solid rgba(74, 127, 212, 0.3);
    background: rgba(74, 127, 212, 0.06);
}

.illus-arch-line {
    width: 2px;
    height: 12px;
    background: rgba(74, 127, 212, 0.2);
    border-radius: 1px;
}

/* Mobile illus */
.illus-phone {
    width: 56px;
    height: 96px;
    border: 2.5px solid var(--dark);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    background: white;
}

.illus-phone-bar {
    height: 8px;
    background: #f5f5f5;
}

.illus-phone-content {
    padding: 4px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.illus-phone-content div {
    height: 10px;
    border-radius: 3px;
    background: var(--accent-soft);
}

.illus-phone-content div:nth-child(2) {
    width: 70%;
    background: rgba(0, 0, 0, 0.04);
}

/* ER diagram illus */
.illus-er {
    display: flex;
    gap: 10px;
    align-items: center;
}

.illus-er-table {
    width: 60px;
    border-radius: 6px;
    overflow: hidden;
    border: 1.5px solid rgba(77, 166, 122, 0.3);
}

.illus-er-header {
    height: 12px;
    background: rgba(77, 166, 122, 0.15);
}

.illus-er-rows {
    padding: 3px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.illus-er-rows div {
    height: 5px;
    background: rgba(0, 0, 0, 0.04);
    border-radius: 2px;
}

.illus-er-link {
    width: 20px;
    border-top: 1.5px dashed rgba(77, 166, 122, 0.4);
}

/* Flow diagram (legacy - unused) */
.flow-diagram {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    width: 100%;
    padding: 1rem 0;
}

/* Skill node with colored top border */
.skill-card {
    background: var(--surface);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    border-top: 4px solid transparent;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.skill-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(217, 119, 87, 0.08);
}

.skill-card.blue {
    border-top-color: var(--blue);
}

.skill-card.green {
    border-top-color: var(--green);
}

.skill-card.purple {
    border-top-color: var(--purple);
}

.skill-card.accent {
    border-top-color: var(--accent);
}

/* Concept card for HTML slide */
.concept-card {
    background: var(--surface);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.concept-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
}

.illus-frame {
    height: 110px;
    background: var(--bg-warm);
    border-radius: var(--radius-sm);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* DOM tree viz */
.dom-viz {
    display: flex;
    flex-direction: column;
    gap: 3px;
    width: 88%;
    padding: 8px;
}

.dom-tag {
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 10px;
    background: rgba(0, 0, 0, 0.04);
    padding: 1px 6px;
    border-radius: 3px;
    color: var(--accent);
    width: fit-content;
}

.dom-tag .comment {
    font-size: 9px;
    color: #bbb;
}

.dom-nest {
    border-left: 1px dashed #ddd;
    margin-left: 10px;
    padding-left: 6px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

/* Responsive viz */
.responsive-viz {
    display: flex;
    gap: 10px;
    align-items: flex-end;
    width: 88%;
    height: 70%;
}

.viz-device {
    background: white;
    border: 1px solid #eee;
    border-radius: 6px;
    padding: 5px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.viz-label {
    font-size: 8px;
    font-weight: 800;
    color: #bbb;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

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

.grid-mobile {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2px;
}

.grid-item {
    height: 16px;
    background: var(--accent-soft);
    border: 1px solid rgba(217, 119, 87, 0.2);
    border-radius: 2px;
}

/* Code viz */
.logic-viz {
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 10px;
    background: #1a1a1a;
    color: #e0e0e0;
    padding: 10px 12px;
    border-radius: 8px;
    width: 88%;
    text-align: left;
    line-height: 1.5;
    border: 1px solid #333;
}

.logic-viz .comment {
    color: #6a9955;
}

.logic-viz .keyword {
    color: #c586c0;
}

.logic-viz .fn {
    color: #4fc1ff;
}

.logic-viz .str {
    color: #ce9178;
}

/* Tool recommendation */
.tool-card {
    background: var(--surface);
    border: 1px solid rgba(0, 0, 0, 0.06);
    padding: 0.85rem 1.15rem;
    border-radius: 14px;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    transition: all 0.25s;
}

.tool-card:hover {
    border-color: var(--accent);
    background: #fffdfb;
}

/* Dialogue card */
.dialogue-card {
    background: var(--surface);
    padding: 1.75rem;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: var(--shadow-soft);
}

/* CTA cards */
.cta-card {
    background: var(--surface);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    transition: all 0.3s;
}

.cta-card:hover {
    box-shadow: var(--shadow-elevated);
    transform: translateY(-3px);
}

.cta-num {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: var(--accent-soft);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
}

/* Background noise texture */
.slide::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.015'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
}

.slide>* {
    position: relative;
    z-index: 1;
}

/* ═══════════════════════════════════════════
   Mobile — 显示「请访问 PC 端」遮罩
═══════════════════════════════════════════ */
@media (max-width: 768px) {
    #mobile-gate {
        display: flex !important;
    }
}