/* Tonnet Browser — Professional One-Pager */

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

:root {
    --bg: #080C1A;
    --fg: #e8e8e8;
    --fg-muted: #737373;
    --accent: #0098EA;
    --accent-hover: #0080cc;
    --border: rgba(255, 255, 255, 0.10);
    --border-hover: rgba(255, 255, 255, 0.20);
    --surface: #111829;
    --surface-hover: #141B30;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'DM Mono', 'SF Mono', 'Fira Code', monospace;
    --radius: 100px;
    --radius-lg: 24px;

    /* Typography — fluid */
    --text-hero: clamp(1.5rem, 1rem + 4.5vw, 4.5rem);
    --text-2xl: clamp(1.875rem, 1.5rem + 2vw, 3rem);
    --text-xl: clamp(1.375rem, 1.2rem + 0.9vw, 1.875rem);
    --text-base: clamp(1rem, 0.9rem + 0.5vw, 1.125rem);
    --text-sm: clamp(0.875rem, 0.8rem + 0.3vw, 1rem);

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;
    --space-4xl: 96px;
    --space-5xl: 128px;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: clip;
}

body {
    background: var(--bg);
    color: var(--fg);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: clip;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

img {
    max-width: 100%;
    height: auto;
}

/* ===== Navigation ===== */
.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.4rem 2.5rem;
    background: rgba(8, 12, 26, 0.6);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid transparent;
    transition: all 0.4s cubic-bezier(.4, 0, .2, 1);
}

.nav::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    opacity: 0.5;
}

.nav.scrolled {
    background: rgba(8, 12, 26, 0.85);
    backdrop-filter: blur(30px) saturate(200%);
    -webkit-backdrop-filter: blur(30px) saturate(200%);
    border-bottom-color: var(--border);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    text-decoration: none;
    color: var(--fg);
    font-family: 'Plus Jakarta Sans', var(--font-sans);
    font-weight: 800;
    font-size: 1.45rem;
    letter-spacing: -0.025em;
}

.nav-logo-mark {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    flex-shrink: 0;
}

.nav-logo-mark svg {
    width: 100%;
    height: 100%;
}

.nav-links {
    display: flex;
    gap: 2.4rem;
    align-items: center;
}

.nav-link {
    font-family: 'Plus Jakarta Sans', var(--font-sans);
    color: var(--fg);
    text-decoration: none;
    font-size: 0.98rem;
    font-weight: 500;
    transition: color 0.15s;
}

.nav-link:hover {
    color: var(--accent);
}

.nav-mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--fg);
    cursor: pointer;
    padding: var(--space-sm);
    touch-action: manipulation;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 14px var(--space-lg);
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.2s, border-color 0.2s, transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--fg);
    color: var(--bg);
}

.btn-primary:hover {
    background: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.15);
}

.btn-secondary {
    background: var(--surface);
    color: var(--fg);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--surface-hover);
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* ===== Section Pattern ===== */
.section {
    max-width: 1100px;
    margin: 0 auto;
    padding: clamp(5.5rem, 9vw, 9rem) var(--space-3xl);
    position: relative;
}

.section-alt {
    position: relative;
    z-index: 1;
    padding-top: clamp(6rem, 8vw, 7.5rem);
    padding-bottom: clamp(6rem, 8vw, 7.5rem);
    margin-top: -25px;
    margin-bottom: -25px;
}

.section-alt::before {
    content: '';
    position: absolute;
    inset: 0 calc(50% - 50vw);
    background: var(--surface);
    border-radius: 56% 44% 50% 50% / 65px 55px 65px 75px;
    z-index: -1;
}

.section-header {
    margin-bottom: var(--space-3xl);
    text-align: center;
}

.section-label {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    color: #ffffff;
    background: #0098EA;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-sm);
    padding: 4px 12px;
    border-radius: 100px;
}

.section-title {
    font-family: 'Plus Jakarta Sans', var(--font-sans);
    font-size: clamp(2.5rem, 5.5vw, 4.5rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.035em;
    color: var(--fg);
    text-wrap: balance;
}

.section-desc {
    font-size: var(--text-base);
    color: var(--fg-muted);
    line-height: 1.6;
    max-width: 600px;
    margin: var(--space-md) auto 0;
    text-wrap: balance;
}

/* ===== Hero ===== */
.hero {
    max-width: 1250px;
    margin: 0 auto;
    padding: var(--space-3xl) var(--space-2xl) var(--space-4xl);
    text-align: center;
}



.hero-title {
    font-family: 'Plus Jakarta Sans', var(--font-sans);
    font-size: clamp(2.8rem, 7vw, 6rem);
    font-weight: 800;
    line-height: 1.02;
    letter-spacing: -0.035em;
    margin: 0 auto var(--space-lg);
    max-width: 1250px;
    color: var(--fg);
    text-wrap: balance;
}

.hero-line {
    display: block;
}

.hero-mockup {
    margin: 3rem auto 0;
    max-width: 1100px;
    padding: 0 var(--space-md);
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 35%, transparent 92%);
            mask-image: linear-gradient(to bottom, #000 0%, #000 35%, transparent 92%);
}

.hero-mockup .browser-mockup {
    margin: 0 auto;
}

@media (max-width: 768px) {
    .hero-mockup {
        margin-top: 2rem;
        -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 45%, transparent 95%);
                mask-image: linear-gradient(to bottom, #000 0%, #000 45%, transparent 95%);
    }
}

.hero-desc {
    position: relative;
    z-index: 2;
    font-family: 'Plus Jakarta Sans', var(--font-sans);
    font-size: 1.55rem;
    font-weight: 500;
    color: var(--fg);
    line-height: 1.45;
    letter-spacing: -0.018em;
    max-width: 920px;
    margin: 2.5rem auto var(--space-2xl);
    padding: 0 1rem;
    text-align: center;
    text-wrap: balance;
}

.hero-mockup + .hero-desc {
    margin-top: -5rem;
}

@media (max-width: 768px) {
    .hero-desc { font-size: 1.25rem; }
    .hero-mockup + .hero-desc { margin-top: -3rem; }
}

.hero-desc .muted {
    color: var(--fg-muted);
    font-weight: 400;
}

.hero-desc .hl {
    position: relative;
    color: var(--accent);
    white-space: nowrap;
    font-weight: 700;
}

.hero-desc .hl::after {
    content: '';
    position: absolute;
    left: -2%;
    right: -2%;
    bottom: -0.12em;
    height: 7px;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 10' preserveAspectRatio='none'><path d='M2 7 Q 50 1, 100 5 T 198 6' stroke='%230098EA' stroke-width='3' stroke-linecap='round' fill='none'/></svg>");
    background-repeat: no-repeat;
    background-size: 100% 100%;
}

.hero-actions {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: var(--space-lg);
}

.hero-trust {
    font-size: 13px;
    color: var(--fg-muted);
    letter-spacing: 0.02em;
}

.hero-platforms {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.4rem;
    margin-top: var(--space-md);
    opacity: 0.7;
    transition: opacity 0.2s;
}

.hero-platforms:hover { opacity: 0.95; }

.hero-platforms img {
    width: 22px;
    height: 22px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

/* ===== Timeline (How It Works) ===== */
.timeline {
    max-width: 720px;
    margin: 0 auto;
}

.timeline-item {
    display: grid;
    grid-template-columns: 24px 1fr;
    gap: var(--space-lg);
}

.timeline-marker {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 4px;
}

.timeline-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent);
    flex-shrink: 0;
    transition: box-shadow 0.2s;
}

.timeline-item:hover .timeline-dot {
    box-shadow: 0 0 14px rgba(0, 152, 234, 0.6);
}

.timeline-line {
    width: 1px;
    flex: 1;
    background: var(--border);
    margin-top: var(--space-sm);
}

.timeline-content {
    padding-bottom: var(--space-2xl);
}

.timeline-item:last-child .timeline-content {
    padding-bottom: 0;
}

.timeline-number {
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: var(--space-xs);
    letter-spacing: 0.05em;
}

.timeline-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--fg);
    margin-bottom: var(--space-xs);
}

.timeline-desc {
    font-size: 14px;
    color: var(--fg-muted);
    line-height: 1.6;
}

/* ===== Download Cards ===== */
.download-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-md);
}

.download-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl) var(--space-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
    text-decoration: none;
    transition: background-color 0.2s;
}

.download-card:hover {
    background: var(--surface);
}

.download-card-icon {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.download-card-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--fg);
}

.download-card-formats {
    font-size: 12px;
    color: var(--fg-muted);
    text-align: center;
}

/* ===== Browser Mockup (preserved from original) ===== */
.browser-mockup {
    --bm-bg: #17212b;
    --bm-bg-secondary: #0e1621;
    --bm-foreground: #f5f5f5;
    --bm-primary: #5288c1;
    --bm-surface: rgba(255, 255, 255, 0.06);
    --bm-surface-hover: rgba(255, 255, 255, 0.08);
    --bm-surface-active: rgba(255, 255, 255, 0.12);
    --bm-border: #2b3d4f;
    --bm-border-subtle: rgba(255, 255, 255, 0.1);
    --bm-muted: rgba(255, 255, 255, 0.6);
    --bm-success: #22c55e;
    --bm-destructive: #ec3942;

    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    background: var(--bm-bg);
    border: 1px solid var(--bm-border-subtle);
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.6),
        0 0 80px rgba(82, 136, 193, 0.15);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

.browser-header {
    display: flex;
    align-items: center;
    background: var(--bm-bg);
    min-height: 44px;
    padding: 0;
}

.browser-tabs {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
}

.browser-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 9999px;
    font-size: 14px;
    color: var(--bm-muted);
    background: var(--bm-surface);
    border: 1px solid transparent;
    cursor: default;
    max-width: 200px;
}

.browser-tab.active {
    background: var(--bm-surface-active);
    border-color: rgba(255, 255, 255, 0.15);
    color: var(--bm-foreground);
}

.tab-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tab-close {
    width: 14px;
    height: 14px;
    opacity: 0.5;
    flex-shrink: 0;
}

.tab-new {
    width: 28px;
    height: 28px;
    border-radius: 9999px;
    background: var(--bm-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bm-muted);
}

.browser-header-spacer {
    flex: 1;
}

.window-controls {
    display: flex;
    align-items: center;
}

.window-btn {
    width: 40px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bm-foreground);
}

.window-btn svg {
    width: 16px;
    height: 16px;
}

.window-btn.maximize svg {
    width: 12px;
    height: 12px;
}

.window-btn.close {
    color: var(--bm-foreground);
}

.browser-navbar {
    display: flex;
    align-items: center;
    padding: 6px 8px;
    gap: 8px;
    background: var(--bm-bg);
}

.nav-buttons,
.action-buttons {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 2px 4px;
    border-radius: 9999px;
    background: var(--bm-surface);
    border: 1px solid var(--bm-surface-hover);
}

.browser-navbar .nav-btn {
    width: 32px;
    height: 32px;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bm-foreground);
    background: transparent;
    border: none;
    padding: 0;
}

.browser-navbar .nav-btn.disabled {
    opacity: 0.4;
}

.browser-navbar .nav-btn svg {
    width: 18px;
    height: 18px;
    stroke-width: 2;
}

.address-bar {
    flex: 1;
    display: flex;
    align-items: center;
    min-width: 200px;
    background: var(--bm-surface);
    border: 1px solid var(--bm-surface-hover);
    border-radius: 9999px;
    padding: 4px 12px 4px 6px;
    gap: 8px;
}

.ton-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 9999px;
    background: #0098EA;
    color: white;
    font-size: 12px;
    font-weight: 500;
    flex-shrink: 0;
}

.ton-badge svg {
    width: 12px;
    height: 12px;
}

.address-ton-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin-left: 6px;
}

.address-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--bm-foreground);
    font-size: 14px;
    text-align: left;
}

.bookmark-star {
    color: var(--bm-muted);
    flex-shrink: 0;
}

.browser-content {
    min-height: 260px;
    background: var(--bm-bg-secondary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    position: relative;
    overflow: hidden;
}

.browser-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 30% 20%, rgba(0, 152, 234, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 80%, rgba(82, 136, 193, 0.08) 0%, transparent 50%);
    animation: glowPulse 6s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.content-inner {
    position: relative;
    z-index: 1;
    width: 100%;
    text-align: center;
}

.browser-statusbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 12px;
    background: var(--bm-bg-secondary);
    border-top: 1px solid var(--bm-border);
    font-size: 12px;
    color: var(--bm-muted);
}

.status-left,
.status-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--bm-success);
    animation: statusPulse 2s ease-in-out infinite;
}

@keyframes statusPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.9); }
}

.status-connected {
    color: var(--bm-success);
}

.status-garlic {
    color: #0098EA;
}

.status-separator {
    width: 1px;
    height: 12px;
    background: var(--bm-border);
}

/* Mockup content — new design */
.mockup-lottie {
    width: 200px;
    height: 200px;
    margin: 0 auto 16px;
}

.mockup-text {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.78);
    margin-bottom: 14px;
}

.mockup-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 4px 10px 16px;
    background: var(--bm-surface);
    border: 1px solid var(--bm-surface-hover);
    border-radius: 9999px;
    max-width: 560px;
    width: 100%;
    margin: 0 auto 24px;
}

.mockup-search-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: var(--bm-muted);
}

.mockup-search-placeholder {
    flex: 1;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.78);
    text-align: left;
}

.mockup-search-go {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.mockup-search-go svg {
    width: 14px;
    height: 14px;
    color: white;
}

.mockup-version {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.3);
}

/* ===== Features Grid ===== */
.features-bento {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: 170px;
    gap: 8px;
    max-width: 1250px;
    margin: 0 auto;
}

.fb-card {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 1.7rem 1.8rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 0.5rem;
    overflow: hidden;
    transition: border-color 0.25s;
    font-family: 'Plus Jakarta Sans', var(--font-sans);
}

.fb-card:hover {
    border-color: var(--accent);
}

.fb-card h3 {
    font-family: 'Plus Jakarta Sans', var(--font-sans);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.1;
    color: var(--fg);
}

.fb-card p {
    font-family: 'Plus Jakarta Sans', var(--font-sans);
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--fg);
    line-height: 1.55;
    margin-top: 0.7rem;
}

.fb-card p .muted {
    color: var(--fg-muted);
    font-weight: 400;
}

.fb-card p .hl {
    position: relative;
    color: var(--accent);
    white-space: nowrap;
    font-weight: 700;
}

.fb-card p .hl::after {
    content: '';
    position: absolute;
    left: -2%;
    right: -2%;
    bottom: -0.12em;
    height: 6px;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 10' preserveAspectRatio='none'><path d='M2 7 Q 50 1, 100 5 T 198 6' stroke='%230098EA' stroke-width='3' stroke-linecap='round' fill='none'/></svg>");
    background-repeat: no-repeat;
    background-size: 100% 100%;
}

/* Hero — Multi-Hop Tunnel Routing */
.fb-hero {
    grid-column: span 7;
    grid-row: span 2;
    border-radius: 28px;
    padding: 2.4rem 2.6rem;
    justify-content: center;
    gap: 0;
}

.fb-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 44px 44px;
    -webkit-mask-image: radial-gradient(900px 500px at 30% 20%, #000 0%, transparent 70%);
            mask-image: radial-gradient(900px 500px at 30% 20%, #000 0%, transparent 70%);
    pointer-events: none;
}

.fb-hero h3 {
    font-size: clamp(2rem, 3.5vw, 3rem);
    max-width: 620px;
    position: relative;
}

.fb-hero p {
    font-size: 1.05rem;
    max-width: 560px;
    margin-top: 1rem;
    position: relative;
}

/* Stat — 25+ Shields */
.fb-stat {
    grid-column: span 5;
    border-radius: 22px;
    justify-content: center;
    gap: 0.2rem;
}

.fb-stat .big {
    font-family: 'Plus Jakarta Sans', var(--font-sans);
    font-weight: 800;
    font-size: clamp(3rem, 5vw, 4rem);
    letter-spacing: -0.05em;
    line-height: 0.9;
    color: var(--accent);
}

.fb-stat h3 {
    font-size: 1.25rem;
}

.fb-stat .vectors {
    font-family: 'JetBrains Mono', var(--font-mono);
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 0.05em;
    line-height: 1.5;
    margin-top: 0.3rem;
}

/* Wallet */
.fb-wallet {
    grid-column: span 5;
}

.fb-wallet h3 {
    font-size: 1.5rem;
}

.fb-wallet .chip-402 {
    align-self: flex-start;
    font-family: 'JetBrains Mono', var(--font-mono);
    font-size: 0.7rem;
    padding: 0.4rem 0.8rem;
    border: 1px solid var(--accent);
    color: var(--accent);
    border-radius: 999px;
    margin-top: auto;
}

/* Detail cards */
.fb-detail {
    grid-column: span 6;
}

.fb-detail h3 {
    font-size: 1.5rem;
}

.fb-detail.fb-small {
    grid-column: span 4;
}

.fb-detail.fb-small h3 {
    font-size: 1.25rem;
}

/* Chain card */
.fb-chain {
    grid-column: span 4;
}

.fb-chain h3 {
    font-size: 1.15rem;
}

.fb-chain .chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: auto;
}

.fb-chain .chips span {
    font-family: 'Inter', var(--font-sans);
    font-weight: 600;
    font-size: 0.78rem;
    letter-spacing: 0;
    padding: 0.4rem 0.9rem;
    background: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 999px;
    color: #ffffff;
}

.fb-chain .chips .primary {
    background: var(--accent);
    color: #ffffff;
    border-color: var(--accent);
}

/* Platform card */
.fb-platform {
    grid-column: span 7;
}

.fb-platform h3 {
    font-size: 1.4rem;
}

.fb-platform .os-row {
    display: flex;
    align-items: center;
    gap: 1.6rem;
    margin-top: auto;
    opacity: 0.85;
}

.fb-platform .os-row img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

/* Open source */
.fb-source {
    grid-column: span 5;
    text-decoration: none;
    color: inherit;
}

.fb-source-head {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.fb-source-logo {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    color: var(--fg);
}

.fb-source h3 {
    font-family: 'JetBrains Mono', var(--font-mono);
    font-weight: 500;
    font-size: 1.05rem;
    letter-spacing: 0;
    color: var(--fg);
}

.fb-source .mit {
    margin-top: auto;
    font-family: 'Plus Jakarta Sans', var(--font-sans);
    font-weight: 800;
    font-size: 2.6rem;
    letter-spacing: -0.03em;
    color: var(--accent);
    line-height: 1;
}

@media (max-width: 1100px) {
    .fb-hero h3 { font-size: 2.2rem; }
}

@media (max-width: 900px) {
    .features-bento {
        grid-template-columns: repeat(6, 1fr);
    }
    .fb-hero { grid-column: span 6; grid-row: span 2; }
    .fb-stat, .fb-wallet, .fb-platform, .fb-source { grid-column: span 6; }
    .fb-detail, .fb-chain { grid-column: span 3; }
    .fb-detail.fb-small { grid-column: span 3; }
}

@media (max-width: 640px) {
    .features-bento {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
    }
    .fb-card {
        grid-column: 1 !important;
        grid-row: auto !important;
        min-height: 180px;
    }
    .fb-hero h3 { font-size: 1.9rem; }
    .fb-stat .big { font-size: 4.5rem; }
}

/* ===== FAQ ===== */
.faq-grid {
    max-width: 820px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}

.faq-item {
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    overflow: hidden;
    transition: border-color 0.2s;
}

.faq-item:first-child {
    border-top: 1px solid var(--border);
}

.faq-item:hover {
    border-bottom-color: var(--border-hover);
}

.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.6rem 0.25rem;
    cursor: pointer;
    list-style: none;
    font-family: 'Plus Jakarta Sans', var(--font-sans);
    font-size: clamp(1.05rem, 0.95rem + 0.4vw, 1.25rem);
    font-weight: 700;
    letter-spacing: -0.018em;
    color: var(--fg);
    transition: color 0.2s;
}

.faq-item:hover .faq-question {
    color: var(--accent);
}

.faq-question::-webkit-details-marker {
    display: none;
}

.faq-question svg {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    color: var(--fg-muted);
    transition: transform 0.25s ease, color 0.2s;
}

.faq-item[open] .faq-question svg {
    transform: rotate(180deg);
    color: var(--accent);
}

.faq-question:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
    border-radius: 4px;
}

.faq-answer {
    padding: 0 0.25rem 1.8rem;
}

.faq-answer p {
    font-family: 'Plus Jakarta Sans', var(--font-sans);
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--fg-muted);
    line-height: 1.6;
    letter-spacing: -0.012em;
    max-width: 720px;
}

/* ===== Footer ===== */
.footer {
    padding: 6rem 2rem 0;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr auto;
    gap: 3rem;
    align-items: start;
}

.footer-logo {
    display: inline-block;
    width: 100px;
    color: var(--accent);
    text-decoration: none;
    margin-bottom: 0.9rem;
}

.footer-logo svg {
    width: 100%;
    height: auto;
    display: block;
}

.footer-tagline {
    font-family: 'Plus Jakarta Sans', var(--font-sans);
    font-weight: 400;
    font-size: 0.95rem;
    color: var(--fg-muted);
    line-height: 1.55;
    word-spacing: 0.05em;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.footer-link {
    font-family: 'Plus Jakarta Sans', var(--font-sans);
    font-weight: 500;
    font-size: 1rem;
    color: var(--fg);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 0;
    letter-spacing: -0.012em;
    transition: color 0.15s;
}

.footer-link:hover {
    color: var(--accent);
}

.footer-link-head {
    font-weight: 800;
    letter-spacing: -0.018em;
}

.caret {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-right: 1.8px solid currentColor;
    border-bottom: 1.8px solid currentColor;
    transform: rotate(45deg) translate(-2px, -2px);
    margin-left: 0.1rem;
}

.footer-col-social {
    display: flex;
    flex-direction: row;
    gap: 0.6rem;
    align-items: center;
    padding-top: 0.5rem;
}

.footer-social {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--fg);
    text-decoration: none;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.footer-social:hover {
    color: var(--accent);
    border-color: var(--accent);
}

.footer-social svg {
    width: 18px;
    height: 18px;
}

.footer-bigname {
    position: relative;
    width: 100%;
    margin-top: 4rem;
    height: clamp(60px, 12vw, 220px);
    overflow: hidden;
    user-select: none;
    --mx: 50%;
    --my: 50%;
}

.bigname-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    display: block;
    pointer-events: none;
}

.bigname-svg text {
    font-family: 'Plus Jakarta Sans', var(--font-sans);
    font-weight: 800;
}

.bigname-svg.outline text {
    fill: var(--bg);
    stroke: var(--accent);
    stroke-width: 3;
    paint-order: stroke fill;
    stroke-linejoin: round;
    stroke-linecap: round;
}

.bigname-svg {
    pointer-events: none;
}

.bigname-svg.fill {
    opacity: 0;
    -webkit-mask-image: radial-gradient(circle 280px at var(--mx) var(--my), #000 0%, rgba(0, 0, 0, 0.7) 40%, transparent 100%);
            mask-image: radial-gradient(circle 280px at var(--mx) var(--my), #000 0%, rgba(0, 0, 0, 0.7) 40%, transparent 100%);
    transition: opacity 0.25s ease;
}

.bigname-svg.fill text {
    fill: var(--accent);
}

.footer-bigname:hover .bigname-svg.fill {
    opacity: 1;
}

@media (max-width: 768px) {
    .footer-inner {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* ===== Scroll Reveal ===== */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== A11y ===== */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
    .features-grid {
        grid-template-columns: 1fr;
    }

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

    .footer-main {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-xl);
    }

    .footer-brand {
        grid-column: 1 / -1;
    }

    .mini-chat {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .nav {
        padding: var(--space-md) var(--space-lg);
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(10, 10, 10, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        padding: var(--space-sm) var(--space-lg);
        gap: 0;
        border-bottom: 1px solid var(--border);
        display: flex;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px);
        transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
        pointer-events: none;
    }

    .nav-links.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        pointer-events: auto;
    }

    .nav-link {
        padding: 12px 0;
        display: block;
    }

    .nav-mobile-toggle {
        display: block;
    }

    .hero {
        padding: var(--space-2xl) var(--space-lg) var(--space-3xl);
    }

    .hero-desc {
        font-size: 16px;
    }

    .section {
        padding: var(--space-3xl) var(--space-lg);
    }

    .section-title br {
        display: none;
    }

    .footer-content {
        padding: var(--space-2xl) var(--space-lg) var(--space-lg);
    }

    .footer-main {
        grid-template-columns: 1fr 1fr;
    }

    .footer-brand {
        grid-column: 1 / -1;
    }

    .footer-bottom {
        flex-wrap: wrap;
        justify-content: center;
        text-align: center;
        gap: 6px;
    }

    /* Mockup responsive */
    .browser-mockup {
        border-radius: 8px;
    }

    .browser-navbar {
        padding: 4px 6px;
        gap: 4px;
        align-items: center;
    }

    .nav-buttons {
        padding: 2px;
        gap: 0;
        height: 32px;
    }

    .nav-buttons .nav-btn {
        width: 28px;
        height: 28px;
    }

    .address-bar {
        min-width: 0;
        flex: 1;
        padding: 0 8px 0 4px;
        gap: 4px;
        height: 32px;
    }

    .ton-badge {
        padding: 2px 6px;
        font-size: 9px;
        height: 24px;
        display: flex;
        align-items: center;
        gap: 2px;
    }

    .ton-badge svg {
        width: 10px;
        height: 10px;
    }

    .address-input {
        font-size: 12px;
        line-height: 32px;
    }

    .bookmark-star {
        display: none;
    }

    .browser-content {
        min-height: 180px;
        padding: 24px 16px;
    }

    .action-buttons {
        display: none;
    }

    .status-right {
        display: none;
    }

    .mockup-lottie {
        width: 140px;
        height: 140px;
    }

    .mockup-text {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .nav {
        padding: var(--space-sm) var(--space-md);
    }

    .hero {
        padding: var(--space-xl) 20px var(--space-2xl);
    }

    .hero-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .section {
        padding: var(--space-2xl) 20px;
    }

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

    .window-controls {
        display: flex;
        padding-right: 4px;
    }

    .window-btn {
        width: 28px;
        height: 24px;
    }

    .window-btn svg {
        width: 12px;
        height: 12px;
    }

    .browser-tabs {
        flex: 1;
    }

    .browser-tab {
        flex: 1;
        justify-content: center;
        padding: 4px 8px;
        font-size: 11px;
        max-width: 120px;
    }

    .tab-close, .tab-new {
        display: none;
    }

    .nav-buttons .nav-btn:nth-child(n+3) {
        display: none;
    }

    .address-bar {
        padding: 2px 6px 2px 2px;
    }

    .ton-badge {
        padding: 2px 4px;
    }

    .ton-badge svg {
        width: 10px;
        height: 10px;
    }

    .address-input {
        font-size: 11px;
    }

    .footer-content {
        padding: var(--space-xl) 20px var(--space-md);
    }

    .footer-main {
        grid-template-columns: 1fr;
    }

    .footer-brand {
        grid-column: auto;
    }

    .chat-bubble {
        max-width: 160px;
    }

    .footer-bottom {
        font-size: 11px;
    }

    .mockup-lottie {
        width: 120px;
        height: 120px;
    }

    .mockup-search {
        padding: 8px 10px 8px 14px;
    }

    .mockup-search-placeholder {
        font-size: 12px;
    }

    .status-garlic {
        display: none;
    }
}

/* =============================================
   Download Page — Adapted to new design system
   ============================================= */

body:has(.header) {
    padding-top: 56px;
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    height: 56px;
    z-index: 100;
    border-bottom: 1px solid var(--border);
    transition: background-color 0.2s;
}

.header.scrolled {
    background: rgba(10, 10, 10, 0.98);
}

.header-container {
    max-width: 1100px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-3xl);
}

.header-brand {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 16px;
    font-weight: 600;
    color: var(--fg);
    letter-spacing: -0.01em;
    text-decoration: none;
}

.brand-logo {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.brand-logo img {
    width: 100%;
    height: 100%;
}

.version-badge {
    background: var(--accent);
    color: white;
    padding: 2px var(--space-sm);
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.header-nav {
    display: flex;
    gap: var(--space-xl);
    align-items: center;
}

.header-nav .nav-link {
    color: var(--fg-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

.header-nav .nav-link:hover {
    color: var(--fg);
}

.nav-btn-download {
    background: var(--fg);
    color: var(--bg);
    padding: 10px 20px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.2s, transform 0.2s;
}

.nav-btn-download:hover {
    background: #ffffff;
    transform: translateY(-1px);
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 var(--space-3xl);
}

.page-header {
    padding: var(--space-4xl) 0 var(--space-2xl);
    text-align: center;
}

.page-title {
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--fg);
    margin-bottom: var(--space-md);
    letter-spacing: -0.025em;
}

.page-description {
    font-size: var(--text-base);
    color: var(--fg-muted);
    max-width: 600px;
    margin: 0 auto;
    text-wrap: balance;
}

.download-section {
    padding: 0 0 var(--space-3xl);
}

.container > main > .hero .hero-title,
.container .hero .hero-title {
    font-size: clamp(2rem, 4vw + 0.5rem, 3.25rem);
    white-space: nowrap;
}

.dl-alt-zone {
    position: relative;
    z-index: 1;
}

.dl-alt-zone > #how-it-works {
    padding-top: 2rem;
}

.dl-alt-zone::before {
    content: '';
    position: absolute;
    inset: -3rem calc(50% - 50vw) 0;
    background: var(--surface);
    border-radius: 62% 38% 47% 53% / 72px 52px 78px 58px;
    z-index: -1;
}

.download-section > input[type="radio"] { display: none; }

.dl-tabs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    border: 1px solid var(--border);
    border-radius: 18px;
    overflow: hidden;
    background: #0d1322;
    margin-bottom: 2rem;
}

.dl-tabs label {
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    font-family: 'Plus Jakarta Sans', var(--font-sans);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--fg-muted);
    cursor: pointer;
    border-right: 1px solid var(--border);
    transition: background 0.15s, color 0.15s;
}

.dl-tabs label:last-child { border-right: none; }

.dl-tabs label img {
    width: 22px;
    height: 22px;
    object-fit: contain;
    opacity: 0.7;
    transition: opacity 0.15s, filter 0.15s;
}

.dl-tabs label:hover {
    background: var(--surface);
    color: var(--fg);
}

.download-section #dl-tab-linux:checked ~ .dl-tabs label[for=dl-tab-linux],
.download-section #dl-tab-win:checked ~ .dl-tabs label[for=dl-tab-win],
.download-section #dl-tab-mac:checked ~ .dl-tabs label[for=dl-tab-mac],
.download-section #dl-tab-and:checked ~ .dl-tabs label[for=dl-tab-and] {
    background: var(--accent);
    color: #ffffff;
}

.download-section #dl-tab-linux:checked ~ .dl-tabs label[for=dl-tab-linux] img,
.download-section #dl-tab-win:checked ~ .dl-tabs label[for=dl-tab-win] img,
.download-section #dl-tab-mac:checked ~ .dl-tabs label[for=dl-tab-mac] img,
.download-section #dl-tab-and:checked ~ .dl-tabs label[for=dl-tab-and] img {
    filter: brightness(0) invert(1);
    opacity: 1;
}

.dl-panel {
    display: none;
    padding: 3rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 22px;
    min-height: 280px;
    grid-template-columns: 1fr auto;
    gap: 2rem;
    align-items: center;
    animation: dl-fade 0.3s ease;
}

@keyframes dl-fade {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
}

.download-section #dl-tab-linux:checked ~ .dl-panels .dl-p-linux,
.download-section #dl-tab-win:checked ~ .dl-panels .dl-p-win,
.download-section #dl-tab-mac:checked ~ .dl-panels .dl-p-mac,
.download-section #dl-tab-and:checked ~ .dl-panels .dl-p-and {
    display: grid;
}

.dl-panel h3 {
    font-family: 'Plus Jakarta Sans', var(--font-sans);
    font-weight: 800;
    font-size: clamp(2rem, 4vw, 2.8rem);
    letter-spacing: -0.03em;
    line-height: 1;
    color: var(--fg);
}

.dl-panel .dl-sub {
    font-family: 'JetBrains Mono', var(--font-mono);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--fg-muted);
    margin-top: 0.8rem;
}

.dl-panel .dl-desc {
    font-family: 'Plus Jakarta Sans', var(--font-sans);
    font-size: 1rem;
    font-weight: 500;
    color: var(--fg-muted);
    line-height: 1.55;
    margin-top: 1rem;
    max-width: 460px;
}

.dl-panel .dl-downloads {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.dl-panel .dl-downloads a {
    font-family: 'Plus Jakarta Sans', var(--font-sans);
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.95rem 1.4rem;
    background: #0d1322;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    color: var(--fg);
    min-width: 200px;
    text-align: left;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.15s;
}

.dl-panel .dl-downloads a:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--bg);
    transform: translateY(-1px);
}

@media (max-width: 700px) {
    .dl-tabs { grid-template-columns: repeat(2, 1fr); }
    .dl-tabs label:nth-child(2) { border-right: none; }
    .dl-tabs label:nth-child(1),
    .dl-tabs label:nth-child(2) { border-bottom: 1px solid var(--border); }
    .dl-panel { grid-template-columns: 1fr; padding: 2rem; }
}

.source-section {
    padding: 0 0 var(--space-3xl);
}

.source-card {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg) var(--space-xl);
    transition: border-color 0.2s;
}

.source-card:hover {
    border-color: var(--border-hover);
}

.source-icon {
    color: var(--accent);
    flex-shrink: 0;
}

.source-content {
    flex: 1;
}

.source-content h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--fg);
    margin-bottom: 4px;
}

.source-content p {
    font-size: 13px;
    color: var(--fg-muted);
    margin: 0;
    line-height: 1.5;
}

.source-link {
    background: var(--surface-hover);
    border: 1px solid var(--border);
    color: var(--fg);
    padding: 10px 20px;
    border-radius: var(--radius);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: background-color 0.2s, border-color 0.2s;
    white-space: nowrap;
}

.source-link:hover {
    background: var(--border-hover);
    border-color: var(--border-hover);
}

/* Download page footer */
.header ~ main ~ footer {
    border-top: 1px solid var(--border);
    background: transparent;
    padding: var(--space-lg) 0;
    margin-top: var(--space-2xl);
}

.header ~ main ~ footer .footer-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 var(--space-3xl);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-xl);
    flex-wrap: wrap;
}

.footer-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--fg-muted);
    font-size: 13px;
    text-decoration: none;
}

.footer-item.link {
    transition: color 0.2s;
    cursor: pointer;
}

.footer-item.link:hover {
    color: var(--fg);
}

.bg-gradient {
    display: none;
}

.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 28px;
    height: 28px;
    cursor: pointer;
    padding: 4px;
    z-index: 1002;
    background: none;
    border: none;
    color: var(--fg);
}

.hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--fg);
    border-radius: 1px;
    transition: transform 0.3s, opacity 0.3s;
}

.hamburger.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.open span:nth-child(2) {
    opacity: 0;
}

.hamburger.open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Download page responsive */
@media (max-width: 768px) {
    .header-container {
        padding: 0 var(--space-lg);
    }

    .page-header {
        padding: var(--space-3xl) 0 var(--space-xl);
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .source-card {
        flex-direction: column;
        text-align: center;
        gap: var(--space-md);
    }

    .hamburger {
        display: flex;
    }

    .header-nav {
        position: fixed;
        top: 0;
        right: -220px;
        width: 220px;
        height: 100vh;
        background: rgba(10, 10, 10, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        align-items: flex-end;
        padding: 70px var(--space-lg) var(--space-lg);
        gap: 0;
        border-left: 1px solid var(--border);
        transition: right 0.3s ease;
        z-index: 1001;
    }

    .header-nav.open {
        right: 0;
    }

    .header-nav .nav-link {
        padding: 12px 0;
        display: block;
    }

    .header-nav .nav-btn-download {
        margin-top: var(--space-md);
    }

    .container {
        padding: 0 var(--space-lg);
    }
}

@media (max-width: 480px) {
    .header {
        height: 48px;
    }

    body:has(.header) {
        padding-top: 48px;
    }

    .header-container {
        padding: 0 var(--space-md);
    }

    .header-brand {
        font-size: 14px;
    }

    .brand-logo {
        width: 22px;
        height: 22px;
    }

    .container {
        padding: 0 20px;
    }

    .header ~ main ~ footer .footer-content {
        padding: 0 20px;
    }
}

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* ===== Terminal Install Section ===== */
.terminal {
    max-width: 900px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: var(--surface);
}

.terminal-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 20px;
    background: var(--bg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.terminal-dots {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.terminal-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.terminal-dot--red { background: #ff5f57; }
.terminal-dot--yellow { background: #febc2e; }
.terminal-dot--green { background: #28c840; }

.terminal-tabs {
    display: flex;
    gap: 2px;
    flex: 1;
}

.terminal-tab {
    padding: 6px 16px;
    background: none;
    border: none;
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.4);
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.terminal-tab:hover {
    color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.05);
}

.terminal-tab--active {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.terminal-tab:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
}

.terminal-copy {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.5);
    font-family: inherit;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.terminal-copy:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.terminal-copy:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.terminal-copy.copied {
    background: rgba(40, 200, 64, 0.2);
    border-color: rgba(40, 200, 64, 0.3);
    color: #28c840;
}

.terminal-body {
    padding: 28px 24px;
    min-height: 120px;
}

.terminal-panel:not(.terminal-panel--active) {
    display: none;
}
.terminal-panel--active {
    animation: terminalFade 0.22s ease-out;
}
@keyframes terminalFade {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}


.terminal-panel pre {
    margin: 0;
    padding: 0;
    background: none;
    overflow-x: auto;
}

.terminal-panel code {
    font-family: SF Mono, Monaco, Menlo, Courier New, monospace;
    font-size: 14px;
    line-height: 1.8;
    color: var(--fg);
    white-space: pre;
}

/* Mobile */
@media (max-width: 640px) {
    .terminal-header {
        flex-wrap: wrap;
        gap: 10px;
        padding: 12px 16px;
    }

    .terminal-dots {
        display: none;
    }

    .terminal-tabs {
        order: 1;
        width: 100%;
    }

    .terminal-tab {
        flex: 1;
        text-align: center;
        padding: 8px 12px;
    }

    .terminal-copy {
        order: 2;
        width: 100%;
        justify-content: center;
    }

    .terminal-body {
        padding: 20px 16px;
    }

    .terminal-panel code {
        font-size: 11px;
    }
}

/* Language Dropdown */
.lang-dropdown {
    position: relative;
}

.lang-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    color: var(--fg-muted);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
    font-family: var(--font-sans);
}

.lang-toggle:hover {
    color: var(--fg);
    background: rgba(255, 255, 255, 0.06);
}

.lang-toggle svg {
    opacity: 0.6;
    flex-shrink: 0;
}

.lang-menu {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    min-width: 130px;
    background: rgba(20, 20, 20, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 4px;
    z-index: 200;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.lang-dropdown.open .lang-menu {
    display: block;
}

.lang-option {
    display: block;
    padding: 8px 12px;
    color: var(--fg-muted);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    border-radius: 6px;
    transition: color 0.15s, background 0.15s;
}

.lang-option:hover {
    color: var(--fg);
    background: rgba(255, 255, 255, 0.08);
}

.lang-option.lang-active {
    color: var(--accent);
}

@media (max-width: 768px) {
    .lang-dropdown {
        margin-top: 8px;
        padding-top: 8px;
        border-top: 1px solid var(--border);
    }

    .lang-menu {
        position: static;
        background: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        border: none;
        box-shadow: none;
        padding: 0;
        min-width: auto;
    }

    .lang-dropdown .lang-menu {
        display: block;
    }

    .lang-toggle {
        display: none;
    }

    .lang-option {
        padding: 8px 0;
    }
}
