/* 潮流科技版：深藍底、取自 LOGO 的斜切角與上升曲線 */
:root {
  --navy: #10243D;
  --navy-deep: #081728;
  --ink: #050F1C;
  --blue: #245A91;
  --accent: #4A91CF;
  --cyan: #8FCBF5;
  --ice: #EAF2F9;
  --surface: #F3F7FB;
  --white: #FFFFFF;
  --text: #1D3045;
  --muted: #536579;
  --line: #D9E3EC;
  --on-dark: #B9CBDF;
  --line-dark: rgba(143,203,245,.18);
  --container: 1240px;
  --gutter: 48px;
  --header-h: 92px;
  --section-y: 120px;
  --cut: 22px;
  --chamfer: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--white);
  color: var(--text);
  font-family: "Inter", "Noto Sans TC", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang TC", "Microsoft JhengHei", sans-serif;
  font-size: 17px;
  line-height: 1.8;
  overflow-wrap: break-word;
}
img { display: block; max-width: 100%; }
figure { margin: 0; }
h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-weight: 700; line-height: 1.35; }
h2 { font-size: clamp(28px, 3.1vw, 42px); letter-spacing: .02em; }

section[id] { scroll-margin-top: var(--header-h); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.section { position: relative; isolation: isolate; padding-block: var(--section-y); }

.skip-link { position: absolute; left: 16px; top: -80px; z-index: 100; padding: 8px 16px; background: var(--white); color: var(--navy); }
.skip-link:focus { top: 12px; }

.ico, .service-icon, .core-icon { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.ico { width: 18px; height: 18px; flex: none; }

/* 小標前的三根長條，呼應 LOGO */
.eyebrow {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 18px;
  color: var(--blue);
  font-size: 13px; font-weight: 600; letter-spacing: .2em;
}
.eyebrow::before {
  content: ""; flex: none; width: 19px; height: 14px; background: currentColor;
  clip-path: polygon(0 62%, 5px 62%, 5px 100%, 0 100%, 0 62%, 7px 32%, 12px 32%, 12px 100%, 7px 100%, 7px 32%, 14px 0, 19px 0, 19px 100%, 14px 100%, 14px 0);
}

/* ---------- 按鈕與連結 ---------- */
.btn {
  --cut: 12px;
  position: relative; overflow: hidden; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 10px 28px;
  clip-path: var(--chamfer);
  font-size: 16px; font-weight: 500; line-height: 1.4; white-space: nowrap;
  transition: background-color .25s, color .25s;
}
.btn::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; z-index: -1;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent);
  transform: skewX(-24deg); pointer-events: none;
}
/* 只在滑入時掃一次，滑出不倒退 */
.btn:hover::after { animation: shine .55s ease; }
@keyframes shine { to { left: 130%; } }
.btn:focus-visible { outline-offset: -5px; }
.btn-primary { background: linear-gradient(110deg, #1C4A7C, #2C6DAC); color: var(--white); }
.btn-primary:hover { background: var(--navy); }
.btn-light { background: var(--white); color: var(--navy); }
.btn-light::after { background: linear-gradient(90deg, transparent, rgba(74,145,207,.35), transparent); }
.btn-ghost { background: rgba(143,203,245,.13); box-shadow: inset 0 0 0 1px rgba(143,203,245,.45); color: var(--white); }
.btn-ghost:hover { background: rgba(143,203,245,.26); }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }
.arrow { transition: transform .2s; }
a:hover > .arrow { transform: translateX(4px); }
.text-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--blue); font-weight: 500; }
.text-link.on-dark { color: var(--cyan); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: var(--navy-deep);
  color: var(--white);
  border-bottom: 1px solid var(--line-dark);
  transition: box-shadow .25s;
}
.site-header.is-scrolled { box-shadow: 0 10px 30px rgba(5,15,28,.45); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: var(--header-h); }
.brand { display: block; flex: none; }
.brand img { width: 340px; height: auto; }
.nav-panel { display: flex; align-items: center; gap: 30px; }
.site-nav ul { display: flex; gap: 28px; }
.site-nav li a { position: relative; display: block; padding-block: 10px; color: #D5E2F0; font-size: 16px; font-weight: 500; white-space: nowrap; transition: color .2s; }
.site-nav li a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 3px; height: 2px; background: var(--cyan); transform: skewX(-35deg) scaleX(0); transition: transform .25s; }
.site-nav li a:hover, .site-nav li a.is-active { color: var(--white); }
.site-nav li a:hover::after, .site-nav li a.is-active::after { transform: skewX(-35deg) scaleX(1); }
.nav-cta { --cut: 10px; min-height: 44px; padding-inline: 22px; }
.menu-toggle { display: none; }

/* ---------- 開場動畫：LOGO 置中出現後原地淡出，接首屏曲線 ---------- */
.intro-screen { display: none; }
.intro .intro-screen { display: block; position: fixed; inset: 0; z-index: 90; cursor: pointer; transition: opacity .6s ease; }
.intro-screen::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 75% 65% at 50% 50%, rgba(74,145,207,.2), rgba(8,23,40,.42) 45%, rgba(5,15,28,.88)),
    url("../images/bg-hero.webp") 30% 50% / cover no-repeat,
    var(--navy-deep);
}
.intro-logo {
  position: absolute; left: 50%; top: 50%;
  width: min(560px, 82vw); height: auto;
  translate: -50% -50%;
  transform-origin: center;
  transition: transform .6s ease;
  animation: logo-in 1s cubic-bezier(.2,.7,.2,1) .15s both;
}
.intro-line {
  position: absolute; left: 50%; top: calc(50% + min(80px, 12vw));
  width: min(240px, 46vw); height: 2px;
  translate: -50% 0;
  background: linear-gradient(90deg, transparent, var(--accent), var(--cyan));
  transform-origin: left;
  animation: line-in .9s ease .55s both;
}
@keyframes logo-in {
  from { opacity: 0; clip-path: inset(0 100% 0 0); scale: .96; }
  to { opacity: 1; clip-path: inset(0 0 0 0); scale: 1; }
}
@keyframes line-in { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.intro:not(.intro-leaving) .hero * { animation-play-state: paused !important; }
.intro-leaving .intro-screen { opacity: 0; pointer-events: none; }
.intro-leaving .intro-logo { transform: scale(1.05); }

/* ---------- Hero ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; align-items: center;
  min-height: clamp(640px, calc(100vh - var(--header-h) - 60px), 760px);
  background: var(--navy-deep); color: var(--white);
}
.hero-bg {
  position: absolute; inset: 0; z-index: -2;
  background:
    linear-gradient(0deg, var(--navy-deep), rgba(8,23,40,0) 30%),
    linear-gradient(rgba(8,23,40,.38), rgba(8,23,40,.38)),
    url("../images/bg-hero.webp") 30% 50% / cover no-repeat;
}
/* 上升曲線與長條：放在照片後面 */
.hero-chart { position: absolute; left: 0; bottom: 0; width: 47%; height: 34%; z-index: -2; overflow: visible; pointer-events: none; }
.hero-chart .bars rect { fill: url(#barFill); transform-box: fill-box; transform-origin: bottom; animation: grow .8s cubic-bezier(.2,.7,.2,1) both; }
.hero-chart .bars rect:nth-child(2) { animation-delay: 0.06s; }
.hero-chart .bars rect:nth-child(3) { animation-delay: 0.12s; }
.hero-chart .bars rect:nth-child(4) { animation-delay: 0.18s; }
.hero-chart .bars rect:nth-child(5) { animation-delay: 0.24s; }
.hero-chart .bars rect:nth-child(6) { animation-delay: 0.30s; }
.hero-chart .bars rect:nth-child(7) { animation-delay: 0.36s; }
.hero-chart .bars rect:nth-child(8) { animation-delay: 0.42s; }
.hero-chart path { fill: none; stroke: url(#curveStroke); stroke-width: 2.5; stroke-dasharray: 1 1; animation: draw 1.6s ease .4s both; }
@keyframes grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }

.hero-media { position: absolute; top: 0; right: 0; bottom: 0; left: 42%; z-index: -1; }
.hero-shot { position: absolute; inset: 0; clip-path: polygon(15% 0, 100% 0, 100% 100%, 0 100%); animation: wipe .9s cubic-bezier(.2,.7,.2,1) both; }
.hero-shot img { width: 100%; height: 100%; object-fit: cover; object-position: 100% 40%; }
.hero-shot::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(8,23,40,.75), rgba(8,23,40,0) 26%), linear-gradient(0deg, rgba(8,23,40,.8), rgba(8,23,40,0) 30%);
}
@keyframes wipe { from { opacity: 0; transform: translateX(60px); } to { opacity: 1; transform: none; } }
/* 照片左緣的斜光線 */
.hero-edge { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.hero-edge line { stroke: var(--cyan); stroke-width: 2; vector-effect: non-scaling-stroke; opacity: .8; }


.hero-inner { padding-block: 64px 110px; }
.hero-copy { max-width: 480px; }
.hero .eyebrow { color: var(--cyan); }
.hero h1 { font-size: clamp(38px, 4.4vw, 66px); line-height: 1.24; letter-spacing: .05em; margin-bottom: 22px; }
.hero h1 span { display: block; }
.hero h1 span + span { color: var(--cyan); }
.hero-sub { font-size: 20px; font-weight: 500; margin-bottom: 14px; padding-left: 16px; border-left: 3px solid var(--accent); line-height: 1.6; }
.hero-desc { color: var(--on-dark); margin-bottom: 32px; }
.hero-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.hero-copy > * { animation: rise .6s ease-out both; }
.hero-copy > :nth-child(2) { animation-delay: .1s; }
.hero-copy > :nth-child(3) { animation-delay: .2s; }
.hero-copy > :nth-child(4) { animation-delay: .3s; }
.hero-copy > :nth-child(5) { animation-delay: .4s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* ---------- 核心價值：跨在首屏與下一區之間 ---------- */
.core-band { position: relative; z-index: 2; background: linear-gradient(var(--navy-deep) 50%, var(--white) 50%); }
.core-list { display: grid; grid-template-columns: repeat(3, 1fr); }
.core-list li {
  position: relative;
  display: grid; grid-template-columns: 40px 1fr; column-gap: 18px; align-content: start;
  padding: 30px 32px;
  background: var(--navy); color: var(--white);
  border-top: 2px solid var(--accent);
}
.core-list li + li { border-left: 1px solid var(--line-dark); }
.core-list li:first-child { clip-path: polygon(var(--cut) 0, 100% 0, 100% 100%, 0 100%, 0 var(--cut)); }
.core-list li:last-child { clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%); }
.core-icon { grid-row: span 2; width: 38px; height: 38px; margin-top: 4px; color: var(--cyan); stroke-width: 1.3; }
.core-en { color: var(--cyan); font-size: 12px; font-weight: 600; letter-spacing: .2em; }
.core-list strong { font-size: 21px; letter-spacing: .06em; }
.core-text { color: var(--on-dark); font-size: 16px; }

/* ---------- 關於 ---------- */
.about::before, .values::before, .contact::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(rgba(255,255,255,.28), rgba(255,255,255,.28)),
    url("../images/bg-about.webp") center / cover no-repeat;
}
.about-grid { display: grid; grid-template-columns: 46fr 54fr; align-items: center; gap: 84px; }
.about-figure { --cut: 56px; position: relative; isolation: isolate; }
.about-figure::before {
  content: ""; position: absolute; inset: 24px -24px -24px 24px; z-index: -1;
  background: linear-gradient(135deg, var(--navy), var(--accent));
  clip-path: var(--chamfer);
}
.about-figure img { width: 100%; height: auto; aspect-ratio: 4 / 3.4; object-fit: cover; object-position: 45% 50%; clip-path: var(--chamfer); }
.about-copy h2 { margin-bottom: 26px; color: var(--navy); }
.about-copy > p:not(.eyebrow) { color: var(--muted); margin-bottom: 16px; }

/* ---------- 專業服務：深色卡片 ---------- */
.services {
  background:
    radial-gradient(ellipse 50% 40% at 100% 0%, rgba(44,109,172,.35), transparent 70%),
    radial-gradient(ellipse 45% 35% at 0% 100%, rgba(44,109,172,.25), transparent 70%),
    var(--ink);
  color: var(--white);
}
.services .eyebrow, .values .eyebrow { color: var(--cyan); }
.values .eyebrow { color: var(--blue); }
.section-head { margin-bottom: 36px; }
.section-lead { max-width: 460px; margin-top: 18px; color: var(--on-dark); }
.services-layout { display: grid; grid-template-columns: 42fr 58fr; gap: 48px; align-items: start; }
.services-side { position: sticky; top: calc(var(--header-h) + 32px); }
.services-figure { clip-path: var(--chamfer); }
/* 照片維持原本 4:3 比例，不裁切 */
.services-figure img { width: 100%; height: auto; }
.services-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

.service {
  --mx: 50%; --my: 0%;
  position: relative; isolation: isolate;
  padding: 34px 30px;
  clip-path: var(--chamfer);
  background: linear-gradient(150deg, rgba(143,203,245,.55), rgba(143,203,245,.14) 40%, rgba(143,203,245,.1));
}
/* 內層蓋住底色，只露出 1px 框線 */
.service::before { content: ""; position: absolute; inset: 1px; z-index: -2; clip-path: var(--chamfer); background: linear-gradient(160deg, #0F2845, #0A1B30 70%); }
.service::after {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .3s;
  background: radial-gradient(260px circle at var(--mx) var(--my), rgba(74,145,207,.32), transparent 70%);
}
.service:hover::after { opacity: 1; }
.service-icon { width: 44px; height: 44px; margin-bottom: 20px; color: var(--cyan); stroke-width: 1.3; transition: transform .25s; }
.service:hover .service-icon { transform: translateY(-4px); }
.service h3 { display: flex; flex-direction: column; font-size: 22px; margin-bottom: 12px; letter-spacing: .04em; }
.service h3 span { color: var(--cyan); font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.service p { color: var(--on-dark); font-size: 16px; margin-bottom: 18px; }
.service ul { padding-top: 14px; border-top: 1px solid var(--line-dark); }
.service li { position: relative; padding-left: 20px; font-size: 16px; font-weight: 500; line-height: 2; }
.service li::before { content: ""; position: absolute; left: 2px; top: calc(1em - 4px); width: 8px; height: 8px; background: var(--accent); clip-path: polygon(40% 0, 100% 0, 60% 100%, 0 100%); }
.services-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 44px; padding-top: 30px; border-top: 1px solid var(--line-dark); }
.services-cta p { font-size: 19px; font-weight: 700; letter-spacing: .04em; }

/* ---------- 服務理念 ---------- */
.values { background: var(--surface); }
.values-grid { display: grid; grid-template-columns: 1.08fr .92fr; gap: 72px; align-items: center; }
.values h2 { margin-bottom: 22px; color: var(--navy); }
.values-lead { color: var(--muted); margin-bottom: 34px; }
.value-list { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.value-list li {
  --cut: 16px;
  position: relative; padding: 24px 22px;
  background: var(--white);
  clip-path: var(--chamfer);
}
.value-list li::before { content: ""; position: absolute; left: var(--cut); top: 0; width: 46px; height: 3px; background: var(--blue); transition: width .35s; }
.value-list li:hover::before { width: calc(100% - var(--cut)); }
.value-list h3 { font-size: 19px; margin-bottom: 6px; color: var(--navy); }
.value-list p { color: var(--muted); font-size: 16px; }
.values-figure { --cut: 56px; align-self: stretch; position: relative; min-height: 480px; clip-path: var(--chamfer); }
.values-figure img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; }

/* ---------- 諮詢引導 ---------- */
.cta-band { position: relative; isolation: isolate; display: flex; align-items: center; min-height: 360px; padding-block: 68px; color: var(--white); background: var(--navy); overflow: hidden; }
.cta-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; z-index: -3; }
.cta-band::before { content: ""; position: absolute; inset: 0; z-index: -2; background: linear-gradient(100deg, rgba(5,15,28,.96) 30%, rgba(16,36,61,.72)); }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 40px; }
.cta-copy { max-width: 640px; }
.cta-copy h2 { margin-bottom: 14px; }
.cta-copy p { color: #DCE6F0; }
.cta-inner .btn-row { flex: none; }

/* ---------- 聯絡 ---------- */
.contact-grid { display: grid; grid-template-columns: 45fr 55fr; gap: 64px; align-items: stretch; }
.contact-info h2 { margin-bottom: 14px; color: var(--navy); }
.contact-info > p:not(.eyebrow) { color: var(--muted); }
.contact-info p.firm-name { margin-block: 28px 14px; color: var(--navy); font-size: 20px; font-weight: 700; }
.firm-name span { display: block; color: var(--blue); font-size: 13px; letter-spacing: .14em; }
.contact-list { display: grid; gap: 10px; }
.contact-list a, .contact-item { --cut: 14px; display: flex; align-items: center; gap: 18px; padding: 14px 20px; background: var(--white); clip-path: var(--chamfer); transition: background-color .25s, color .25s; }
.contact-list a:hover { background: var(--navy); color: var(--white); }
.contact-list a:focus-visible { outline-offset: -4px; }
.contact-list .ico { width: 24px; height: 24px; color: var(--blue); }
.contact-list a:hover .ico, .contact-list a:hover small { color: var(--cyan); }
.contact-list span { display: flex; flex-direction: column; line-height: 1.6; min-width: 0; overflow-wrap: anywhere; }
.contact-list small { color: var(--muted); font-size: 13px; }
.contact-map { display: flex; flex-direction: column; gap: 8px; }
.contact-map iframe { flex: 1; width: 100%; min-height: 480px; border: 0; border-top: 3px solid var(--navy); }

/* 地址的導航標示 */
.go-nav { display: flex; flex-direction: column; align-items: center; flex: none; margin-left: auto; padding-left: 14px; border-left: 1px solid var(--line); color: var(--blue); font-style: normal; font-size: 12px; font-weight: 600; line-height: 1.5; }
.contact-list .go-nav .ico { width: 22px; height: 22px; transition: transform .25s; }
.contact-list a:hover .go-nav { color: var(--cyan); border-color: var(--line-dark); }
.contact-list a:hover .go-nav .ico { color: var(--cyan); transform: translate(3px, -3px); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--on-dark); font-size: 16px; border-top: 2px solid var(--blue); }
.footer-grid { display: grid; grid-template-columns: 1.3fr .8fr 1.2fr; gap: 48px; padding-block: 64px 40px; }
.brand-footer { margin-bottom: 20px; }
.brand-footer img { width: 300px; }
.footer-title { margin-bottom: 12px; color: var(--white); font-size: 17px; letter-spacing: .08em; }
.site-footer li { padding-block: 3px; }
.site-footer li a:hover { color: var(--white); text-decoration: underline; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: center; text-align: center; gap: 8px 32px; padding-block: 22px 28px; border-top: 1px solid var(--line-dark); font-size: 13.5px; }
.footer-grid + .footer-bottom { max-width: var(--container); padding-inline: 0; width: calc(100% - var(--gutter) * 2); }

.footer-icons { display: flex; gap: 14px; margin-top: 10px; }
.site-footer .footer-line, .site-footer .footer-tel { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: #06C755; transition: transform .25s; }
.site-footer .footer-tel { background: var(--blue); color: var(--white); }
.footer-tel .ico { width: 21px; height: 21px; }
.site-footer .footer-line:hover, .site-footer .footer-tel:hover { transform: translateY(-3px); text-decoration: none; }
.footer-line svg { width: 22px; height: 22px; fill: #fff; }

/* ---------- 懸浮按鈕：由下往上 LINE、電話、回頂端 ---------- */
.float-stack { position: fixed; z-index: 30; right: 20px; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 12px; }
.float-btn { display: grid; place-items: center; width: 48px; height: 48px; padding: 0; border: 0; border-radius: 50%; cursor: pointer; box-shadow: 0 4px 14px rgba(8,23,40,.3); }
.float-line { background: #06C755; }
.float-line svg { width: 22px; height: 22px; fill: #fff; }
.float-tel { background: var(--blue); color: var(--white); border: 1px solid rgba(255,255,255,.5); }
.float-tel .ico { width: 22px; height: 22px; }
.float-top { background: var(--white); color: var(--navy); border: 1px solid var(--line); }
.js .float-stack { opacity: 0; visibility: hidden; transform: translateY(10px); transition: opacity .25s, transform .25s, visibility .25s; }
.js .float-stack.is-visible { opacity: 1; visibility: visible; transform: none; }
html:not(.js) .float-top { display: none; }

/* ---------- 進場動畫：捲到定點才出現 ---------- */
main { overflow-x: clip; }
.js .reveal { opacity: 0; transform: translateY(36px); transition: opacity .7s ease-out, transform .7s cubic-bezier(.2,.7,.2,1); }
.js .reveal.from-left { transform: translateX(-40px); }
.js .reveal.from-right { transform: translateX(40px); }
.js .reveal.is-in { opacity: 1; transform: none; }
/* 同一組依序出現 */
.js .core-list li:nth-child(2), .js .value-list li:nth-child(2), .js .contact-list li:nth-child(2),
.js .footer-grid > :nth-child(2), .js .services-grid .service:nth-child(2) { transition-delay: .12s; }
.js .core-list li:nth-child(3), .js .value-list li:nth-child(3), .js .contact-list li:nth-child(3),
.js .footer-grid > :nth-child(3), .js .services-grid .service:nth-child(3) { transition-delay: .24s; }
.js .value-list li:nth-child(4), .js .services-grid .service:nth-child(4) { transition-delay: .36s; }

/* ---------- 小筆電 ---------- */
@media (max-width: 1199px) {
  :root { --gutter: 36px; }
  .brand img { width: 276px; }
  .nav-panel { gap: 20px; }
  .site-nav ul { gap: 18px; }
  .hero-copy { max-width: 430px; }
  .about-grid { gap: 64px; }
  .services-layout { grid-template-columns: 1fr; gap: 36px; }
  .services-side { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: center; }
  .section-head { margin-bottom: 0; }
  .values-grid { grid-template-columns: 1fr; gap: 48px; }
  .values-figure { min-height: 0; aspect-ratio: 16 / 9; }
  .cta-inner { flex-direction: column; align-items: flex-start; gap: 28px; }
}

/* ---------- 平板與以下：Hero 改照片接文字 ---------- */
@media (max-width: 1099px) {
  .hero { flex-direction: column; align-items: stretch; min-height: 0; }
  .hero-media { position: relative; left: 0; z-index: 0; aspect-ratio: 16 / 9; }
  .hero-shot { clip-path: polygon(0 0, 100% 0, 100% 88%, 0 100%); }
  .hero-shot img { object-position: 100% 50%; }
  .hero-shot::after { background: linear-gradient(0deg, rgba(8,23,40,.55), rgba(8,23,40,0) 35%); }
  .hero-edge { display: none; }
  .hero-chart { width: 100%; height: 30%; opacity: .55; }
  .hero-inner { padding-block: 24px 80px; }
  .hero-copy { max-width: 560px; }
}

/* ---------- 漢堡選單 ---------- */
@media (max-width: 1023px) {
  :root { --header-h: 76px; --section-y: 84px; }
  .menu-toggle {
    display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 6px;
    width: 46px; height: 46px; padding: 0;
    background: none; border: 1px solid var(--line-dark); cursor: pointer;
  }
  .menu-toggle span { width: 22px; height: 2px; background: var(--white); transition: transform .25s, opacity .2s; }
  .menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

  /* 外層只控制高度，padding 與框線放在內層，收合時才能真的歸零 */
  .site-nav { position: absolute; left: 0; right: 0; top: 100%; max-height: 0; overflow: hidden; visibility: hidden; background: var(--navy-deep); transition: max-height .3s ease, visibility .3s; }
  .site-nav.is-open { max-height: calc(100vh - var(--header-h)); overflow-y: auto; visibility: visible; box-shadow: 0 20px 34px rgba(5,15,28,.4); }
  .nav-panel { flex-direction: column; align-items: stretch; gap: 16px; padding: 8px var(--gutter) 24px; border-top: 1px solid var(--line-dark); }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav li { border-bottom: 1px solid var(--line-dark); }
  .site-nav li a { padding-block: 13px; }
  .site-nav li a::after { display: none; }
  .site-nav li a.is-active { color: var(--cyan); }

  html:not(.js) .menu-toggle { display: none; }
  html:not(.js) .site-header { position: static; }
  html:not(.js) .header-inner { flex-wrap: wrap; padding-block: 12px; }
  html:not(.js) .site-nav { position: static; max-height: none; visibility: visible; width: 100%; }
  html:not(.js) .nav-panel { padding-inline: 0; }

  .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 56px; }
  .about-figure { margin-right: 24px; }
  .about-figure img { aspect-ratio: 4 / 3; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
}

/* ---------- 手機 ---------- */
@media (max-width: 767px) {
  :root { --gutter: 20px; --section-y: 64px; }
  body { font-size: 16px; }
  h2 { font-size: clamp(27px, 7.4vw, 32px); }
  .services-side { grid-template-columns: 1fr; gap: 28px; }
  .brand img { width: min(270px, 68vw); }
  .brand-footer img { width: min(290px, 100%); }

  .hero-media { aspect-ratio: 4 / 3; }
  .hero-inner { padding-block: 18px 68px; }
  .hero h1 { font-size: clamp(36px, 10.5vw, 44px); }
  .hero-sub { font-size: 17px; }
  .hero .eyebrow { font-size: 11.5px; letter-spacing: .08em; gap: 8px; }
  .hero-actions { align-items: stretch; }
  .hero-actions .text-link { align-self: flex-start; }
  .hero .btn-row, .cta-inner .btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; }
  .hero .btn, .cta-inner .btn { padding-inline: 8px; gap: 6px; font-size: 15px; }

  .core-band { background: linear-gradient(var(--navy-deep) 60px, var(--white) 60px); }
  .core-list { grid-template-columns: 1fr; }
  .core-list li { padding: 22px 20px; border-top: 0; }
  .core-list li + li { border-left: 0; border-top: 1px solid var(--line-dark); }
  .core-list li:first-child { border-top: 2px solid var(--accent); }

  .about-figure { --cut: 34px; margin-right: 12px; }
  .about-figure::before { inset: 12px -12px -12px 12px; }

  .services-grid { grid-template-columns: 1fr; gap: 14px; }
  .service { padding: 28px 22px; }
  .services-cta { flex-direction: column; align-items: stretch; margin-top: 32px; }

  .value-list { grid-template-columns: 1fr; gap: 12px; }
  .values-figure { --cut: 34px; aspect-ratio: 4 / 3; }
  .contact-map iframe { flex: none; height: 420px; min-height: 0; }

  .footer-grid { grid-template-columns: 1fr; gap: 32px; padding-block: 48px 28px; }
  /* 12 個字剛好排成一行，隨螢幕寬度縮放 */
  .cta-copy h2 { font-size: min(30px, calc((100vw - 40px) / 12.5)); }
  .footer-grid { text-align: center; }
  .brand-footer img { margin-inline: auto; }
  .footer-icons { justify-content: center; }
  .footer-bottom .nowrap { white-space: nowrap; }
  /* 底部多留空間，避免懸浮按鈕蓋住版權文字 */
  .footer-grid + .footer-bottom { padding-bottom: calc(104px + env(safe-area-inset-bottom, 0px)); padding-inline: 44px; }
  .float-stack { right: 14px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); gap: 10px; }
}

@media (max-width: 374px) {
  .hero .btn-row, .cta-inner .btn-row { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
