/* ============================================================
   CSS Variables & Reset
   ============================================================ */
:root {
    --orange:       #E05A1C;
    --orange-dark:  #C04A10;
    --orange-light: #FF7A3C;
    --dark:         #1A1A1A;
    --dark-2:       #2A2A2A;
    --dark-3:       #333333;
    --gray:         #666666;
    --gray-light:   #999999;
    --border:       #E2E2E2;
    --bg-light:     #F7F7F7;
    --white:        #FFFFFF;
    --shadow:       0 4px 24px rgba(0,0,0,0.08);
    --shadow-lg:    0 12px 48px rgba(0,0,0,0.14);
    --radius:       10px;
    --radius-lg:    18px;
    --transition:   all 0.3s ease;
    --font:         'Microsoft JhengHei', '微軟正黑體', 'PingFang TC', 'Noto Sans TC', sans-serif;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 76px;
}

body {
    font-family: var(--font);
    color: var(--dark);
    line-height: 1.65;
    background: var(--white);
    overflow-x: hidden;
}

a    { text-decoration: none; color: inherit; }
ul   { list-style: none; }
img  { max-width: 100%; display: block; }

/* ============================================================
   Layout Utilities
   ============================================================ */
.container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 24px;
}

.section       { padding: 100px 0; }
.section-gray  { background: var(--bg-light); }

/* Section Header */
.section-title {
    text-align: center;
    margin-bottom: 64px;
}
.section-title .tag {
    display: inline-block;
    background: rgba(224, 90, 28, 0.1);
    color: var(--orange);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 3px;
    padding: 5px 18px;
    border-radius: 100px;
    margin-bottom: 14px;
}
.section-title h2 {
    font-size: clamp(26px, 4vw, 38px);
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 10px;
}
.section-title p {
    color: var(--gray);
    font-size: 15px;
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
    font-family: var(--font);
    white-space: nowrap;
}
.btn-orange {
    background: var(--orange);
    color: var(--white);
    border-color: var(--orange);
}
.btn-orange:hover {
    background: var(--orange-dark);
    border-color: var(--orange-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(224, 90, 28, 0.35);
}
.btn-ghost {
    background: transparent;
    color: var(--white);
    border-color: rgba(255,255,255,0.45);
}
.btn-ghost:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.8);
}
.btn-full { width: 100%; }

/* ============================================================
   Header & Navbar
   ============================================================ */
.header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    background: rgba(20, 20, 20, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: var(--transition);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.header.scrolled {
    background: rgba(20, 20, 20, 0.98);
    box-shadow: 0 2px 24px rgba(0,0,0,0.4);
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 24px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}
.nav-logo-img  { height: 42px; width: auto; object-fit: contain; }
.nav-logo-text { display: flex; flex-direction: column; }
.logo-cn { color: var(--white); font-size: 15px; font-weight: 800; line-height: 1.3; }
.logo-en { color: var(--orange); font-size: 9px; font-weight: 700; letter-spacing: 0.5px; }

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
}
.nav-link {
    color: rgba(255,255,255,0.75);
    font-size: 14px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: var(--radius);
    transition: var(--transition);
}
.nav-link:hover { color: var(--white); background: rgba(255,255,255,0.07); }
.nav-link.active { color: var(--orange); }
.nav-link.contact-btn {
    background: var(--orange);
    color: var(--white);
    margin-left: 12px;
}
.nav-link.contact-btn:hover { background: var(--orange-dark); }

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 10;
}
.hamburger span {
    display: block;
    width: 24px; height: 2px;
    background: var(--white);
    border-radius: 2px;
    transition: var(--transition);
}
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ============================================================
   Hero Section
   ============================================================ */
.hero {
    min-height: 100vh;
    background:
        radial-gradient(ellipse at 75% 50%, rgba(224, 90, 28, 0.18) 0%, transparent 55%),
        radial-gradient(ellipse at 20% 80%, rgba(224, 90, 28, 0.08) 0%, transparent 50%),
        linear-gradient(150deg, #0e0e0e 0%, #1a1a1a 50%, #202020 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 120px 24px 40px;
    position: relative;
    overflow: hidden;
}

/* Grid overlay */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
    background-size: 64px 64px;
    pointer-events: none;
}

/* Decorative hexagon shapes */
.hero::after {
    content: '';
    position: absolute;
    top: -80px; right: -80px;
    width: 500px; height: 500px;
    background: rgba(224, 90, 28, 0.06);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 780px;
    animation: fadeInUp 0.8s ease;
}
.hero-eyebrow {
    color: var(--orange);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 4px;
    margin-bottom: 20px;
}
.hero h1 {
    font-size: clamp(38px, 6.5vw, 72px);
    font-weight: 900;
    color: var(--white);
    line-height: 1.15;
    margin-bottom: 22px;
}
.hero h1 span { color: var(--orange); }
.hero-desc {
    color: rgba(255,255,255,0.55);
    font-size: 16px;
    line-height: 1.9;
    margin-bottom: 40px;
}
.hero-cta {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Stats bar */
.hero-stats {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: var(--radius-lg);
    padding: 28px 48px;
    margin-top: 60px;
    backdrop-filter: blur(8px);
    animation: fadeInUp 0.8s ease 0.25s both;
}
.stat-item    { text-align: center; padding: 0 40px; }
.stat-num     { font-size: 44px; font-weight: 900; color: var(--white); line-height: 1; }
.stat-num span { font-size: 26px; color: var(--orange); }
.stat-label   { color: rgba(255,255,255,0.45); font-size: 12px; margin-top: 6px; letter-spacing: 0.5px; }
.stat-divider { width: 1px; height: 52px; background: rgba(255,255,255,0.12); }

/* ============================================================
   About Section
   ============================================================ */
.about-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 72px;
    align-items: start;
}
.about-text h3 {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 16px;
    color: var(--dark);
}
.about-text p {
    color: var(--gray);
    line-height: 1.85;
    margin-bottom: 14px;
    font-size: 15px;
}
.about-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 28px;
}
.badge {
    background: rgba(224, 90, 28, 0.08);
    color: var(--orange);
    border: 1px solid rgba(224, 90, 28, 0.2);
    padding: 7px 18px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 700;
}

.about-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.info-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: var(--transition);
}
.info-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
    border-color: var(--orange);
}
.card-icon {
    width: 48px; height: 48px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
}
.card-icon.orange { background: rgba(224, 90, 28, 0.1); color: var(--orange); }
.card-icon.dark   { background: var(--dark-2); color: var(--white); }
.card-icon svg    { width: 22px; height: 22px; }
.info-card h4 { font-size: 14px; font-weight: 800; margin-bottom: 6px; }
.info-card p  { font-size: 13px; color: var(--gray); line-height: 1.6; }

/* ============================================================
   Services Section
   ============================================================ */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}
.service-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 36px 26px 28px;
    position: relative;
    border: 1px solid var(--border);
    transition: var(--transition);
    overflow: hidden;
}
.service-card::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--orange);
    transform: scaleX(0);
    transition: var(--transition);
    transform-origin: left;
}
.service-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(224, 90, 28, 0.2);
}
.service-card:hover::after { transform: scaleX(1); }

.service-num {
    font-size: 52px;
    font-weight: 900;
    color: rgba(224, 90, 28, 0.07);
    line-height: 1;
    position: absolute;
    top: 14px; right: 22px;
    user-select: none;
}
.service-icon {
    width: 52px; height: 52px;
    background: rgba(224, 90, 28, 0.1);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    color: var(--orange);
    transition: var(--transition);
}
.service-card:hover .service-icon {
    background: var(--orange);
    color: var(--white);
}
.service-icon svg { width: 26px; height: 26px; }
.service-card h3 { font-size: 16px; font-weight: 800; margin-bottom: 10px; color: var(--dark); }
.service-card p  { color: var(--gray); font-size: 14px; line-height: 1.75; margin-bottom: 16px; }

.service-list { display: flex; flex-direction: column; gap: 7px; }
.service-list li {
    font-size: 13px;
    color: var(--gray);
    padding-left: 14px;
    position: relative;
}
.service-list li::before {
    content: '';
    position: absolute;
    left: 0; top: 50%;
    transform: translateY(-50%);
    width: 5px; height: 5px;
    border-radius: 50%;
    background: var(--orange);
}

/* ============================================================
   Cases Section
   ============================================================ */
.cases-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
    margin-bottom: 48px;
}
.case-card {
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: var(--transition);
    background: var(--white);
}
.case-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--orange);
}
.case-img {
    position: relative;
    height: 190px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.case-icon { opacity: 0.25; }
.case-icon svg { width: 64px; height: 64px; }
.case-category {
    position: absolute;
    top: 14px; left: 14px;
    background: rgba(0,0,0,0.55);
    color: var(--white);
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 100px;
    backdrop-filter: blur(4px);
}
.case-overlay {
    position: absolute;
    inset: 0;
    background: rgba(224, 90, 28, 0.88);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}
.case-overlay span {
    color: var(--white);
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 1px;
}
.case-card:hover .case-overlay { opacity: 1; }

.case-info { padding: 20px 22px; }
.case-info h4 { font-size: 15px; font-weight: 800; margin-bottom: 6px; color: var(--dark); }
.case-info p  { font-size: 13px; color: var(--gray); line-height: 1.65; margin-bottom: 12px; }
.case-tag {
    background: rgba(224, 90, 28, 0.08);
    color: var(--orange);
    font-size: 12px;
    font-weight: 700;
    padding: 3px 12px;
    border-radius: 100px;
}
.cases-cta {
    text-align: center;
    padding: 44px;
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}
.cases-cta p {
    color: var(--gray);
    margin-bottom: 24px;
    font-size: 15px;
}

/* ============================================================
   Contact Section
   ============================================================ */
.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1.6fr;
    gap: 64px;
    align-items: start;
}
.contact-info h3 {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 4px;
}
.contact-sub-name {
    color: var(--orange);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.5px;
    margin-bottom: 36px;
}
.contact-items { display: flex; flex-direction: column; gap: 28px; }
.contact-item  { display: flex; gap: 16px; align-items: flex-start; }
.contact-icon {
    width: 44px; height: 44px;
    background: rgba(224, 90, 28, 0.1);
    color: var(--orange);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.contact-icon svg { width: 20px; height: 20px; }
.contact-item strong { display: block; font-size: 14px; font-weight: 800; margin-bottom: 2px; }
.contact-item p      { color: var(--gray); font-size: 14px; }

/* Form */
.contact-form {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 40px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 0;
}
.form-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-bottom: 18px;
}
.form-group label  { font-size: 14px; font-weight: 700; color: var(--dark); }
.required          { color: var(--orange); }
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    font-family: var(--font);
    color: var(--dark);
    transition: var(--transition);
    background: var(--white);
    outline: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--orange);
    box-shadow: 0 0 0 3px rgba(224, 90, 28, 0.1);
}
.form-group textarea { resize: vertical; min-height: 120px; }
.form-group select   { cursor: pointer; appearance: auto; }
.form-success {
    display: none;
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
    padding: 16px;
    border-radius: var(--radius);
    text-align: center;
    margin-top: 14px;
    font-size: 14px;
    font-weight: 700;
}

/* ============================================================
   Footer
   ============================================================ */
.footer {
    background: var(--dark);
    color: rgba(255,255,255,0.6);
    padding: 72px 0 0;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.6fr;
    gap: 48px;
    padding-bottom: 56px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-brand    { display: flex; flex-direction: column; gap: 14px; }
.footer-logo-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}
.footer-logo { height: 38px; width: auto; }
.footer-company-name { display: flex; flex-direction: column; }
.footer-company-name span  { color: var(--white); font-weight: 800; font-size: 15px; }
.footer-company-name small { color: var(--orange); font-size: 9px; font-weight: 700; letter-spacing: 0.5px; }
.footer-tagline { font-size: 13px; line-height: 1.8; }

.footer h5 { color: var(--white); font-size: 15px; font-weight: 800; margin-bottom: 20px; }
.footer-col ul      { display: flex; flex-direction: column; gap: 10px; }
.footer-col li      { font-size: 14px; }
.footer-col a       { transition: var(--transition); }
.footer-col a:hover { color: var(--orange); }

.footer-contact-list { display: flex; flex-direction: column; gap: 12px; }
.footer-contact-list li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    line-height: 1.5;
}
.footer-contact-list svg { width: 14px; height: 14px; flex-shrink: 0; margin-top: 2px; color: var(--orange); }

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 0;
    font-size: 12px;
    color: rgba(255,255,255,0.3);
}

/* ============================================================
   Back to Top
   ============================================================ */
.back-to-top {
    position: fixed;
    bottom: 32px; right: 32px;
    width: 44px; height: 44px;
    background: var(--orange);
    color: var(--white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(16px);
    transition: var(--transition);
    z-index: 500;
    box-shadow: 0 4px 16px rgba(224, 90, 28, 0.4);
}
.back-to-top.show { opacity: 1; transform: translateY(0); }
.back-to-top:hover { background: var(--orange-dark); transform: translateY(-3px); }
.back-to-top svg { width: 20px; height: 20px; }

/* ============================================================
   Animations
   ============================================================ */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(32px); }
    to   { opacity: 1; transform: translateY(0); }
}

.fade-in {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.65s ease, transform 0.65s ease;
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================================
   Responsive — Tablet (≤ 1024px)
   ============================================================ */
@media (max-width: 1024px) {
    .services-grid,
    .cases-grid    { grid-template-columns: repeat(2, 1fr); }
    .about-layout  { grid-template-columns: 1fr; gap: 48px; }
    .footer-grid   { grid-template-columns: 1fr 1fr; gap: 36px; }
    .hero-stats    { padding: 24px 36px; }
    .stat-item     { padding: 0 28px; }
}

/* ============================================================
   Responsive — Mobile (≤ 768px)
   ============================================================ */
@media (max-width: 768px) {
    .section { padding: 64px 0; }

    /* Navbar */
    .hamburger { display: flex; }
    .nav-links {
        position: fixed;
        top: 72px; left: 0; right: 0;
        background: rgba(20, 20, 20, 0.98);
        flex-direction: column;
        padding: 16px;
        gap: 4px;
        transform: translateY(-10px);
        opacity: 0;
        pointer-events: none;
        transition: var(--transition);
        border-top: 1px solid rgba(255,255,255,0.06);
    }
    .nav-links.open { transform: translateY(0); opacity: 1; pointer-events: all; }
    .nav-link       { width: 100%; text-align: center; padding: 12px; }
    .nav-link.contact-btn { margin-left: 0; margin-top: 4px; }

    /* Hero */
    .hero         { padding: 110px 20px 48px; }
    .hero-stats   {
        flex-direction: column;
        gap: 0;
        padding: 24px;
        width: 90%;
        max-width: 340px;
        margin-top: 40px;
    }
    .stat-item    { padding: 14px 0; width: 100%; }
    .stat-divider { width: 40px; height: 1px; }
    .stat-num     { font-size: 34px; }

    /* Services & Cases */
    .services-grid,
    .cases-grid   { grid-template-columns: 1fr; }

    /* About cards */
    .about-cards  { grid-template-columns: 1fr; }

    /* Contact */
    .contact-layout { grid-template-columns: 1fr; gap: 40px; }
    .form-row        { grid-template-columns: 1fr; }
    .contact-form    { padding: 28px 20px; }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    .footer-bottom {
        flex-direction: column;
        gap: 6px;
        text-align: center;
    }

    /* Cases CTA */
    .cases-cta { padding: 28px 20px; }

    /* Back to top */
    .back-to-top { bottom: 20px; right: 20px; }

    /* Section title */
    .section-title { margin-bottom: 40px; }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 34px; }
    .hero-cta { flex-direction: column; align-items: center; }
    .btn      { width: 100%; max-width: 280px; }
}
