/* 允將建設 歷年作品 — 共用樣式。每頁的 --accent 由版型內嵌的 <style> 覆寫。 */
:root {
  --bg: #f6f5f2;
  --paper: #ffffff;
  --ink: #1f2326;
  --muted: #676d72;
  --line: #e2e0da;
  --line-strong: #cfcbc2;
  --accent: #0e6f7a;
  --accent-dark: #0a5058;
  --accent-soft: #e6f0f1;
  --serif: "Noto Serif TC", "PingFang TC", "Microsoft JhengHei", "微軟正黑體", serif;
  --sans: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", "微軟正黑體", system-ui, sans-serif;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(20, 24, 26, .06), 0 8px 24px -16px rgba(20, 24, 26, .25);
  --wrap: 1120px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.8; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.3; margin: 0; text-wrap: balance; font-weight: 700; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: 20px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--paper); padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }
.eyebrow { font-size: 13px; letter-spacing: .12em; color: var(--muted); font-weight: 500; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.eyebrow .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--line-strong); display: inline-block; }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.brand { display: flex; align-items: baseline; gap: 10px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-name { font-family: var(--serif); font-weight: 700; font-size: 20px; letter-spacing: .06em; }
.brand-sub { font-size: 13px; color: var(--muted); letter-spacing: .1em; }
.topnav { display: flex; align-items: center; gap: 22px; font-size: 14px; font-weight: 500; }
.topnav a { color: var(--ink); }
.topnav .btn { background: var(--accent); color: #fff; padding: 8px 16px; border-radius: 999px; }
.topnav .btn:hover { background: var(--accent-dark); text-decoration: none; }
@media (max-width: 560px) { .topnav a:not(.btn) { display: none; } .brand-sub { display: none; } }

/* ---------- hero ---------- */
.hero { padding-block: 44px 36px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, var(--accent-soft), var(--bg) 70%); }
.hero-in { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 36px 48px; align-items: center; }
.hero h1 { font-size: clamp(34px, 5vw, 52px); color: var(--accent-dark); margin-top: 10px; letter-spacing: .02em; }
.hero .en { font-family: var(--serif); font-size: 13px; letter-spacing: .3em; color: var(--muted); margin-top: 8px; text-transform: uppercase; }
.hero .tagline { font-size: 19px; font-weight: 500; margin-top: 14px; color: var(--ink); }
.hero .lead { margin-top: 16px; color: var(--muted); font-size: 15.5px; max-width: 46ch; }
.hero .lead + .lead { margin-top: 8px; }
.hero-media { margin: 0; }
.hero-media img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); }
.hero-media figcaption { font-size: 12.5px; color: var(--muted); margin-top: 8px; text-align: right; }
.hero-home { text-align: left; padding-block: 56px 40px; }
.hero-home h1 { font-size: clamp(34px, 5vw, 48px); color: var(--accent-dark); margin-top: 10px; }
.hero-home .lead { margin-top: 18px; max-width: 60ch; color: var(--muted); }
@media (max-width: 860px) { .hero-in { grid-template-columns: 1fr; } .hero-media { order: -1; } }

/* ---------- sub nav ---------- */
.subnav { position: sticky; top: 64px; z-index: 15; background: var(--paper); border-bottom: 1px solid var(--line); }
.subnav-in { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.subnav-in::-webkit-scrollbar { display: none; }
.subnav a { flex: 0 0 auto; padding: 12px 12px; font-size: 14px; font-weight: 500; color: var(--muted); border-bottom: 2px solid transparent; }
.subnav a:hover { color: var(--accent-dark); text-decoration: none; border-bottom-color: var(--accent); }

/* ---------- facts ---------- */
.facts { padding-block: 28px 4px; }
.facts dl { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.facts dl > div { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.facts dt { font-size: 12px; letter-spacing: .1em; color: var(--muted); font-weight: 500; }
.facts dd { margin: 4px 0 0; font-weight: 500; }

/* ---------- sections ---------- */
.sec { padding-block: 48px; }
.sec + .sec { border-top: 1px solid var(--line); }
.sec-head { margin-bottom: 22px; }
.sec-head h2 { font-size: clamp(24px, 3vw, 32px); margin-top: 8px; color: var(--ink); }
.sec-head h2::before { content: ""; display: block; width: 36px; height: 3px; background: var(--accent); margin-bottom: 14px; border-radius: 2px; }
.sec-head .sub { color: var(--muted); font-size: 16px; margin-top: 8px; }
.prose { max-width: 70ch; display: grid; gap: 12px; margin-bottom: 26px; color: #34393d; }
.footnote { margin-top: 18px; font-size: 13px; color: var(--muted); }

/* gallery */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.gallery figure { margin: 0; }
.gallery a { display: block; border-radius: var(--radius); overflow: hidden; background: var(--paper); box-shadow: var(--shadow); }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .35s ease; }
.gallery.fit-contain img { object-fit: contain; background: #fff; padding: 6px; }
.gallery.fit-wide img { aspect-ratio: 21 / 9; }
.gallery a:hover img { transform: scale(1.03); }
.gallery figcaption { font-size: 13.5px; color: var(--muted); margin-top: 8px; line-height: 1.5; }
@media (max-width: 560px) { .gallery { grid-template-columns: repeat(2, 1fr); gap: 10px; } .gallery figcaption { font-size: 12px; } }

/* cards (image + text) */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.card-media img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.card-body { padding: 14px 16px 18px; }
.card-body h3 { font-size: 17px; }
.card-body h3 small { font-family: var(--sans); font-weight: 400; font-size: 12px; color: var(--muted); margin-left: 6px; }
.card-body p { margin-top: 6px; font-size: 14.5px; color: #34393d; }

/* people */
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.person { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.person-media { display: block; border-radius: 8px; overflow: hidden; margin-bottom: 12px; }
.person-media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: top; }
.person h3 { font-size: 19px; }
.person .role { font-size: 13px; color: var(--accent-dark); font-weight: 500; margin-top: 2px; display: flex; flex-direction: column; }
.person .org { color: var(--muted); font-weight: 400; }
.person .bio { margin-top: 10px; font-size: 14px; color: #34393d; }

/* quotes */
.quotes { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.quotes blockquote { margin: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; font-size: 14.5px; position: relative; }
.quotes blockquote::before { content: "“"; font-family: var(--serif); font-size: 44px; line-height: 1; color: var(--accent); position: absolute; top: 10px; left: 14px; opacity: .5; }
.quotes blockquote p { padding-left: 22px; color: #34393d; }
.quotes footer { margin-top: 10px; font-size: 13px; color: var(--muted); padding-left: 22px; }

/* ---------- home ---------- */
.work-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 22px; }
.work { display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); color: var(--ink); transition: transform .25s ease, box-shadow .25s ease; }
.work:hover { text-decoration: none; transform: translateY(-3px); box-shadow: 0 2px 4px rgba(20, 24, 26, .06), 0 18px 34px -18px rgba(20, 24, 26, .35); }
.work-media { margin: 0; }
.work-media img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.work-body { padding: 16px 18px 20px; border-top: 3px solid var(--accent); }
.work-body h2 { font-size: 24px; margin-top: 8px; }
.work-body .en { font-family: var(--serif); font-size: 11px; letter-spacing: .28em; color: var(--muted); margin-top: 4px; text-transform: uppercase; }
.work-body .tagline { margin-top: 8px; font-size: 14.5px; color: #34393d; }
.brand-sec { background: var(--paper); border-top: 1px solid var(--line); }
.values { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 28px; }
.value { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; background: var(--bg); }
.value-en { font-family: var(--serif); font-size: 12px; letter-spacing: .25em; color: var(--accent-dark); text-transform: uppercase; }
.value h3 { font-size: 22px; margin-top: 4px; }
.value p:last-child { margin-top: 6px; font-size: 14.5px; color: #34393d; }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--line); background: var(--paper); padding-block: 40px 28px; margin-top: 24px; font-size: 14px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; }
.foot .brand-name { font-size: 18px; }
.foot-text { color: var(--muted); margin-top: 8px; max-width: 40ch; }
.foot-title { font-weight: 700; margin-bottom: 8px; }
.foot-list { display: grid; gap: 6px; }
.foot-list a { color: var(--ink); }
.foot-list span { display: block; font-size: 12px; color: var(--muted); }
.copy { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12.5px; }
@media (max-width: 720px) { .foot-grid { grid-template-columns: 1fr; gap: 22px; } }

/* ---------- lightbox ---------- */
.lb { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
.lb::backdrop { background: rgba(10, 12, 14, .92); }
.lb[open] { display: grid; place-items: center; }
.lb figure { margin: 0; max-width: min(96vw, 1500px); max-height: 92vh; display: grid; justify-items: center; gap: 10px; }
.lb img { max-width: 96vw; max-height: 84vh; width: auto; height: auto; object-fit: contain; border-radius: 6px; }
.lb figcaption { color: #e6e6e6; font-size: 14px; text-align: center; }
.lb button { position: fixed; background: rgba(255, 255, 255, .12); color: #fff; border: 0; width: 48px; height: 48px; border-radius: 50%; font-size: 30px; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.lb button:hover { background: rgba(255, 255, 255, .25); }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 12px; top: 50%; transform: translateY(-50%); }
@media (max-width: 560px) { .lb button { width: 40px; height: 40px; font-size: 24px; } .lb-prev { left: 4px; } .lb-next { right: 4px; } }
