:root {
    --primary: #4f6ef7;
    --primary-dark: #3d5ae0;
    --primary-soft: rgba(79, 110, 247, 0.12);
    --secondary: #0f172a;
    --text: #1e293b;
    --text-muted: #64748b;
    --bg-page: #f1f5f9;
    --card: #ffffff;
    --border: #e2e8f0;
    --radius: 14px;
    --shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.07), 0 10px 20px -8px rgba(15, 23, 42, 0.12);
    --shadow-lg: 0 20px 50px -12px rgba(15, 23, 42, 0.18);
    --header-h: 72px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html { scroll-behavior: smooth; }

body {
    background: var(--bg-page);
    color: var(--text);
    line-height: 1.65;
    min-height: 100vh;
}

body.lang-zh-hans { font-family: "Noto Sans SC", "DM Sans", system-ui, sans-serif; }
body.lang-zh-hant { font-family: "Noto Sans TC", "DM Sans", system-ui, sans-serif; }
body.lang-en { font-family: "DM Sans", "Noto Sans SC", system-ui, sans-serif; }

header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--header-h);
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #f8fafc;
    box-shadow: var(--shadow);
}

.header-inner {
    max-width: 1200px;
    width: 92%;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: inherit;
}

.brand-mark {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(145deg, var(--primary), #7c3aed);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    box-shadow: 0 4px 14px rgba(79, 110, 247, 0.45);
    flex-shrink: 0;
    overflow: hidden;
}

.brand-mark img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.brand-mark--sm {
    width: 40px;
    height: 40px;
}

.brand-text h1 {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.company-line {
    font-size: 0.68rem;
    font-weight: 500;
    opacity: 0.7;
    margin-top: 0.1rem;
    line-height: 1.2;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 0.25rem 1.25rem;
    flex-wrap: wrap;
    align-items: center;
}

nav a {
    color: #e2e8f0;
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 500;
    position: relative;
    padding: 0.25rem 0;
    transition: color 0.2s;
}

nav a:hover { color: #93c5fd; }

.lang-switcher {
    display: inline-flex;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 3px;
    gap: 2px;
}

.lang-switcher button {
    border: none;
    background: transparent;
    color: #cbd5e1;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.4rem 0.6rem;
    border-radius: 7px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    font-family: inherit;
}

.lang-switcher button:hover { color: #fff; }
.lang-switcher button.active {
    background: var(--primary);
    color: #fff;
}

.hero {
    margin-top: var(--header-h);
    min-height: calc(100vh - var(--header-h));
    display: flex;
    align-items: center;
    position: relative;
    color: #f8fafc;
    background: #0f172a url("../static/bg.png") center / cover no-repeat;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(15, 23, 42, 0.88) 0%, rgba(30, 64, 175, 0.5) 45%, rgba(79, 70, 229, 0.35) 100%);
}

.hero .container,
.hero .wrap {
    position: relative;
    z-index: 1;
}

.container {
    width: 90%;
    max-width: 1120px;
    margin: 0 auto;
}

.hero .wrap { padding: 3.5rem 0; text-align: center; }

.tag-pill {
    display: inline-block;
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    background: var(--primary-soft);
    border: 1px solid rgba(99, 102, 241, 0.35);
    color: #c7d2fe;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
}

.hero h2 {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero p {
    max-width: 40rem;
    margin: 0 auto 1.75rem;
    font-size: 1.05rem;
    opacity: 0.92;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    background: var(--primary);
    color: #fff;
    padding: 0.75rem 1.75rem;
    border: none;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    font-family: inherit;
    box-shadow: 0 4px 14px rgba(79, 110, 247, 0.4);
    transition: transform 0.2s, background 0.2s, box-shadow 0.2s;
}

.btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(79, 110, 247, 0.45);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    box-shadow: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.2);
}

.hero-cta { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; }

.hero-official {
    margin-top: 1rem;
    font-size: 0.88rem;
    color: rgba(248, 250, 252, 0.85);
    max-width: 36rem;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
}

.about-org { background: var(--card); }

.about-official {
    max-width: 720px;
    margin: 0 auto 1.75rem;
    padding: 1.15rem 1.35rem;
    border-radius: var(--radius);
    border: 1px solid rgba(79, 110, 247, 0.35);
    background: var(--primary-soft);
    color: var(--secondary);
}

.about-official p { margin: 0; font-size: 0.95rem; line-height: 1.6; }
.about-official p + p { margin-top: 0.65rem; }

.about-domain-line { font-weight: 600; }
.about-domain-line a {
    color: var(--primary-dark);
    word-break: break-all;
}

.prose {
    max-width: 720px;
    margin: 0 auto;
    color: var(--text);
    font-size: 0.95rem;
    line-height: 1.75;
}

.prose p { margin: 0 0 1rem; }
.prose p:last-child { margin-bottom: 0; }

.legal-prose h3 {
    font-size: 1.05rem;
    color: var(--secondary);
    margin: 1.75rem 0 0.5rem;
    font-weight: 700;
}

.legal-prose h3:first-of-type { margin-top: 0.5rem; }

.legal-updated {
    margin-bottom: 1.25rem;
    color: var(--text-muted);
    font-size: 0.92rem;
}

.privacy-section { background: var(--bg-page); }

section { padding: 4.5rem 0; }
.section-title { text-align: center; margin-bottom: 2.75rem; }
.section-title h2 {
    font-size: clamp(1.5rem, 2.5vw, 2.1rem);
    color: var(--secondary);
    font-weight: 700;
}

.section-title p.sub {
    margin-top: 0.6rem;
    color: var(--text-muted);
    font-size: 0.98rem;
}

.title-bar {
    width: 48px;
    height: 4px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--primary), #7c3aed);
    margin: 0.75rem auto 0;
}

.products { background: var(--card); }
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.product-card {
    background: var(--bg-page);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.25s, box-shadow 0.25s;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.product-image { height: 200px; overflow: hidden; }
.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.product-card:hover .product-image img { transform: scale(1.06); }

.product-info { padding: 1.4rem; }
.product-info h3 { font-size: 1.15rem; color: var(--secondary); margin-bottom: 0.5rem; }
.product-info p { color: var(--text-muted); font-size: 0.92rem; margin-bottom: 0.9rem; }
.price {
    display: block;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1rem;
}

.features { background: var(--bg-page); }
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
}

.feature-card {
    background: var(--card);
    padding: 1.5rem 1.35rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    text-align: center;
    box-shadow: var(--shadow);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
    border-color: rgba(79, 110, 247, 0.35);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: var(--primary-soft);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin: 0 auto 1rem;
}

.feature-card h3 { font-size: 1.05rem; margin-bottom: 0.5rem; color: var(--secondary); }
.feature-card p { color: var(--text-muted); font-size: 0.9rem; }

.how-it-works { background: var(--card); }
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.step {
    text-align: center;
    padding: 1.25rem;
}

.step-number {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, var(--primary), #6366f1);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 auto 1rem;
    box-shadow: 0 4px 12px rgba(79, 110, 247, 0.4);
}

.step h3 { font-size: 1.05rem; color: var(--secondary); margin-bottom: 0.45rem; }
.step p { color: var(--text-muted); font-size: 0.9rem; }

.contact { background: var(--bg-page); }
.contact-form {
    max-width: 580px;
    margin: 0 auto;
    background: var(--card);
    padding: 2rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; margin-bottom: 0.4rem; font-weight: 600; color: var(--secondary); font-size: 0.9rem; }
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.7rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
}

.form-group textarea { min-height: 130px; resize: vertical; }

footer {
    background: #0f172a;
    color: #e2e8f0;
    padding: 2.75rem 0;
}

.footer-top {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-brand p {
    color: #94a3b8;
    font-size: 0.9rem;
    max-width: 22rem;
    line-height: 1.5;
}

.footer-brand .en-name { font-size: 0.82rem; color: #64748b; margin-top: 0.35rem; }
.footer-meta {
    text-align: right;
    max-width: 22rem;
}

.footer-official-label {
    font-size: 0.78rem;
    color: #94a3b8;
    margin: 0 0 0.35rem;
    line-height: 1.4;
}

.footer-site-url {
    margin: 0 0 0.65rem;
    font-size: 0.95rem;
    font-weight: 600;
}

.footer-site-url a {
    color: #93c5fd;
    word-break: break-all;
}

.footer-site-url a:hover { color: #bfdbfe; }

.footer-nav {
    font-size: 0.88rem;
    color: #94a3b8;
}

.footer-nav a {
    color: #cbd5e1;
    text-decoration: none;
}

.footer-nav a:hover { color: #93c5fd; text-decoration: underline; }
.copyright { text-align: center; padding-top: 1.5rem; border-top: 1px solid rgba(255, 255, 255, 0.08); font-size: 0.85rem; color: #64748b; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media (max-width: 900px) {
    .header-inner { flex-wrap: wrap; height: auto; min-height: var(--header-h); padding: 0.65rem 0; }
    .hero { min-height: auto; }
}

@media (max-width: 640px) {
    .header-inner { flex-wrap: wrap; }
    nav ul { width: 100%; justify-content: center; }
    .hero-cta { flex-direction: column; align-items: stretch; }
    .footer-top { flex-direction: column; }
    .footer-meta { text-align: left; max-width: none; }
}
