:root {
  --ink: #10201d;
  --muted: #51615d;
  --surface: #fffdf7;
  --surface-soft: #f4efe3;
  --line: rgba(16, 32, 29, 0.14);
  --green: #12352f;
  --green-2: #1f6655;
  --teal: #1f8c82;
  --amber: #c98b39;
  --coral: #d86b4b;
  --white: #ffffff;
  --shadow: 0 22px 70px rgba(16, 32, 29, 0.15);
  --radius: 8px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--surface);
  font-family:
    Inter,
    "Noto Sans TC",
    "PingFang TC",
    "Microsoft JhengHei",
    system-ui,
    sans-serif;
  font-size: 16px;
  line-height: 1.65;
}

body.nav-open {
  overflow: hidden;
}

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

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

.skip-link {
  position: fixed;
  left: 16px;
  top: 12px;
  z-index: 30;
  padding: 10px 14px;
  background: var(--white);
  color: var(--green);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transform: translateY(-160%);
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 12px clamp(20px, 5vw, 56px);
  color: var(--white);
  transition:
    background 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.site-header.is-scrolled,
.site-header.menu-open {
  color: var(--ink);
  background: rgba(255, 253, 247, 0.94);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 10px 40px rgba(16, 32, 29, 0.08);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--teal), var(--amber));
  color: var(--white);
  font-size: 1.2rem;
  line-height: 1;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.22);
}

.brand-name,
.brand-line {
  display: block;
  line-height: 1.05;
}

.brand-name {
  font-size: 1.02rem;
}

.brand-line {
  margin-top: 3px;
  font-size: 0.72rem;
  font-weight: 700;
  opacity: 0.74;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.92rem;
}

.site-nav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border-radius: var(--radius);
  transition:
    background 160ms ease,
    color 160ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  background: rgba(255, 255, 255, 0.16);
  outline: none;
}

.site-header.is-scrolled .site-nav a:hover,
.site-header.is-scrolled .site-nav a:focus-visible,
.site-header.menu-open .site-nav a:hover,
.site-header.menu-open .site-nav a:focus-visible {
  background: rgba(31, 102, 85, 0.1);
}

.nav-toggle {
  display: none;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.54);
  border-radius: var(--radius);
  color: inherit;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
  backdrop-filter: blur(12px);
}

.nav-toggle span:not(.sr-only) {
  display: block;
  width: 21px;
  height: 2px;
  margin: 5px auto;
  background: currentColor;
  border-radius: 10px;
  transition:
    transform 180ms ease,
    opacity 180ms ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.site-header.is-scrolled .nav-toggle,
.site-header.menu-open .nav-toggle {
  border-color: rgba(16, 32, 29, 0.22);
  background: rgba(16, 32, 29, 0.06);
}

.hero {
  position: relative;
  min-height: clamp(620px, 88dvh, 820px);
  display: grid;
  align-items: center;
  overflow: hidden;
  color: var(--white);
  background: var(--green);
}

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

.hero-image {
  object-fit: cover;
  object-position: 62% center;
}

.hero-shade {
  background:
    linear-gradient(90deg, rgba(7, 19, 17, 0.88), rgba(7, 19, 17, 0.58) 42%, rgba(7, 19, 17, 0.08) 78%),
    linear-gradient(0deg, rgba(7, 19, 17, 0.22), rgba(7, 19, 17, 0.08));
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(760px, calc(100% - 40px));
  margin-left: clamp(20px, 6vw, 72px);
  padding-top: 72px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 14px;
  color: var(--amber);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 720px;
  margin: 0;
  font-size: clamp(3rem, 8vw, 6.8rem);
  line-height: 0.95;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.hero-copy {
  max-width: 620px;
  margin: 26px 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(1.08rem, 2vw, 1.35rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 36px;
}

.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 900;
  transition:
    transform 160ms ease,
    background 160ms ease,
    color 160ms ease,
    border-color 160ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
  outline: none;
}

.button.primary {
  background: var(--amber);
  color: #1b1308;
}

.button.primary:hover,
.button.primary:focus-visible {
  background: #e0a74f;
}

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

.button.secondary:hover,
.button.secondary:focus-visible {
  border-color: var(--white);
  background: rgba(255, 255, 255, 0.16);
}

.button.dark {
  color: var(--green);
  background: var(--white);
}

.section-panel {
  padding: clamp(72px, 9vw, 120px) 0;
}

.section-panel.alt {
  background:
    linear-gradient(180deg, rgba(244, 239, 227, 0.78), rgba(255, 253, 247, 0.8)),
    var(--surface-soft);
}

.section-inner {
  width: min(var(--max), calc(100% - 40px));
  margin-inline: auto;
}

.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(28px, 6vw, 80px);
  align-items: start;
}

h2,
h3,
p {
  overflow-wrap: anywhere;
}

h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1.08;
}

h3 {
  margin: 0;
  font-size: 1.18rem;
  line-height: 1.25;
}

.intro p,
.section-heading p,
.contact p {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.section-heading {
  max-width: 720px;
  margin-bottom: 44px;
}

.section-heading.compact {
  margin-bottom: 30px;
}

.metrics {
  border-block: 1px solid var(--line);
  background: var(--green);
  color: var(--white);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metric-item {
  min-height: 136px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 26px 24px;
  border-right: 1px solid rgba(255, 255, 255, 0.14);
}

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

.metric-item strong {
  font-size: clamp(1.6rem, 3vw, 2.5rem);
  line-height: 1;
}

.metric-item span {
  color: rgba(255, 255, 255, 0.74);
  font-weight: 700;
}

.service-grid,
.project-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.service-card,
.project-grid article {
  min-height: 260px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 12px 36px rgba(16, 32, 29, 0.06);
}

.service-card {
  display: flex;
  flex-direction: column;
}

.card-index {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  margin-bottom: auto;
  border-radius: var(--radius);
  color: var(--green);
  background: rgba(31, 140, 130, 0.12);
  font-size: 0.82rem;
  font-weight: 900;
}

.service-card h3,
.project-grid h3 {
  margin-top: 24px;
}

.service-card p,
.project-grid p,
.timeline p {
  margin: 12px 0 0;
  color: var(--muted);
}

.process-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.78fr) minmax(0, 1.22fr);
  gap: clamp(32px, 6vw, 88px);
}

.sticky-heading {
  position: sticky;
  top: 112px;
  align-self: start;
  margin-bottom: 0;
}

.timeline {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: steps;
}

.timeline li {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 20px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 247, 0.72);
}

.timeline span {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--green);
  color: var(--white);
  font-weight: 900;
}

.project-grid article {
  min-height: 220px;
  background:
    linear-gradient(180deg, rgba(31, 140, 130, 0.08), rgba(255, 255, 255, 0) 52%),
    var(--white);
}

.contact {
  padding: clamp(72px, 9vw, 118px) 0;
  background: var(--green);
  color: var(--white);
}

.contact-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  align-items: center;
}

.contact p {
  max-width: 680px;
  color: rgba(255, 255, 255, 0.76);
}

.company-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 34px;
  margin: 28px 0 0;
  color: var(--white);
  max-width: 760px;
}

.company-meta div {
  display: grid;
  gap: 2px;
}

.company-meta dt {
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.company-meta dd {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.company-meta a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.site-footer {
  background: #0b211d;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.94rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 0;
}

.footer-inner p {
  margin: 0;
}

.footer-inner a {
  font-weight: 800;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 420ms ease,
    transform 420ms ease;
}

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

@media (max-width: 980px) {
  .site-header {
    min-height: 66px;
    padding-inline: 20px;
  }

  .nav-toggle {
    display: block;
    position: fixed;
    top: 12px;
    right: 20px;
    z-index: 35;
  }

  .site-nav {
    position: fixed;
    inset: 66px 16px auto;
    display: grid;
    gap: 4px;
    padding: 12px;
    color: var(--ink);
    background: rgba(255, 253, 247, 0.98);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transform-origin: top right;
    transform: scale(0.98);
    opacity: 0;
    pointer-events: none;
    transition:
      opacity 160ms ease,
      transform 160ms ease;
  }

  .site-header.menu-open .site-nav {
    transform: scale(1);
    opacity: 1;
    pointer-events: auto;
  }

  .site-nav a {
    width: 100%;
    min-height: 48px;
  }

  .hero {
    min-height: clamp(640px, 84dvh, 820px);
  }

  .hero-image {
    object-position: 66% center;
  }

  .hero-shade {
    background:
      linear-gradient(90deg, rgba(7, 19, 17, 0.92), rgba(7, 19, 17, 0.64) 58%, rgba(7, 19, 17, 0.16)),
      linear-gradient(0deg, rgba(7, 19, 17, 0.22), rgba(7, 19, 17, 0.12));
  }

  .hero-content {
    margin-left: 20px;
    padding-top: 66px;
  }

  .intro-grid,
  .process-layout,
  .contact-box {
    grid-template-columns: 1fr;
  }

  .sticky-heading {
    position: static;
  }

  .service-grid,
  .project-grid,
  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric-item:nth-child(2) {
    border-right: 0;
  }

  .metric-item:nth-child(-n + 2) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  }
}

@media (max-width: 620px) {
  .brand-line {
    display: none;
  }

  .hero {
    min-height: clamp(660px, 82dvh, 820px);
  }

  .hero h1 {
    font-size: clamp(2.4rem, 11.5vw, 3.25rem);
    line-height: 1.02;
  }

  h2 {
    font-size: clamp(1.65rem, 7.2vw, 1.95rem);
    line-height: 1.14;
    max-width: 10.8em;
  }

  .hero-copy {
    font-size: 1.02rem;
  }

  .hero-actions,
  .footer-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .button {
    width: 100%;
  }

  .section-inner {
    width: min(var(--max), calc(100% - 32px));
  }

  .service-grid,
  .project-grid,
  .metric-grid {
    grid-template-columns: 1fr;
  }

  .company-meta {
    grid-template-columns: 1fr;
  }

  .metric-item {
    min-height: 116px;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  }

  .metric-item:last-child {
    border-bottom: 0;
  }

  .service-card,
  .project-grid article {
    min-height: 0;
  }

  .timeline li {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
