:root {
  --navy: #234d79;
  --navy-deep: #173a60;
  --gold: #f5b51b;
  --ink: #23303d;
  --muted: #66717c;
  --cream: #f8f6f0;
  --white: #fff;
  --shadow: 0 18px 50px rgba(28, 54, 78, .13);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 82px; }
body { margin: 0; color: var(--ink); background: var(--white); font-family: "Noto Sans TC", "Microsoft JhengHei", sans-serif; line-height: 1.8; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
.container { width: min(1120px, calc(100% - 48px)); margin: 0 auto; }
.section { padding: 100px 0; }

.site-header { position: sticky; z-index: 100; top: 0; height: 96px; background: rgba(31, 69, 108, .96); box-shadow: 0 5px 20px rgba(0, 0, 0, .13); backdrop-filter: blur(12px); }
.nav-wrap { width: min(1200px, calc(100% - 40px)); height: 100%; margin: auto; display: flex; align-items: center; justify-content: space-between; }
.brand { width: 180px; }
.brand img { width: 100%; height: auto; }
.site-nav { display: flex; align-items: center; gap: 34px; }
.site-nav a { position: relative; color: #fff; font-size: 15px; font-weight: 700; letter-spacing: .08em; }
.site-nav a::after { content: ""; position: absolute; left: 50%; bottom: -8px; width: 0; height: 2px; background: var(--gold); transition: .25s; transform: translateX(-50%); }
.site-nav a:hover::after, .site-nav a.active::after { width: 100%; }
.menu-toggle { display: none; width: 44px; height: 44px; padding: 10px; border: 0; background: transparent; }
.menu-toggle span { display: block; height: 2px; margin: 6px 0; background: #fff; transition: .25s; }

.hero { position: relative; min-height: clamp(520px, 50vw, 720px); overflow: hidden; background: var(--navy-deep); }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(35,77,121,.98) 0%, rgba(35,77,121,.95) 48%, rgba(35,77,121,.82) 100%); }
.hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.hero-overlay { position: relative; z-index: 2; width: min(1380px, calc(100% - 48px)); min-height: clamp(520px, 50vw, 720px); margin: auto; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #fff; text-align: center; }
.hero-overlay h1 { margin: 0; color: var(--gold); font-size: clamp(58px, 7.2vw, 104px); line-height: 1.12; letter-spacing: .08em; text-shadow: 0 4px 20px rgba(0,0,0,.22); }
.hero-overlay h2 { margin: 24px 0 26px; color: var(--gold); font-size: clamp(36px, 5vw, 72px); line-height: 1.25; letter-spacing: .05em; }
.hero-description { margin: 0; color: #fff; font-size: clamp(18px, 2.1vw, 29px); font-weight: 800; letter-spacing: .11em; }
.hero-phone { display: inline-flex; margin-top: 30px; padding: 12px 28px; border: 2px solid var(--gold); color: var(--navy-deep); background: var(--gold); font-size: clamp(18px, 2vw, 26px); font-weight: 900; letter-spacing: .08em; box-shadow: 0 10px 26px rgba(0,0,0,.25); transition: color .2s, background .2s, transform .2s; }
.hero-phone:hover { color: #fff; background: transparent; transform: translateY(-2px); }
.announcement { display: flex; width: min(1040px, calc(100% - 48px)); margin: 18px auto 0; padding: 8px 20px; border: 2px solid var(--navy); color: var(--navy); align-items: center; justify-content: center; gap: 18px; text-align: center; font-weight: 700; letter-spacing: .08em; transition: color .2s, background .2s; }
.announcement span { padding-left: 18px; border-left: 1px solid currentColor; color: #a06c00; font-size: 12px; }
.announcement:hover { color: #fff; background: var(--navy); }
.announcement:hover span { color: var(--gold); }

.section-heading { margin-bottom: 50px; text-align: center; }
.section-heading p, .eyebrow { margin: 0 0 4px; color: var(--gold); font-size: 12px; font-weight: 800; letter-spacing: .22em; }
.section-heading h2, .contact-card h2 { margin: 0; color: var(--gold); font-size: clamp(28px, 4vw, 42px); letter-spacing: .08em; }
.section-heading h2::after { content: ""; display: block; width: 58px; height: 3px; margin: 14px auto 0; background: var(--gold); }

.about-section { position: relative; padding: 62px 0; background: linear-gradient(90deg, rgba(255,255,255,.96), rgba(255,255,255,.72)), url("../images/wall-paint-background.jpg") center/cover fixed; }
.about-section .container { width: min(1320px, calc(100% - 60px)); }
.about-grid { display: grid; grid-template-columns: minmax(380px, .88fr) minmax(0, 1.12fr); gap: 68px; align-items: start; }
.certificate-card { padding: 0; background: transparent; box-shadow: none; transform: none; }
.certificate-card img { width: 100%; }
.about-copy { padding-top: 2px; color: #171717; font-size: 17px; font-weight: 600; line-height: 1.62; }
.blog-copy h3 { margin: 0 0 18px; color: var(--navy); font-size: clamp(24px, 3vw, 34px); line-height: 1.35; }
.about-copy > p { margin: 0 0 5px; color: #171717; }
.about-copy .intro-emphasis { margin: 0 0 14px; color: #0c0c0c; font-size: 21px; font-weight: 600; line-height: 1.55; }
.about-details { display: grid; gap: 27px; margin: 25px 0 22px; }
.about-details section { padding: 0; border: 0; background: transparent; box-shadow: none; }
.about-details h4 { margin: 0 0 9px; color: var(--navy); font-size: 19px; font-weight: 600; }
.about-details p, .about-details li { color: #171717; font-size: 17px; font-weight: 600; }
.about-details p { margin: 0; }
.about-details ol { margin: 0; padding-left: 1.4em; }
.about-details .note { margin-top: 2px; color: #222; font-weight: 400; }
.key-blue { color: var(--navy); font-weight: 600; }
.key-gold { color: #a66e00; font-weight: 600; }
.about-section .button-primary { min-height: 0; padding: 0; color: var(--navy); background: transparent; box-shadow: none; font-size: 18px; font-weight: 600; letter-spacing: 0; }
.about-section .button-primary:hover { color: var(--navy); text-decoration: underline; transform: none; }
.service-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin: 28px 0 36px; }
.service-columns h4 { margin: 0 0 8px; color: var(--navy); font-size: 17px; }
.service-columns ul { margin: 0; padding-left: 1.35em; }
.service-columns p, .service-columns li { color: var(--muted); font-size: 14px; }
.button { display: inline-flex; min-height: 48px; padding: 10px 28px; align-items: center; justify-content: center; border-radius: 2px; font-weight: 800; letter-spacing: .08em; transition: transform .2s, box-shadow .2s, background .2s; }
.button:hover { transform: translateY(-2px); }
.button-primary { color: #fff; background: var(--navy); box-shadow: 0 10px 22px rgba(35, 77, 121, .25); }

.projects-section { background: var(--cream); }
.project-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.project-grid figure { position: relative; margin: 0; overflow: hidden; background: #fff; box-shadow: 0 10px 30px rgba(31, 55, 76, .09); }
.project-photo { display: block; width: 100%; padding: 0; overflow: hidden; border: 0; background: transparent; cursor: zoom-in; }
.project-grid img { width: 100%; aspect-ratio: 4/3; object-fit: cover; transition: transform .45s, filter .35s; }
.project-grid figure:hover img, .project-photo:focus-visible img { transform: scale(1.04); filter: brightness(.88); }
.project-photo:focus-visible { outline: 4px solid var(--gold); outline-offset: -4px; }
.project-grid figcaption { position: absolute; right: 0; bottom: 0; padding: 7px 16px; color: #fff; background: rgba(29, 65, 101, .9); font-size: 14px; font-weight: 700; }

.lightbox { position: fixed; z-index: 1000; inset: 0; display: flex; padding: 72px 88px; visibility: hidden; align-items: center; justify-content: center; opacity: 0; background: rgba(8, 18, 29, .92); backdrop-filter: blur(8px); transition: opacity .3s ease, visibility .3s; }
.lightbox.open { visibility: visible; opacity: 1; }
.lightbox-stage { width: min(1100px, 82vw); text-align: center; }
.lightbox-image { max-width: 100%; max-height: calc(100vh - 150px); margin: auto; object-fit: contain; opacity: 1; transform: scale(1); box-shadow: 0 24px 80px rgba(0,0,0,.45); transition: opacity .2s ease, transform .3s ease; }
.lightbox-image.changing { opacity: 0; transform: scale(.96); }
.lightbox-caption { margin: 12px 0 0; color: #fff; font-weight: 700; letter-spacing: .08em; }
.lightbox-close, .lightbox-nav { position: absolute; border: 0; color: #fff; background: rgba(255,255,255,.12); cursor: pointer; transition: color .2s, background .2s, transform .2s; }
.lightbox-close:hover, .lightbox-nav:hover { color: var(--gold); background: rgba(255,255,255,.2); }
.lightbox-close { top: 22px; right: 28px; width: 48px; height: 48px; border-radius: 50%; font-size: 38px; line-height: 42px; }
.lightbox-nav { top: 50%; width: 54px; height: 72px; font-size: 56px; line-height: 54px; transform: translateY(-50%); }
.lightbox-nav:hover { transform: translateY(-50%) scale(1.06); }
.lightbox-prev { left: 24px; }
.lightbox-next { right: 24px; }
body.lightbox-open { overflow: hidden; }

.blog-section { background: #fff; }
.blog-card { padding: 64px; background: #f8f7f3; box-shadow: var(--shadow); }
.blog-grid { display: grid; grid-template-columns: 1.35fr .65fr; gap: 48px; align-items: center; }
.blog-grid-next { margin-top: 48px; padding-top: 48px; border-top: 1px solid #e3ded4; }
.blog-grid > img, .blog-image-link img { width: 100%; min-height: 360px; object-fit: cover; }
.blog-image-link { display: block; }
.blog-image-link:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }
.blog-copy p { margin-bottom: 30px; color: var(--muted); }
.button-outline { gap: 12px; border: 2px solid var(--gold); color: #a06c00; background: #fff; }
.button-outline:hover { color: #fff; background: var(--gold); }

.contact-section { padding: 80px 0; color: #fff; background: var(--navy); }
.contact-card { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }
.contact-card > div:first-child > p:last-child { color: rgba(255,255,255,.76); }
.contact-info { display: grid; gap: 20px; }
.contact-info div { padding: 18px 22px; border-left: 3px solid var(--gold); background: rgba(255,255,255,.08); }
.contact-info span { display: block; color: rgba(255,255,255,.64); font-size: 13px; letter-spacing: .1em; }
.contact-info strong, .contact-info a { color: #fff; font-size: clamp(20px, 3vw, 30px); font-weight: 800; }
.contact-info a:hover { color: var(--gold); }

footer { position: relative; min-height: 58px; padding: 17px 70px; color: rgba(255,255,255,.67); background: var(--navy-deep); text-align: center; font-size: 12px; }
footer p { margin: 0; }
footer a { position: absolute; right: 24px; top: 12px; width: 34px; height: 34px; border: 1px solid rgba(255,255,255,.5); border-radius: 50%; color: #fff; font-size: 19px; line-height: 31px; }

@media (max-width: 820px) {
  html { scroll-padding-top: 88px; }
  .site-header { height: 70px; }
  .nav-wrap { width: calc(100% - 28px); }
  .brand { width: 120px; }
  .menu-toggle { display: block; cursor: pointer; }
  .menu-toggle.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .menu-toggle.active span:nth-child(2) { opacity: 0; }
  .menu-toggle.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
  .site-nav { position: absolute; top: 88px; left: 0; width: 100%; max-height: 0; padding: 0 24px; overflow: hidden; flex-direction: column; align-items: stretch; gap: 0; background: var(--navy-deep); transition: max-height .3s, padding .3s; }
  .site-nav.open { max-height: 320px; padding: 10px 24px 18px; }
  .site-nav a { padding: 13px 4px; border-bottom: 1px solid rgba(255,255,255,.12); text-align: center; }
  .site-nav a::after { display: none; }
  .hero { display: flex; min-height: 0; flex-direction: column; }
  .hero::after { display: none; }
  .hero > img { position: relative; inset: auto; width: 100%; height: auto; opacity: .38; filter: grayscale(1) contrast(.86); object-fit: contain; object-position: center; }
  .hero-overlay { width: 100%; min-height: 0; padding: 42px max(24px, calc((100% - 720px) / 2)); align-items: center; justify-content: center; background: linear-gradient(135deg, var(--navy-deep), var(--navy)); text-align: center; }
  .section { padding: 72px 0; }
  .section-heading { margin-bottom: 36px; }
  .about-grid, .blog-grid, .contact-card { grid-template-columns: 1fr; }
  .about-grid { gap: 44px; }
  .about-section .container { width: min(100% - 40px, 660px); }
  .certificate-card { width: min(100%, 560px); margin: auto; }
  .project-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .blog-card { padding: 42px 28px; }
  .blog-grid { gap: 28px; }
  .blog-grid > img, .blog-image-link img { min-height: 0; }
  .contact-card { gap: 38px; }
  .lightbox { padding: 70px 56px; }
  .lightbox-stage { width: calc(100vw - 112px); }
  .lightbox-nav { width: 44px; height: 64px; }
  .lightbox-prev { left: 6px; }
  .lightbox-next { right: 6px; }
}

@media (max-width: 540px) {
  .container { width: min(100% - 30px, 1120px); }
  .section { padding: 58px 0; }
  .projects-section { padding-bottom: 24px; }
  .blog-section { padding-top: 0; }
  .hero, .hero-overlay { min-height: 0; }
  .hero-overlay { width: 100%; padding: 34px 20px 38px; }
  .hero-overlay h1 { font-size: 48px; }
  .hero-overlay h2 { font-size: 30px; }
  .hero-description { font-size: 15px; line-height: 1.7; }
  .hero-phone { width: 100%; margin-top: 24px; justify-content: center; }
  .announcement { width: calc(100% - 30px); margin-top: 12px; padding: 7px 12px; font-size: 12px; }
  .announcement { flex-direction: column; gap: 2px; }
  .announcement span { padding: 0; border-left: 0; }
  .service-columns { grid-template-columns: 1fr; gap: 12px; }
  .about-section .container { width: calc(100% - 30px); }
  .about-copy { font-size: 16px; }
  .about-copy .intro-emphasis { font-size: 20px; }
  .about-details p, .about-details li { font-size: 16px; }
  .project-grid { grid-template-columns: 1fr; }
  .project-grid img { aspect-ratio: 16/10; }
  .blog-card { width: 100%; padding: 30px 20px 50px; box-shadow: none; }
  .blog-grid-next { margin-top: 38px; padding-top: 38px; }
  .contact-section { padding: 58px 0; }
  footer { padding: 17px 55px 17px 16px; text-align: left; }
  footer a { right: 14px; }
  .lightbox { padding: 68px 44px; }
  .lightbox-stage { width: calc(100vw - 88px); }
  .lightbox-close { top: 12px; right: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
/* Case pages */
a.project-photo { cursor: pointer; }
a:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }
.case-actions { margin-top: 36px; text-align: center; }
.page-banner { padding: 28px 0 64px; color: #fff; background: var(--navy-deep); }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 40px; font-size: 14px; }
.breadcrumbs a:hover { text-decoration: underline; }
.page-banner h1, .case-detail-heading h1 { margin: 8px 0 16px; font-size: clamp(32px, 5vw, 48px); line-height: 1.3; letter-spacing: .08em; }
.page-banner h1 { color: var(--gold); }
.case-list { background: var(--cream); }
.case-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.case-card { display: flex; flex-direction: column; overflow: hidden; background: #fff; box-shadow: var(--shadow); transition: transform .2s; }
.case-card:hover { transform: translateY(-5px); }
.case-card > img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.case-card-copy { display: flex; flex: 1; flex-direction: column; padding: 24px; }
.case-card .eyebrow, .case-detail-heading .eyebrow { color: #916200; }
.case-card h2 { margin: 4px 0 10px; color: var(--navy); font-size: 24px; }
.case-card p { margin: 0 0 24px; color: var(--muted); }
.case-more { display: flex; justify-content: space-between; margin-top: auto; padding-top: 16px; border-top: 1px solid #e9e5dc; color: var(--navy); font-weight: 700; }
.detail-container { padding-top: 28px; padding-bottom: 72px; }
.case-detail-heading { max-width: 760px; margin: 0 auto 40px; text-align: center; }
.case-detail-heading h1 { color: var(--navy); }
.case-detail-heading > p:last-child { color: var(--muted); }
.case-detail-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.case-detail-photo { margin: 0; padding: 16px; background: var(--cream); }
.case-detail-photo img { width: 100%; height: auto; }
.case-detail-photo figcaption { padding-top: 12px; color: var(--muted); font-size: 14px; text-align: center; }
.case-detail-copy h2 { margin: 0 0 12px; color: var(--navy); font-size: 23px; }
.case-detail-copy p { margin: 0 0 28px; }
.case-detail-copy ol { padding-left: 1.4em; margin-bottom: 24px; }
.case-detail-copy li { margin-bottom: 10px; }
.case-note { padding: 16px 20px; border-left: 3px solid var(--gold); background: var(--cream); font-size: 14px; }
.case-pagination { display: grid; grid-template-columns: 1fr auto 1fr; gap: 20px; margin-top: 56px; padding-top: 24px; border-top: 1px solid #ddd; color: var(--navy); font-weight: 700; }
.case-pagination > :last-child { text-align: right; }
.case-pagination a:hover { text-decoration: underline; }
#case-missing { padding: 40px 0; }
#case-missing a { text-decoration: underline; }
[hidden] { display: none !important; }
@media (max-width: 820px) {
  .site-nav { top: 70px; }
  .site-nav a.active { color: var(--gold); }
  .case-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .case-detail-grid { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 540px) {
  .case-grid { grid-template-columns: 1fr; }
  .page-banner { padding-bottom: 42px; }
  .case-pagination { gap: 12px; font-size: 13px; }
  .case-detail-copy .button { width: 100%; padding: 10px 12px; letter-spacing: 0; }
}

/* Editable content and additional case photographs. */
.case-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 40px;
}
.case-gallery figure { margin: 0; padding: 16px; background: var(--cream); }
.case-gallery img { width: 100%; height: auto; }
.case-gallery figcaption { padding-top: 12px; color: var(--muted); text-align: center; }
.contact-card > div:first-child > div { color: rgba(255, 255, 255, .76); }
.case-detail-copy a:not(.button), .about-copy a:not(.button) { text-decoration: underline; }
.hero-overlay, .about-copy, .case-detail-copy, .blog-copy { overflow-wrap: anywhere; min-width: 0; }
.hero-overlay span[style*="font-size"] { max-width: 100%; }
@media (max-width: 540px) {
  .case-gallery { grid-template-columns: 1fr; }
}

/* Case articles follow the author's image/text block order. */
.case-article { width: min(820px, 100%); margin: 0 auto; color: var(--ink); font-size: 18px; line-height: 1.95; overflow-wrap: anywhere; }
.article-text { margin: 30px 0; }
.article-text:empty { display: none; }
.article-text > :first-child { margin-top: 0; }
.article-text > :last-child { margin-bottom: 0; }
.article-text h2, .article-text h3, .article-text h4 { color: var(--navy); line-height: 1.5; margin-top: 1.6em; }
.article-text a { color: var(--navy); text-decoration: underline; }
.article-photo { margin: 32px 0; }
.article-photo img { width: auto; max-width: 100%; height: auto; margin: 0 auto; }
.article-photo figcaption { margin-top: 12px; color: var(--muted); font-size: 15px; text-align: center; }
.case-article-cta { width: min(820px, 100%); margin: 44px auto 0; padding-top: 28px; border-top: 1px solid #ddd; text-align: center; }
@media (max-width: 540px) {
    .case-article { font-size: 16px; }
    .article-photo { margin: 24px 0; }
}
