:root {
  color-scheme: light;
  font-family: Geist, system-ui, sans-serif;
  background: #faf9f6;
  color: #222a27;
  --ink: #222a27;
  --muted: #4e5953;
  --accent: #285241;
  --line: #cfd5ce;
  --tint: #edf1ec;
  --serif: "Instrument Serif", Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, h4, p { margin: 0; }
a { color: inherit; }
:where(a, [tabindex]):focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
section[id], #demo-title { scroll-margin-top: 24px; }
.wrap { width: min(68rem, calc(100% - 3rem)); margin-inline: auto; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  z-index: 2;
  inset: 12px auto auto 12px;
  padding: 12px 16px;
  background: var(--accent);
  color: white;
  transform: translateY(-180%);
}
.skip-link:focus { transform: translateY(0); }

.header-inner, .site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .4rem 1.5rem;
  padding-block: .8rem;
}
.header-inner { min-block-size: 4.5rem; border-bottom: 1px solid var(--line); }
.wordmark {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: .48rem;
  font-size: 1.48rem;
  font-weight: 700;
  letter-spacing: -.055em;
  line-height: 1.2;
  text-decoration: none;
}
.brand-mark {
  flex: 0 0 auto;
  width: 1rem;
  height: 1rem;
  background: var(--accent);
  clip-path: polygon(50% 3%, 100% 96%, 74% 96%, 50% 52%, 36% 78%, 55% 78%, 65% 96%, 0 96%);
}
.main-nav, .language-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0 clamp(.7rem, 2vw, 1.4rem);
}
.main-nav a, .language-nav a, .back-top {
  display: inline-flex;
  min-block-size: 2.5rem;
  align-items: center;
  color: var(--muted);
  font-size: .88rem;
  text-decoration: none;
}
.language-nav { gap: 0 .75rem; }
.language-nav a { font-size: .79rem; white-space: nowrap; }
.language-nav a[aria-current="page"] { color: var(--accent); font-weight: 700; }
.main-nav a:hover, .language-nav a:hover, .language-nav a[aria-current="page"], .back-top:hover {
  text-decoration: underline;
  text-underline-offset: .25rem;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  align-items: end;
  gap: 2rem clamp(2.2rem, 7vw, 6rem);
  padding-block: clamp(3.6rem, 8.2vw, 7rem);
}
.hero h1 {
  max-inline-size: 10ch;
  font: 400 clamp(3.7rem, 7.2vw, 6.6rem) / .96 var(--serif);
  letter-spacing: -.02em;
  text-wrap: balance;
}
.hero-copy { padding-block-end: .3rem; }
.hero-copy p, .section p { color: var(--muted); line-height: 1.64; }
.hero-copy p { max-inline-size: 38ch; font-size: clamp(1rem, 1.7vw, 1.14rem); text-wrap: pretty; }
.button {
  display: inline-flex;
  align-items: center;
  min-block-size: 2.8rem;
  margin-top: 1.35rem;
  padding: .53rem 1rem;
  border: 1px solid var(--accent);
  border-radius: 3px;
  background: var(--accent);
  color: white;
  font-size: .92rem;
  font-weight: 600;
  text-decoration: none;
}
.button:hover { background: #183b2d; }

.section {
  display: grid;
  grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr);
  align-items: start;
  gap: 1.5rem clamp(2rem, 7vw, 6rem);
  border-top: 1px solid var(--line);
  padding-block: clamp(2.2rem, 5.5vw, 4.4rem);
}
.section > h2 { font: 400 clamp(2.65rem, 4.8vw, 4.25rem) / 1 var(--serif); text-wrap: balance; }
.section h3 { font-size: 1.12rem; line-height: 1.35; font-weight: 650; }
.service + .service, .case + .case { border-top: 1px solid var(--line); margin-top: 1.2rem; padding-top: 1.2rem; }
.service, .case { min-inline-size: 0; }
.service {
  display: grid;
  grid-template-columns: minmax(0, .62fr) minmax(0, 1fr);
  gap: .35rem 1.25rem;
}
.service p, .case p, .contact p { font-size: .98rem; }
.case h3 + p { margin-top: .4rem; }

.demo {
  position: relative;
  min-inline-size: 0;
  margin: 1.25rem 0 0;
  padding: 0 1rem 1rem;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--tint);
}
.demo legend { padding-inline: .35rem; font-size: .85rem; font-weight: 650; }
.demo-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .5rem;
  border-bottom: 1px solid var(--line);
}
.demo-steps label {
  display: flex;
  align-items: center;
  min-block-size: 2.75rem;
  padding-inline: .25rem;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 600;
  line-height: 1.3;
  cursor: pointer;
}
.demo-steps label:hover { color: var(--accent); text-decoration: underline; }
#step-intake:checked ~ .demo-steps [for="step-intake"],
#step-review:checked ~ .demo-steps [for="step-review"],
#step-followup:checked ~ .demo-steps [for="step-followup"] { border-color: var(--accent); color: var(--accent); }
#step-intake:focus-visible ~ .demo-steps [for="step-intake"],
#step-review:focus-visible ~ .demo-steps [for="step-review"],
#step-followup:focus-visible ~ .demo-steps [for="step-followup"] { outline: 2px solid var(--accent); outline-offset: 2px; }
.demo-panels { display: grid; padding-top: .85rem; }
.demo-panel { grid-area: 1 / 1; min-inline-size: 0; visibility: hidden; }
.demo-panel h4 { font-size: .96rem; line-height: 1.35; }
.demo-panel h4 + p { margin-top: .28rem; font-size: .9rem; }
#step-intake:checked ~ .demo-panels #panel-intake,
#step-review:checked ~ .demo-panels #panel-review,
#step-followup:checked ~ .demo-panels #panel-followup { visibility: visible; }

.contact { align-items: center; }
.email-link {
  display: inline-flex;
  align-items: center;
  min-block-size: 2.75rem;
  margin-top: .35rem;
  color: var(--accent);
  font-size: 1.12rem;
  font-weight: 650;
  text-underline-offset: .2rem;
  overflow-wrap: anywhere;
}
.email-link:hover { text-decoration-thickness: 2px; }
.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: .88rem; }
.footer-wordmark { font-size: 1.18rem; color: var(--ink); }
.footer-wordmark .brand-mark { width: .8rem; height: .8rem; }

:lang(zh-Hans) { font-family: Geist, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif; }
:lang(zh-Hant) { font-family: Geist, "PingFang TC", "Microsoft JhengHei", "Noto Sans CJK TC", system-ui, sans-serif; }
html:lang(zh) .hero h1 {
  max-inline-size: 9em;
  font: 650 clamp(2.5rem, 5.2vw, 4.6rem) / 1.18 system-ui, sans-serif;
  font-family: inherit;
  letter-spacing: normal;
}
html:lang(zh) .section > h2 { font: 650 clamp(1.75rem, 3.5vw, 2.75rem) / 1.2 system-ui, sans-serif; font-family: inherit; }

@media (max-width: 48rem) {
  .hero, .section { grid-template-columns: minmax(0, 1fr); }
  .hero h1 { font-size: clamp(3.35rem, 10.5vw, 5.2rem); }
  .hero { gap: 1.15rem; }
  .section { gap: 1.1rem; }
}
@media (max-width: 32rem) {
  .wrap { width: calc(100% - 2rem); }
  .header-inner { column-gap: .9rem; }
  .language-nav { flex-basis: 100%; }
  .service { grid-template-columns: minmax(0, 1fr); }
}
@media (pointer: coarse) {
  :where(.main-nav a, .language-nav a, .back-top) { min-inline-size: 44px; }
  .main-nav a, .language-nav a, .back-top { min-block-size: 44px; }
}
@media (forced-colors: active) {
  #step-intake:checked ~ .demo-steps [for="step-intake"],
  #step-review:checked ~ .demo-steps [for="step-review"],
  #step-followup:checked ~ .demo-steps [for="step-followup"] { border-color: Highlight; }
}
