:root {
  color-scheme: light;
  --paper: #f7f8f5;
  --white: #ffffff;
  --tint: #edf2f0;
  --ink: #1f3032;
  --muted: #5e7070;
  --teal: #396d70;
  --teal-dark: #244d50;
  --line: #d5dfdb;
  --sans: -apple-system, BlinkMacSystemFont, "Avenir Next", "PingFang TC", "Microsoft JhengHei", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 1rem; line-height: 1.7; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; }
::selection { color: white; background: var(--teal-dark); }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 4px; }
.shell { width: min(100% - 2.5rem, 80rem); margin-inline: auto; }
.skip-link { position: absolute; left: 1rem; top: -5rem; z-index: 20; padding: .6rem 1rem; background: var(--ink); color: white; }
.skip-link:focus { top: 1rem; }
.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: sticky; top: 0; z-index: 10; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.97); }
.header-inner { position: relative; display: flex; align-items: flex-start; flex-direction: column; gap: .15rem; padding-block: .7rem .4rem; }
.brand { display: inline-flex; align-items: center; min-height: 3.3rem; padding-right: 6.3rem; text-decoration: none; }
.brand-wide { display: none; width: 18rem; height: auto; }
.brand-compact { display: flex; align-items: center; gap: .55rem; }
.brand-compact img { width: 2.8rem; height: 2.6rem; object-fit: contain; }
.brand-compact-text { display: flex; flex-direction: column; line-height: 1.3; }
.brand-compact-text strong { font-size: .98rem; font-weight: 700; letter-spacing: .06em; }
.brand-compact-text small { margin-top: .18rem; color: var(--muted); font-size: .62rem; }
.header-actions { width: 100%; display: flex; flex-direction: column; }
.site-nav { width: 100%; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: center; }
.site-nav a { min-height: 2.6rem; display: inline-flex; align-items: center; justify-content: center; padding: .1rem; font-size: .76rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.site-nav a:hover, .site-nav a:focus-visible { color: var(--teal); }
.language-switch { position: absolute; right: 0; top: .65rem; display: inline-flex; align-items: center; }
.language-switch button { min-width: 2.5rem; min-height: 2.6rem; border: 0; background: none; color: var(--teal-dark); cursor: pointer; font-size: .78rem; font-weight: 700; }
.language-switch button:hover { color: var(--ink); }

.hero { scroll-margin-top: 7rem; border-bottom: 1px solid var(--line); background: var(--white); }
.hero-main { display: grid; gap: 2rem; padding-block: 4.1rem 3.4rem; }
.hero-content { max-width: 48rem; }
.eyebrow { display: flex; align-items: center; gap: .8rem; margin: 0 0 1.35rem; color: var(--teal); font-size: .78rem; font-weight: 700; letter-spacing: .14em; }
.eyebrow-line { width: 1.6rem; height: 1px; background: var(--teal); }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-weight: 650; }
.hero-description { max-width: 47rem; margin-bottom: 0; color: var(--ink); font-size: clamp(1.16rem, 2.1vw, 1.48rem); font-weight: 500; line-height: 1.75; }
.hero-links { display: flex; align-items: center; flex-wrap: wrap; gap: 1rem 1.6rem; }
.primary-link { display: inline-flex; align-items: center; justify-content: space-between; gap: 2rem; min-height: 3.2rem; padding: .7rem 1.15rem; background: var(--teal-dark); color: white; font-size: .84rem; font-weight: 700; text-decoration: none; transition: background .2s ease; }
.primary-link:hover { background: var(--teal); }
.primary-link span:last-child { font-size: 1rem; font-weight: 400; }
.secondary-link { color: var(--teal-dark); font-size: .84rem; font-weight: 700; text-decoration-thickness: 1px; text-underline-offset: .3rem; }
.secondary-link:hover { color: var(--teal); }
.hero-facts { display: grid; grid-template-columns: 1fr; border-top: 1px solid var(--line); }
.hero-facts > div { display: flex; flex-direction: column; gap: .15rem; padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
.hero-facts > div:last-child { border-bottom: 0; }
.hero-facts strong { font-size: 1.05rem; font-weight: 700; letter-spacing: -.025em; }
.hero-facts > div:first-child strong { color: var(--teal-dark); font-size: 1.65rem; line-height: 1.2; font-variant-numeric: tabular-nums; }
.hero-facts span { color: var(--muted); font-size: .76rem; }

.section { padding-block: 4.5rem; scroll-margin-top: 7rem; }
.section-label { display: flex; align-items: center; gap: .8rem; padding-bottom: .8rem; border-bottom: 1px solid var(--line); color: var(--teal); font-size: .74rem; font-weight: 700; letter-spacing: .1em; }
.section-label span:first-child { color: var(--muted); font-variant-numeric: tabular-nums; }
.section-body { padding-top: 2rem; }
h2 { margin-bottom: 1.15rem; font-size: clamp(2rem, 4.1vw, 3.35rem); line-height: 1.28; letter-spacing: -.05em; }
.about-copy { max-width: 38rem; color: #45595a; line-height: 1.85; }
.about-copy p { margin-bottom: 1.1rem; }
.about-copy p:last-child { margin-bottom: 0; }
.section-tint { background: var(--tint); }
.section-heading-row { display: flex; flex-direction: column; gap: .2rem; margin-bottom: 1.8rem; }
.section-heading-row h2 { margin-bottom: .4rem; }
.section-heading-row > p { max-width: 26rem; margin-bottom: 0; color: var(--muted); font-size: .9rem; }
.service-grid { display: grid; grid-template-columns: 1fr; border-top: 1px solid var(--line); }
.service-item { min-height: 10rem; padding: 1.3rem 0 1.6rem; border-bottom: 1px solid var(--line); }
.service-number { color: var(--teal); font-size: .73rem; font-weight: 700; letter-spacing: .1em; }
.service-item h3 { margin: .8rem 0 .3rem; font-size: 1.3rem; line-height: 1.35; }
.service-item p { max-width: 21rem; margin-bottom: 0; color: #526566; font-size: .88rem; line-height: 1.75; }
.projects-heading { margin-bottom: 1.5rem; }
.project-list { margin: 0; padding: 0; border-top: 1px solid var(--ink); list-style: none; }
.project-row { display: grid; grid-template-columns: 1fr; gap: .25rem; padding: 1.35rem 0; border-bottom: 1px solid var(--line); }
.project-year { color: var(--teal-dark); font-size: .83rem; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.project-detail h3 { margin: .1rem 0 .2rem; font-size: 1.12rem; line-height: 1.5; }
.project-detail p { margin: 0; color: var(--muted); font-size: .86rem; }
.project-detail .project-contract { margin-top: .35rem; color: var(--teal-dark); font-size: .79rem; font-variant-numeric: tabular-nums; }
.project-client { margin-top: .3rem; color: var(--muted); font-size: .82rem; }

.systems { background: #213e40; color: #f5f7f4; }
.systems .section-label { border-color: #547174; color: #c4ddd9; }
.systems .section-label span:first-child { color: #acc3be; }
.systems-heading { display: flex; flex-direction: column; gap: .4rem; margin-bottom: 2rem; }
.systems-heading h2 { margin-bottom: 0; }
.systems-heading p { max-width: 33rem; margin-bottom: 0; color: #cbdad6; font-size: .94rem; line-height: 1.8; }
.systems-grid { border-top: 1px solid #587376; }
.system-card { border-bottom: 1px solid #587376; }
.system-card-summary { display: grid; grid-template-columns: 2.5rem minmax(0, 1fr) auto; gap: .4rem 1rem; align-items: center; min-height: 5.2rem; padding: 1.05rem .3rem; cursor: pointer; list-style: none; }
.system-card-summary::-webkit-details-marker { display: none; }
.system-card-summary:hover .system-title, .system-card[open] .system-title { color: #b8d6d1; }
.system-number { color: #a6c5bf; font-size: .76rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.system-title { grid-column: 2; grid-row: 1; font-size: 1.18rem; font-weight: 650; line-height: 1.4; transition: color .2s ease; }
.system-category { grid-column: 2; grid-row: 2; color: #a9c6c1; font-size: .69rem; font-weight: 700; letter-spacing: .1em; }
.system-toggle { grid-column: 3; grid-row: 1 / span 2; justify-self: end; min-width: 3.7rem; padding: .34rem .5rem; border: 1px solid #789795; color: #d6e7e3; font-size: .72rem; font-weight: 700; line-height: 1.35; letter-spacing: .04em; text-align: center; white-space: nowrap; }
.system-card-summary:hover .system-toggle, .system-card[open] .system-toggle { border-color: #b8d6d1; background: #315558; }
.toggle-collapse, .system-card[open] .toggle-expand { display: none; }
.system-card[open] .toggle-collapse { display: inline; }
.system-description { max-width: 58rem; padding: 0 2rem 1.7rem 3.8rem; }
.system-description p { margin: 0; color: #d2dfdc; font-size: .92rem; line-height: 1.9; overflow-wrap: anywhere; }

.site-footer { background: #172d2f; color: #eff3f0; }
.footer-inner { display: flex; flex-direction: column; gap: 2rem; padding-block: 2.2rem; }
.footer-brand { display: flex; align-items: center; gap: .7rem; }
.footer-brand img { width: 2.75rem; height: 2.5rem; object-fit: contain; }
.footer-brand div { display: flex; flex-direction: column; line-height: 1.35; }
.footer-brand strong { font-size: .96rem; font-weight: 700; letter-spacing: .03em; }
.footer-brand span { color: #b4c6c1; font-size: .72rem; }
.footer-meta { display: flex; flex-direction: column; gap: .25rem; color: #b4c6c1; font-size: .73rem; }

html[lang="en"] .system-title { font-size: 1.18rem; }

@media (min-width: 48rem) {
  .shell { width: min(100% - 4.5rem, 80rem); }
  .hero-main { grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 3rem; padding-block: 5rem 4rem; }
  .hero-links { flex-direction: column; align-items: flex-start; min-width: 12rem; }
  .hero-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero-facts > div { min-height: 6.7rem; justify-content: center; padding: 1rem 1.5rem; border-bottom: 0; border-right: 1px solid var(--line); }
  .hero-facts > div:first-child { padding-left: 0; }
  .hero-facts > div:last-child { border-right: 0; }
  .section { padding-block: 6rem; }
  .about-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
  .section-heading-row { flex-direction: row; align-items: end; justify-content: space-between; gap: 2rem; }
  .section-heading-row h2 { margin-bottom: 0; }
  .section-heading-row > p { text-align: right; }
  .service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .service-item { padding-inline: 1.5rem; }
  .service-item:nth-child(odd) { padding-left: 0; border-right: 1px solid var(--line); }
  .project-row { grid-template-columns: 8.5rem minmax(0, 1fr) 9rem; align-items: start; gap: 1rem; }
  .project-detail h3 { margin-top: 0; }
  .project-client { margin-top: .18rem; text-align: right; }
  .systems-heading { flex-direction: row; align-items: end; justify-content: space-between; gap: 2rem; }
  .systems-heading p { max-width: 22rem; text-align: right; }
  .system-card-summary { grid-template-columns: 3.5rem minmax(0, 1fr) 11rem auto; gap: 1rem; }
  .system-title { grid-column: 2; grid-row: 1; font-size: 1.36rem; }
  .system-category { grid-column: 3; grid-row: 1; text-align: right; }
  .system-toggle { grid-column: 4; grid-row: 1; }
  .system-description { padding-left: 4.8rem; }
  .footer-inner { flex-direction: row; align-items: end; justify-content: space-between; }
  .footer-meta { align-items: end; text-align: right; }
}

@media (min-width: 64rem) {
  .shell { width: min(100% - 6rem, 80rem); }
  .header-inner { flex-direction: row; align-items: center; justify-content: space-between; gap: 1.5rem; padding-block: .9rem; }
  .brand { padding-right: 0; }
  .brand-wide { display: block; }
  .brand-compact { display: none; }
  .header-actions { width: auto; flex-direction: row; align-items: center; gap: 1rem; }
  .site-nav { width: auto; display: flex; gap: .2rem; }
  .site-nav a { padding-inline: .6rem; font-size: .81rem; }
  .language-switch { position: static; }
  .service-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .service-item { min-height: 12.5rem; padding: 1.4rem 1.2rem; border-right: 1px solid var(--line); }
  .service-item:nth-child(odd) { padding-left: 1.2rem; }
  .service-item:first-child { padding-left: 0; }
  .service-item:last-child { padding-right: 0; border-right: 0; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition-duration: .01ms !important; } }
