:root {
  --ink: var(--t6-ink);
  --blue: var(--t6-primary);
  --cyan: var(--t6-accent);
  --muted: var(--t6-muted);
  --pale: var(--t6-pale);
  --line: var(--t6-line);
  --radius: 14px;
  --shadow: 0 8px 28px -12px rgba(var(--t6-ink-rgb), 0.16);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
/* 文字採相對字級；預設內文 18px，配合瀏覽器字體偏好縮放。 */
body { margin: 0; color: var(--ink); background: #fff; font-family: "Noto Sans TC", "Microsoft JhengHei", "PingFang TC", sans-serif; font-size: 1.125rem; line-height: 1.75; -webkit-font-smoothing: antialiased; }
::selection { color: var(--t6-hover); background: var(--t6-soft); }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
h1, h2, h3 { line-height: 1.4; }
a { color: inherit; text-decoration: none; }
input, select, textarea { font: inherit; }
button { color: inherit; font: inherit; cursor: pointer; }
button, a { -webkit-tap-highlight-color: transparent; }
button { border: 0; }
img { display: block; max-width: 100%; height: auto; }
button:focus-visible, a:focus-visible { outline: 3px solid var(--cyan); outline-offset: 5px; }
.container { width: min(1240px, calc(100% - 96px)); margin-inline: auto; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: fixed; top: -70px; left: 20px; z-index: 20; background: var(--ink); color: #fff; padding: 10px 20px; }
.skip-link:focus { top: 10px; }
.site-header { position: sticky; top: 0; z-index: 10; background: rgb(255 255 255 / 96%); border-bottom: 1px solid var(--t6-pale); backdrop-filter: blur(12px); }
.header-inner { display: flex; align-items: center; gap: 36px; min-height: 82px; }
.brand { display: inline-flex; flex-direction: column; flex-shrink: 0; align-items: center; }
.brand img { width: 157px; height: auto; }
.brand span { color: var(--t6-muted); font-size: 0.5rem; letter-spacing: .8px; margin-top: 1px; }
.main-nav { display: flex; align-items: center; justify-content: center; gap: clamp(22px, 3vw, 46px); flex: 1; }
.main-nav a { position: relative; padding: 23px 0; font-weight: 700; font-size: 1rem; white-space: nowrap; }
.main-nav a::after { content: ""; position: absolute; height: 3px; left: 20%; right: 20%; bottom: 11px; border-radius: 3px; background: var(--blue); transform: scaleX(0); transition: transform .2s; }
.main-nav a.is-active, .main-nav a:hover { color: var(--blue); }
.main-nav a.is-active::after, .main-nav a:hover::after { transform: scaleX(1); }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 16px; min-height: 50px; padding: 11px 29px; border: 1px solid transparent; border-radius: 50px; font-weight: 700; letter-spacing: .8px; transition: background .2s, box-shadow .2s, transform .2s; }
.button-primary { background: var(--blue); color: #fff; box-shadow: 0 7px 18px -5px rgba(var(--t6-primary-rgb), 0.3); }
.button-primary:hover { background: var(--t6-hover); transform: translateY(-2px); }
.button-outline { border-color: var(--blue); color: var(--blue); background: rgb(255 255 255 / 80%); box-shadow: 0 0 0 4px rgb(255 255 255 / 60%); }
.button-outline:hover { background: var(--t6-soft); }
.header-cta { min-height: 40px; padding: 8px 25px; font-size: 1rem; }
.menu-toggle { display: none; width: 44px; height: 44px; background: transparent; font-size: 29px; }
/* 整張 Banner 等比例呈現，不再以多個裝飾元件拼接主視覺。 */
.hero { position: relative; display: grid; background: var(--pale); border-bottom: 1px solid var(--line); }
.hero.has-caption { min-height: clamp(480px, 40vw, 680px); }
.hero-picture, .hero-image { display: block; width: 100%; }
.hero-picture { grid-area: 1 / 1; align-self: center; min-width: 0; }
.hero-image { height: auto; }
.hero-caption { position: relative; grid-area: 1 / 1; display: flex; align-items: center; padding-block: 28px; min-width: 0; }
.hero-caption-content { max-width: 44%; padding: 20px 0; color: var(--ink); }
.hero-caption h1 { font-size: clamp(2.375rem, 3.8vw, 3.5rem); line-height: 1.4; letter-spacing: .5px; text-wrap: balance; overflow-wrap: anywhere; }
.hero-caption p { margin-top: 18px; color: var(--muted); font-size: 1.125rem; line-height: 1.8; overflow-wrap: anywhere; }
/* 窄螢幕將文案放在圖下，保留完整圖片與足夠的閱讀空間。 */
@media (max-width: 1020px) {
  .hero.has-caption { min-height: 0; }
  .hero-picture { grid-area: auto; }
  .hero-caption { grid-area: auto; padding-block: 26px 30px; }
  .hero-caption-content { max-width: 740px; padding: 0; border: 0; color: var(--ink); background: transparent; }
  .hero-caption h1 { font-size: clamp(1.875rem, 4.5vw, 2.375rem); }
  .hero-caption p { margin-top: 12px; color: var(--muted); font-size: 1rem; }
}
h1 { font-size: clamp(2.1875rem, 3.83vw, 3.375rem); line-height: 1.32; letter-spacing: 1px; font-weight: 800; }
h1 span { color: var(--t6-hover); }
.handwritten { font-family: "Kaiti TC", "DFKai-SB", "KaiTi", cursive; letter-spacing: 1px; font-style: italic; color: var(--t6-muted); line-height: 1.5; }
.section-tint { background: var(--pale); }
.services { padding: 46px 0 48px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.eyebrow { font-size: 0.8125rem; font-weight: 600; color: var(--t6-muted); letter-spacing: 1.8px; margin-bottom: 7px; }
h2 { font-size: 1.875rem; font-weight: 800; letter-spacing: .4px; }
.section-intro { margin-top: 7px; color: var(--muted); font-size: 1rem; letter-spacing: .3px; }
.text-link { display: inline-flex; align-items: center; gap: 10px; color: var(--t6-primary); font-size: 1rem; font-weight: 600; background: transparent; padding: 8px 0; white-space: nowrap; }
.text-link:hover { color: var(--t6-hover); text-decoration: underline; text-underline-offset: 4px; }
.service-grid, .case-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.service-card { display: flex; flex-direction: column; background: #fff; padding: 7px; border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--t6-line); transition: border-color .2s, box-shadow .2s; }
.card-photo { width: 100%; height: 154px; object-fit: cover; border-radius: 9px; }
.service-content { position: relative; display: flex; flex-direction: column; flex: 1; padding: 36px 16px 10px; }
.service-icon { position: absolute; left: 14px; top: -24px; display: grid; place-items: center; width: 48px; height: 48px; color: var(--t6-primary); background: var(--t6-soft); border: 4px solid #fff; border-radius: 14px; box-shadow: 0 3px 8px rgba(var(--t6-ink-rgb), 0.08); font-size: 23px; }
.service-content h3 { font-size: 1.1875rem; letter-spacing: -.4px; }
.service-content p { margin: 12px 0 16px; color: var(--muted); font-size: 1rem; min-height: 46px; line-height: 1.85; }
.service-content .text-link { margin-top: auto; align-self: flex-start; }
.cases { padding: 34px 0 42px; }
.section-heading.compact { margin-bottom: 18px; }
.compact h2 { font-size: 1.4375rem; }
.compact h2 span { color: var(--t6-muted); font-size: 0.8125rem; letter-spacing: 1.3px; font-weight: 500; }
.case-card { overflow: hidden; background: #fff; border-radius: 10px; border: 1px solid var(--t6-line); box-shadow: none; transition: border-color .2s; }
.case-card > img { width: 100%; height: 122px; object-fit: cover; filter: saturate(.8); }
.case-card:nth-child(2) > img { object-position: 25% 25%; }
.case-card:nth-child(3) > img { object-position: 75% 70%; }
.case-card > div { position: relative; padding: 15px 46px 15px 15px; }
.case-card h3 { font-size: 1.125rem; }
.case-card p { color: var(--muted); font-size: 1rem; margin-top: 4px; }
.round-link { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; background: var(--t6-soft); border-radius: 50%; color: var(--t6-primary); }
.round-link:hover { background: var(--t6-soft); }
.news { padding: 44px 0 48px; }
.news-heading { display: flex; align-items: baseline; gap: 12px; }
.news-heading p { color: var(--muted); font-size: 1rem; }
.news-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.news-card { display: flex; overflow: hidden; border: 1px solid var(--t6-line); box-shadow: none; border-radius: 11px; padding: 9px; gap: 16px; transition: border-color .2s; }
.news-card > img { width: 34%; min-width: 0; object-fit: cover; border-radius: 5px; }
.news-card > div { padding: 3px 5px 2px 0; flex: 1; min-width: 0; }
.news-card time { color: var(--t6-muted); font-size: 0.8125rem; letter-spacing: .8px; }
.news-card h3 { margin-top: 6px; font-size: 1.125rem; line-height: 1.6; }
.news-card p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 9px 0 4px; font-size: 1rem; color: var(--muted); }
.site-footer { color: var(--t6-foottext); background: var(--t6-footer); border-top: 3px solid var(--t6-accent); }
.footer-main { display: grid; grid-template-columns: 2fr 1.25fr .7fr .9fr .8fr; align-items: center; gap: 25px; padding-block: 43px 35px; }
.footer-brand { display: flex; align-items: center; gap: 27px; }
.footer-brand .brand img { width: 148px; }
.footer-brand .brand span { color: var(--t6-foottext); }
.footer-brand > p { padding-left: 19px; border-left: 1px solid var(--t6-footline); font-size: 0.875rem; letter-spacing: .7px; }
.footer-contact address { font-style: normal; font-size: 0.875rem; line-height: 1.9; }
.footer-contact address i { display: inline-block; width: 22px; }
.socials { display: flex; gap: 14px; margin-top: 7px; }
.socials button { color: var(--t6-foottext); padding: 0; background: transparent; width: 21px; height: 26px; }
.footer-links { display: flex; flex-direction: column; font-size: 0.875rem; line-height: 1.9; padding-left: 28px; border-left: 1px solid var(--t6-footline); }
.footer-links h2 { font-size: 0.875rem; font-weight: 600; margin-bottom: 5px; }
.footer-links a:hover, .footer-contact a:hover { color: var(--t6-accent); }
.footer-signoff { align-self: stretch; position: relative; border-left: 1px solid var(--t6-footline); padding: 4px 0 38px 20px; }
.footer-signoff .handwritten { color: var(--t6-foottext); font-size: 1rem; transform: rotate(-10deg); white-space: nowrap; }
.back-top { position: absolute; right: 0; bottom: 0; display: grid; place-items: center; height: 33px; width: 33px; background: var(--t6-primary); color: #fff; border-radius: 50%; font-size: 19px; }
.back-top:hover { background: var(--t6-primary); }
.footer-bottom { border-top: 1px solid var(--t6-footline); font-size: 0.8125rem; color: var(--t6-foottext); }
.footer-bottom .container { display: flex; justify-content: space-between; gap: 15px; padding-block: 13px; }
.footer-bottom span { margin: 0 5px; }
.footer-bottom button { padding: 0; background: none; font-size: inherit; }
.footer-bottom button:hover { text-decoration: underline; }
.preview-dialog { width: min(540px, calc(100% - 40px)); max-height: calc(100dvh - 48px); padding: 38px; border: 1px solid var(--line); border-radius: 14px; color: var(--ink); box-shadow: 0 25px 100px rgba(var(--t6-ink-rgb), 0.25); }
.preview-dialog::backdrop { background: rgba(var(--t6-ink-rgb), 0.55); backdrop-filter: blur(4px); }
.dialog-close { position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; background: var(--pale); border-radius: 50%; }
.preview-dialog h2 { font-size: 1.6875rem; margin: 8px 0 16px; }
#preview-description { color: var(--muted); line-height: 1.9; }
.preview-note { font-size: 0.875rem; color: var(--muted); border-top: 1px solid var(--line); margin-top: 20px; padding-top: 16px; }
.dialog-contact { margin-top: 22px; }
body.dialog-open { overflow: hidden; }
@media (hover: hover) {
  .service-card:hover, .service-card:focus-within { border-color: var(--t6-border); box-shadow: 0 16px 32px -18px rgba(var(--t6-ink-rgb), 0.32); }
  .case-card:hover, .news-card:hover { border-color: var(--t6-border); }
  .text-link i { transition: transform .2s; }
  .text-link:hover i { transform: translateX(4px); }
}
@media (max-width: 1199px) {
  .container { width: calc(100% - 64px); }
  .header-inner { gap: 24px; }
  .brand img { width: 138px; }
  .main-nav { gap: 26px; }
  .service-grid, .case-grid { gap: 12px; }
  .card-photo { height: 134px; }
  .service-content { padding-inline: 11px; }
  .service-content h3 { font-size: 1.125rem; min-height: 42px; }
  .service-content p { font-size: 1rem; min-height: 67px; }
  .service-icon { width: 45px; height: 45px; font-size: 22px; }
  .news-card { gap: 10px; }
  .news-card h3 { font-size: 1rem; }
  .footer-main { grid-template-columns: 1.5fr 1.2fr .65fr .85fr; gap: 20px; }
  .footer-brand { gap: 15px; }
  .footer-brand .brand img { width: 118px; }
  .footer-brand > p { padding-left: 15px; font-size: 0.8125rem; }
  .footer-signoff { display: none; }
}
@media (max-width: 900px) {
  .header-inner { gap: 18px; }
  .main-nav { gap: 20px; }
  .main-nav a { font-size: 0.875rem; }
  .header-cta { padding-inline: 19px; font-size: 0.875rem; }
  .service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-photo { height: 150px; }
  .service-content h3 { font-size: 1.1875rem; min-height: 0; }
  .service-content p { font-size: 1rem; min-height: 48px; }
  .case-card > div { padding-left: 9px; padding-right: 32px; }
  .case-card h3 { font-size: 1rem; }
  .case-card p { font-size: 1rem; }
  .round-link { width: 28px; height: 28px; right: 5px; }
  .news-heading { display: block; }
  .news-card { flex-direction: column; padding: 7px; }
  .news-card > img { width: 100%; height: 110px; }
  .news-card > div { padding: 0 5px 5px; }
  .news-card h3 { font-size: 1rem; }
  .footer-main { grid-template-columns: 1.2fr 1.2fr .7fr .9fr; gap: 16px; }
  .footer-brand { display: block; }
  .footer-brand > p { border: 0; padding: 0; margin-top: 9px; }
  .footer-links { padding-left: 13px; }
  .footer-contact address { font-size: 0.8125rem; }
  .footer-bottom .container { flex-wrap: wrap; justify-content: center; gap: 3px; text-align: center; }
}
@media (max-width: 680px) {
  html { scroll-padding-top: 80px; }
  .container { width: calc(100% - 36px); }
  .header-inner { min-height: 64px; gap: 10px; }
  .brand img { width: 125px; }
  .brand span { font-size: 0.4375rem; }
  .menu-toggle { display: block; order: 3; }
  .header-cta { margin-left: auto; padding: 7px 15px; min-height: 36px; font-size: 0.8125rem; gap: 7px; }
  .main-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; padding: 10px 22px 18px; box-shadow: 0 12px 18px rgba(var(--t6-ink-rgb), 0.1); }
  .main-nav.is-open { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
  .main-nav a { padding: 12px 8px; font-size: 1.125rem; }
  .main-nav a::after { display: none; }
  h1 { font-size: clamp(2.125rem, 8.64vw, 2.875rem); letter-spacing: 1.5px; }
  h2 { font-size: 1.5625rem; }
  .section-heading { align-items: flex-end; gap: 10px; margin-bottom: 20px; }
  .section-heading > .text-link { font-size: 0.8125rem; gap: 5px; }
  .section-intro { font-size: 1rem; margin-top: 5px; }
  .services { padding-block: 30px; }
  .services .section-heading { flex-wrap: wrap; }
  .services .section-heading > .text-link { margin-left: auto; }
  .service-grid { gap: 12px; }
  .service-card { padding: 6px; }
  .card-photo { height: 111px; }
  .service-content { padding: 30px 7px 7px; }
  .service-icon { top: -20px; left: 7px; width: 42px; height: 42px; font-size: 21px; }
  .service-content h3 { font-size: 1rem; min-height: 39px; }
  .service-content p { font-size: 1rem; margin-top: 9px; min-height: 67px; }
  .text-link { font-size: 0.875rem; }
  .cases { padding-block: 28px; }
  .compact h2 { font-size: 1.125rem; }
  .compact h2 span { font-size: 0.5625rem; letter-spacing: .7px; }
  .case-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .case-card > img { height: 104px; }
  .case-card p { font-size: 1rem; }
  .news { padding-block: 30px; }
  .news-heading p { font-size: 1rem; margin-top: 5px; }
  .news-grid { grid-template-columns: 1fr; }
  .news-card { flex-direction: row; gap: 13px; }
  .news-card > img { width: 31%; height: auto; }
  .news-card > div { padding: 3px 3px 3px 0; }
  .news-card h3 { font-size: 1rem; }
  .news-card p { margin-block: 7px; }
  .footer-main { grid-template-columns: 1fr 1fr; gap: 28px 20px; padding-top: 32px; }
  .footer-brand .brand img { width: 135px; }
  .footer-brand > p { font-size: 0.8125rem; }
  .footer-contact address { font-size: 0.8125rem; }
  .socials { gap: 10px; }
  .footer-links { border: 0; padding-left: 0; font-size: 0.875rem; line-height: 1.9; }
  .footer-links h2 { font-size: 1rem; }
  .footer-signoff { display: flex; align-items: center; grid-column: 1 / -1; padding: 0; border: 0; }
  .footer-signoff .handwritten { font-size: 1rem; transform: none; }
  .footer-signoff br { display: none; }
  .back-top { bottom: 0; }
  .footer-bottom { font-size: 0.8125rem; }
  .footer-bottom .container { padding-block: 12px; }
  .preview-dialog { padding: 32px 24px; }
}
@media (max-width: 359px) {
  .header-cta { padding-inline: 10px; }
  .brand img { width: 109px; }
  .service-content { padding-inline: 3px; }
  .service-content h3 { font-size: 1rem; }
  .service-content p { min-height: 76px; }
  .compact h2 span { display: block; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}


