/* ============================================================================
   東籬資訊官網 設計系統
   品牌主色:企業綠(呼應 logo);版面參考現代企業站(hero / 方案 / 客戶 / CTA)。
   自足設計:不外引 Google Fonts 與第三方 CSS 框架,字體採系統堆疊。
   ============================================================================ */

:root {
    --green: #2f9e44;
    --green-600: #279141;
    --green-700: #1e7a34;
    --green-800: #155c28;
    --green-900: #103f1e;
    --green-50: #eefbf2;
    --green-100: #d6f2df;

    --ink: #0f1c14;
    --body: #33413a;
    --muted: #576459;
    --line: #e4ebe6;
    --bg: #ffffff;
    --bg-soft: #f4f8f5;
    --bg-dark: #0c1f14;

    --amber: #f0a91b;

    --radius: 14px;
    --radius-sm: 10px;
    --shadow-sm: 0 1px 2px rgba(16, 40, 24, .06), 0 2px 8px rgba(16, 40, 24, .05);
    --shadow: 0 10px 30px rgba(16, 45, 26, .10);
    --shadow-lg: 0 24px 60px rgba(16, 45, 26, .16);
    --maxw: 1180px;
    --font: -apple-system, BlinkMacSystemFont, "PingFang TC", "Noto Sans TC",
            "Microsoft JhengHei", "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font);
    color: var(--body);
    background: var(--bg);
    line-height: 1.7;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--green-700); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--green-900); }

h1, h2, h3, h4 { color: var(--ink); line-height: 1.25; margin: 0 0 .5em; font-weight: 800; letter-spacing: -.01em; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ── 通用區塊 ─────────────────────────────────────────────────────────── */
.section { padding: 84px 0; }
.section--soft { background: var(--bg-soft); }
.section--tight { padding: 56px 0; }

.eyebrow {
    display: inline-block;
    font-size: 13px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
    color: var(--green-700); background: var(--green-50);
    padding: 6px 14px; border-radius: 999px; margin-bottom: 18px;
}

.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 { font-size: clamp(28px, 4vw, 40px); }
.section-head .lead { font-size: 18px; color: var(--muted); margin: 0; }

.lead { font-size: 18px; color: var(--muted); }

/* ── 按鈕 ─────────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; gap: 9px;
    font-weight: 700; font-size: 15px; line-height: 1;
    padding: 14px 24px; border-radius: 999px; cursor: pointer;
    border: 1.5px solid transparent; transition: all .18s ease; white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--green); color: #fff; box-shadow: 0 8px 20px rgba(47, 158, 68, .28); }
.btn-primary:hover { background: var(--green-700); color: #fff; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--green); color: var(--green-700); }
.btn-white { background: #fff; color: var(--green-800); }
.btn-white:hover { background: var(--green-50); color: var(--green-900); }
.btn-outline-white { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .5); }
.btn-outline-white:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.btn-lg { padding: 17px 32px; font-size: 16px; }

.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.link-arrow svg { width: 16px; height: 16px; transition: transform .15s ease; }
.link-arrow:hover svg { transform: translateX(3px); }

/* ── 頁首 / 導覽 ───────────────────────────────────────────────────────── */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(255, 255, 255, .92); backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 74px; gap: 20px; }
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand img { height: 38px; width: auto; }

.nav-menu { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-menu > li { position: relative; }
.nav-menu > li > a {
    display: block; padding: 10px 14px; color: var(--ink); font-weight: 600; font-size: 15.5px;
    border-radius: 8px;
}
.nav-menu > li > a:hover, .nav-menu > li.active > a { color: var(--green-700); background: var(--green-50); }

.nav-actions { display: flex; align-items: center; gap: 10px; }

/* 下拉子選單 */
.has-dropdown > .dropdown {
    position: absolute; top: calc(100% + 8px); left: 0; min-width: 260px;
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
    box-shadow: var(--shadow); padding: 8px; list-style: none; margin: 0;
    opacity: 0; visibility: hidden; transform: translateY(6px); transition: all .16s ease;
}
.has-dropdown:hover > .dropdown, .has-dropdown:focus-within > .dropdown {
    opacity: 1; visibility: visible; transform: translateY(0);
}
.dropdown li a { display: block; padding: 10px 12px; border-radius: 8px; color: var(--body); font-weight: 600; }
.dropdown li a small { display: block; font-weight: 500; color: var(--muted); font-size: 12.5px; }
.dropdown li a:hover { background: var(--green-50); color: var(--green-800); }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; border-radius: 2px; transition: .2s; }

/* ── Hero ─────────────────────────────────────────────────────────────── */
.hero {
    position: relative; overflow: hidden; color: #fff;
    background-color: #0c1f14;
    /* 候車情境實拍照 + 左深右透深綠遮罩:左側文字清晰、右側露出人物與公車 */
    background-image:
        linear-gradient(90deg, rgba(9, 26, 16, .82) 0%, rgba(11, 35, 20, .55) 24%,
                        rgba(14, 52, 26, .26) 46%, rgba(16, 63, 30, .06) 68%, rgba(16, 63, 30, 0) 86%),
        url('/static/images/hero_bus.png');
    background-size: cover;
    background-position: center right;
    background-repeat: no-repeat;
}
.hero::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background-image: radial-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px);
    background-size: 22px 22px; opacity: .5;
}
.hero .container { position: relative; z-index: 1; padding-top: 96px; padding-bottom: 96px; }
.hero-eyebrow { color: #bff3cf; background: rgba(255, 255, 255, .1); }
.hero h1 { color: #fff; font-size: clamp(34px, 5.4vw, 60px); letter-spacing: -.02em; margin-bottom: 22px; max-width: 15ch; }
.hero p { font-size: clamp(17px, 2.2vw, 21px); color: #d9f2e1; max-width: 46ch; margin: 0 0 34px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 26px; margin-top: 54px; color: #bfe9cd; font-size: 14px; }
.hero-badges span { display: inline-flex; align-items: center; gap: 8px; }
.hero-badges svg { width: 18px; height: 18px; color: #7fdca0; }

/* ── 統計數據 ─────────────────────────────────────────────────────────── */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.stat { text-align: center; padding: 8px; }
.stat .num { font-size: clamp(32px, 4vw, 46px); font-weight: 800; color: var(--green-700); letter-spacing: -.02em; }
.stat .lbl { color: var(--muted); font-size: 15px; margin-top: 4px; }

/* ── 卡片格 ───────────────────────────────────────────────────────────── */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

.card {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    padding: 30px; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--green-100); }
.card .ico {
    width: 52px; height: 52px; border-radius: 13px; display: grid; place-items: center;
    background: var(--green-50); color: var(--green-700); margin-bottom: 18px;
}
.card .ico svg { width: 26px; height: 26px; }
.card h3 { font-size: 19px; margin-bottom: 8px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }

/* ── 特色/showcase 兩欄 ───────────────────────────────────────────────── */
.split { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.split.reverse .split-media { order: 2; }
.split-media {
    border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg);
    background: linear-gradient(160deg, #103f1e, #2f9e44);
    aspect-ratio: 4 / 3; display: grid; place-items: center; color: #fff; position: relative;
}
.split-media .glyph { width: 40%; opacity: .95; }
.split-media img { width: 100%; height: 100%; object-fit: cover; }

/* 產品圖:靜態,正方形,完整顯示(站牌整隻 + 建築全景,不裁切) */
.split-media.media-square { aspect-ratio: 1 / 1; }
.split-media.media-square img { object-fit: contain; }

/* 解決方案圖(原圖 21:9):靜態,與產品框同為正方形,cover 填滿無黑白邊、
   裁切對準右中看手機的女生。 */
.split-media.media-cover img { object-fit: cover; object-position: 60% 50%; }

.check-list { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 14px; }
.check-list li { display: flex; gap: 12px; align-items: flex-start; }
.check-list .tick {
    flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%; background: var(--green-50);
    color: var(--green-700); display: grid; place-items: center; margin-top: 2px;
}
.check-list .tick svg { width: 14px; height: 14px; }
.check-list b { color: var(--ink); }
.check-list span { color: var(--muted); }

/* ── 流程步驟 ─────────────────────────────────────────────────────────── */
.flow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: step; }
.flow .node { position: relative; padding: 26px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.flow .node .n { font-size: 14px; font-weight: 800; color: var(--green); letter-spacing: .1em; }
.flow .node h4 { margin: 8px 0 6px; font-size: 17px; }
.flow .node p { margin: 0; color: var(--muted); font-size: 14px; }

/* ── 客戶 logo 牆 ──────────────────────────────────────────────────── */
.logo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; }
.logo-tile {
    display: grid; place-items: center; height: 112px; padding: 18px 22px;
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
    transition: box-shadow .16s ease, transform .16s ease, border-color .16s ease;
}
.logo-tile:hover { box-shadow: var(--shadow); transform: translateY(-3px); border-color: var(--green-100); }
.logo-tile img { max-width: 100%; max-height: 72px; object-fit: contain; }

/* ── 部落格卡 ─────────────────────────────────────────────────────────── */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.post {
    display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line);
    border-radius: var(--radius); overflow: hidden; transition: transform .18s ease, box-shadow .18s ease;
}
.post:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.post .thumb {
    aspect-ratio: 16 / 9; background: linear-gradient(160deg, #155c28, #2f9e44);
    display: grid; place-items: center; overflow: hidden;
}
.post .thumb img { width: 56%; height: auto; object-fit: contain; }
.post .body { padding: 22px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.tag { align-self: flex-start; font-size: 12px; font-weight: 800; color: var(--green-700); background: var(--green-50); padding: 4px 10px; border-radius: 999px; letter-spacing: .04em; }
.post h3 { font-size: 18px; margin: 12px 0 8px; }
.post h3 a { color: var(--ink); }
.post h3 a:hover { color: var(--green-700); }
.post .excerpt { color: var(--muted); font-size: 14.5px; margin: 0 0 16px; flex: 1; }
.post .meta { color: var(--muted); font-size: 13px; display: flex; gap: 14px; align-items: center; }

/* ── 頁面 hero(內頁小標題) ──────────────────────────────────────────── */
.page-hero { background: var(--bg-soft); border-bottom: 1px solid var(--line); padding: 56px 0; }
.page-hero .eyebrow { margin-bottom: 14px; }
.page-hero h1 { font-size: clamp(30px, 4.6vw, 46px); margin-bottom: 12px; }
.page-hero p { font-size: 18px; color: var(--muted); max-width: 60ch; margin: 0; }
.breadcrumb { font-size: 13.5px; color: var(--muted); margin-bottom: 18px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--green-700); }

/* ── 文章內文排版 ─────────────────────────────────────────────────────── */
.prose { max-width: 760px; margin: 0 auto; font-size: 17px; color: var(--body); }
.prose p { margin: 0 0 1.3em; }
.prose img { border-radius: var(--radius-sm); margin: 1.5em auto; box-shadow: var(--shadow-sm); }
.prose h2, .prose h3 { margin-top: 1.6em; }
.prose ul { margin: 0 0 1.3em; padding-left: 1.4em; }
.prose li { margin-bottom: .5em; }

/* ── 表單欄位 ─────────────────────────────────────────────────────────── */
.form { display: grid; gap: 14px; margin-top: 10px; }
.form label { display: grid; gap: 6px; font-weight: 600; font-size: 14px; color: var(--ink); }
.field {
    padding: 12px; border: 1.5px solid #9aa8a0; border-radius: 10px; font: inherit;
    color: var(--ink); background: var(--bg); transition: border-color .15s ease, box-shadow .15s ease;
}
.field::placeholder { color: #8a978d; }
.field:focus {
    outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(47, 158, 68, .18);
}
textarea.field { resize: vertical; }

/* ── CTA band ─────────────────────────────────────────────────────────── */
.cta {
    color: #fff; text-align: center;
    background: radial-gradient(800px 300px at 50% 0%, rgba(47, 158, 68, .5), transparent 60%),
                linear-gradient(160deg, #103f1e, #0c1f14);
}
.cta h2 { color: #fff; font-size: clamp(26px, 3.6vw, 38px); }
.cta p { color: #cfeeda; font-size: 18px; max-width: 52ch; margin: 0 auto 30px; }
.cta .btn-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ── 頁尾 ─────────────────────────────────────────────────────────────── */
.site-footer { background: var(--bg-dark); color: #b9c9bf; padding: 64px 0 30px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 40px; }
.site-footer .fbrand img { height: 40px; background: #fff; padding: 6px 10px; border-radius: 8px; }
.site-footer .fbrand p { margin: 16px 0 0; font-size: 14px; color: #93a89b; max-width: 34ch; }
.site-footer h4 { color: #fff; font-size: 14px; letter-spacing: .06em; margin-bottom: 16px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.site-footer ul a { color: #b9c9bf; font-size: 14.5px; }
.site-footer ul a:hover { color: #fff; }
.fcontact li { font-size: 14.5px; display: flex; gap: 10px; align-items: flex-start; }
.fcontact svg { width: 17px; height: 17px; color: #6fce8c; flex: 0 0 auto; margin-top: 3px; }
.footer-bottom {
    margin-top: 44px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .08);
    display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
    font-size: 13px; color: #7f948a;
}

/* ── 響應式 ───────────────────────────────────────────────────────────── */
@media (max-width: 960px) {
    .split { grid-template-columns: 1fr; gap: 32px; }
    .split.reverse .split-media { order: 0; }
    .flow { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
    .post-grid, .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 780px) {
    .nav-menu, .nav-actions .btn { display: none; }
    .nav-toggle { display: block; }
    .nav-menu.open {
        display: flex; flex-direction: column; align-items: stretch; gap: 2px;
        position: absolute; top: 74px; left: 0; right: 0; background: #fff;
        border-bottom: 1px solid var(--line); box-shadow: var(--shadow); padding: 12px 16px 20px;
    }
    .nav-menu.open .dropdown { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding: 0 0 6px 14px; }
    .nav-menu.open .nav-cta-mobile { display: block; margin-top: 12px; }
    .nav-menu.open .nav-cta-mobile .btn { display: inline-flex; width: 100%; justify-content: center; }
    .stats { grid-template-columns: repeat(2, 1fr); gap: 28px 12px; }
    .grid-2, .grid-3, .post-grid { grid-template-columns: 1fr; }
    .flow { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .section { padding: 60px 0; }
    .hero .container { padding-top: 64px; padding-bottom: 64px; }
    /* 窄螢幕文字會佔滿寬度,遮罩改為整體加深以維持可讀性 */
    .hero {
        background-image:
            linear-gradient(180deg, rgba(9, 26, 16, .78) 0%, rgba(11, 35, 20, .64) 55%, rgba(14, 52, 26, .56) 100%),
            url('/static/images/hero_bus.png');
        background-position: center center;
    }
}

/* 行動選單專用 CTA:桌機隱藏,行動選單展開時顯示(見 780px 斷點) */
.nav-cta-mobile { display: none; }

/* 尊重使用者的減少動態偏好 */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { transition: none !important; animation: none !important; }
}
