:root {
    --primary: #6d28d9;
    --primary-light: #7c3aed;
    --primary-lighter: #8b5cf6;
    --primary-lightest: #a78bfa;
    --primary-bg: #ede9fe;
    --primary-dark: #4c1d95;
    --accent: #f59e0b;
    --accent-light: #fbbf24;
    --bg-body: #faf9ff;
    --bg-card: #ffffff;
    --bg-glass: rgba(255, 255, 255, 0.72);
    --bg-glass-border: rgba(255, 255, 255, 0.5);
    --bg-header: rgba(255, 255, 255, 0.82);
    --text-primary: #1e1b2e;
    --text-secondary: #4a4560;
    --text-muted: #7c7891;
    --border-color: #e8e4f0;
    --shadow-sm: 0 1px 3px rgba(109, 40, 217, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 16px rgba(109, 40, 217, 0.1), 0 2px 6px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 12px 40px rgba(109, 40, 217, 0.14), 0 4px 12px rgba(0, 0, 0, 0.06);
    --shadow-glow: 0 0 24px rgba(109, 40, 217, 0.25);
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-full: 9999px;
    --transition-fast: 0.18s ease;
    --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
    --max-width: 1200px;
    --header-height: 68px;
}

[data-theme="dark"] {
    --primary: #a78bfa;
    --primary-light: #8b5cf6;
    --primary-lighter: #7c3aed;
    --primary-lightest: #6d28d9;
    --primary-bg: #2e1065;
    --primary-dark: #c4b5fd;
    --accent: #fbbf24;
    --accent-light: #fcd34d;
    --bg-body: #0f0d1a;
    --bg-card: #1a1728;
    --bg-glass: rgba(26, 23, 40, 0.78);
    --bg-glass-border: rgba(167, 139, 250, 0.12);
    --bg-header: rgba(15, 13, 26, 0.85);
    --text-primary: #f0edf7;
    --text-secondary: #b8b2cc;
    --text-muted: #7c7891;
    --border-color: rgba(167, 139, 250, 0.15);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 24px rgba(167, 139, 250, 0.2);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-height) + 20px);
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.75;
    color: var(--text-primary);
    background-color: var(--bg-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    transition: background-color var(--transition-base), color var(--transition-base);
}

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

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

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

ul,
ol {
    list-style: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
    font-size: inherit;
}

input {
    font-family: inherit;
    font-size: inherit;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ===== Header ===== */
#site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--bg-header);
    backdrop-filter: blur(18px) saturate(180%);
    -webkit-backdrop-filter: blur(18px) saturate(180%);
    border-bottom: 1px solid var(--border-color);
    transition: background var(--transition-base), border-color var(--transition-base), box-shadow var(--transition-base);
}

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

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    height: var(--header-height);
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 17px;
    color: var(--text-primary);
    white-space: nowrap;
    flex-shrink: 0;
    transition: opacity var(--transition-fast);
}

.logo:hover {
    opacity: 0.85;
    color: var(--text-primary);
}

.logo svg {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    flex-shrink: 0;
}

#main-nav {
    flex: 1;
    min-width: 0;
}

#main-nav ul {
    display: flex;
    gap: 2px;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

#main-nav ul::-webkit-scrollbar {
    display: none;
}

#main-nav a {
    display: block;
    padding: 6px 11px;
    font-size: 14px;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    white-space: nowrap;
    transition: color var(--transition-fast), background var(--transition-fast);
}

#main-nav a:hover {
    color: var(--primary);
    background: var(--primary-bg);
}

.search-box {
    display: flex;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    overflow: hidden;
    flex-shrink: 0;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.search-box:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(109, 40, 217, 0.12);
}

.search-box input {
    border: none;
    outline: none;
    background: transparent;
    padding: 8px 14px;
    width: 150px;
    color: var(--text-primary);
    font-size: 14px;
}

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

.search-box button {
    padding: 8px 16px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    border-radius: var(--radius-full);
    margin: 3px;
    transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.search-box button:hover {
    opacity: 0.9;
    transform: scale(1.03);
}

#theme-toggle {
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    background: var(--primary-bg);
    border-radius: var(--radius-full);
    white-space: nowrap;
    flex-shrink: 0;
    transition: background var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
}

#theme-toggle:hover {
    transform: scale(1.05);
    background: var(--primary-lightest);
    color: #fff;
}

#menu-toggle {
    display: none;
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    flex-shrink: 0;
    transition: background var(--transition-fast), color var(--transition-fast);
}

#menu-toggle:hover {
    background: var(--primary-bg);
    color: var(--primary);
}

/* ===== Breadcrumb ===== */
#breadcrumb {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 16px 24px 0;
}

#breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-muted);
}

#breadcrumb li {
    display: flex;
    align-items: center;
    gap: 6px;
}

#breadcrumb li:not(:last-child)::after {
    content: "/";
    color: var(--border-color);
    font-size: 12px;
}

#breadcrumb a {
    color: var(--text-muted);
    transition: color var(--transition-fast);
}

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

#breadcrumb [aria-current="page"] {
    color: var(--text-secondary);
    font-weight: 600;
}

/* ===== Main ===== */
main {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px 60px;
}

section {
    margin-top: 56px;
    scroll-margin-top: calc(var(--header-height) + 24px);
}

section h2 {
    font-size: 26px;
    font-weight: 800;
    line-height: 1.35;
    margin-bottom: 20px;
    color: var(--text-primary);
    position: relative;
    padding-left: 18px;
}

section h2::before {
    content: "";
    position: absolute;
    left: 0;
    top: 6px;
    bottom: 6px;
    width: 5px;
    border-radius: var(--radius-full);
    background: linear-gradient(180deg, var(--primary), var(--primary-lightest));
}

section h3 {
    font-size: 19px;
    font-weight: 700;
    line-height: 1.4;
    margin: 28px 0 12px;
    color: var(--text-primary);
}

section p {
    margin-bottom: 14px;
    color: var(--text-secondary);
}

section ul,
section ol {
    margin: 12px 0 18px;
    padding-left: 0;
}

section ul li,
section ol li {
    position: relative;
    padding-left: 26px;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

section ul li::before {
    content: "";
    position: absolute;
    left: 6px;
    top: 11px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-lightest));
}

section ol {
    counter-reset: item;
}

section ol li {
    counter-increment: item;
    padding-left: 36px;
}

section ol li::before {
    content: counter(item);
    position: absolute;
    left: 0;
    top: 2px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* ===== Hero ===== */
#hero {
    margin-top: 32px;
    padding: 48px 40px;
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, #6d28d9 0%, #7c3aed 30%, #a78bfa 65%, #c4b5fd 100%);
    color: #fff;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

#hero::before {
    content: "";
    position: absolute;
    top: -60%;
    right: -10%;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.18) 0%, transparent 70%);
    pointer-events: none;
}

#hero::after {
    content: "";
    position: absolute;
    bottom: -40%;
    left: -5%;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

#hero h1 {
    font-size: 32px;
    font-weight: 800;
    line-height: 1.35;
    margin-bottom: 18px;
    color: #fff;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.hero-lead {
    font-size: 16px;
    line-height: 1.85;
    color: rgba(255, 255, 255, 0.92);
    max-width: 780px;
    position: relative;
    z-index: 1;
    margin-bottom: 24px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    position: relative;
    z-index: 1;
    margin-bottom: 32px;
}

.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 30px;
    border-radius: var(--radius-full);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.02em;
    transition: transform var(--transition-base), box-shadow var(--transition-base), background var(--transition-base);
    position: relative;
    z-index: 1;
}

.btn-primary {
    background: #fff;
    color: var(--primary);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.15);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22);
    color: var(--primary-dark);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    border: 1.5px solid rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.28);
    transform: translateY(-3px);
    color: #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    position: relative;
    z-index: 1;
    margin-bottom: 32px;
}

.hero-stats > div {
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: var(--radius-md);
    padding: 16px 12px;
    text-align: center;
    transition: background var(--transition-base), transform var(--transition-base);
}

.hero-stats > div:hover {
    background: rgba(255, 255, 255, 0.22);
    transform: translateY(-4px);
}

.hero-stats strong {
    display: block;
    font-size: 26px;
    font-weight: 800;
    line-height: 1.2;
    color: #fff;
    font-variant-numeric: tabular-nums;
}

.hero-stats span {
    display: block;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.82);
    margin-top: 4px;
}

.hero-banner {
    position: relative;
    z-index: 1;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    transition: transform var(--transition-slow);
}

.hero-banner:hover {
    transform: scale(1.01);
}

.hero-banner svg {
    width: 100%;
    height: auto;
    display: block;
}

.hero-banner figcaption {
    position: absolute;
    bottom: 12px;
    right: 16px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.75);
    background: rgba(0, 0, 0, 0.25);
    padding: 3px 12px;
    border-radius: var(--radius-full);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

/* ===== Cards / Glass sections ===== */
#intro,
#products,
#solutions,
#cases,
#news,
#articles,
#faq,
#howto,
#contact,
#sitemap,
#links,
#legal {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 36px 32px;
    box-shadow: var(--shadow-sm);
    transition: background var(--transition-base), border-color var(--transition-base), box-shadow var(--transition-base);
}

#intro:hover,
#products:hover,
#solutions:hover,
#cases:hover,
#news:hover,
#articles:hover,
#faq:hover,
#howto:hover,
#contact:hover,
#sitemap:hover,
#links:hover,
#legal:hover {
    box-shadow: var(--shadow-md);
}

/* ===== News list ===== */
.news-list li {
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
    padding-left: 0;
    transition: background var(--transition-fast);
}

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

.news-list li::before {
    display: none;
}

.news-list h3 {
    margin: 0 0 6px;
    font-size: 17px;
}

.news-list h3 a {
    color: var(--text-primary);
    transition: color var(--transition-fast);
}

.news-list h3 a:hover {
    color: var(--primary);
}

.news-list time {
    display: block;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.news-list p {
    font-size: 14px;
    margin-bottom: 0;
}

/* ===== Articles ===== */
#articles article {
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 22px 24px;
    margin-bottom: 16px;
    transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base), background var(--transition-base);
}

#articles article:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-lightest);
}

#articles article h3 {
    margin: 0 0 6px;
    font-size: 17px;
}

#articles article h3 a {
    color: var(--text-primary);
}

#articles article h3 a:hover {
    color: var(--primary);
}

#articles article time {
    display: block;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

#articles article p {
    font-size: 14px;
    margin-bottom: 10px;
}

#articles article > a:last-child {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    transition: gap var(--transition-fast), color var(--transition-fast);
}

#articles article > a:last-child::after {
    content: "→";
    transition: transform var(--transition-fast);
}

#articles article > a:last-child:hover {
    gap: 10px;
    color: var(--primary-light);
}

#articles article > a:last-child:hover::after {
    transform: translateX(3px);
}

/* ===== FAQ ===== */
#faq details {
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 10px;
    overflow: hidden;
    transition: border-color var(--transition-base), box-shadow var(--transition-base), background var(--transition-base);
}

#faq details[open] {
    border-color: var(--primary-lightest);
    box-shadow: 0 2px 12px rgba(109, 40, 217, 0.08);
}

#faq details:hover {
    border-color: var(--primary-lightest);
}

#faq summary {
    padding: 16px 22px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    list-style: none;
    position: relative;
    padding-right: 48px;
    transition: background var(--transition-fast), color var(--transition-fast);
    user-select: none;
}

#faq summary::-webkit-details-marker {
    display: none;
}

#faq summary::after {
    content: "+";
    position: absolute;
    right: 22px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    font-weight: 400;
    color: var(--primary);
    transition: transform var(--transition-base), color var(--transition-base);
    line-height: 1;
}

#faq details[open] summary::after {
    content: "−";
    transform: translateY(-50%) rotate(180deg);
}

#faq summary:hover {
    background: var(--primary-bg);
    color: var(--primary);
}

#faq details p {
    padding: 0 22px 18px;
    margin: 0;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.8;
    animation: fadeSlideIn 0.3s ease;
}

@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Contact ===== */
#contact ul {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 10px;
}

#contact ul li {
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 18px 12px 40px;
    font-size: 14px;
    transition: border-color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}

#contact ul li::before {
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
}

#contact ul li:hover {
    border-color: var(--primary-lightest);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* ===== Sitemap & Links ===== */
#sitemap ul,
#links ul {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

#sitemap ul li,
#links ul li {
    padding-left: 0;
    margin-bottom: 0;
}

#sitemap ul li::before,
#links ul li::before {
    display: none;
}

#sitemap a,
#links a {
    display: inline-block;
    padding: 8px 18px;
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    font-size: 14px;
    color: var(--text-secondary);
    transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}

#sitemap a:hover,
#links a:hover {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(109, 40, 217, 0.3);
}

/* ===== Blockquote ===== */
blockquote {
    background: var(--bg-body);
    border-left: 4px solid var(--primary-lightest);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    padding: 16px 22px;
    margin: 14px 0;
    transition: border-color var(--transition-fast), background var(--transition-fast), transform var(--transition-fast);
}

blockquote:hover {
    border-left-color: var(--primary);
    background: var(--primary-bg);
    transform: translateX(4px);
}

blockquote p {
    margin: 0;
    font-size: 14px;
    font-style: italic;
    color: var(--text-secondary);
}

/* ===== Author info ===== */
#author-info {
    margin-top: 56px;
    padding: 28px 32px;
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, var(--primary-bg), rgba(167, 139, 250, 0.12));
    border: 1px solid var(--border-color);
    transition: background var(--transition-base), border-color var(--transition-base);
}

#author-info h2 {
    font-size: 20px;
    margin-bottom: 14px;
    padding-left: 16px;
}

#author-info h2::before {
    width: 4px;
}

#author-info p {
    font-size: 14px;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

#author-info p:last-child {
    margin-bottom: 0;
}

/* ===== Footer ===== */
#site-footer {
    margin-top: 60px;
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    transition: background var(--transition-base), border-color var(--transition-base);
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 36px 24px;
    text-align: center;
}

.footer-inner p {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 10px;
    line-height: 1.8;
}

.footer-inner p:last-of-type {
    margin-bottom: 18px;
}

.footer-inner nav ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 20px;
}

.footer-inner nav a {
    font-size: 13px;
    color: var(--text-muted);
    transition: color var(--transition-fast);
}

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

/* ===== Back to top ===== */
#back-to-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 900;
    padding: 12px 20px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px);
    transition: opacity var(--transition-base), visibility var(--transition-base), transform var(--transition-base), box-shadow var(--transition-base);
}

#back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#back-to-top:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(109, 40, 217, 0.45);
}

/* ===== Scroll animations ===== */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* ===== Responsive: tablet ===== */
@media (max-width: 1024px) {
    .header-inner {
        gap: 12px;
    }

    #main-nav a {
        padding: 6px 8px;
        font-size: 13px;
    }

    .search-box input {
        width: 110px;
    }

    #hero {
        padding: 40px 28px;
    }

    #hero h1 {
        font-size: 26px;
    }

    .hero-stats strong {
        font-size: 22px;
    }

    section h2 {
        font-size: 23px;
    }
}

/* ===== Responsive: mobile ===== */
@media (max-width: 768px) {
    :root {
        --header-height: 60px;
    }

    .header-inner {
        padding: 0 16px;
        gap: 10px;
    }

    .logo span {
        display: none;
    }

    .logo svg {
        width: 34px;
        height: 34px;
    }

    #main-nav {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: var(--bg-header);
        backdrop-filter: blur(20px) saturate(180%);
        -webkit-backdrop-filter: blur(20px) saturate(180%);
        border-bottom: 1px solid var(--border-color);
        padding: 12px 16px;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        visibility: hidden;
        transition: max-height var(--transition-base), opacity var(--transition-base), visibility var(--transition-base), padding var(--transition-base);
        z-index: 999;
        box-shadow: var(--shadow-md);
    }

    #main-nav.open {
        max-height: 420px;
        opacity: 1;
        visibility: visible;
        padding: 12px 16px 20px;
        overflow-y: auto;
    }

    #main-nav ul {
        flex-direction: column;
        gap: 2px;
    }

    #main-nav a {
        padding: 11px 14px;
        font-size: 15px;
        border-radius: var(--radius-sm);
    }

    .search-box {
        flex: 1;
        min-width: 0;
    }

    .search-box input {
        width: 100%;
        min-width: 0;
        padding: 8px 10px;
        font-size: 13px;
    }

    .search-box button {
        padding: 8px 12px;
        font-size: 12px;
    }

    #theme-toggle {
        padding: 7px 10px;
        font-size: 12px;
    }

    #menu-toggle {
        display: block;
    }

    #breadcrumb {
        padding: 12px 16px 0;
    }

    main {
        padding: 0 16px 40px;
    }

    section {
        margin-top: 36px;
    }

    #hero {
        margin-top: 20px;
        padding: 30px 22px;
        border-radius: var(--radius-lg);
    }

    #hero h1 {
        font-size: 22px;
        margin-bottom: 14px;
    }

    .hero-lead {
        font-size: 15px;
        line-height: 1.8;
    }

    .hero-actions {
        gap: 10px;
        margin-bottom: 24px;
    }

    .btn-primary,
    .btn-secondary {
        padding: 11px 22px;
        font-size: 14px;
        flex: 1;
        min-width: 140px;
    }

    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin-bottom: 24px;
    }

    .hero-stats strong {
        font-size: 20px;
    }

    .hero-stats span {
        font-size: 12px;
    }

    .hero-banner figcaption {
        font-size: 11px;
        bottom: 8px;
        right: 10px;
    }

    #intro,
    #products,
    #solutions,
    #cases,
    #news,
    #articles,
    #faq,
    #howto,
    #contact,
    #sitemap,
    #links,
    #legal {
        padding: 24px 18px;
        border-radius: var(--radius-lg);
    }

    section h2 {
        font-size: 20px;
        padding-left: 14px;
        margin-bottom: 16px;
    }

    section h2::before {
        width: 4px;
    }

    section h3 {
        font-size: 17px;
        margin: 22px 0 10px;
    }

    section p {
        font-size: 15px;
    }

    #articles article {
        padding: 18px 16px;
    }

    #faq summary {
        padding: 14px 16px;
        padding-right: 42px;
        font-size: 14px;
    }

    #faq summary::after {
        right: 16px;
    }

    #faq details p {
        padding: 0 16px 16px;
        font-size: 14px;
    }

    #contact ul {
        grid-template-columns: 1fr;
    }

    #contact ul li {
        padding: 10px 14px 10px 34px;
        font-size: 13px;
    }

    #contact ul li::before {
        left: 12px;
    }

    #author-info {
        padding: 22px 18px;
        margin-top: 36px;
    }

    #author-info h2 {
        font-size: 18px;
    }

    .footer-inner {
        padding: 28px 16px;
    }

    .footer-inner p {
        font-size: 12px;
    }

    #back-to-top {
        right: 16px;
        bottom: 16px;
        padding: 10px 16px;
        font-size: 12px;
    }

    blockquote {
        padding: 14px 16px;
    }
}

/* ===== Responsive: small mobile ===== */
@media (max-width: 380px) {
    .hero-stats {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .hero-stats > div {
        padding: 12px 8px;
    }

    .hero-stats strong {
        font-size: 18px;
    }

    .btn-primary,
    .btn-secondary {
        min-width: 100%;
    }

    #hero h1 {
        font-size: 19px;
    }
}

/* ===== 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;
    }
}

/* ===== Print ===== */
@media print {
    #site-header,
    #back-to-top,
    #menu-toggle,
    #theme-toggle,
    .search-box,
    .hero-actions,
    #breadcrumb {
        display: none !important;
    }

    body {
        background: #fff;
        color: #000;
    }

    #hero {
        background: #f3f0ff;
        color: #000;
        box-shadow: none;
    }

    #hero h1,
    .hero-lead,
    .hero-stats strong,
    .hero-stats span {
        color: #000;
    }

    section {
        break-inside: avoid;
    }
}