/* CSS Variables for Premium Vibrant Gradient Theme */
:root {
    --color-bg: #F8F9FB; 
    --color-text-main: #11111A;
    --color-text-muted: #666677;
    --color-card-bg: rgba(255, 255, 255, 0.7);
    
    /* Gradients */
    --grad-primary: linear-gradient(135deg, #FF6B6B, #FF9A44, #FFD057);
    --grad-secondary: linear-gradient(135deg, #667EEA, #8A65B8);
    --grad-accent: linear-gradient(135deg, #11998E, #4AE88E);
    --grad-dark: linear-gradient(135deg, #0B0C10, #1A1A24);
    
    /* Shadows & Glass */
    --shadow-card: 0 20px 40px rgba(0, 0, 0, 0.04), inset 0 1px 0 rgba(255,255,255,0.9), inset 1px 0 0 rgba(255,255,255,0.5);
    --shadow-card-hover: 0 40px 80px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255,255,255,1), inset 1px 0 0 rgba(255,255,255,0.6);
    --shadow-btn: 0 12px 30px rgba(255, 107, 107, 0.25);

    /* Fixed navbar + extra gap so #anchors (e.g. #features) don’t sit flush under the header */
    --anchor-scroll-padding: calc(5.75rem + env(safe-area-inset-top, 0px) + 1.5rem);
    /* Download page: nav + lang control + clearance so prior section cards don’t peek under the bar */
    --anchor-scroll-padding-dl: calc(6.75rem + env(safe-area-inset-top, 0px) + 2.25rem);
    
    /* Typography */
    --font-heading: 'Inter', 'Noto Sans SC', sans-serif;
    --font-body: 'Inter', 'Noto Sans SC', sans-serif;
}

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

/* Avoid viewport “creeping” a few pixels on load/refresh (scroll anchoring + late layout). */
html {
    overflow-anchor: none;
    /* Only the root clips horizontally; duplicating overflow-x on body/#main-content
       creates extra scroll containers and can show two vertical scrollbars. */
    overflow-x: hidden;
    max-width: 100%;
    scroll-padding-top: var(--anchor-scroll-padding);
}
html:has(body.page-download),
html:has(body.page-help) {
    scroll-padding-top: var(--anchor-scroll-padding-dl);
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg);
    color: var(--color-text-main);
    line-height: 1.6;
    max-width: 100%;
    -webkit-font-smoothing: antialiased;
}

body.nav-drawer-open {
    overflow: hidden;
}

#main-content {
    max-width: 100%;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* Typography Utilities */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 500;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.text-gradient-primary {
    background: var(--grad-primary);
    -webkit-background-clip: text; color: transparent; background-clip: text;
}
.text-gradient-secondary {
    background: var(--grad-secondary);
    -webkit-background-clip: text; color: transparent; background-clip: text;
}

/* Animated Background Orbs */
.bg-orbs {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    max-width: 100%;
    z-index: -1; overflow: hidden; pointer-events: none;
}
.orb {
    position: absolute; border-radius: 50%; filter: blur(140px); opacity: 0.35;
    animation: float 25s infinite alternate ease-in-out;
}
.orb-1 { top: -10%; left: -10%; width: 700px; height: 700px; background: var(--grad-primary); }
.orb-2 { bottom: -5%; right: -10%; width: 600px; height: 600px; background: var(--grad-secondary); animation-delay: -5s; }
.orb-3 { top: 30%; left: 35%; width: 500px; height: 500px; background: var(--grad-accent); opacity: 0.15; animation-delay: -10s; }

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(40px, 20px) scale(1.05); }
    100% { transform: translate(-20px, 40px) scale(0.95); }
}

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 18px 42px; border-radius: 100px;
    font-weight: 400; font-size: 1.05rem; letter-spacing: 0.02em;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer; border: none; gap: 12px;
}
.btn-primary {
    background: var(--grad-primary); color: white;
    box-shadow: var(--shadow-btn); background-size: 200% auto;
}
.btn-primary:hover {
    background-position: right center; transform: translateY(-2px);
    box-shadow: 0 16px 40px rgba(255, 107, 107, 0.35);
}
.btn-secondary {
    background: rgba(255, 255, 255, 0.8); backdrop-filter: blur(10px);
    color: var(--color-text-main);
    box-shadow: 0 10px 30px rgba(0,0,0,0.04), inset 0 0 0 1px rgba(0,0,0,0.05);
}
.btn-secondary:hover {
    transform: translateY(-2px); background: white;
    box-shadow: 0 16px 40px rgba(0,0,0,0.06), inset 0 0 0 1px rgba(0,0,0,0.08);
}

/* Navigation */
.navbar {
    position: fixed; top: 0; left: 0; width: 100%;
    padding: 24px 5%;
    padding-top: max(24px, env(safe-area-inset-top, 0px));
    display: flex; align-items: center; gap: 16px;
    z-index: 1000; transition: all 0.4s ease;
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    background: rgba(248, 249, 251, 0.4); border-bottom: 1px solid rgba(255,255,255,0.1);
}
.navbar .logo {
    margin-right: auto;
}
.nav-cluster {
    display: flex;
    align-items: center;
    gap: clamp(20px, 3vw, 40px);
}
.navbar.scrolled {
    padding: 16px 5%;
    padding-top: max(16px, env(safe-area-inset-top, 0px));
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 10px 40px rgba(0,0,0,0.03); border-bottom: 1px solid rgba(255,255,255,0.5);
}
.logo {
    font-family: var(--font-heading); font-size: 1.8rem; font-weight: 500;
    letter-spacing: -0.04em; display: flex; align-items: center; gap: 10px;
}
.logo-mark {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    object-fit: contain;
    border-radius: 8px;
}
.logo i { background: var(--grad-primary); -webkit-background-clip: text; color: transparent; }
.nav-links { display: flex; gap: 40px; align-items: center; }
.nav-links a { font-weight: 300; font-size: 0.95rem; transition: color 0.3s; }
.nav-links a:hover { color: #FF6B6B; }
.mobile-menu-btn {
    display: none; font-size: 1.5rem; cursor: pointer; background: none; border: none;
    position: relative; z-index: 1002;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    padding: 8px;
    margin: -8px -8px -8px 0;
    flex-shrink: 0;
}

/* Language switcher (glass pill + dropdown, matches secondary buttons / nav) */
.lang-switch {
    position: relative;
    flex-shrink: 0;
    z-index: 1003;
}
.lang-switch__toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 100px;
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 400;
    letter-spacing: 0.02em;
    color: var(--color-text-main);
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04), inset 0 0 0 1px rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    cursor: pointer;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, color 0.3s ease, transform 0.25s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}
.lang-switch__toggle:hover {
    border-color: rgba(255, 107, 107, 0.35);
    box-shadow: 0 12px 28px rgba(255, 107, 107, 0.08), inset 0 0 0 1px rgba(255, 255, 255, 1);
    color: #FF6B6B;
}
.lang-switch__toggle:focus-visible {
    outline: 2px solid rgba(255, 107, 107, 0.45);
    outline-offset: 3px;
}
.lang-switch__toggle .fa-globe {
    font-size: 0.95rem;
    opacity: 0.85;
}
.lang-switch__caret {
    font-size: 0.55rem;
    opacity: 0.55;
    transition: transform 0.35s cubic-bezier(0.33, 1, 0.68, 1);
}
.lang-switch--open .lang-switch__caret {
    transform: rotate(180deg);
}
.lang-switch__label--short {
    display: none;
}
.lang-switch__menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 188px;
    padding: 8px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 24px 48px rgba(17, 17, 26, 0.12), inset 0 1px 0 rgba(255, 255, 255, 1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}
.lang-switch__menu[hidden] {
    display: none !important;
}
.lang-switch__item {
    display: block;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--color-text-main);
    transition: background 0.2s ease, color 0.2s ease;
}
.lang-switch__item:hover {
    background: rgba(255, 107, 107, 0.08);
    color: #FF6B6B;
}
.lang-switch__item--current {
    font-weight: 500;
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.1), rgba(255, 154, 68, 0.08));
    color: var(--color-text-main);
}
.lang-switch__item--current:hover {
    color: #FF6B6B;
}
@media (max-width: 520px) {
    .lang-switch__label--full {
        display: none;
    }
    .lang-switch__label--short {
        display: inline;
    }
    .lang-switch__toggle {
        padding: 10px 12px;
        gap: 6px;
    }
}
@media (max-width: 380px) {
    .lang-switch__label--short {
        display: none;
    }
    .lang-switch__toggle {
        padding: 10px;
    }
}

/* Asymmetrical Hero Section */
.hero {
    padding: 200px 5% 120px;
    padding-left: max(5%, env(safe-area-inset-left, 0px));
    padding-right: max(5%, env(safe-area-inset-right, 0px));
    max-width: 1400px; margin: 0 auto;
    display: flex; align-items: center; justify-content: space-between; gap: 60px;
    position: relative;
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
}
.hero-content {
    flex: 1.2;
    z-index: 2;
    min-width: 0;
    max-width: 100%;
}
.hero h1 {
    font-size: 5rem;
    margin-bottom: 30px;
    letter-spacing: -0.04em;
    line-height: 1.1;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.hero p {
    font-size: 1.3rem; font-weight: 300; color: var(--color-text-muted);
    margin-bottom: 40px; line-height: 1.8; max-width: 600px;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.hero-actions { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; margin-bottom: 50px; }

.github-stats { display: flex; gap: 24px; align-items: center; font-size: 0.95rem; color: var(--color-text-muted); font-weight: 300; }
.github-stats a { display: flex; align-items: center; gap: 8px; font-weight: 400; color: var(--color-text-main); transition: color 0.3s; }
.github-stats a:hover { color: #FF6B6B; }
.github-stats .fa-github { font-size: 1.2rem; }
.github-stats__item { display: flex; align-items: center; gap: 8px; font-weight: 400; color: var(--color-text-main); }

/* Hero Abstract Visual (Glassmorphism Mockup) */
.hero-visual {
    flex: 1;
    min-width: 0;
    max-width: 100%;
    position: relative;
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1000px;
}
.glass-panel {
    position: absolute;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 24px; box-shadow: var(--shadow-card);
    padding: 24px; font-family: monospace; font-size: 0.9rem; font-weight: 400;
    color: var(--color-text-main);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.panel-1 {
    width: 320px; height: 200px; top: 10%; right: 10%; z-index: 3;
    transform: rotateY(-15deg) rotateX(10deg);
}
.panel-1::before { content: '◎ DIRECT / STATUS: 200ms'; color: #4AE88E; }
.panel-2 {
    width: 360px; height: 240px; bottom: 10%; left: 0; z-index: 2;
    background: rgba(255, 255, 255, 0.6);
    transform: rotateY(-5deg) rotateX(5deg) translateZ(-50px);
    display: flex; flex-direction: column; gap: 10px;
}
.panel-line { height: 12px; border-radius: 6px; background: rgba(0,0,0,0.05); }
.panel-eyebrow { font-size: 0.8rem; color: #888; margin-bottom: 8px; }
.panel-2 .panel-line--accent { width: 40%; background: var(--grad-secondary); }
.panel-2 .panel-line--wide { width: 80%; }
.panel-2 .panel-line--mid { width: 60%; }
.panel-footer-stats {
    margin-top: auto;
    font-size: 0.8rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.panel-footer-stats .status-active { color: #4ae88e; }

.hero-visual:hover .panel-1 { transform: rotateY(-5deg) rotateX(5deg) translateZ(30px); }
.hero-visual:hover .panel-2 { transform: rotateY(0deg) rotateX(0deg) translateZ(0px); }

/* Floating Stat Banner */
.stat-banner {
    max-width: 1200px; margin: 56px auto 100px; padding: 40px 20px;
    background: rgba(255, 255, 255, 0.6); backdrop-filter: blur(30px);
    border-radius: 24px; border: 1px solid rgba(255,255,255,0.8);
    box-shadow: var(--shadow-card);
    display: flex; justify-content: space-around;
    position: relative; z-index: 1;
}
.stat-block { text-align: center; }
.stat-block h3 { font-size: 4rem; font-weight: 200; margin-bottom: 5px; color: var(--color-text-main); font-family: 'Inter', sans-serif; letter-spacing: -0.05em; }
.stat-block p { font-size: 0.9rem; font-weight: 400; color: #888899; text-transform: uppercase; letter-spacing: 0.1em; }

/* Bento Box Features Grid */
.features { padding: 80px 5% 120px; max-width: 1400px; margin: 0 auto; }
.section-header { text-align: center; margin-bottom: 80px; }
.section-header h2 { font-size: 3.5rem; margin-bottom: 24px; }
.section-header p { font-size: 1.2rem; font-weight: 300; color: var(--color-text-muted); max-width: 600px; margin: 0 auto; }

.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: minmax(280px, auto);
    gap: 24px;
}

.bento-card {
    background: var(--color-card-bg);
    backdrop-filter: blur(40px); border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 32px; padding: 48px; box-shadow: var(--shadow-card);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    display: flex; flex-direction: column; justify-content: flex-start;
    overflow: hidden; position: relative;
}
.bento-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card-hover); border-color: rgba(255,255,255,1); }

.bento-icon {
    width: 64px; height: 64px; border-radius: 20px; display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; color: white; margin-bottom: 30px; box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}
.bento-icon--primary { background: var(--grad-primary); }
.bento-icon--secondary { background: var(--grad-secondary); }
.bento-icon--accent { background: var(--grad-accent); }
.bento-icon--dark { background: linear-gradient(135deg, #1a1a24, #3a3a4a); }
.bento-card h3 { font-size: 1.6rem; margin-bottom: 16px; }
.bento-card p { color: var(--color-text-muted); font-size: 1.05rem; font-weight: 300; line-height: 1.6; }

/* Grid Spans */
.card-large { grid-column: span 2; background: linear-gradient(135deg, rgba(255,255,255,0.9), rgba(255,255,255,0.4)); }
.card-tall { grid-row: span 2; }

/* Deep Dive Zig-zag Layout */
.deep-dive { padding: 120px 5%; background: rgba(255,255,255,0.4); border-top: 1px solid rgba(255,255,255,0.5); }
.split-row {
    display: flex; align-items: center; gap: 80px;
    max-width: 1200px; margin: 0 auto 120px;
}
.split-row:last-child { margin-bottom: 0; }
.split-row.reverse { flex-direction: row-reverse; }

.split-text { flex: 1; }
.split-text h3 { font-size: 2.8rem; margin-bottom: 24px; line-height: 1.2; font-weight: 500;}
.split-text p { font-size: 1.15rem; color: var(--color-text-muted); margin-bottom: 30px; font-weight: 300; line-height: 1.8; }
.split-list li { margin-bottom: 16px; display: flex; align-items: center; gap: 12px; font-weight: 300; }
.split-list li i { color: #38EF7D; font-size: 1.2rem; }

.split-visual {
    flex: 1; border-radius: 32px; padding: 40px;
    background: var(--grad-dark); color: white;
    box-shadow: 0 30px 60px rgba(0,0,0,0.15); position: relative;
}
.split-visual--embed {
    padding: 0;
    background: transparent;
    box-shadow: none;
}

/* GUI ↔ Core architecture diagram (deep-dive visual) */
/* ── arch-diagram wrapper ── */
.split-visual.split-visual--arch {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 36px 28px;
    color: var(--color-text-main);
    background: linear-gradient(145deg, rgba(255,255,255,0.96) 0%, rgba(246,248,252,0.88) 100%);
    border: 1px solid rgba(255,255,255,0.98);
    box-shadow: var(--shadow-card), inset 0 1px 0 rgba(255,255,255,1);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    overflow: hidden;
}
.split-visual.split-visual--arch::before {
    content: "";
    position: absolute;
    inset: -50%;
    background:
        radial-gradient(ellipse 55% 45% at 18% 35%, rgba(138,101,184,0.1), transparent 55%),
        radial-gradient(ellipse 50% 40% at 88% 65%, rgba(74,232,142,0.08), transparent 50%);
    pointer-events: none;
}
.arch-diagram {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 580px;
    margin: 0 auto;
}

/* ── dark stage ── */
.arch-stage {
    position: relative;
    padding: 28px 22px 26px;
    border-radius: 28px;
    background: linear-gradient(155deg, #0e1020 0%, #121828 55%, #0d1e18 100%);
    border: 1px solid rgba(255,255,255,0.09);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.07),
        0 32px 72px rgba(0,0,0,0.32),
        0 0 0 1px rgba(0,0,0,0.18);
    overflow: hidden;
}
.arch-stage::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.028) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.028) 1px, transparent 1px);
    background-size: 20px 20px;
    pointer-events: none;
}
.arch-stage::after {
    content: "";
    position: absolute;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    width: 320px;
    height: 120px;
    background: radial-gradient(ellipse at center, rgba(102,126,234,0.12) 0%, transparent 70%);
    pointer-events: none;
}
.arch-nodes {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 0;
}

/* ── card base ── */
.arch-card {
    flex: 1 1 0;
    min-width: 0;
    max-width: 210px;
    position: relative;
    border-radius: 20px;
    padding: 22px 16px 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.45s cubic-bezier(0.16,1,0.3,1), box-shadow 0.45s ease, border-color 0.35s ease;
}
.arch-card:hover { transform: translateY(-5px); }

/* ── GUI card ── */
.arch-card--gui {
    background: linear-gradient(165deg, #ffffff 0%, #f2f4ff 100%);
    border: 1px solid rgba(102,126,234,0.14);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,1),
        0 24px 56px rgba(0,0,0,0.22),
        0 0 0 0.5px rgba(102,126,234,0.1);
}
.arch-card--gui:hover {
    border-color: rgba(102,126,234,0.28);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,1),
        0 32px 64px rgba(0,0,0,0.28),
        0 0 20px rgba(102,126,234,0.1);
}
.arch-card--gui::before {
    content: "";
    position: absolute;
    top: 0; left: 14px; right: 14px;
    height: 2px;
    border-radius: 0 0 6px 6px;
    background: linear-gradient(90deg, transparent, #8a65b8 30%, #667eea 70%, transparent);
    opacity: 0.9;
}

/* ── Core card ── */
.arch-card--core {
    background: linear-gradient(160deg, #091a2e 0%, #0b2035 55%, #0b2318 100%);
    color: #fff;
    border: 1px solid rgba(74,232,142,0.18);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.1),
        inset 0 -60px 80px -40px rgba(74,232,142,0.1),
        0 24px 56px rgba(0,0,0,0.45),
        0 0 30px rgba(74,232,142,0.06);
}
.arch-card--core:hover {
    border-color: rgba(74,232,142,0.32);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.12),
        inset 0 -64px 88px -40px rgba(74,232,142,0.15),
        0 32px 70px rgba(0,0,0,0.5),
        0 0 40px rgba(74,232,142,0.1);
}
.arch-card--core::before {
    content: "";
    position: absolute;
    top: 0; left: 14px; right: 14px;
    height: 2px;
    border-radius: 0 0 6px 6px;
    background: linear-gradient(90deg, transparent, #4ae88e 30%, #11998e 70%, transparent);
    opacity: 0.95;
}

/* ── badge ── */
.arch-card__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.56rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #7b7b99;
    margin-bottom: 14px;
    padding: 5px 11px;
    border-radius: 100px;
    border: 1px solid rgba(0,0,0,0.07);
    background: rgba(255,255,255,0.9);
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.arch-card--core .arch-card__badge {
    color: rgba(255,255,255,0.4);
    border-color: rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.06);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}

/* ── icon ── */
.arch-card__icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 12px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}
.arch-card--gui .arch-card__icon {
    background: linear-gradient(145deg, #ffffff 0%, rgba(102,126,234,0.1) 100%);
    color: #5c4d9e;
    border: 1px solid rgba(102,126,234,0.2);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,1),
        0 8px 22px rgba(102,126,234,0.18);
}
.arch-card--core .arch-card__icon {
    background: linear-gradient(145deg, rgba(74,232,142,0.16) 0%, rgba(17,153,142,0.1) 100%);
    color: #5ee9a8;
    border: 1px solid rgba(74,232,142,0.22);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.12),
        0 8px 24px rgba(0,0,0,0.3),
        0 0 12px rgba(74,232,142,0.15);
}

/* ── title & desc ── */
.arch-card__title {
    font-size: 0.98rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 5px;
    line-height: 1.25;
}
.arch-card__desc {
    font-size: 0.7rem;
    font-weight: 300;
    line-height: 1.45;
    color: var(--color-text-muted);
    opacity: 0.9;
}
.arch-card--core .arch-card__title { color: #fff; }
.arch-card--core .arch-card__desc  { color: rgba(255,255,255,0.45); }

/* ── GUI preview widget ── */
.arch-card__preview {
    margin-top: 14px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 11px 11px;
    border-radius: 12px;
    background: rgba(102,126,234,0.06);
    border: 1px solid rgba(102,126,234,0.1);
}
.arch-preview-row {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.67rem;
    font-weight: 500;
    color: var(--color-text-main);
}
.arch-preview-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}
.arch-preview-dot--on {
    background: #4ae88e;
    box-shadow: 0 0 6px rgba(74,232,142,0.7);
    animation: arch-dot-pulse 2.2s ease-in-out infinite;
}
.arch-preview-dot--delay { animation-delay: 0.8s; }
.arch-preview-dot--off {
    background: rgba(0,0,0,0.12);
    border: 1px solid rgba(0,0,0,0.08);
}
@keyframes arch-dot-pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 6px rgba(74,232,142,0.7); }
    50%       { opacity: 0.45; box-shadow: 0 0 2px rgba(74,232,142,0.3); }
}
.arch-preview-label {
    flex: 1;
    font-weight: 600;
    font-size: 0.65rem;
    letter-spacing: 0.04em;
    color: var(--color-text-main);
}
.arch-preview-ping {
    font-family: 'Courier New', monospace;
    font-size: 0.62rem;
    color: var(--color-text-muted);
    letter-spacing: 0.02em;
}

/* ── Core metrics widget ── */
.arch-card__metrics {
    margin-top: 14px;
    width: 100%;
    display: flex;
    gap: 6px;
}
.arch-metric {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 9px 4px;
    border-radius: 10px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.07);
}
.arch-metric__label {
    font-size: 0.54rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.35);
}
.arch-metric__value {
    font-size: 0.78rem;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    color: rgba(255,255,255,0.65);
    letter-spacing: 0.04em;
}
.arch-metric__value--ok {
    color: #4ae88e;
    text-shadow: 0 0 10px rgba(74,232,142,0.55);
}

/* ── connector ── */
.arch-connector {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
    min-width: 68px;
}
.arch-connector__svg {
    width: 88px;
    height: auto;
    display: block;
    filter: drop-shadow(0 2px 10px rgba(102,126,234,0.2));
}
.arch-connector__flow {
    stroke-dasharray: 6 10;
    animation: arch-flow 2.4s linear infinite;
}
@keyframes arch-flow { to { stroke-dashoffset: -28; } }
@media (prefers-reduced-motion: reduce) {
    .arch-connector__flow { animation: none; }
}
.arch-connector__label {
    margin-top: 9px;
    display: flex;
    justify-content: center;
}
.arch-connector__pill {
    display: inline-block;
    font-size: 0.56rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.5);
    padding: 5px 11px;
    border-radius: 100px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
    white-space: nowrap;
}

/* ── caption ── */
.arch-caption {
    margin-top: 22px;
    text-align: center;
    font-size: 0.82rem;
    font-weight: 400;
    color: var(--color-text-muted);
    letter-spacing: 0.02em;
    line-height: 1.5;
}
.arch-caption::before {
    content: "";
    display: block;
    width: 36px;
    height: 2px;
    margin: 0 auto 14px;
    border-radius: 3px;
    background: linear-gradient(90deg, #9b7bc9, #6b8cff, #3ddc9a);
    opacity: 0.7;
}

.code-mock { font-family: monospace; font-size: 0.9rem; color: #a0a0b0; line-height: 1.6; }
.code-mock span.key { color: #ff9a44; }
.code-mock span.val { color: #4ae88e; }
.code-mock span.mode { color: #8a65b8; }
.code-mock span.comment { color: #888; }
.mac-filename { margin-left: 10px; font-size: 0.8rem; color: #888; }

/* Download Section */
.downloads { padding: 160px 5% 120px; text-align: center; max-width: 1200px; margin: 0 auto; }
.download-primary {
    background: white; border-radius: 32px; padding: 48px; margin-bottom: 40px;
    box-shadow: var(--shadow-card-hover); border: 1px solid rgba(0,0,0,0.02);
    display: flex; align-items: center; justify-content: space-between; text-align: left;
    gap: 40px; flex-wrap: wrap;
}
.dl-info { flex: 1; min-width: 300px; }
.dl-info h3 { font-size: 2.2rem; margin-bottom: 12px; line-height: 1.2; }
.dl-info p { color: var(--color-text-muted); font-size: 1.05rem; line-height: 1.65; margin: 0; }
.dl-action { flex-shrink: 0; }
.download-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.dl-card-sm {
    background: rgba(255,255,255,0.5); border-radius: 20px; padding: 30px 20px;
    border: 1px solid rgba(255,255,255,0.8); transition: all 0.3s; cursor: pointer;
}
.dl-card-sm:hover { background: white; transform: translateY(-5px); box-shadow: var(--shadow-card); }
.dl-card-sm i { font-size: 2.5rem; margin-bottom: 16px; color: var(--color-text-main); }
.dl-card-sm h4 { font-size: 1.1rem; margin-bottom: 4px; }
.dl-card-sm p { font-size: 0.85rem; color: var(--color-text-muted); }

.nav-links a[aria-current="page"] {
    color: #FF6B6B;
    font-weight: 500;
}

/* Dedicated download page */
.hero--download {
    padding-bottom: 80px;
}
.hero-code {
    font-family: ui-monospace, monospace;
    font-size: 0.88em;
    padding: 2px 8px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.06);
    color: var(--color-text-main);
    word-break: break-all;
}
.hero-visual--download {
    height: 420px;
}
.hero-visual--download .panel-1 {
    top: 14%;
    right: 6%;
}
.hero-visual--download .panel-2 {
    bottom: 12%;
    left: 4%;
}

.dl-jump-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    align-items: center;
    max-width: 900px;
    margin: 0 auto 24px;
    padding: 0 5%;
}
.dl-jump-bar a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 100px;
    font-size: 0.88rem;
    font-weight: 400;
    color: var(--color-text-main);
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.dl-jump-bar a:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 107, 107, 0.35);
    box-shadow: 0 12px 28px rgba(255, 107, 107, 0.1);
}

.dl-page-section {
    padding: 72px 5% 88px;
    max-width: 1200px;
    margin: 0 auto;
}
/* In-page anchors use heading ids; scroll-padding on html (see :has(body.page-download)) clears the fixed nav */
main.download-page .section-header > h2[id] {
    scroll-margin-top: 0.5rem;
}
.dl-page-section .section-header {
    margin-bottom: 48px;
}
.dl-page-section .section-header p {
    max-width: 760px;
}

.dl-assets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 22px;
    text-align: left;
}
.dl-assets-grid--dense {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.dl-asset-card {
    background: white;
    border-radius: 24px;
    padding: 28px 26px;
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.dl-asset-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card-hover);
}
.dl-asset-card h3 {
    font-size: 1.12rem;
    font-weight: 500;
    letter-spacing: -0.02em;
}
.dl-asset-card p {
    font-size: 0.92rem;
    font-weight: 300;
    color: var(--color-text-muted);
    line-height: 1.65;
    flex: 1;
}
.dl-asset-meta {
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #888899;
    font-weight: 400;
}
.btn--compact {
    padding: 14px 24px;
    font-size: 0.95rem;
    width: 100%;
    justify-content: center;
    box-sizing: border-box;
}

.dl-ios-note {
    max-width: 720px;
    margin: 0 auto;
    padding: 40px 36px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow-card);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}
.dl-ios-note__icon {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15), rgba(138, 101, 184, 0.12));
    color: var(--color-text-main);
}
.dl-ios-note p {
    font-size: 1.05rem;
    font-weight: 300;
    color: var(--color-text-muted);
    line-height: 1.75;
    max-width: 560px;
}
.dl-ios-note .btn--compact {
    width: auto;
    min-width: 200px;
}

.dl-faq {
    padding-top: 100px;
}

/* FAQ Accordion Section */
.faq-section { padding: 120px 5%; max-width: 900px; margin: 0 auto; }
.faq-item {
    background: var(--color-card-bg); border-radius: 20px;
    margin-bottom: 16px; border: 1px solid rgba(255,255,255,0.6);
    box-shadow: 0 4px 15px rgba(0,0,0,0.02); overflow: hidden;
    transition: all 0.3s ease;
}
.faq-question {
    padding: 24px 30px; font-weight: 400; font-size: 1.15rem; color: var(--color-text-main);
    display: flex; justify-content: space-between; align-items: center;
    cursor: pointer; user-select: none;
}
.faq-question i { transition: transform 0.3s ease; color: var(--color-text-muted); }
.faq-answer {
    padding: 0 30px; max-height: 0; overflow: hidden;
    color: var(--color-text-muted); font-size: 1.05rem; font-weight: 300; line-height: 1.7;
    transition: max-height 0.4s ease, padding 0.4s ease;
}
.faq-item.active { background: white; box-shadow: var(--shadow-card); }
.faq-item.active .faq-question i { transform: rotate(180deg); color: #FF6B6B; }
.faq-item.active .faq-answer { padding: 0 30px 24px; max-height: 800px; }

/* Blog Section */
.blog-section {
    padding: 120px 5% 100px;
    max-width: 1400px;
    margin: 0 auto;
    border-top: 1px solid rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.25);
}
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.blog-card {
    display: block;
    background: var(--color-card-bg);
    backdrop-filter: blur(40px);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 28px;
    padding: 32px;
    box-shadow: var(--shadow-card);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    color: inherit;
    text-align: left;
}
.blog-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-card-hover);
    border-color: rgba(255, 255, 255, 1);
}
.blog-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 12px;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    font-weight: 300;
    margin-bottom: 16px;
}
.blog-meta .blog-cat {
    padding: 4px 12px;
    border-radius: 100px;
    background: rgba(255, 107, 107, 0.12);
    color: #FF6B6B;
    font-weight: 500;
    font-size: 0.8rem;
}
.blog-card h3 {
    font-size: 1.35rem;
    margin-bottom: 12px;
    line-height: 1.35;
    font-weight: 500;
}
.blog-card p {
    font-size: 1rem;
    font-weight: 300;
    color: var(--color-text-muted);
    line-height: 1.65;
    margin: 0;
}
.blog-read-hint {
    margin-top: 20px;
    font-size: 0.95rem;
    font-weight: 400;
    color: #8A65B8;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.blog-section .blog-actions {
    text-align: center;
    margin-top: 48px;
}

/* Immersive CTA */
.cta-bottom {
    margin: 120px 5% 0; border-radius: 40px 40px 0 0;
    background: var(--grad-dark); color: white; padding: 120px 20px; text-align: center;
    position: relative; overflow: hidden;
}
.cta-bottom::before {
    content: ''; position: absolute; top: -50%; left: 25%; width: 50%; height: 100%;
    background: var(--grad-primary); filter: blur(120px); opacity: 0.2; border-radius: 50%;
}
.cta-bottom h2 { font-size: 4rem; margin-bottom: 30px; position: relative; z-index: 2; }
.cta-bottom__lede {
    font-size: 1.2rem;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 40px;
    font-weight: 300;
    opacity: 0.9;
    position: relative;
    z-index: 2;
}
.cta-bottom .btn-primary { background: white; color: #111; box-shadow: 0 10px 30px rgba(255,255,255,0.2); position: relative; z-index: 2;}
.cta-bottom .btn-primary:hover { transform: translateY(-3px); box-shadow: 0 15px 40px rgba(255,255,255,0.3); }

/* --- NEW VISUAL UI ELEMENTS --- */
/* Infinite Marquee */
.marquee-container {
    width: 100%; overflow: hidden; background: rgba(255,255,255,0.4);
    border-top: 1px solid rgba(255,255,255,0.6); border-bottom: 1px solid rgba(255,255,255,0.6);
    padding: 24px 0; display: flex; position: relative; z-index: 1;
    backdrop-filter: blur(10px);
}
.marquee-content {
    display: flex; gap: 30px; animation: marqueeScroll 25s linear infinite; white-space: nowrap; padding-left: 30px;
}
.marquee-item {
    display: flex; align-items: center; gap: 8px; font-weight: 500; color: var(--color-text-main);
    font-size: 1.05rem; background: white; padding: 10px 24px; border-radius: 100px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03); border: 1px solid rgba(0,0,0,0.02);
}
.marquee-item i { color: #8A65B8; }
@keyframes marqueeScroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* Floating Badges */
.float-badge {
    position: absolute; background: rgba(255,255,255,0.85); backdrop-filter: blur(12px);
    padding: 10px 20px; border-radius: 100px; font-size: 0.9rem; font-weight: 500;
    box-shadow: var(--shadow-card); border: 1px solid rgba(255,255,255,1);
    z-index: 4; display: flex; align-items: center; gap: 8px; color: var(--color-text-main);
}
.badge-1 { top: 0; left: -10%; animation: float 6s infinite alternate ease-in-out; }
.badge-2 { bottom: 15%; right: -20%; animation: float 8s infinite alternate-reverse ease-in-out; }
.badge-icon { display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: var(--grad-accent); color: white; font-size: 0.7rem; }
.badge-icon--secondary { background: var(--grad-secondary); }

/* UI Abstracts for Bento */
.route-ui { margin-top: 24px; display: flex; flex-direction: column; gap: 12px; }
.route-row { display: flex; align-items: center; justify-content: space-between; background: rgba(255,255,255,0.5); padding: 12px 16px; border-radius: 16px; border: 1px solid rgba(255,255,255,0.8); }
.route-node { font-size: 0.85rem; font-weight: 500; padding: 6px 12px; border-radius: 8px; background: white; box-shadow: 0 2px 8px rgba(0,0,0,0.04); }
.route-arrow { color: #A0A0B0; font-size: 0.8rem; }
.node-proxy { color: #FF6B6B; }
.node-direct { color: #4AE88E; }

.tag-cloud { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.ui-tag { background: rgba(255,255,255,0.6); border: 1px solid rgba(255,255,255,0.9); padding: 8px 16px; border-radius: 12px; font-size: 0.9rem; font-weight: 400; transition: all 0.3s; cursor: default; }
.ui-tag:hover { background: white; transform: translateY(-2px); box-shadow: 0 5px 15px rgba(0,0,0,0.05); }

.chart-ui { display: flex; align-items: flex-end; gap: 8px; height: 80px; margin-top: 30px; }
.chart-bar { flex: 1; background: var(--grad-secondary); border-radius: 6px 6px 0 0; opacity: 0.8; }
.chart-bar.active { background: var(--grad-accent); opacity: 1; }
.chart-bar--h40 { height: 40%; }
.chart-bar--h90 { height: 90%; }
.chart-bar--h60 { height: 60%; }
.chart-bar--h30 { height: 30%; }
.chart-bar--h70 { height: 70%; }

.icon-brand-youtube { color: #ff0000; }
.icon-brand-bilibili { color: #00a1d6; }

.meta-license-row {
    margin-top: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text-main);
    display: flex;
    align-items: center;
    gap: 10px;
}
.meta-license-row .fa-check-circle { color: #4ae88e; }

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-dl-1 { transition-delay: 0.1s; }
.reveal-delay-dl-2 { transition-delay: 0.2s; }
.reveal-delay-dl-3 { transition-delay: 0.3s; }
.reveal-delay-dl-4 { transition-delay: 0.4s; }
.reveal-delay-blog-1 { transition-delay: 0.08s; }
.reveal-delay-blog-2 { transition-delay: 0.16s; }

.btn--download-xl { padding: 18px 30px; font-size: 1.15rem; white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 10px; }

.platform-icon--apple { color: #555; }
.platform-icon--android { color: #3ddc84; }
.platform-icon--ios { color: #007aff; }
.platform-icon--linux { color: #e95420; }

a.dl-card-sm {
    color: inherit;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* Mac-style Window */
.mac-window { background: #1A1A24; border-radius: 16px; overflow: hidden; box-shadow: 0 20px 40px rgba(0,0,0,0.2); width: 100%; }
.mac-header { background: #2A2A35; padding: 12px 16px; display: flex; gap: 8px; align-items: center; }
.mac-dot { width: 12px; height: 12px; border-radius: 50%; }
.dot-red { background: #FF5F56; } .dot-yellow { background: #FFBD2E; } .dot-green { background: #27C93F; }
.mac-body {
    padding: 20px;
    font-family: monospace;
    font-size: 0.9rem;
    color: #a0a0b0;
    line-height: 1.8;
    text-align: left;
}
.mac-body.code-mock { color: #a0a0b0; line-height: 1.8; }

/* Footer — calm, editorial layout */
.site-footer,
footer.site-footer {
    position: relative;
    background: linear-gradient(180deg, #0c0d12 0%, #08090e 100%);
    color: #fff;
    padding: 72px 5% 36px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.footer-content {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(32px, 4vw, 56px);
    align-items: start;
    max-width: 1120px;
    margin: 0 auto 48px;
}
.footer-brand__logo.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    text-decoration: none;
}
.footer-brand__logo .logo-mark {
    border-radius: 10px;
}
.footer-brand__lead {
    margin: 20px 0 0;
    color: rgba(245, 245, 250, 0.58);
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.7;
    letter-spacing: 0.01em;
}
.footer-heading {
    margin: 0 0 18px;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.38);
}
.footer-links ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.footer-links li {
    margin: 0 0 11px;
}
.footer-links li:last-child {
    margin-bottom: 0;
}
.footer-links a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: rgba(230, 231, 240, 0.72);
    font-size: 0.9rem;
    font-weight: 400;
    line-height: 1.45;
    text-decoration: none;
    transition: color 0.2s ease, transform 0.2s ease;
}
.footer-links a:hover {
    color: #fff;
}
.footer-link-icon {
    display: inline-flex;
    width: 1em;
    justify-content: center;
    opacity: 0.55;
    font-size: 0.95rem;
    transition: opacity 0.2s ease;
}
.footer-links a:hover .footer-link-icon {
    opacity: 0.9;
}
.footer-bottom {
    max-width: 1120px;
    margin: 0 auto;
    padding-top: 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.footer-bottom__fine {
    margin: 0 0 10px;
    font-size: 0.75rem;
    font-weight: 400;
    line-height: 1.6;
    letter-spacing: 0.02em;
    color: rgba(160, 162, 180, 0.35);
}
.footer-bottom__line {
    margin: 0;
    font-size: 0.8125rem;
    font-weight: 400;
    letter-spacing: 0.03em;
    color: rgba(160, 162, 180, 0.45);
    line-height: 1.5;
}
.footer-bottom__domain {
    color: rgba(200, 202, 220, 0.55);
}

@media (max-width: 1180px) {
    .footer-content {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 44px 40px;
    }
    .footer-brand {
        grid-column: 1 / -1;
    }
}

/* Animations */
.reveal { opacity: 0; transform: translateY(40px); transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1); }
.reveal.active { opacity: 1; transform: translateY(0); }

/* Responsive */
@media (max-width: 1024px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 160px;
        padding-bottom: 80px;
        max-width: 100%;
    }
    .hero h1 {
        font-size: clamp(1.85rem, 5.5vw + 0.85rem, 3rem);
    }
    .hero p {
        margin-left: auto;
        margin-right: auto;
        max-width: 100%;
        font-size: 1.1rem;
    }
    .hero-actions { justify-content: center; }
    .github-stats {
        justify-content: center;
        margin-bottom: 40px;
        flex-wrap: wrap;
        gap: 12px 20px;
        max-width: 100%;
    }
    .hero-visual {
        width: 100%;
        height: 380px;
        overflow: hidden;
        margin-left: auto;
        margin-right: auto;
    }
    .panel-1 {
        width: min(300px, 86vw);
        height: 180px;
        right: 8%;
    }
    .panel-2 {
        width: min(320px, 90vw);
        height: 220px;
        left: 5%;
    }
    .badge-1 { left: 0; }
    .badge-2 { right: 0; }
    .bento-grid { grid-template-columns: 1fr; }
    .card-large, .card-tall { grid-column: auto; grid-row: auto; }
    .split-row, .split-row.reverse { flex-direction: column; gap: 40px; text-align: center; }
    .split-list li { justify-content: center; }
    .arch-nodes {
        flex-direction: column;
        align-items: center;
        gap: 2px;
    }
    .arch-card {
        max-width: 280px;
        width: 100%;
    }
    .arch-card__preview,
    .arch-card__metrics {
        max-width: 200px;
        margin-left: auto;
        margin-right: auto;
    }
    .arch-connector {
        padding: 8px 0 12px;
        min-width: 0;
    }
    .arch-connector__svg {
        transform: rotate(90deg);
        width: 48px;
        height: 88px;
    }
    .download-primary { flex-direction: column; text-align: center; gap: 30px; }
    .download-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-content { grid-template-columns: 1fr; gap: 40px; }
    .blog-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    /*
     * Drawer: top edge tracks real navbar bottom via --nav-bottom (set in main.js).
     * Clip-path only on the panel (no extra translate) so the seam stays flush.
     */
    .nav-links {
        position: fixed;
        top: var(--nav-bottom, calc(4.5rem + env(safe-area-inset-top, 0px)));
        left: 0;
        width: 100%;
        max-height: calc(100dvh - var(--nav-bottom, 5.5rem) - env(safe-area-inset-bottom, 0px));
        background: #f8f9fb;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 8px 5% calc(24px + env(safe-area-inset-bottom, 0px));
        box-shadow: 0 20px 40px rgba(17, 17, 26, 0.1);
        border-bottom: 1px solid rgba(0, 0, 0, 0.06);
        border-radius: 0 0 16px 16px;
        clip-path: inset(0 0 100% 0);
        opacity: 0;
        visibility: hidden;
        transition:
            clip-path 0.5s cubic-bezier(0.33, 1, 0.68, 1),
            opacity 0.4s cubic-bezier(0.33, 1, 0.68, 1),
            box-shadow 0.5s ease,
            visibility 0s linear 0.5s;
        overflow-x: hidden;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        z-index: 1001;
        pointer-events: none;
    }
    .nav-links.active {
        clip-path: inset(0 0 0 0);
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transition:
            clip-path 0.5s cubic-bezier(0.33, 1, 0.68, 1),
            opacity 0.32s cubic-bezier(0.33, 1, 0.68, 1) 0.05s,
            box-shadow 0.5s ease,
            visibility 0s linear 0s;
    }
    .nav-links a {
        display: block;
        width: 100%;
        text-align: center;
        padding: 14px 12px;
        box-sizing: border-box;
        opacity: 0;
        transform: translate3d(0, 6px, 0);
        transition:
            opacity 0.38s cubic-bezier(0.33, 1, 0.68, 1),
            transform 0.38s cubic-bezier(0.33, 1, 0.68, 1),
            color 0.3s ease;
    }
    .nav-links:not(.active) a {
        transition-duration: 0.18s, 0.18s, 0.3s;
        transition-timing-function: cubic-bezier(0.4, 0, 1, 1), cubic-bezier(0.4, 0, 1, 1), ease;
    }
    .nav-links.active a {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
    .nav-links.active a:nth-child(1) { transition-delay: 0.04s; }
    .nav-links.active a:nth-child(2) { transition-delay: 0.07s; }
    .nav-links.active a:nth-child(3) { transition-delay: 0.1s; }
    .nav-links.active a:nth-child(4) { transition-delay: 0.13s; }
    .nav-links.active a:nth-child(5) { transition-delay: 0.16s; }
    .nav-links.active a:nth-child(6) { transition-delay: 0.19s; }
    .nav-links.active a:nth-child(n + 7) { transition-delay: 0.22s; }

    @media (prefers-reduced-motion: reduce) {
        .nav-links {
            transition-duration: 0.01ms;
            transition-delay: 0s !important;
        }
        .nav-links.active {
            transition-duration: 0.01ms;
        }
        .nav-links a,
        .nav-links.active a {
            transition-duration: 0.01ms !important;
            transition-delay: 0s !important;
            transform: none !important;
        }
        .nav-links:not(.active) a {
            opacity: 0;
        }
        .nav-links.active a {
            opacity: 1;
        }
    }

    .mobile-menu-btn { display: block; }
    .hero {
        padding-top: 140px;
    }
    .hero h1 {
        font-size: clamp(1.65rem, 6vw + 0.5rem, 2.35rem);
    }
    .hero p {
        font-size: 1rem;
    }
    .hero-actions .btn {
        max-width: 100%;
        box-sizing: border-box;
        padding-left: 28px;
        padding-right: 28px;
    }
    .stat-banner { flex-direction: column; gap: 30px; margin: 40px 5% 80px; }
    .cta-bottom h2 { font-size: 2.8rem; }
    .blog-grid { grid-template-columns: 1fr; }
    .blog-section { padding: 80px 5% 72px; }
    .download-grid { grid-template-columns: 1fr; }
    .footer-bottom .footer-bottom__fine { text-align: center; }
    .footer-bottom .footer-bottom__line { text-align: center; }
    .hero-visual--download {
        height: 280px;
        margin-top: 24px;
    }
    .dl-jump-bar {
        gap: 8px;
    }
    .dl-jump-bar a {
        padding: 8px 14px;
        font-size: 0.82rem;
    }
    .dl-page-section {
        padding-top: 56px;
        padding-bottom: 64px;
    }

    body.page-download .dl-page-hero {
        padding-top: 140px;
    }
    body.page-download .dl-page-hero h1 {
        font-size: clamp(1.85rem, 6vw + 0.5rem, 2.8rem);
    }
    body.page-download .dl-tab-btn {
        padding: 12px 20px;
        font-size: 0.95rem;
    }
}

/* Download center: tabbed cards (content from ../assets/clients/clients.json) */
@keyframes dlFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

body.page-download .dl-page-hero {
    padding: 180px 5% 64px;
    text-align: center;
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}
body.page-download .dl-page-hero h1 {
    font-size: clamp(2.2rem, 5vw + 1rem, 4rem);
    margin-bottom: 24px;
    letter-spacing: -0.04em;
}
body.page-download .dl-page-hero p {
    font-size: 1.2rem;
    font-weight: 300;
    color: var(--color-text-muted);
    line-height: 1.8;
    max-width: 700px;
    margin: 0 auto;
}

body.page-download .dl-center-section {
    padding: 0 5% 120px;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

body.page-download .dl-platform-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 48px;
}

body.page-download .dl-tab-btn {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 100px;
    padding: 14px 28px;
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-body);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}
body.page-download .dl-tab-btn:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
    color: var(--color-text-main);
}
body.page-download .dl-tab-btn.is-active {
    background: white;
    color: var(--color-text-main);
    border-color: rgba(255, 255, 255, 1);
    box-shadow: var(--shadow-card);
}
body.page-download .dl-tab-btn i { font-size: 1.2rem; }
body.page-download .dl-tab-btn.is-active i.fa-windows { color: #0078d6; }
body.page-download .dl-tab-btn.is-active i.fa-apple { color: #111; }
body.page-download .dl-tab-btn.is-active i.fa-android { color: #3ddc84; }
body.page-download .dl-tab-btn.is-active i.fa-app-store-ios { color: #007aff; }
body.page-download .dl-tab-btn.is-active i.fa-linux { color: #e95420; }

body.page-download .dl-tab-panels { position: relative; }
body.page-download .dl-tab-panel {
    display: none;
    flex-direction: column;
    gap: 24px;
    animation: dlFadeIn 0.5s ease;
}
body.page-download .dl-tab-panel.is-active { display: flex; }

/* ── Card container ─────────────────────────── */
body.page-download .dl-client-card {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.85);
    border-radius: 20px;
    padding: 28px 30px 24px;
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    gap: 0;
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}
body.page-download .dl-client-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-card-hover);
    border-color: rgba(255, 255, 255, 1);
}

/* ── Card header: icon + name/badge + GitHub button ── */
body.page-download .dl-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}
body.page-download .dl-client-icon {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    border-radius: 14px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.7rem;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}
body.page-download .dl-client-icon--windows { color: #0078d6; }
body.page-download .dl-client-icon--mac     { color: #111; }
body.page-download .dl-client-icon--android { color: #3ddc84; }
body.page-download .dl-client-icon--android-alt { background: #1a1a24; color: #4ae88e; }
body.page-download .dl-client-icon--ios     { background: var(--grad-secondary); color: white; }
body.page-download .dl-client-icon--ios-alt { background: linear-gradient(135deg, #1a2980, #26d0ce); color: white; font-size: 1.4rem; }
body.page-download .dl-client-icon--linux   { color: #e95420; }
body.page-download .dl-client-icon--verge   { background: var(--grad-primary); color: white; font-size: 1.5rem; }

body.page-download .dl-card-title-wrap {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
body.page-download .dl-card-name {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--color-text-main);
    line-height: 1.2;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
body.page-download .dl-card-badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

/* GitHub icon button */
body.page-download .dl-card-gh-btn {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #bbb;
    font-size: 1rem;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}
body.page-download .dl-card-gh-btn:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #444;
}
body.page-download .dl-card-gh-btn--deleted {
    cursor: not-allowed;
    opacity: 0.38;
    position: relative;
    gap: 5px;
    width: auto;
    padding: 0 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    background: rgba(0, 0, 0, 0.05);
    pointer-events: none;
}
body.page-download .dl-card-gh-btn--deleted:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #bbb;
}
body.page-download .dl-card-gh-deleted-tip {
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

/* ── Badge ───────────────────────────────────── */
body.page-download .dl-client-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.72rem;
    font-weight: 500;
    padding: 3px 9px;
    border-radius: 6px;
    border: 1px solid transparent;
    white-space: nowrap;
}
body.page-download .dl-client-badge--green {
    background: #e8f5e9; color: #2e7d32; border-color: #c8e6c9;
}
body.page-download .dl-client-badge--blue {
    background: #e3f2fd; color: #1565c0; border-color: #bbdefb;
}
body.page-download .dl-client-badge--muted {
    background: rgba(0,0,0,0.05); color: #666677; border-color: rgba(0,0,0,0.08);
}

/* ── Description ────────────────────────────── */
body.page-download .dl-card-desc {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    font-weight: 300;
    line-height: 1.65;
    margin: 0 0 12px;
}

/* ── Meta tags ───────────────────────────────── */
body.page-download .dl-client-meta {
    display: flex;
    gap: 8px;
    font-size: 0.8rem;
    font-weight: 400;
    color: #888899;
    flex-wrap: wrap;
}
body.page-download .dl-client-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(255, 255, 255, 0.55);
    padding: 3px 9px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.8);
}

/* ── Download button area ──────────────────── */
body.page-download .dl-card-downloads {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}
body.page-download .dl-btn-primary {
    padding: 11px 22px;
    font-size: 0.92rem;
    gap: 7px;
    white-space: nowrap;
}
body.page-download .dl-dl-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 15px;
    border-radius: 100px;
    font-size: 0.83rem;
    font-weight: 400;
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid rgba(0, 0, 0, 0.09);
    color: #555;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s, border-color 0.2s, transform 0.2s, color 0.2s;
}
body.page-download .dl-dl-chip:hover {
    background: white;
    border-color: rgba(0, 0, 0, 0.18);
    color: #222;
    transform: translateY(-1px);
}
body.page-download .dl-dl-chip i {
    font-size: 0.85em;
    opacity: 0.7;
}

body.page-download .dl-disclaimer-box {
    background: rgba(255, 255, 255, 0.4);
    border-left: 4px solid #ff9a44;
    padding: 24px;
    border-radius: 0 16px 16px 0;
    margin-top: 48px;
    font-size: 0.95rem;
    color: var(--color-text-muted);
    line-height: 1.65;
}
body.page-download .dl-disclaimer-box strong {
    color: var(--color-text-main);
    font-weight: 500;
}
body.page-download .dl-disclaimer-box__icon {
    color: #ff9a44;
    margin-right: 8px;
}

body.page-download .dl-center-loading,
body.page-download .dl-center-error {
    text-align: center;
    padding: 48px 24px;
    color: var(--color-text-muted);
    font-weight: 300;
    font-size: 1.05rem;
}
body.page-download .dl-center-error {
    color: #c62828;
    background: rgba(255, 235, 238, 0.6);
    border-radius: 16px;
    border: 1px solid rgba(198, 40, 40, 0.15);
}

@media (max-width: 640px) {
    body.page-download .dl-card-header {
        gap: 12px;
    }
    body.page-download .dl-card-name {
        font-size: 1.05rem;
        white-space: normal;
    }
    body.page-download .dl-client-meta {
        justify-content: flex-start;
    }
    body.page-download .dl-card-downloads {
        gap: 7px;
    }
    body.page-download .dl-btn-primary,
    body.page-download .dl-dl-chip {
        flex: 1 1 100%;
        justify-content: center;
        white-space: normal;
    }
}
