/* ==========================================================
   君震營造有限公司 — 官方網站
   Direction: 「施工藍圖」— 深海軍藍 × 礦黃金 × 混凝土白
   ========================================================== */

:root {
  --ink: #0a1530;
  --navy: #12245a;
  --navy-2: #1b3274;
  --gold: #c18a1f;
  --gold-hi: #e2b04a;
  --paper: #f3f0e8;
  --paper-2: #e9e4d8;
  --concrete: #d8d2c4;
  --text: #1a2236;
  --muted: #5c6479;
  --line: rgba(10, 21, 48, .14);
  --line-strong: rgba(10, 21, 48, .32);
  --line-light: rgba(243, 240, 232, .16);

  --serif: "Noto Serif TC", "Songti TC", "PMingLiU", serif;
  --sans: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;

  --wrap: 1240px;
  --gutter: clamp(20px, 4vw, 48px);
  --ease: cubic-bezier(.2, .7, .1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.85;
  color: var(--text);
  background: var(--paper);
  letter-spacing: .02em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
::selection { background: var(--gold); color: var(--ink); }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 999; background: var(--gold); color: var(--ink); padding: 8px 14px; }

/* ---------- 共用：標籤 / 標題 ---------- */
.tag {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 12px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--gold);
}
.tag::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.sec-head { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; margin-bottom: clamp(40px, 6vw, 72px); }
.sec-head h2 {
  margin: 0; font-family: var(--serif); font-weight: 700;
  font-size: clamp(32px, 4.6vw, 56px); line-height: 1.2; letter-spacing: .06em; color: var(--ink);
}
.sec-head h2 em { font-style: normal; color: var(--gold); }
.sec-head .lede { max-width: 640px; color: var(--muted); margin: 0; }
.sec-num {
  font-family: var(--mono); font-size: 12px; color: var(--muted); letter-spacing: .14em;
}
section { position: relative; }
.sec { padding: clamp(88px, 12vw, 160px) 0; }

/* 測量十字標記 */
.mark { position: absolute; width: 14px; height: 14px; pointer-events: none; }
.mark::before, .mark::after { content: ""; position: absolute; background: var(--gold); }
.mark::before { left: 50%; top: 0; bottom: 0; width: 1px; }
.mark::after { top: 50%; left: 0; right: 0; height: 1px; }

/* ---------- 導覽列 ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  transition: background .35s var(--ease), box-shadow .35s var(--ease), transform .35s var(--ease);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.nav.is-solid { background: rgba(10, 21, 48, .94); backdrop-filter: blur(10px); box-shadow: 0 1px 0 var(--line-light); }
.brand { display: flex; align-items: center; gap: 12px; color: var(--paper); }
.brand img { width: 44px; height: auto; }
.brand-txt { display: flex; flex-direction: column; line-height: 1.15; }
.brand-txt b { font-family: var(--serif); font-weight: 700; font-size: 20px; letter-spacing: .16em; }
.brand-txt small { font-family: var(--mono); font-size: 9.5px; letter-spacing: .2em; opacity: .66; text-transform: uppercase; }
.nav ul { display: flex; gap: clamp(14px, 2.2vw, 32px); list-style: none; margin: 0; padding: 0; }
.nav ul a {
  position: relative; font-size: 15px; color: rgba(243, 240, 232, .82); letter-spacing: .12em; padding: 6px 0;
  transition: color .2s;
}
.nav ul a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 1px; background: var(--gold-hi);
  transition: right .3s var(--ease);
}
.nav ul a:hover, .nav ul a.is-active { color: #fff; }
.nav ul a:hover::after, .nav ul a.is-active::after { right: 0; }
.nav-cta {
  font-size: 14px; letter-spacing: .12em; padding: 9px 18px; border: 1px solid var(--gold);
  color: var(--gold-hi); transition: background .2s, color .2s;
}
.nav-cta:hover { background: var(--gold); color: var(--ink); }
.burger { display: none; background: none; border: 0; width: 44px; height: 44px; position: relative; }
.burger span { position: absolute; left: 11px; right: 11px; height: 1.5px; background: var(--paper); transition: transform .3s, opacity .3s; }
.burger span:nth-child(1) { top: 16px; } .burger span:nth-child(2) { top: 22px; } .burger span:nth-child(3) { top: 28px; }
.nav.is-open .burger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav.is-open .burger span:nth-child(2) { opacity: 0; }
.nav.is-open .burger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- HERO ---------- */
.hero {
  position: relative; min-height: 100svh; display: flex; align-items: stretch;
  color: var(--paper); background: var(--ink); overflow: hidden; isolation: isolate;
}
.hero-bg { position: absolute; inset: 0; z-index: -2; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); animation: heroZoom 18s var(--ease) forwards; }
@keyframes heroZoom { to { transform: scale(1); } }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(10, 21, 48, .96) 0%, rgba(10, 21, 48, .82) 38%, rgba(10, 21, 48, .35) 72%, rgba(10, 21, 48, .55) 100%),
    linear-gradient(0deg, rgba(10, 21, 48, .9) 0%, transparent 40%);
}
/* 藍圖格線 */
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5;
  background-image:
    linear-gradient(var(--line-light) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-light) 1px, transparent 1px);
  background-size: 120px 120px;
  mask-image: linear-gradient(90deg, #000 0%, transparent 60%);
  -webkit-mask-image: linear-gradient(90deg, #000 0%, transparent 60%);
}
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: 48px; align-items: end; padding-top: 140px; padding-bottom: 72px; }
.hero-kicker { font-family: var(--mono); font-size: 12px; letter-spacing: .24em; color: var(--gold-hi); margin-bottom: 28px; display: flex; gap: 16px; align-items: center; }
.hero-kicker i { flex: 0 0 48px; height: 1px; background: var(--gold); }
.hero h1 {
  margin: 0; font-family: var(--serif); font-weight: 900;
  font-size: clamp(64px, 11.5vw, 168px); line-height: .98; letter-spacing: .08em;
}
.hero h1 span { display: block; overflow: hidden; }
.hero h1 span > b { display: inline-block; font-weight: inherit; transform: translateY(105%); animation: rise 1.1s var(--ease) forwards; }
.hero h1 span:nth-child(2) > b { animation-delay: .12s; color: var(--gold-hi); }
@keyframes rise { to { transform: none; } }
.hero-sub { margin: 32px 0 0; max-width: 540px; font-size: clamp(16px, 1.5vw, 18px); color: rgba(243, 240, 232, .82); line-height: 2; }
.hero-sub strong { color: var(--paper); font-weight: 500; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 40px; }
.btn {
  display: inline-flex; align-items: center; gap: 12px; padding: 15px 26px; font-size: 15px; letter-spacing: .14em;
  border: 1px solid transparent; transition: transform .25s var(--ease), background .25s, color .25s, border-color .25s;
}
.btn svg { width: 16px; height: 16px; transition: transform .25s var(--ease); }
.btn:hover svg { transform: translateX(4px); }
.btn-gold { background: var(--gold); color: var(--ink); font-weight: 500; }
.btn-gold:hover { background: var(--gold-hi); }
.btn-ghost { border-color: rgba(243, 240, 232, .4); color: var(--paper); }
.btn-ghost:hover { border-color: var(--paper); background: rgba(243, 240, 232, .06); }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover { background: var(--navy); }

/* 右側規格銘牌 */
.plate {
  position: relative; border: 1px solid var(--line-light); background: rgba(10, 21, 48, .55); backdrop-filter: blur(6px);
  padding: 28px 28px 8px;
}
.plate-head { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 11px; letter-spacing: .2em; color: rgba(243, 240, 232, .55); padding-bottom: 16px; border-bottom: 1px solid var(--line-light); }
.plate-head b { color: var(--gold-hi); font-weight: 500; }
.plate dl { margin: 0; }
.plate dl > div { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 12px; padding: 16px 0; border-bottom: 1px dashed var(--line-light); }
.plate dl > div:last-child { border-bottom: 0; }
.plate dt { font-size: 14px; color: rgba(243, 240, 232, .7); letter-spacing: .1em; }
.plate dd { margin: 0; font-family: var(--serif); font-size: 30px; font-weight: 700; color: var(--paper); line-height: 1; }
.plate dd small { font-family: var(--sans); font-size: 13px; font-weight: 400; color: rgba(243, 240, 232, .6); margin-left: 4px; }
.plate .mark { top: -7px; left: -7px; } .plate .mark + .mark { top: auto; left: auto; bottom: -7px; right: -7px; }

.hero-foot {
  position: absolute; left: 0; right: 0; bottom: 0; border-top: 1px solid var(--line-light);
  font-family: var(--mono); font-size: 11px; letter-spacing: .2em; color: rgba(243, 240, 232, .5);
}
.hero-foot .wrap { display: flex; justify-content: space-between; padding-top: 14px; padding-bottom: 14px; grid-template-columns: none; }
.scroll-cue { display: inline-flex; gap: 10px; align-items: center; }
.scroll-cue i { width: 1px; height: 14px; background: var(--gold); animation: cue 1.6s infinite; transform-origin: top; }
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* ---------- 走馬燈：服務關鍵字 ---------- */
.ticker { background: var(--gold); color: var(--ink); overflow: hidden; border-bottom: 1px solid rgba(10,21,48,.2); }
.ticker-track { display: flex; width: max-content; animation: tick 42s linear infinite; }
.ticker-track span { font-family: var(--serif); font-weight: 700; font-size: 18px; letter-spacing: .2em; padding: 16px 0; white-space: nowrap; display: inline-flex; align-items: center; }
.ticker-track span::after { content: "◆"; font-size: 9px; margin: 0 32px; opacity: .55; }
@keyframes tick { to { transform: translateX(-50%); } }

/* ---------- 關於我們 ---------- */
.about { background: var(--paper); }
.about-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(40px, 7vw, 110px); align-items: start; }
.about-figure { position: sticky; top: 110px; }
.about-figure .frame { position: relative; }
.about-figure img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; filter: saturate(.92); }
.about-figure .frame::after { content: ""; position: absolute; inset: 18px -18px -18px 18px; border: 1px solid var(--gold); z-index: -1; }
.about-figure figcaption { margin-top: 34px; font-family: var(--mono); font-size: 12px; letter-spacing: .12em; color: var(--muted); display: flex; justify-content: space-between; gap: 16px; }
.about-body p { margin: 0 0 1.5em; font-size: 17px; }
.about-body .first { font-family: var(--serif); font-size: clamp(21px, 2.2vw, 27px); line-height: 1.75; color: var(--ink); font-weight: 500; }
.about-body .first b { color: var(--gold); font-weight: 700; }

.timeline-mini { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 56px; border-top: 1px solid var(--line-strong); }
.timeline-mini div { padding: 22px 18px 0 0; position: relative; }
.timeline-mini div::before { content: ""; position: absolute; top: -5px; left: 0; width: 9px; height: 9px; background: var(--paper); border: 1px solid var(--gold); transform: rotate(45deg); }
.timeline-mini div.on::before { background: var(--gold); }
.timeline-mini b { display: block; font-family: var(--mono); font-size: 13px; color: var(--gold); letter-spacing: .1em; font-weight: 500; }
.timeline-mini span { display: block; font-size: 14.5px; line-height: 1.6; color: var(--text); margin-top: 6px; }

/* ---------- 經營理念 ---------- */
.values { background: var(--ink); color: var(--paper); overflow: hidden; }
.values::before {
  content: ""; position: absolute; inset: 0; opacity: .35; pointer-events: none;
  background-image: radial-gradient(circle at 1px 1px, rgba(243,240,232,.25) 1px, transparent 0);
  background-size: 28px 28px;
}
.values .sec-head h2 { color: var(--paper); }
.values .sec-head .lede { color: rgba(243, 240, 232, .7); }
.values-grid { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line-light); border-left: 1px solid var(--line-light); position: relative; }
.value { border-right: 1px solid var(--line-light); border-bottom: 1px solid var(--line-light); padding: 40px 30px 44px; position: relative; transition: background .4s var(--ease); }
.value:hover { background: rgba(193, 138, 31, .08); }
.value .n { font-family: var(--mono); font-size: 12px; letter-spacing: .2em; color: rgba(243,240,232,.45); }
.value .glyph { font-family: var(--serif); font-weight: 900; font-size: clamp(76px, 8vw, 116px); line-height: 1; margin: 26px 0 22px; color: transparent; -webkit-text-stroke: 1px var(--gold-hi); transition: color .4s var(--ease); }
.value:hover .glyph { color: var(--gold); -webkit-text-stroke-color: var(--gold); }
.value h3 { margin: 0 0 12px; font-size: 20px; letter-spacing: .14em; font-weight: 500; }
.value h3 small { display: block; font-family: var(--mono); font-size: 11px; letter-spacing: .2em; color: var(--gold-hi); margin-top: 4px; font-weight: 400; }
.value p { margin: 0; font-size: 15px; color: rgba(243, 240, 232, .7); line-height: 1.9; }
.values-quote { margin: clamp(48px, 7vw, 80px) 0 0; max-width: 860px; font-family: var(--serif); font-size: clamp(19px, 2vw, 24px); line-height: 1.9; color: rgba(243,240,232,.88); padding-left: 28px; border-left: 2px solid var(--gold); }

/* ---------- 公司資料（規格表） ---------- */
.profile { background: var(--paper-2); }
.spec { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 2px solid var(--ink); }
.spec > div { padding: 30px 32px 30px 0; border-bottom: 1px solid var(--line-strong); display: grid; grid-template-columns: 150px 1fr; gap: 20px; }
.spec > div.l { border-right: 1px solid var(--line-strong); }
.spec > div.r { padding-left: 32px; }
.spec > div.wide { grid-column: 1 / -1; border-right: 0; padding-left: 0; }
.spec dt { font-size: 14px; color: var(--muted); letter-spacing: .1em; }
.spec dt small { display: block; font-family: var(--mono); font-size: 10.5px; letter-spacing: .2em; color: var(--gold); text-transform: uppercase; margin-top: 2px; }
.spec dd { margin: 0; font-size: 17px; color: var(--ink); line-height: 1.8; }
.spec dd .big { font-family: var(--serif); font-size: 30px; font-weight: 700; line-height: 1.2; }
.spec dd a { border-bottom: 1px solid var(--gold); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips span { font-size: 14.5px; padding: 4px 12px; border: 1px solid var(--line-strong); background: var(--paper); }

/* 組織架構 */
.org { margin-top: clamp(72px, 9vw, 112px); }
.org-title { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line-strong); padding-bottom: 14px; margin-bottom: 48px; }
.org-title h3 { margin: 0; font-family: var(--serif); font-size: 28px; letter-spacing: .12em; color: var(--ink); }
.org-title span { font-family: var(--mono); font-size: 12px; color: var(--muted); letter-spacing: .16em; }
.org-tree { display: flex; flex-direction: column; align-items: center; }
.node { background: var(--paper); border: 1px solid var(--ink); min-width: 220px; text-align: center; position: relative; }
.node b { display: block; background: var(--ink); color: var(--paper); font-weight: 500; letter-spacing: .14em; padding: 10px 18px; font-size: 16px; }
.node span { display: block; font-size: 13.5px; color: var(--muted); padding: 8px 18px; letter-spacing: .08em; }
.node.top b { background: var(--gold); color: var(--ink); font-family: var(--serif); font-weight: 700; font-size: 18px; }
.vline { width: 1px; height: 34px; background: var(--line-strong); }
.org-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; position: relative; padding-top: 34px; width: min(100%, 880px); }
.org-row::before { content: ""; position: absolute; top: 0; left: calc((100% - 56px) / 6); right: calc((100% - 56px) / 6); height: 1px; background: var(--line-strong); }
.org-row .node { min-width: 0; }
.org-row .node::before { content: ""; position: absolute; left: 50%; top: -34px; height: 34px; width: 1px; background: var(--line-strong); }
.org-row-wrap { position: relative; width: min(100%, 880px); display: flex; flex-direction: column; align-items: center; }
.org-row-wrap::after { content: ""; position: absolute; bottom: -34px; left: calc((100% - 56px) / 6); right: calc((100% - 56px) / 6); height: 34px; border: 1px solid var(--line-strong); border-top: 0; }
.org-row-wrap + .vline { height: 34px; margin-top: 34px; }
.org-row .node:nth-child(2)::after { content: ""; position: absolute; left: 50%; bottom: -35px; height: 34px; width: 1px; background: var(--line-strong); }
.org-note { text-align: center; margin-top: 18px; font-size: 13px; color: var(--muted); }

/* ---------- 榮耀獎項 ---------- */
.awards { background: var(--paper); }
.award { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(36px, 6vw, 88px); align-items: center; padding: clamp(48px, 6vw, 72px) 0; border-top: 1px solid var(--line-strong); }
.award:last-child { border-bottom: 1px solid var(--line-strong); }
.award.flip .award-media { order: 2; }
.award-media { display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; align-items: end; }
.award-media img { width: 100%; object-fit: cover; box-shadow: 0 24px 48px -24px rgba(10,21,48,.45); }
.award-media img:first-child { aspect-ratio: 4 / 3; }
.award-media img:last-child { aspect-ratio: 3 / 4; }
.award-year { font-family: var(--serif); font-size: clamp(72px, 9vw, 128px); font-weight: 900; line-height: .9; color: transparent; -webkit-text-stroke: 1.2px var(--gold); letter-spacing: .02em; }
.award h3 { margin: 18px 0 6px; font-family: var(--serif); font-size: clamp(24px, 2.8vw, 34px); line-height: 1.4; color: var(--ink); letter-spacing: .06em; }
.award .cat { display: inline-block; font-size: 14px; letter-spacing: .14em; padding: 4px 12px; background: var(--ink); color: var(--gold-hi); margin-bottom: 24px; }
.award dl { margin: 0; display: grid; gap: 16px; }
.award dt { font-family: var(--mono); font-size: 11px; letter-spacing: .2em; color: var(--gold); }
.award dd { margin: 4px 0 0; font-size: 16.5px; }

/* ---------- 營業項目 ---------- */
.services { background: var(--ink); color: var(--paper); }
.services .sec-head h2 { color: var(--paper); }
.services .sec-head .lede { color: rgba(243,240,232,.7); }
.svc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; background: var(--line-light); border: 1px solid var(--line-light); }
.svc { position: relative; background: var(--ink); min-height: 380px; display: flex; flex-direction: column; justify-content: flex-end; padding: 30px; overflow: hidden; isolation: isolate; }
.svc img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; opacity: .62; transform: scale(1.02); transition: transform 1.1s var(--ease), opacity .6s var(--ease); filter: grayscale(.35); }
.svc::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(10,21,48,.95) 12%, rgba(10,21,48,.15) 70%, rgba(10,21,48,.35) 100%); }
.svc:hover img { transform: scale(1.09); opacity: .7; filter: none; }
.svc .no { position: absolute; top: 26px; left: 30px; font-family: var(--mono); font-size: 12px; letter-spacing: .2em; color: var(--gold-hi); }
.svc h3 { margin: 0 0 8px; font-family: var(--serif); font-size: 26px; letter-spacing: .1em; font-weight: 700; }
.svc h3 small { display: block; font-family: var(--mono); font-size: 11px; letter-spacing: .2em; font-weight: 400; color: rgba(243,240,232,.55); margin-top: 4px; text-transform: uppercase; }
.svc p { margin: 0; font-size: 14.5px; color: rgba(243,240,232,.74); line-height: 1.8; max-height: 0; opacity: 0; transition: max-height .6s var(--ease), opacity .4s, margin .4s; }
.svc:hover p, .svc:focus-within p { max-height: 140px; opacity: 1; margin-top: 10px; }
.svc-scope { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 56px; border-top: 1px solid var(--line-light); }
.svc-scope div { padding: 26px 26px 0 0; }
.svc-scope b { font-family: var(--serif); font-size: 20px; letter-spacing: .12em; display: block; font-weight: 700; color: var(--gold-hi); }
.svc-scope span { font-size: 14.5px; color: rgba(243,240,232,.72); }

/* ---------- 工程實績 ---------- */
.works { background: var(--paper); }
.works-tools { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: end; margin-bottom: 36px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filters button { background: transparent; border: 1px solid var(--line-strong); padding: 8px 16px; font-size: 14.5px; letter-spacing: .1em; transition: all .2s; }
.filters button:hover { border-color: var(--ink); }
.filters button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.filters button .c { font-family: var(--mono); font-size: 11px; opacity: .6; margin-left: 6px; }
.works-count { font-family: var(--mono); font-size: 12px; letter-spacing: .16em; color: var(--muted); }

.years { display: grid; grid-template-columns: repeat(8, 1fr); border-top: 2px solid var(--ink); margin-bottom: 44px; }
.years button { background: none; border: 0; border-right: 1px solid var(--line); padding: 16px 10px 14px; text-align: left; position: relative; transition: background .25s; }
.years button:last-child { border-right: 0; }
.years button:hover { background: var(--paper-2); }
.years button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.years b { display: block; font-family: var(--serif); font-size: 26px; font-weight: 700; line-height: 1.1; }
.years b sup { font-family: var(--sans); font-size: 12px; font-weight: 400; margin-left: 2px; vertical-align: top; position: relative; top: 4px; }
.years span { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; opacity: .6; }
.years i { position: absolute; left: 10px; right: 10px; bottom: 0; height: 3px; background: var(--gold); transform-origin: left; transform: scaleX(var(--w, .2)); }

.works-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 24px; }
.work { display: flex; flex-direction: column; text-align: left; background: none; border: 0; padding: 0; animation: fadeUp .5s var(--ease) both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } }
.work-img { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--ink); }
.work-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.work:hover .work-img img { transform: scale(1.06); }
.work-img .badge { position: absolute; left: 12px; top: 12px; font-family: var(--mono); font-size: 11px; letter-spacing: .14em; background: var(--gold); color: var(--ink); padding: 3px 8px; }
.work-img .pics { position: absolute; right: 12px; bottom: 12px; font-family: var(--mono); font-size: 11px; letter-spacing: .1em; background: rgba(10,21,48,.8); color: var(--paper); padding: 3px 8px; display: inline-flex; gap: 6px; align-items: center; }
.work-img.blank {
  display: flex; align-items: center; justify-content: center; color: rgba(243,240,232,.5);
  background-color: var(--navy);
  background-image: linear-gradient(rgba(243,240,232,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(243,240,232,.08) 1px, transparent 1px);
  background-size: 22px 22px;
}
.work-img.blank { flex-direction: column; gap: 6px; }
.work-img.blank .yr { font-family: var(--serif); font-weight: 900; font-size: 88px; line-height: 1; color: transparent; -webkit-text-stroke: 1px rgba(226,176,74,.75); }
.work-img.blank .cn { font-family: var(--sans); font-size: 13px; letter-spacing: .2em; color: rgba(243,240,232,.6); }
.work-meta { padding: 16px 2px 0; border-bottom: 1px solid var(--line); padding-bottom: 16px; flex: 1; }
.work-meta .cl { font-size: 13px; color: var(--gold); letter-spacing: .08em; }
.work-meta h3 { margin: 4px 0 0; font-size: 17px; font-weight: 500; line-height: 1.6; color: var(--ink); }
.work.is-clickable { cursor: pointer; }
.work:not(.is-clickable) { cursor: default; }

/* 工程案件明細表 */
.ledger { margin-top: 72px; }
.ledger summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; padding: 22px 0; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--line-strong); }
.ledger summary::-webkit-details-marker { display: none; }
.ledger summary h3 { margin: 0; font-family: var(--serif); font-size: 24px; letter-spacing: .1em; color: var(--ink); }
.ledger summary span { font-family: var(--mono); font-size: 12px; letter-spacing: .16em; color: var(--muted); display: inline-flex; gap: 10px; align-items: center; }
.ledger summary span::after { content: "+"; font-size: 20px; color: var(--gold); transition: transform .3s; }
.ledger[open] summary span::after { transform: rotate(45deg); }
.ledger table { width: 100%; border-collapse: collapse; font-size: 15px; }
.ledger th { text-align: left; font-family: var(--mono); font-size: 11px; letter-spacing: .18em; color: var(--muted); font-weight: 400; padding: 14px 12px; border-bottom: 1px solid var(--line-strong); }
.ledger td { padding: 13px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.ledger td:first-child { font-family: var(--mono); color: var(--gold); white-space: nowrap; }
.ledger td:nth-child(2) { color: var(--muted); white-space: nowrap; }
.ledger tr:hover td { background: var(--paper-2); }

/* ---------- 員工園地 ---------- */
.life { background: var(--paper-2); overflow: hidden; }
.life-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(40px, 6vw, 96px); align-items: center; }
.life-photo { position: relative; }
.life-photo img { width: 100%; aspect-ratio: 5 / 4; object-fit: cover; object-position: center 62%; }
.life-photo .stamp {
  position: absolute; right: -18px; bottom: -18px; background: var(--gold); color: var(--ink); padding: 18px 22px;
  font-family: var(--serif); font-weight: 700; font-size: 20px; letter-spacing: .14em; line-height: 1.35;
}
.life-photo .stamp small { display: block; font-family: var(--mono); font-size: 11px; font-weight: 400; letter-spacing: .16em; }
.perks { list-style: none; margin: 32px 0 0; padding: 0; border-top: 1px solid var(--line-strong); }
.perks li { display: grid; grid-template-columns: 56px 1fr; gap: 16px; padding: 22px 0; border-bottom: 1px solid var(--line-strong); }
.perks .ic { width: 56px; height: 56px; border: 1px solid var(--ink); display: grid; place-items: center; color: var(--ink); }
.perks .ic svg { width: 26px; height: 26px; }
.perks h4 { margin: 0; font-size: 18px; letter-spacing: .12em; color: var(--ink); font-weight: 500; }
.perks p { margin: 2px 0 0; font-size: 15px; color: var(--muted); }

/* ---------- 人才招募 ---------- */
.careers { background: var(--navy); color: var(--paper); overflow: hidden; }
.careers::after {
  content: "JOIN"; position: absolute; right: -2vw; bottom: -6vw; font-family: var(--serif); font-weight: 900;
  font-size: 26vw; line-height: 1; color: transparent; -webkit-text-stroke: 1px rgba(243,240,232,.08); pointer-events: none;
}
.careers .sec-head h2 { color: var(--paper); }
.careers .sec-head .lede { color: rgba(243,240,232,.75); }
.roles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; position: relative; z-index: 1; }
.role { border: 1px solid var(--line-light); padding: 26px 22px; background: rgba(10,21,48,.35); transition: border-color .3s, transform .3s var(--ease); }
.role:hover { border-color: var(--gold); transform: translateY(-4px); }
.role .n { font-family: var(--mono); font-size: 11px; letter-spacing: .2em; color: var(--gold-hi); }
.role h3 { margin: 14px 0 8px; font-size: 20px; letter-spacing: .12em; font-weight: 500; }
.role p { margin: 0; font-size: 14.5px; color: rgba(243,240,232,.7); line-height: 1.8; }
.careers-cta { display: flex; flex-wrap: wrap; gap: 20px 40px; align-items: center; justify-content: space-between; margin-top: 56px; padding-top: 32px; border-top: 1px solid var(--line-light); position: relative; z-index: 1; }
.careers-cta p { margin: 0; font-family: var(--serif); font-size: clamp(18px, 2vw, 22px); }

/* ---------- 聯絡我們 ---------- */
.contact { background: var(--paper); }
.contact-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(36px, 5vw, 72px); align-items: stretch; }
.contact-card { background: var(--ink); color: var(--paper); padding: clamp(32px, 4vw, 48px); position: relative; }
.contact-card .mark { top: -7px; right: -7px; }
.contact-card h3 { margin: 0 0 6px; font-family: var(--serif); font-size: 26px; letter-spacing: .12em; }
.contact-card .who { font-size: 15px; color: rgba(243,240,232,.7); margin: 0 0 28px; }
.contact-list { list-style: none; margin: 0; padding: 0; }
.contact-list li { display: grid; grid-template-columns: 90px 1fr; gap: 14px; padding: 15px 0; border-top: 1px solid var(--line-light); font-size: 16px; }
.contact-list li span { font-family: var(--mono); font-size: 11px; letter-spacing: .2em; color: var(--gold-hi); padding-top: 5px; }
.contact-list a { border-bottom: 1px solid rgba(226,176,74,.5); transition: color .2s; }
.contact-list a:hover { color: var(--gold-hi); }
.contact-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.contact-actions .btn { padding: 12px 18px; font-size: 14px; }
.btn-line { background: #06c755; color: #fff; }
.btn-line:hover { background: #05b04b; }
.map { position: relative; min-height: 420px; border: 1px solid var(--line-strong); background: var(--paper-2); }
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; filter: grayscale(.4) contrast(1.05); }

/* ---------- 頁尾 ---------- */
.footer { background: var(--ink); color: rgba(243,240,232,.7); font-size: 14px; }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding: 72px 0 56px; }
.footer .brand img { width: 56px; }
.footer .brand-txt b { font-size: 24px; }
.footer h4 { margin: 0 0 14px; font-family: var(--mono); font-size: 11px; letter-spacing: .22em; color: var(--gold-hi); font-weight: 400; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.footer a:hover { color: var(--paper); }
.footer-bottom { border-top: 1px solid var(--line-light); padding: 20px 0; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-family: var(--mono); font-size: 11.5px; letter-spacing: .12em; }

/* ---------- 燈箱 ---------- */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(6, 12, 28, .96); display: none; color: var(--paper); }
.lightbox.is-open { display: grid; grid-template-rows: auto 1fr auto; }
.lb-head { display: flex; justify-content: space-between; align-items: start; gap: 24px; padding: 20px var(--gutter); border-bottom: 1px solid var(--line-light); }
.lb-head .cl { font-size: 13px; color: var(--gold-hi); letter-spacing: .1em; }
.lb-head h3 { margin: 2px 0 0; font-size: clamp(16px, 1.8vw, 20px); font-weight: 500; letter-spacing: .06em; line-height: 1.5; }
.lb-close { background: none; border: 1px solid var(--line-light); width: 44px; height: 44px; flex: 0 0 44px; display: grid; place-items: center; }
.lb-close:hover { border-color: var(--gold); }
.lb-stage { position: relative; display: flex; align-items: center; justify-content: center; padding: 20px 72px; min-height: 0; }
.lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; border: 1px solid var(--line-light); background: rgba(10,21,48,.6); display: grid; place-items: center; }
.lb-nav:hover { border-color: var(--gold); background: var(--gold); color: var(--ink); }
.lb-prev { left: 12px; } .lb-next { right: 12px; }
.lb-thumbs { display: flex; gap: 8px; padding: 14px var(--gutter) 18px; overflow-x: auto; border-top: 1px solid var(--line-light); }
.lb-thumbs button { flex: 0 0 auto; width: 84px; height: 62px; padding: 0; border: 2px solid transparent; background: none; opacity: .5; transition: opacity .2s, border-color .2s; }
.lb-thumbs button img { width: 100%; height: 100%; object-fit: cover; }
.lb-thumbs button[aria-current="true"] { opacity: 1; border-color: var(--gold); }
.lb-count { font-family: var(--mono); font-size: 12px; letter-spacing: .16em; color: rgba(243,240,232,.6); padding-top: 4px; white-space: nowrap; }

/* ---------- 進場動畫 ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; } .reveal.d2 { transition-delay: .16s; } .reveal.d3 { transition-delay: .24s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- 響應式 ---------- */
@media (max-width: 1080px) {
  .nav ul, .nav-cta { display: none; }
  .burger { display: block; }
  .nav.is-open { background: var(--ink); }
  .nav.is-open ul {
    display: flex; flex-direction: column; gap: 0; position: absolute; top: 76px; left: 0; right: 0;
    background: var(--ink); padding: 8px var(--gutter) 28px; border-top: 1px solid var(--line-light);
  }
  .nav.is-open ul a { display: block; padding: 14px 0; font-size: 17px; border-bottom: 1px solid var(--line-light); }
  .values-grid { grid-template-columns: repeat(2, 1fr); }
  .roles { grid-template-columns: repeat(2, 1fr); }
  .works-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; padding-bottom: 96px; }
  .plate { max-width: 460px; }
  .about-grid, .life-grid, .contact-grid, .award { grid-template-columns: 1fr; }
  .about-figure { position: relative; top: 0; max-width: 520px; }
  .award.flip .award-media { order: 0; }
  .spec { grid-template-columns: 1fr; }
  .spec > div, .spec > div.r { padding-left: 0; border-right: 0; grid-template-columns: 1fr; gap: 6px; }
  .spec > div.l { border-right: 0; }
  .svc-grid { grid-template-columns: 1fr 1fr; }
  .svc-scope { grid-template-columns: 1fr; }
  .years { grid-template-columns: repeat(4, 1fr); }
  .years button:nth-child(4) { border-right: 0; }
  .years button:nth-child(-n+4) { border-bottom: 1px solid var(--line); }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-top > :first-child { grid-column: 1 / -1; }
  .timeline-mini { grid-template-columns: repeat(2, 1fr); row-gap: 28px; }
  .org-row { grid-template-columns: 1fr; gap: 14px; padding-top: 20px; }
  .org-row::before, .org-row .node::before, .org-row-wrap::after { display: none; }
  .org-row-wrap + .vline { margin-top: 0; }
  .org-row .node:nth-child(2)::after { display: none; }
  .life-photo .stamp { right: 12px; bottom: -22px; }
}
@media (max-width: 560px) {
  body { font-size: 15.5px; }
  .brand-txt small { display: none; }
  .values-grid, .roles, .svc-grid, .works-grid { grid-template-columns: 1fr; }
  .svc { min-height: 300px; }
  .svc p { max-height: none; opacity: 1; margin-top: 10px; }
  .lb-stage { padding: 12px; }
  .lb-nav { top: auto; bottom: 12px; transform: none; }
  .ledger td:nth-child(2) { white-space: normal; }
  .footer-top { grid-template-columns: 1fr; }
  .hero-foot .wrap > :last-child { display: none; }
}
