:root {
    --bg-base: #f6f8fb;
    --bg-surface: #f1f5f9;
    --bg-card: rgba(255, 255, 255, 0.94);
    --border-color: rgba(15, 23, 42, 0.09);
    --border-hover: rgba(37, 99, 235, 0.45);
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-glow: rgba(37, 99, 235, 0.18);
    --accent-cyan: #0891b2;
    --text-main: #16202e;
    --text-muted: #55677d;
    --text-dim: #8595a8;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
}

html {
    scroll-padding-top: 120px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", sans-serif;
    background-color: var(--bg-base);
    color: var(--text-main);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* 導航列 */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 10px rgba(15, 23, 42, 0.05);
}

.brand-logo img.logo-img {
    height: 72px;
    width: auto;
    display: block;
}

.brand-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.brand-zh {
    font-size: 1.8rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: 0.04em;
    line-height: 1.2;
}

.brand-en {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--accent-cyan);
    letter-spacing: 0.02em;
    line-height: 1.2;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-badge {
    background: linear-gradient(135deg, var(--primary), var(--accent-cyan));
    color: #fff;
    font-weight: 900;
    font-size: 1.2rem;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px var(--primary-glow);
}

.brand-name {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: #0f172a;
}

.brand-name span {
    color: var(--accent-cyan);
    font-size: 0.9rem;
    font-weight: 500;
    margin-left: 6px;
}

nav {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

nav a:hover, nav a.active {
    color: #0f172a;
}

nav a.active {
    background: rgba(37, 99, 235, 0.08);
    color: var(--primary);
}

.nav-btn {
    background: rgba(37, 99, 235, 0.1) !important;
    color: var(--primary) !important;
    border: 1px solid rgba(37, 99, 235, 0.3);
    padding: 0.45rem 1rem !important;
}

.nav-btn:hover {
    background: var(--primary) !important;
    color: #fff !important;
    box-shadow: 0 0 12px var(--primary-glow);
}

/* 主容器 */
main {
    flex: 1;
}

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 3rem 2rem 5rem;
}

/* 頁面標題區 */
.page-header {
    text-align: center;
    padding: 4rem 2rem 3rem;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(180deg, rgba(226, 232, 240, 0.55) 0%, transparent 100%);
}

.page-header .tag {
    display: inline-block;
    padding: 0.35rem 1rem;
    background: rgba(8, 145, 178, 0.08);
    border: 1px solid rgba(8, 145, 178, 0.28);
    border-radius: 50px;
    color: var(--accent-cyan);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.page-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: #0f172a;
}

.page-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto;
}

/* 按鈕樣式 */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary);
    color: #fff;
    padding: 0.85rem 1.8rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: 0 4px 15px var(--primary-glow);
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    color: var(--text-main);
    border: 1px solid var(--border-color);
    padding: 0.85rem 1.8rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    border-color: var(--border-hover);
    background: var(--bg-surface);
}

/* ============================================
   共用元件
   ============================================ */

/* 區塊標題 */
.section-head {
    text-align: center;
    margin-bottom: 2.5rem;
}
.section-head h2 {
    font-size: 2rem;
    color: #0f172a;
}
.section-head p {
    color: var(--text-dim);
    margin-top: 0.4rem;
}

/* 錨點快速導覽列 */
.anchor-nav {
    position: sticky;
    top: 110px;
    z-index: 90;
    display: flex;
    gap: 0.6rem;
    justify-content: center;
    flex-wrap: wrap;
    padding: 0.9rem 1rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
}
.anchor-nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.88rem;
    padding: 0.35rem 0.9rem;
    border-radius: 50px;
    border: 1px solid var(--border-color);
    background: #ffffff;
    transition: all 0.2s ease;
}
.anchor-nav a:hover {
    color: var(--accent-cyan);
    border-color: rgba(8, 145, 178, 0.45);
    background: rgba(8, 145, 178, 0.06);
}

/* 應用產業 */
.industries-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1.25rem;
}
.industry-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem 1rem;
    text-align: center;
    transition: all 0.25s ease;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
}
.industry-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.1);
}
.industry-icon {
    font-size: 1.9rem;
    margin-bottom: 0.6rem;
}
.industry-card h3 {
    font-size: 1rem;
    color: #0f172a;
    margin-bottom: 0.25rem;
}
.industry-card p {
    font-size: 0.84rem;
    color: var(--text-muted);
}

/* 為什麼選擇 */
.why-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1.5rem;
}
.why-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.75rem;
    transition: all 0.25s ease;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
}
.why-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.09);
}
.why-num {
    font-size: 1.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary), var(--accent-cyan));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.6rem;
}
.why-card h3 {
    font-size: 1.1rem;
    color: #0f172a;
    margin-bottom: 0.5rem;
}
.why-card p {
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.65;
}

/* 服務流程 */
.process-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}
.step-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.75rem;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
}
.step-no {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent-cyan));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: #fff;
    margin-bottom: 1rem;
    box-shadow: 0 2px 10px var(--primary-glow);
}
.step-card h3 {
    font-size: 1.08rem;
    color: #0f172a;
    margin-bottom: 0.5rem;
}
.step-card p {
    color: var(--text-muted);
    font-size: 0.92rem;
}

/* 周邊整合分類 */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}
.category-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    transition: all 0.25s ease;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
}
.category-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.1);
}
.category-card svg {
    width: 54px;
    height: 54px;
}
.category-card h3 {
    font-size: 1.08rem;
    color: #0f172a;
}
.category-card p {
    font-size: 0.92rem;
    color: var(--text-muted);
    flex-grow: 1;
}

/* 應用實績照片 */
.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}
.photo-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.25s ease;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.05);
}
.photo-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.14);
}
.photo-card img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    display: block;
}
.photo-card figcaption {
    padding: 0.9rem 1.2rem;
    color: var(--text-main);
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
    background: #ffffff;
}

/* FAQ */
details.faq-item {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
}
details.faq-item summary {
    cursor: pointer;
    font-weight: 600;
    color: #0f172a;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}
details.faq-item summary::-webkit-details-marker {
    display: none;
}
details.faq-item summary::after {
    content: '+';
    color: var(--accent-cyan);
    font-size: 1.4rem;
    font-weight: 400;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}
details.faq-item[open] summary::after {
    transform: rotate(45deg);
}
details.faq-item p {
    color: var(--text-muted);
    margin-top: 0.8rem;
    font-size: 0.95rem;
    line-height: 1.7;
}

/* 捲動淡入 */
.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
    opacity: 1;
    transform: none;
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; transition: none; }
}

/* 頁尾 */
footer {
    background: #eef2f7;
    border-top: 1px solid var(--border-color);
    color: var(--text-dim);
    padding: 3rem 2rem 2rem;
    font-size: 0.9rem;
}

.footer-grid {
    max-width: 1140px;
    margin: 0 auto 2rem;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
}

.footer-col h4 {
    color: #0f172a;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 0.5rem;
}

.footer-col ul li a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-col ul li a:hover {
    color: var(--primary);
}

.footer-bottom {
    max-width: 1140px;
    margin: 0 auto;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(15, 23, 42, 0.07);
    text-align: center;
    font-size: 0.85rem;
}

/* RWD */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.8rem;
    }
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .anchor-nav {
        top: 178px;
    }
}
