:root {
  --charcoal: #17201f;
  --ink: #273230;
  --muted: #6b7471;
  --line: #dfe4df;
  --paper: #f7f5ef;
  --white: #ffffff;
  --sage: #60776d;
  --teal: #1f7a72;
  --amber: #d7a23f;
  --clay: #b76246;
  --shadow: 0 18px 48px rgba(23, 32, 31, 0.13);
  --radius: 8px;
  --section: clamp(72px, 9vw, 118px);
  --content: min(1460px, calc(100% - 36px));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", Arial, sans-serif;
  line-height: 1.6;
}

body.modal-open {
  overflow: hidden;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 14px clamp(18px, 4vw, 56px);
  color: var(--white);
  background: rgba(23, 32, 31, 0.72);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  transition: background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

.site-header.scrolled {
  color: var(--ink);
  background: rgba(247, 245, 239, 0.94);
  box-shadow: 0 8px 30px rgba(23, 32, 31, 0.08);
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 222px;
}

.brand-logo {
  display: block;
  width: 205px;
  height: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 28px);
  font-size: 0.94rem;
  font-weight: 700;
}

.site-nav a {
  position: relative;
  padding: 8px 0;
}

.site-nav a::after {
  position: absolute;
  left: 0;
  bottom: 2px;
  width: 0;
  height: 2px;
  content: "";
  background: var(--amber);
  transition: width 0.2s ease;
}

.site-nav a:hover::after,
.site-nav a.active::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid currentColor;
  border-radius: 50%;
  color: inherit;
  background: transparent;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 5px auto;
  background: currentColor;
}

.hero {
  position: relative;
  display: grid;
  align-items: center;
  min-height: calc(88svh - 72px);
  overflow: hidden;
  color: var(--white);
}

.hero img,
.hero-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero img {
  object-fit: cover;
  object-position: center;
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(12, 18, 17, 0.87) 0%, rgba(12, 18, 17, 0.58) 42%, rgba(12, 18, 17, 0.06) 100%),
    linear-gradient(0deg, rgba(12, 18, 17, 0.36), rgba(12, 18, 17, 0.08));
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(760px, calc(100% - 36px));
  margin-left: clamp(18px, 7vw, 92px);
  padding: clamp(56px, 7vw, 108px) 0;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--clay);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: var(--amber);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 780px;
  margin-bottom: 22px;
  font-size: clamp(2.35rem, 4.8vw, 4.4rem);
  line-height: 1.08;
  letter-spacing: 0;
}

.nowrap {
  white-space: nowrap;
}

.desktop-line {
  display: block;
  white-space: nowrap;
}

.mobile-block {
  display: inline;
}

h2 {
  color: var(--charcoal);
  font-size: clamp(1.85rem, 3.5vw, 3.1rem);
  line-height: 1.18;
  letter-spacing: 0;
}

h3 {
  color: var(--charcoal);
  font-size: 1.1rem;
  line-height: 1.35;
}

.hero-copy {
  max-width: 640px;
  margin-bottom: 30px;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
}

.hero-actions,
.center-action {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 13px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.button-primary {
  color: #111a18;
  background: var(--amber);
  border-color: var(--amber);
}

.button-secondary {
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.45);
}

.button-outline {
  color: var(--teal);
  background: var(--white);
  border-color: rgba(31, 122, 114, 0.24);
}

.section {
  padding: var(--section) 0;
}

.section-inner {
  width: var(--content);
  margin: 0 auto;
}

.section-heading {
  max-width: 980px;
  margin-bottom: clamp(30px, 5vw, 52px);
}

.section-heading p:not(.eyebrow) {
  color: var(--muted);
  font-size: 1.08rem;
}

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 700ms ease,
    transform 700ms ease;
  transition-delay: var(--reveal-delay, 0ms);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.trust {
  position: relative;
  display: grid;
  align-items: center;
  min-height: calc(88svh - 72px);
  overflow: hidden;
  color: var(--white);
  background: var(--charcoal);
  isolation: isolate;
}

.trust-album,
.trust-overlay {
  position: absolute;
  inset: 0;
}

.trust-album {
  z-index: 0;
  background: url("assets/trust-album/trust-01.jpg") center / cover no-repeat;
}

.trust-album img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  animation: trustAlbum 30s infinite;
}

.trust-album img:nth-child(2) {
  animation-delay: 6s;
}

.trust-album img:nth-child(3) {
  animation-delay: 12s;
}

.trust-album img:nth-child(4) {
  animation-delay: 18s;
}

.trust-album img:nth-child(5) {
  animation-delay: 24s;
}

.trust-overlay {
  z-index: 1;
  background: rgba(0, 0, 0, 0.2);
}

.trust .section-inner {
  position: relative;
  z-index: 2;
}

@keyframes trustAlbum {
  0% {
    opacity: 0;
  }

  4%,
  20% {
    opacity: 1;
  }

  24%,
  100% {
    opacity: 0;
  }
}

.trust .section-heading {
  max-width: none;
}

#trust-title {
  max-width: 1120px;
  color: var(--white);
  text-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(12px);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.18);
}

.trust-item {
  min-height: 260px;
  padding: 26px 22px;
  border-right: 1px solid rgba(23, 32, 31, 0.12);
}

.trust-item:last-child {
  border-right: 0;
}

.icon-badge {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 18px;
  background: #eef4ef;
  border-radius: 50%;
  font-size: 1.35rem;
}

.trust-item p,
.service-card p,
.timeline p,
figure blockquote,
.about-copy {
  color: var(--muted);
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(240px, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(36px, 7vw, 90px);
  align-items: start;
}

.about {
  position: relative;
  min-height: clamp(720px, 78vw, 960px);
  display: grid;
  align-items: center;
  color: var(--white);
  background:
    linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)),
    var(--about-bg, url("assets/about-background.jpg")) center / cover no-repeat;
}

.about h2,
.about h3 {
  color: var(--white);
}

.about .eyebrow {
  color: var(--amber);
}

.about-copy p {
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.05rem;
}

.services {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, #ffffff, #eef3ef);
}

.services h2 {
  color: var(--charcoal);
}

.services .section-heading {
  max-width: 900px;
}

.services .section-heading p:not(.eyebrow),
.services .service-card p {
  color: var(--muted);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
}

.service-card {
  position: relative;
  min-height: 320px;
  padding: clamp(24px, 2.4vw, 34px);
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 18px 46px rgba(23, 32, 31, 0.08);
}

.service-card::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 5px;
  content: "";
  background: linear-gradient(90deg, var(--teal), var(--amber));
}

.service-card h3 {
  color: var(--charcoal);
  font-size: clamp(1.2rem, 1.3vw, 1.5rem);
}

.service-card span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 68px;
  height: 68px;
  margin-bottom: 28px;
  background: #eef4ef;
  border-radius: 50%;
  font-size: 2.35rem;
  line-height: 1;
}

.process {
  display: grid;
  align-items: center;
  min-height: clamp(560px, 58vw, 760px);
  background: var(--white);
}

.timeline {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  padding: 18px 0 0;
  margin: 0;
  list-style: none;
  --node-size: 72px;
}

.timeline::before {
  position: absolute;
  top: calc(var(--node-size) / 2 + 8px);
  right: calc(100% / 10);
  left: calc(100% / 10);
  height: 3px;
  content: "";
  background: linear-gradient(90deg, var(--teal), var(--amber));
  border-radius: 999px;
}

.timeline li {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: start;
  min-height: 0;
  padding: 0 18px;
  text-align: center;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.timeline span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
  width: var(--node-size);
  height: var(--node-size);
  margin-bottom: 22px;
  color: var(--white);
  background: var(--teal);
  border: 5px solid var(--white);
  border-radius: 50%;
  box-shadow: 0 12px 28px rgba(23, 32, 31, 0.16);
  font-weight: 900;
}

.timeline h3 {
  margin-bottom: 12px;
  font-size: 1.18rem;
}

.timeline p {
  max-width: 230px;
  margin-bottom: 0;
  font-size: 1rem;
}

.projects {
  display: grid;
  align-items: center;
  min-height: auto;
  background:
    linear-gradient(180deg, var(--paper), #f0f3f0);
}

.portfolio-entry-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 56px);
}

.portfolio-entry {
  display: block;
  width: 100%;
  overflow: hidden;
  padding: 0;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 18px 44px rgba(23, 32, 31, 0.11);
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.portfolio-entry:hover,
.portfolio-entry:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 24px 60px rgba(23, 32, 31, 0.16);
}

.portfolio-entry img {
  display: block;
  width: 100%;
  height: min(60vw, 680px);
  object-fit: cover;
  background: #f3f2ed;
}

.portfolio-entry span {
  display: block;
  padding: 24px 28px 28px;
  font-size: clamp(1.55rem, 2.4vw, 2.4rem);
  font-weight: 900;
  text-align: center;
}

.gallery-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: clamp(14px, 3vw, 42px);
  background: rgba(10, 15, 14, 0.76);
  backdrop-filter: blur(10px);
}

.gallery-modal[hidden] {
  display: none;
}

.gallery-modal-panel {
  position: relative;
  width: min(1720px, 100%);
  max-height: min(92svh, 1120px);
  overflow: auto;
  padding: clamp(22px, 3vw, 44px);
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.32);
}

.gallery-close {
  position: sticky;
  top: 0;
  z-index: 2;
  float: right;
  width: 46px;
  height: 46px;
  padding: 0;
  color: var(--white);
  background: var(--deep);
  border: 0;
  border-radius: 50%;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

.gallery-modal-heading {
  max-width: 860px;
  margin-bottom: clamp(22px, 3vw, 36px);
}

.gallery-modal-heading h2 {
  margin: 0 0 10px;
  font-size: clamp(2rem, 4vw, 4.3rem);
}

.gallery-modal-heading p {
  margin: 0;
  color: var(--muted);
}

.gallery-modal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 28px);
}

.gallery-modal-grid img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: #f3f2ed;
  border-radius: var(--radius);
}

.testimonials {
  background: var(--white);
  overflow: hidden;
}

.testimonial-marquee {
  position: relative;
  width: 100vw;
  margin-top: 10px;
  margin-left: calc(50% - 50vw);
  overflow: hidden;
}

.testimonial-marquee::before,
.testimonial-marquee::after {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 2;
  width: min(120px, 12vw);
  content: "";
  pointer-events: none;
}

.testimonial-marquee::before {
  left: 0;
  background: linear-gradient(90deg, var(--white), rgba(255, 255, 255, 0));
}

.testimonial-marquee::after {
  right: 0;
  background: linear-gradient(270deg, var(--white), rgba(255, 255, 255, 0));
}

.testimonial-track {
  display: flex;
  width: max-content;
  animation: testimonial-marquee 42s linear infinite;
}

figure {
  flex: 0 0 clamp(320px, 28vw, 430px);
  min-height: 230px;
  padding: 18px 34px;
  margin: 0;
  background: transparent;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
}

.stars {
  margin-bottom: 18px;
  color: var(--amber);
  font-size: 1.05rem;
}

blockquote {
  margin: 0 0 22px;
  font-size: 1.05rem;
}

figcaption {
  color: var(--charcoal);
  font-weight: 900;
}

@keyframes testimonial-marquee {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

.contact {
  color: var(--white);
  background:
    linear-gradient(135deg, rgba(23, 32, 31, 0.95), rgba(31, 122, 114, 0.86)),
    var(--charcoal);
}

.contact h2,
.contact h3 {
  color: var(--white);
}

.contact h2 {
  font-size: clamp(2rem, 3vw, 2.7rem);
}

.contact p {
  color: rgba(255, 255, 255, 0.78);
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1.05fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}

.contact-list {
  display: grid;
  gap: 12px;
  margin: 32px 0 18px;
}

.contact-list a,
.contact-list div {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 2px 14px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: var(--radius);
}

.contact-list a > span:first-child,
.contact-list div > span:first-child {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  background: rgba(255, 255, 255, 0.11);
  border-radius: 50%;
}

.contact-list strong {
  color: var(--white);
}

.address-lines {
  display: grid;
  grid-column: 2;
  gap: 4px;
  line-height: 1.5;
}

.address-lines small {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.92rem;
  line-height: 1.45;
}

.map-placeholder {
  overflow: hidden;
  min-height: 190px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
}

.map-placeholder iframe {
  display: block;
  width: 100%;
  height: 260px;
  border: 0;
}

.contact-form {
  display: grid;
  gap: 16px;
  padding: clamp(20px, 4vw, 34px);
  color: var(--ink);
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.contact-form label,
.contact-form legend {
  color: var(--charcoal);
  font-weight: 900;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  margin-top: 7px;
  padding: 13px 14px;
  color: var(--ink);
  background: #fbfbf8;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  outline: none;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(31, 122, 114, 0.14);
}

.contact-form fieldset {
  padding: 0;
  margin: 0;
  border: 0;
}

.radio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 10px;
}

.radio-grid label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 9px 11px;
  background: #fbfbf8;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-weight: 700;
}

.radio-grid input {
  width: auto;
  margin: 0;
  accent-color: var(--teal);
}

.form-note {
  min-height: 24px;
  margin: 0;
  color: var(--teal);
  font-weight: 800;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 26px clamp(18px, 4vw, 56px);
  color: rgba(255, 255, 255, 0.72);
  background: #101615;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: var(--amber);
  font-weight: 800;
}

@media (max-width: 1020px) {
  .trust-grid,
  .services-grid,
  .timeline,
  .gallery-modal-grid,
  .testimonial-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .trust-item {
    min-height: 220px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .split-layout,
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .timeline {
    grid-template-columns: 1fr;
    gap: 0;
    padding-top: 0;
  }

  .timeline::before {
    top: 6px;
    bottom: 6px;
    left: calc(var(--node-size) / 2);
    width: 3px;
    height: auto;
    background: linear-gradient(180deg, var(--teal), var(--amber));
  }

  .timeline li:nth-child(n) {
    grid-column: auto;
    grid-row: auto;
    grid-template-columns: var(--node-size) 1fr;
    justify-items: start;
    column-gap: 18px;
    padding: 0 0 38px;
    text-align: left;
  }

  .timeline li:last-child {
    padding-bottom: 0;
  }

  .timeline span {
    grid-row: 1 / span 3;
    margin-bottom: 0;
  }

  .timeline p {
    max-width: 100%;
  }
}

@media (max-width: 760px) {
  .site-header {
    min-height: 68px;
    padding: 12px 18px;
  }

  .brand {
    min-width: 0;
  }

  .brand-logo {
    width: 168px;
  }

  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: fixed;
    top: 68px;
    right: 12px;
    left: 12px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px;
    color: var(--ink);
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
  }

  .site-nav.open {
    display: flex;
  }

  .site-nav a {
    padding: 14px;
  }

  .hero {
    min-height: calc(86svh - 68px);
  }

  .hero-overlay {
    background:
      linear-gradient(90deg, rgba(12, 18, 17, 0.9) 0%, rgba(12, 18, 17, 0.64) 68%, rgba(12, 18, 17, 0.18) 100%),
      linear-gradient(0deg, rgba(12, 18, 17, 0.52), rgba(12, 18, 17, 0.06));
  }

  .hero-content {
    width: min(100% - 32px, 640px);
    margin: 0 auto;
    padding: 48px 0;
  }

  .button {
    width: 100%;
  }

  .trust-grid,
  .timeline,
  .testimonial-grid,
  .radio-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .services-grid,
  .portfolio-entry-grid,
  .gallery-modal-grid {
    grid-template-columns: 1fr;
  }

  .trust-item,
  .service-card,
  .timeline li,
  figure {
    min-height: auto;
  }

  .site-footer {
    display: block;
  }

  .site-footer a {
    display: inline-block;
    margin-top: 10px;
  }
}

@media (max-width: 430px) {
  h1 {
    font-size: 2.15rem;
  }

  .desktop-line {
    white-space: normal;
  }

  .mobile-block {
    display: block;
  }

  .hero-actions {
    gap: 10px;
  }

  .filter-button {
    flex: 1 1 calc(50% - 8px);
  }

}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .trust-album img {
    animation: none;
  }

  .trust-album img:first-child {
    opacity: 1;
  }
}
