:root {
    --navy: #0b1120;
    --navy-mid: #131c31;
    --slate: #1e293b;
    --slate-light: #334155;
    --cyan: #22d3ee;
    --cyan-dark: #0891b2;
    --violet: #818cf8;
    --violet-dark: #6366f1;
    --light: #f8fafc;
    --off-white: #f1f5f9;
    --text: #0f172a;
    --gray: #64748b;
    --gray-light: #e2e8f0;
    --white: #ffffff;
    --shadow: 0 8px 32px rgba(11, 17, 32, 0.08);
    --shadow-lg: 0 20px 60px rgba(11, 17, 32, 0.14);
    --radius: 8px;
    --radius-lg: 12px;
}

* { 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(--text);
    line-height: 1.75;
    background: var(--light);
    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(--navy);
}

a { text-decoration: none; color: inherit; }

.eyebrow {
    display: inline-block;
    color: var(--cyan-dark);
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    margin-bottom: 14px;
}
.eyebrow-light { color: var(--cyan); }
.section-head-light h2 { color: var(--light); }

/* ===== 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) 0%, var(--violet) 100%);
    color: var(--navy);
}
.btn-primary:hover {
    box-shadow: 0 8px 28px rgba(34, 211, 238, 0.4);
    transform: translateY(-2px);
}
.btn-secondary {
    background: transparent;
    color: var(--light);
    border: 1px solid rgba(34, 211, 238, 0.4);
}
.btn-secondary:hover {
    border-color: var(--cyan);
    color: var(--cyan);
    background: rgba(34, 211, 238, 0.06);
}
.btn-block { display: block; width: 100%; text-align: center; }

/* ===== Top bar ===== */
.topbar {
    background: var(--navy);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
    padding: 10px 0;
    letter-spacing: 0.02em;
}
.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.7); transition: color 0.2s; }
.topbar-item:hover { color: var(--cyan); }

/* ===== Navbar ===== */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(248, 250, 252, 0.92);
    backdrop-filter: blur(16px);
    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 {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--navy) 0%, var(--slate) 100%);
    color: var(--cyan);
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.15rem;
    font-weight: 700;
    border-radius: var(--radius);
    border: 1px solid rgba(34, 211, 238, 0.3);
}
.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(--navy);
    letter-spacing: 0.02em;
}
.logo-text small {
    font-size: 0.6rem;
    color: var(--gray);
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.nav-links { display: flex; align-items: center; gap: 36px; }
.nav-links a {
    font-weight: 500;
    font-size: 0.88rem;
    color: var(--text);
    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));
    border-radius: 2px;
    transform: scaleX(0);
    transition: transform 0.3s;
}
.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(--navy);
    color: var(--cyan);
    border: 1px solid rgba(34, 211, 238, 0.3);
    border-radius: var(--radius);
    padding: 10px 18px;
    font-family: 'Noto Sans TC', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.06em;
    cursor: pointer;
    transition: all 0.25s;
    min-width: 88px;
    justify-content: center;
}
.lang-btn:hover, .lang-btn.open {
    background: var(--navy-mid);
    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(--text);
    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(--off-white); color: var(--cyan-dark); }
.lang-dropdown li.active {
    background: var(--navy);
    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(--navy);
    border-radius: 2px;
}

/* ===== Hero ===== */
.hero {
    padding: 100px 0 0;
    background: var(--navy);
    color: var(--light);
    position: relative;
    overflow: hidden;
}
.hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(34, 211, 238, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(34, 211, 238, 0.04) 1px, transparent 1px);
    background-size: 48px 48px;
    pointer-events: none;
}
.hero-glow {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(80px);
}
.hero-glow-1 {
    width: 400px; height: 400px;
    top: -100px; right: -80px;
    background: rgba(34, 211, 238, 0.12);
}
.hero-glow-2 {
    width: 300px; height: 300px;
    bottom: 60px; left: -60px;
    background: rgba(129, 140, 248, 0.1);
}
.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;
    border: 1px solid rgba(34, 211, 238, 0.3);
    color: var(--cyan);
    padding: 8px 18px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    border-radius: 100px;
    margin-bottom: 28px;
}
.hero h1 {
    font-size: 2.6rem;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--light);
    line-height: 1.25;
}
.hero-sub {
    font-size: 1.02rem;
    color: rgba(248, 250, 252, 0.7);
    margin-bottom: 36px;
    max-width: 520px;
}
.hero-buttons { display: flex; gap: 18px; flex-wrap: wrap; }

.hero-visual { display: flex; justify-content: center; align-items: center; }
.hero-terminal {
    width: 100%;
    max-width: 380px;
    background: rgba(19, 28, 49, 0.9);
    border: 1px solid rgba(34, 211, 238, 0.2);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.3);
}
.terminal-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.dot {
    width: 10px; height: 10px;
    border-radius: 50%;
}
.dot.red { background: #ef4444; }
.dot.yellow { background: #eab308; }
.dot.green { background: #22c55e; }
.terminal-title {
    margin-left: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.4);
}
.terminal-body {
    padding: 24px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.82rem;
    line-height: 1.9;
}
.code-prompt { color: var(--cyan); }
.code-cmd { color: var(--violet); }
.code-comment { color: rgba(255, 255, 255, 0.35); font-size: 0.78rem; }
.code-output { color: rgba(248, 250, 252, 0.75); }
.code-ok { color: #22c55e; }
.code-cursor {
    display: inline-block;
    animation: blink 1s step-end infinite;
    color: var(--cyan);
}
@keyframes blink {
    50% { opacity: 0; }
}

.hero-categories {
    background: var(--navy-mid);
    border-top: 1px solid rgba(34, 211, 238, 0.12);
    padding: 20px 0;
    position: relative;
    z-index: 1;
}
.categories-row {
    display: flex;
    justify-content: center;
    gap: 48px;
    flex-wrap: wrap;
}
.categories-row span {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    color: var(--cyan);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 500;
}

/* ===== 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(--off-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(--text);
    border-bottom: 1px solid var(--gray-light);
    font-size: 0.92rem;
    letter-spacing: 0.02em;
}
.about-list li:last-child { border-bottom: none; }
.about-cards { display: flex; flex-direction: column; gap: 20px; }
.about-card {
    background: var(--white);
    border: 1px solid var(--gray-light);
    border-radius: var(--radius-lg);
    padding: 28px 32px;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}
.about-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--cyan), var(--violet));
    opacity: 0;
    transition: opacity 0.3s;
}
.about-card:hover {
    border-color: rgba(34, 211, 238, 0.3);
    box-shadow: var(--shadow);
}
.about-card:hover::before { opacity: 1; }
.card-label {
    display: block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 8px;
}
.card-value {
    font-family: 'Inter', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--navy);
}

/* ===== Services ===== */
.services { padding: 100px 0; background: var(--light); }
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.service-card {
    background: var(--white);
    padding: 40px 32px;
    border: 1px solid var(--gray-light);
    border-radius: var(--radius-lg);
    text-align: center;
    transition: all 0.35s ease;
}
.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow);
    border-color: rgba(34, 211, 238, 0.35);
}
.service-icon { font-size: 2.4rem; margin-bottom: 20px; }
.service-card h3 { font-size: 1.15rem; margin-bottom: 12px; }
.service-card p { color: var(--gray); font-size: 0.9rem; line-height: 1.65; }

/* ===== Why Us ===== */
.why {
    padding: 100px 0;
    background: var(--navy);
    position: relative;
    overflow: hidden;
}
.why::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(34, 211, 238, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(34, 211, 238, 0.03) 1px, transparent 1px);
    background-size: 48px 48px;
    pointer-events: none;
}
.why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; position: relative; z-index: 1; }
.why-card {
    padding: 36px 24px;
    border: 1px solid rgba(34, 211, 238, 0.12);
    border-radius: var(--radius-lg);
    text-align: center;
    transition: all 0.3s;
    background: rgba(19, 28, 49, 0.5);
}
.why-card:hover {
    border-color: rgba(34, 211, 238, 0.35);
    background: rgba(19, 28, 49, 0.8);
}
.why-num {
    display: block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.8rem;
    color: var(--cyan);
    opacity: 0.7;
    margin-bottom: 16px;
}
.why-card h3 { font-size: 1.05rem; color: var(--light); margin-bottom: 10px; }
.why-card p { font-size: 0.88rem; color: rgba(248, 250, 252, 0.55); line-height: 1.65; }

/* ===== Stats ===== */
.stats { padding: 72px 0; background: var(--off-white); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px; text-align: center; }
.stat h3 {
    font-family: 'JetBrains Mono', monospace;
    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: 500;
    margin-top: 6px;
    font-size: 0.85rem;
    letter-spacing: 0.06em;
}

/* ===== Contact ===== */
.contact { padding: 100px 0; background: var(--light); }
.contact-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.contact-info h2 { font-size: 2.2rem; margin-bottom: 14px; }
.contact-info > p { color: var(--gray); margin-bottom: 36px; }
.contact-details { display: flex; flex-direction: column; gap: 18px; }
.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(--navy);
    margin-bottom: 10px;
    font-size: 0.8rem;
    letter-spacing: 0.06em;
}
.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(--navy);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.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(--off-white);
    color: var(--text);
    margin-bottom: 16px;
    transition: border-color 0.2s;
}
.contact-form input:focus, .contact-form textarea:focus {
    outline: none;
    border-color: var(--cyan);
}
.form-note { font-size: 0.88rem; color: var(--cyan-dark); font-weight: 600; text-align: center; margin-top: 8px; }

/* ===== Footer ===== */
.footer {
    background: var(--navy);
    color: rgba(255, 255, 255, 0.6);
    padding: 72px 0 32px;
}
.footer .logo-mark { color: var(--cyan); border-color: rgba(34, 211, 238, 0.3); }
.footer .logo-text strong { color: var(--light); }
.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.04em;
}
.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(--light);
        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-terminal { max-width: 100%; margin: 0 auto; }
    .services-grid { grid-template-columns: 1fr; }
    .why-grid { grid-template-columns: repeat(2, 1fr); }
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 32px; }
    .footer-inner { grid-template-columns: 1fr 1fr; }
    .categories-row { gap: 24px; }
}
@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; }
}
