:root {
    --slate: #0f1729;
    --slate-light: #1a2540;
    --glass: rgba(255, 255, 255, 0.06);
    --glass-border: rgba(255, 255, 255, 0.12);
    --cyan: #22d3ee;
    --cyan-dark: #06b6d4;
    --violet: #8b5cf6;
    --violet-light: #a78bfa;
    --ice: #e0f7fa;
    --gray-bg: #f0f4f8;
    --gray: #64748b;
    --gray-light: #dce4ec;
    --white: #ffffff;
    --shadow: 0 8px 32px rgba(15, 23, 41, 0.1);
    --shadow-lg: 0 20px 60px rgba(15, 23, 41, 0.15);
    --radius: 8px;
    --radius-lg: 14px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Noto Sans TC', 'Inter', -apple-system, sans-serif;
    color: var(--slate);
    line-height: 1.75;
    background: var(--gray-bg);
    font-weight: 400;
}

.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }

h1, h2, h3, h4 {
    font-family: 'Inter', 'Noto Sans TC', sans-serif;
    line-height: 1.3;
    font-weight: 700;
    color: var(--slate);
}

a { text-decoration: none; color: inherit; }

.eyebrow {
    display: inline-block;
    color: var(--cyan-dark);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    margin-bottom: 14px;
}
.eyebrow-light { color: var(--cyan); }
.section-head-light h2 { color: var(--ice); }

/* ===== Buttons ===== */
.btn {
    display: inline-block;
    padding: 14px 32px;
    font-family: 'Noto Sans TC', 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.88rem;
    letter-spacing: 0.04em;
    cursor: pointer;
    border: none;
    border-radius: var(--radius);
    transition: all 0.35s ease;
}
.btn-primary {
    background: linear-gradient(135deg, var(--cyan-dark) 0%, var(--violet) 100%);
    color: var(--white);
}
.btn-primary:hover {
    box-shadow: 0 8px 28px rgba(34, 211, 238, 0.35);
    transform: translateY(-2px);
}
.btn-secondary {
    background: var(--glass);
    color: var(--ice);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(8px);
}
.btn-secondary:hover {
    border-color: var(--cyan);
    color: var(--cyan);
}
.btn-block { display: block; width: 100%; text-align: center; }

/* ===== Top bar ===== */
.topbar {
    background: var(--slate);
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.8rem;
    padding: 10px 0;
}
.topbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.topbar-left { display: flex; gap: 24px; flex-wrap: wrap; }
.topbar-item { color: rgba(255, 255, 255, 0.75); transition: color 0.2s; }
.topbar-item:hover { color: var(--cyan); }

/* ===== Navbar ===== */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(240, 244, 248, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--gray-light);
}
.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 76px;
    gap: 16px;
}
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}
.logo-mark {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.3) 0%, rgba(139, 92, 246, 0.3) 100%);
    border: 1px solid rgba(34, 211, 238, 0.4);
    position: relative;
    overflow: hidden;
}
.logo-mark::before {
    content: '';
    position: absolute;
    inset: 8px;
    background: linear-gradient(45deg, transparent 40%, rgba(255,255,255,0.5) 50%, transparent 60%);
    border-radius: 4px;
}
.logo-mark::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 14px; height: 14px;
    transform: translate(-50%, -50%) rotate(45deg);
    border: 2px solid var(--cyan);
    background: rgba(34, 211, 238, 0.15);
}
.logo-text { display: flex; flex-direction: column; line-height: 1.25; }
.logo-text strong {
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--slate);
    letter-spacing: 0.02em;
}
.logo-text small {
    font-size: 0.65rem;
    color: var(--gray);
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a {
    font-weight: 500;
    font-size: 0.88rem;
    color: var(--slate-light);
    letter-spacing: 0.04em;
    transition: color 0.25s;
    position: relative;
}
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -6px; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--cyan), var(--violet));
    transform: scaleX(0);
    transition: transform 0.3s;
    border-radius: 1px;
}
.nav-links a:hover { color: var(--cyan-dark); }
.nav-links a:hover::after { transform: scaleX(1); }

/* ===== Language Switcher ===== */
.lang-switcher { position: relative; flex-shrink: 0; z-index: 1001; }
.lang-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    background: var(--slate);
    color: var(--white);
    border: 1px solid var(--slate-light);
    padding: 10px 18px;
    font-family: 'Noto Sans TC', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.06em;
    cursor: pointer;
    border-radius: var(--radius);
    transition: all 0.25s;
    min-width: 88px;
    justify-content: center;
}
.lang-btn:hover, .lang-btn.open {
    border-color: var(--cyan);
    box-shadow: 0 4px 16px rgba(34, 211, 238, 0.2);
}
.lang-globe { font-size: 0.95rem; }
.lang-current { font-weight: 800; }
.lang-arrow { font-size: 0.65rem; transition: transform 0.2s; }
.lang-btn.open .lang-arrow { transform: rotate(180deg); }
.lang-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 148px;
    background: var(--white);
    border: 1px solid var(--gray-light);
    border-radius: var(--radius);
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.25s ease;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}
.lang-dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.lang-dropdown li {
    padding: 13px 20px;
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--slate-light);
    cursor: pointer;
    transition: all 0.15s;
    border-bottom: 1px solid var(--gray-light);
}
.lang-dropdown li:last-child { border-bottom: none; }
.lang-dropdown li:hover { background: var(--gray-bg); color: var(--cyan-dark); }
.lang-dropdown li.active {
    background: var(--slate);
    color: var(--cyan);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
}
.nav-toggle span {
    width: 24px; height: 2px;
    background: var(--slate);
    border-radius: 1px;
}

/* ===== Hero ===== */
.hero {
    padding: 100px 0 0;
    background: var(--slate);
    color: var(--ice);
    position: relative;
    overflow: hidden;
}
.hero-mesh {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(34, 211, 238, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(139, 92, 246, 0.1) 0%, transparent 45%),
        linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 40px 40px, 40px 40px;
    pointer-events: none;
}
.hero-inner {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 1;
    padding-bottom: 60px;
}
.badge {
    display: inline-block;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    color: var(--cyan);
    padding: 8px 18px;
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    margin-bottom: 28px;
    border-radius: 50px;
    backdrop-filter: blur(12px);
}
.hero h1 {
    font-size: 2.6rem;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--white);
    line-height: 1.25;
}
.hero-sub {
    font-size: 1.02rem;
    color: rgba(224, 247, 250, 0.75);
    margin-bottom: 36px;
    max-width: 500px;
}
.hero-buttons { display: flex; gap: 16px; flex-wrap: wrap; }

.hero-glass-card {
    width: 300px;
    height: 300px;
    margin: 0 auto;
    border-radius: var(--radius-lg);
    background: var(--glass);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(24px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}
.code-lines {
    position: absolute;
    top: 24px; left: 24px; right: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.code-lines span {
    height: 4px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--cyan), transparent);
    opacity: 0.4;
}
.code-lines span:nth-child(1) { width: 60%; }
.code-lines span:nth-child(2) { width: 80%; }
.code-lines span:nth-child(3) { width: 45%; }
.code-lines span:nth-child(4) { width: 70%; }
.hero-icon {
    font-family: 'Inter', monospace;
    font-size: 4.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--cyan) 0%, var(--violet-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-categories {
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid var(--glass-border);
    padding: 18px 0;
    position: relative;
    z-index: 1;
    backdrop-filter: blur(8px);
}
.categories-row {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}
.categories-row span {
    font-size: 0.78rem;
    color: var(--cyan);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 600;
}

/* ===== Section heads ===== */
.section-head { text-align: center; max-width: 600px; margin: 0 auto 56px; }
.section-head h2 { font-size: 2.2rem; margin-bottom: 14px; }
.section-head p { color: var(--gray); font-size: 1rem; }

/* ===== About ===== */
.about { padding: 100px 0; background: var(--white); }
.about-inner {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 64px;
    align-items: start;
}
.about-content h2 { font-size: 2rem; margin-bottom: 20px; }
.about-content > p { color: var(--gray); margin-bottom: 28px; font-size: 1rem; }
.about-list { list-style: none; }
.about-list li {
    padding: 12px 0;
    font-weight: 500;
    color: var(--slate);
    border-bottom: 1px solid var(--gray-light);
    font-size: 0.92rem;
}
.about-list li:last-child { border-bottom: none; }
.about-cards { display: flex; flex-direction: column; gap: 18px; }
.about-card {
    background: var(--gray-bg);
    border: 1px solid var(--gray-light);
    border-radius: var(--radius-lg);
    padding: 28px 32px;
    transition: all 0.3s;
    backdrop-filter: blur(8px);
}
.about-card:hover {
    border-color: var(--cyan);
    box-shadow: var(--shadow);
}
.card-label {
    display: block;
    font-size: 0.72rem;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 8px;
    font-weight: 600;
}
.card-value {
    font-family: 'Inter', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--slate);
}

/* ===== Products ===== */
.products { padding: 100px 0; background: var(--gray-bg); }
.products-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.product-card {
    background: var(--white);
    padding: 38px 30px;
    border: 1px solid var(--gray-light);
    border-radius: var(--radius-lg);
    text-align: center;
    transition: all 0.35s ease;
}
.product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(34, 211, 238, 0.4);
    background: linear-gradient(180deg, var(--white) 0%, rgba(224, 247, 250, 0.3) 100%);
}
.product-icon { font-size: 2.4rem; margin-bottom: 18px; }
.product-card h3 { font-size: 1.1rem; margin-bottom: 12px; }
.product-card p { color: var(--gray); font-size: 0.9rem; line-height: 1.65; }

/* ===== Why Us ===== */
.why {
    padding: 100px 0;
    background: var(--slate);
}
.why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.why-card {
    padding: 36px 24px;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    text-align: center;
    transition: all 0.3s;
    background: var(--glass);
    backdrop-filter: blur(12px);
}
.why-card:hover {
    border-color: var(--cyan);
    background: rgba(34, 211, 238, 0.06);
}
.why-num {
    display: block;
    font-family: 'Inter', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--cyan), var(--violet-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0.8;
    margin-bottom: 16px;
}
.why-card h3 { font-size: 1.05rem; color: var(--white); margin-bottom: 10px; }
.why-card p { font-size: 0.88rem; color: rgba(224, 247, 250, 0.6); line-height: 1.65; }

/* ===== Stats ===== */
.stats { padding: 72px 0; background: var(--white); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 36px; text-align: center; }
.stat h3 {
    font-family: 'Inter', sans-serif;
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--cyan-dark), var(--violet));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.stat p {
    color: var(--gray);
    font-weight: 600;
    margin-top: 6px;
    font-size: 0.85rem;
    letter-spacing: 0.06em;
}

/* ===== Contact ===== */
.contact { padding: 100px 0; background: var(--gray-bg); }
.contact-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: start; }
.contact-info h2 { font-size: 2.2rem; margin-bottom: 14px; }
.contact-info > p { color: var(--gray); margin-bottom: 32px; }
.contact-details { display: flex; flex-direction: column; gap: 16px; }
.contact-box {
    background: var(--white);
    border: 1px solid var(--gray-light);
    border-radius: var(--radius-lg);
    padding: 22px 26px;
    font-size: 0.92rem;
    color: var(--gray);
}
.contact-box strong {
    display: block;
    color: var(--slate);
    margin-bottom: 10px;
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    font-weight: 700;
}
.contact-box a { color: var(--cyan-dark); font-weight: 600; }
.contact-form {
    background: var(--white);
    border: 1px solid var(--gray-light);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow);
}
.contact-form h3 {
    font-size: 1.2rem;
    margin-bottom: 28px;
    padding-bottom: 16px;
    border-bottom: 2px solid transparent;
    border-image: linear-gradient(90deg, var(--cyan), var(--violet)) 1;
    color: var(--slate);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.contact-form input, .contact-form textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--gray-light);
    border-radius: var(--radius);
    font-family: 'Noto Sans TC', 'Inter', sans-serif;
    font-size: 0.9rem;
    background: var(--gray-bg);
    color: var(--slate);
    margin-bottom: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.contact-form input:focus, .contact-form textarea:focus {
    outline: none;
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.15);
}
.form-note { font-size: 0.88rem; color: var(--cyan-dark); font-weight: 600; text-align: center; margin-top: 8px; }

/* ===== Footer ===== */
.footer {
    background: var(--slate);
    color: rgba(255, 255, 255, 0.6);
    padding: 72px 0 32px;
}
.footer .logo-text strong { color: var(--white); }
.footer .logo-text small { color: rgba(255, 255, 255, 0.4); }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 48px; }
.footer-brand p { font-size: 0.88rem; max-width: 300px; margin-top: 18px; line-height: 1.7; }
.footer-legal-name { font-size: 0.72rem; color: rgba(255, 255, 255, 0.3); margin-top: 14px; }
.footer-col h4 {
    font-family: 'Inter', sans-serif;
    color: var(--cyan);
    margin-bottom: 18px;
    font-size: 0.95rem;
    letter-spacing: 0.06em;
}
.footer-col a, .footer-col span {
    display: block;
    padding: 6px 0;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.55);
    transition: color 0.2s;
}
.footer-col a:hover { color: var(--cyan); }
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    flex-wrap: wrap;
    gap: 12px;
}
.footer-links { display: flex; gap: 28px; }
.footer-links a { color: rgba(255, 255, 255, 0.45); font-size: 0.8rem; }
.footer-links a:hover { color: var(--cyan); }

/* ===== Reveal ===== */
.reveal { opacity: 0; transform: translateY(28px); transition: all 0.7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ===== Responsive ===== */
@media (max-width: 900px) {
    .topbar-right { display: none; }
    .nav-links {
        position: fixed;
        top: 76px; right: 0;
        flex-direction: column;
        align-items: flex-start;
        background: var(--gray-bg);
        width: 280px;
        padding: 32px;
        gap: 24px;
        border-left: 1px solid var(--gray-light);
        box-shadow: var(--shadow-lg);
        transform: translateX(100%);
        transition: transform 0.3s ease;
        height: calc(100vh - 76px);
        overflow-y: auto;
    }
    .nav-links.open { transform: translateX(0); }
    .nav-toggle { display: flex; }
    .hero-inner, .about-inner, .contact-inner { grid-template-columns: 1fr; }
    .hero h1 { font-size: 2rem; }
    .hero-glass-card { width: 260px; height: 260px; }
    .products-grid { grid-template-columns: 1fr; }
    .why-grid { grid-template-columns: repeat(2, 1fr); }
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 28px; }
    .footer-inner { grid-template-columns: 1fr 1fr; }
    .categories-row { gap: 20px; }
}
@media (max-width: 480px) {
    .form-row { grid-template-columns: 1fr; }
    .why-grid { grid-template-columns: 1fr; }
    .footer-inner { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; text-align: center; }
    .hero h1 { font-size: 1.75rem; }
    .about-cards { flex-direction: row; flex-wrap: wrap; }
    .about-card { flex: 1; min-width: 140px; }
}
