:root {
    --primary: #7b2ff7;
    --primary-dark: #5a1fbf;
    --primary-light: #a06df8;
    --secondary: #f107a3;
    --accent: #00d4ff;
    --bg: #ffffff;
    --bg-alt: #f8f9fc;
    --bg-card: #ffffff;
    --text: #1a1a2e;
    --text-secondary: #4a4a6a;
    --text-muted: #8888a0;
    --border: #e8e8f0;
    --shadow: 0 4px 20px rgba(123, 47, 247, 0.08);
    --shadow-lg: 0 12px 40px rgba(123, 47, 247, 0.12);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --header-h: 68px;
}

[data-theme="dark"] {
    --bg: #0f0f1a;
    --bg-alt: #16162a;
    --bg-card: #1c1c34;
    --text: #eeeeff;
    --text-secondary: #b0b0d0;
    --text-muted: #7777a0;
    --border: #2a2a4a;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.4);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-h);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.8;
    font-size: 16px;
    transition: background var(--transition), color var(--transition);
    overflow-x: hidden;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--secondary);
}

img,
svg {
    max-width: 100%;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== Header ===== */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transition: box-shadow var(--transition), background var(--transition);
}

[data-theme="dark"] .header {
    background: rgba(15, 15, 26, 0.88);
}

.header.scrolled {
    box-shadow: var(--shadow);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-h);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.5px;
}

.logo svg {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
}

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

.nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav a {
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all var(--transition);
    white-space: nowrap;
}

.nav a:hover,
.nav a.active {
    color: var(--primary);
    background: rgba(123, 47, 247, 0.08);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-box {
    display: flex;
    align-items: center;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 6px 14px;
    transition: all var(--transition);
    width: 200px;
}

.search-box:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(123, 47, 247, 0.12);
    width: 240px;
}

.search-box input {
    border: none;
    background: transparent;
    outline: none;
    font-size: 0.88rem;
    color: var(--text);
    width: 100%;
    font-family: inherit;
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.search-box svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin-right: 6px;
    opacity: 0.5;
}

.theme-toggle,
.menu-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-alt);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
    color: var(--text-secondary);
}

.theme-toggle:hover,
.menu-toggle:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(123, 47, 247, 0.06);
}

.theme-toggle svg,
.menu-toggle svg {
    width: 18px;
    height: 18px;
}

.menu-toggle {
    display: none;
}

/* ===== Hero / Banner ===== */
.hero {
    position: relative;
    padding: 60px 0 40px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(ellipse 60% 50% at 10% 20%, rgba(123, 47, 247, 0.10), transparent),
        radial-gradient(ellipse 50% 40% at 90% 80%, rgba(241, 7, 163, 0.08), transparent),
        radial-gradient(ellipse 40% 60% at 50% 50%, rgba(0, 212, 255, 0.05), transparent);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(123, 47, 247, 0.10);
    color: var(--primary);
    font-size: 0.82rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 20px;
    margin-bottom: 20px;
    border: 1px solid rgba(123, 47, 247, 0.15);
}

.hero-badge .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.3);
    }
}

.hero h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -1px;
    margin-bottom: 20px;
}

.hero h1 .gradient {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: 28px;
    max-width: 520px;
}

.hero-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    font-family: inherit;
    transition: all var(--transition);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    box-shadow: 0 4px 16px rgba(123, 47, 247, 0.35);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(123, 47, 247, 0.45);
    color: #fff;
}

.btn-outline {
    background: transparent;
    color: var(--text);
    border: 1.5px solid var(--border);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(123, 47, 247, 0.04);
}

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

.hero-visual svg {
    width: 100%;
    max-width: 440px;
    filter: drop-shadow(0 20px 40px rgba(123, 47, 247, 0.15));
}

.hero-stats {
    display: flex;
    gap: 40px;
    margin-top: 40px;
    padding-top: 28px;
    border-top: 1px solid var(--border);
}

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

.stat-num {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ===== Section Common ===== */
.section {
    padding: 72px 0;
}

.section-alt {
    background: var(--bg-alt);
}

.section-header {
    text-align: center;
    max-width: 680px;
    margin: 0 auto 48px;
}

.section-tag {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--primary);
    margin-bottom: 12px;
}

.section-header h2 {
    font-size: clamp(1.5rem, 3vw, 2.1rem);
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 14px;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* ===== Cards ===== */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

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

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

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 24px;
    transition: all var(--transition);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(123, 47, 247, 0.2);
}

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    background: rgba(123, 47, 247, 0.08);
    color: var(--primary);
}

.card-icon svg {
    width: 24px;
    height: 24px;
}

.card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.card p {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ===== About ===== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

.about-content h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
    margin-bottom: 18px;
    letter-spacing: -0.5px;
}

.about-content p {
    color: var(--text-secondary);
    margin-bottom: 16px;
    font-size: 0.98rem;
}

.about-list {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 24px;
}

.about-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.92rem;
    color: var(--text-secondary);
}

.about-list li svg {
    width: 18px;
    height: 18px;
    color: var(--primary);
    flex-shrink: 0;
}

/* ===== Timeline ===== */
.timeline {
    position: relative;
    padding-left: 32px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary), var(--secondary));
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    padding-bottom: 32px;
}

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

.timeline-item::before {
    content: '';
    position: absolute;
    left: -32px;
    top: 6px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--bg);
    border: 3px solid var(--primary);
    z-index: 1;
}

.timeline-year {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 6px;
}

.timeline-item h4 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.timeline-item p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* ===== Articles ===== */
.article-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.article-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(123, 47, 247, 0.2);
}

.article-thumb {
    height: 160px;
    background: linear-gradient(135deg, rgba(123, 47, 247, 0.08), rgba(241, 7, 163, 0.06));
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--border);
}

.article-thumb svg {
    width: 56px;
    height: 56px;
    opacity: 0.5;
}

.article-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.article-meta .tag {
    background: rgba(123, 47, 247, 0.08);
    color: var(--primary);
    padding: 2px 10px;
    border-radius: 10px;
    font-weight: 600;
}

.article-card h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.5;
}

.article-card p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    flex: 1;
    margin-bottom: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-link {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.article-link:hover {
    gap: 8px;
}

/* ===== FAQ ===== */
.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    overflow: hidden;
    transition: all var(--transition);
    background: var(--bg-card);
}

.faq-item.open {
    border-color: rgba(123, 47, 247, 0.3);
    box-shadow: var(--shadow);
}

.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.98rem;
    gap: 16px;
    user-select: none;
    transition: color var(--transition);
}

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

.faq-question .icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--transition);
    color: var(--primary);
}

.faq-item.open .faq-question .icon {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
    padding: 0 22px;
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.8;
}

.faq-item.open .faq-answer {
    max-height: 400px;
    padding: 0 22px 20px;
}

/* ===== HowTo ===== */
.howto-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    counter-reset: step;
}

.howto-step {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 22px;
    transition: all var(--transition);
}

.howto-step:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.howto-step::before {
    counter-increment: step;
    content: counter(step);
    position: absolute;
    top: -14px;
    left: 22px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 4px 12px rgba(123, 47, 247, 0.3);
}

.howto-step h4 {
    font-size: 1rem;
    font-weight: 700;
    margin: 8px 0 10px;
}

.howto-step p {
    font-size: 0.88rem;
    color: var(--text-secondary);
}

/* ===== Testimonials ===== */
.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.testimonial {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 24px;
    transition: all var(--transition);
}

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

.testimonial-stars {
    display: flex;
    gap: 3px;
    margin-bottom: 14px;
    color: #f5a623;
}

.testimonial-stars svg {
    width: 16px;
    height: 16px;
}

.testimonial p {
    font-size: 0.92rem;
    color: var(--text-secondary);
    margin-bottom: 18px;
    font-style: italic;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.testimonial-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.testimonial-author-info strong {
    display: block;
    font-size: 0.9rem;
}

.testimonial-author-info span {
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* ===== News ===== */
.news-list {
    max-width: 800px;
    margin: 0 auto;
}

.news-item {
    display: flex;
    gap: 20px;
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
    transition: all var(--transition);
}

.news-item:last-child {
    border-bottom: none;
}

.news-item:hover {
    padding-left: 8px;
}

.news-date {
    flex-shrink: 0;
    width: 72px;
    text-align: center;
}

.news-date .day {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.2;
}

.news-date .month {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.news-content h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.news-content p {
    font-size: 0.88rem;
    color: var(--text-secondary);
}

/* ===== Contact ===== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
}

.contact-info-item {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.contact-info-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(123, 47, 247, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    flex-shrink: 0;
}

.contact-info-icon svg {
    width: 20px;
    height: 20px;
}

.contact-info-item h4 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.contact-info-item p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.contact-form {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-alt);
    color: var(--text);
    font-size: 0.92rem;
    font-family: inherit;
    transition: all var(--transition);
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(123, 47, 247, 0.12);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* ===== Footer ===== */
.footer {
    background: var(--bg-alt);
    border-top: 1px solid var(--border);
    padding: 56px 0 28px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 14px 0;
    max-width: 300px;
}

.footer-social {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.footer-social a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all var(--transition);
}

.footer-social a:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(123, 47, 247, 0.06);
}

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

.footer-col h4 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 10px;
}

.footer-col a {
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.footer-col a:hover {
    color: var(--primary);
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.footer-bottom a {
    color: var(--text-muted);
}

.footer-bottom a:hover {
    color: var(--primary);
}

/* ===== Breadcrumb ===== */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: var(--text-muted);
    padding: 16px 0;
    flex-wrap: wrap;
}

.breadcrumb a {
    color: var(--text-muted);
}

.breadcrumb a:hover {
    color: var(--primary);
}

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

/* ===== Back to top ===== */
.back-top {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(123, 47, 247, 0.35);
    opacity: 0;
    pointer-events: none;
    transition: all var(--transition);
    z-index: 900;
}

.back-top.visible {
    opacity: 1;
    pointer-events: auto;
}

.back-top:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(123, 47, 247, 0.5);
}

.back-top svg {
    width: 20px;
    height: 20px;
}

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

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

/* ===== Mobile menu ===== */
.mobile-nav {
    display: none;
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg);
    z-index: 999;
    padding: 24px;
    flex-direction: column;
    gap: 4px;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform var(--transition);
}

.mobile-nav.open {
    transform: translateX(0);
    display: flex;
}

.mobile-nav a {
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
}

.mobile-nav a:hover {
    color: var(--primary);
    background: rgba(123, 47, 247, 0.06);
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .grid-3,
    .article-grid,
    .testimonial-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .grid-4,
    .howto-steps {
        grid-template-columns: repeat(2, 1fr);
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav {
        display: none;
    }
    .menu-toggle {
        display: flex;
    }
    .search-box {
        display: none;
    }
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero p {
        margin-left: auto;
        margin-right: auto;
    }
    .hero-actions {
        justify-content: center;
    }
    .hero-stats {
        justify-content: center;
    }
    .hero-visual {
        order: -1;
    }
    .hero-visual svg {
        max-width: 280px;
    }
    .about-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }
    .grid-3,
    .grid-2,
    .grid-4,
    .article-grid,
    .testimonial-grid,
    .howto-steps {
        grid-template-columns: 1fr;
    }
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    .section {
        padding: 48px 0;
    }
    .hero {
        padding: 36px 0 24px;
    }
    .hero-stats {
        flex-wrap: wrap;
        gap: 24px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
    .hero-actions {
        flex-direction: column;
        width: 100%;
    }
    .btn {
        justify-content: center;
        width: 100%;
    }
}

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* ===== Selection ===== */
::selection {
    background: rgba(123, 47, 247, 0.2);
    color: var(--text);
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-alt);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 10px;
    border: 2px solid var(--bg-alt);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* ===== Focus visible ===== */
:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: 4px;
}

/* ===== Print ===== */
@media print {
    .header,
    .mobile-nav,
    .back-top,
    .hero-bg,
    .footer-social {
        display: none !important;
    }
    body {
        background: #fff;
        color: #000;
    }
    .card,
    .article-card,
    .faq-item,
    .testimonial,
    .howto-step {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
}