:root {
  --ink: #121614;
  --ink-2: #1b2420;
  --paper: #f4efe6;
  --paper-2: #fffdf8;
  --line: rgba(247, 243, 234, 0.14);
  --line-strong: rgba(247, 243, 234, 0.32);
  --ivory: #f7f3ea;
  --muted: #d4cec2;
  --gold: #e4c27a;
  --gold-deep: #6d4d12;
  --ink-text: #1c2420;
  --muted-ink: #4e5852;
  --danger: #8d342c;
  --header: 4.5rem;
  --sans: "Microsoft JhengHei", "PingFang TC", "Noto Sans TC", "Segoe UI", sans-serif;
  --display: "Segoe UI", "PingFang TC", "Microsoft JhengHei", sans-serif;
}

html[lang="zh-Hans"] {
  --sans: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", "Segoe UI", sans-serif;
  --display: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

html[lang="en"] {
  --sans: "Segoe UI", "Helvetica Neue", "PingFang TC", sans-serif;
  --display: "Segoe UI", "Helvetica Neue", sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; overflow-x: clip; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.75;
  background: var(--ink);
  color: var(--ivory);
  -webkit-font-smoothing: antialiased;
}

main { flex: 1; outline: none; }
img, svg { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4, p, ul, ol, dl, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
h2 { font-size: clamp(1.7rem, 3vw, 2.45rem); line-height: 1.35; font-weight: 700; text-wrap: balance; }
h3 { font-size: 1.15rem; line-height: 1.45; font-weight: 700; }
p + p { margin-top: 0.85rem; }

::selection { background: var(--gold); color: #1b140b; }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.band-paper :focus-visible { outline-color: var(--gold-deep); }

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 80;
  background: var(--gold);
  color: #1b140b;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  text-decoration: none;
}

.skip:focus { top: 1rem; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.container {
  width: min(1120px, calc(100% - 3rem));
  margin-inline: auto;
}

.kicker {
  margin-bottom: 0.75rem;
  color: var(--gold);
  font-family: var(--display);
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.kicker span { letter-spacing: 0.16em; }

.lead {
  max-width: 40rem;
  margin-top: 1rem;
  color: var(--muted);
  font-size: 1.125rem;
  line-height: 1.85;
}

.quiet { color: var(--muted); line-height: 1.8; }
.fine { margin-top: 0.9rem; color: var(--muted); font-size: 0.92rem; }

.band-paper {
  background: var(--paper);
  color: var(--ink-text);
}

.band-paper .kicker,
.band-paper .idx,
.band-paper .role,
.band-paper .year,
.outcome strong,
.case-cols h3,
.split h3 { color: var(--gold-deep); }

.band-paper .quiet,
.band-paper .lead,
.band-paper .fine { color: var(--muted-ink); }

.text-link {
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.band-paper a.text-link { color: var(--gold-deep); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.85rem;
  padding: 0 1.2rem;
  border: 0;
  border-radius: 999px;
  background: var(--gold);
  color: #1b140b;
  font-weight: 700;
  text-decoration: none;
}

.btn:hover { background: #f0d7a4; }
.btn-small { min-height: 2.5rem; padding: 0 1rem; font-size: 0.95rem; }

.btn-ghost {
  background: transparent;
  color: var(--ivory);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}

.btn-ghost:hover {
  background: transparent;
  color: var(--gold);
  box-shadow: inset 0 0 0 1px var(--gold);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(18, 22, 20, 0.94);
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled { border-bottom-color: var(--line); }

.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: var(--header);
}

.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-en { font-family: var(--display); font-weight: 700; letter-spacing: 0.04em; }
.brand-zh { color: var(--muted); font-size: 0.75rem; letter-spacing: 0.14em; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem 1.15rem;
  margin-left: auto;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  text-decoration: none;
}

.site-nav a.is-active { color: var(--gold); }
.site-nav .nav-cta { display: none; }
.header-cta { margin-left: 0.4rem; }

.lang-switch {
  display: inline-flex;
  align-items: center;
  flex: none;
  gap: 0.1rem;
  margin-left: 0.85rem;
  padding: 0.15rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
}

.lang-switch a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.15rem;
  min-height: 2.15rem;
  padding: 0 0.4rem;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.lang-switch a:hover { color: var(--ivory); }

.lang-switch a[aria-current="true"] {
  color: #1b140b;
  background: var(--gold);
}

.lang-switch a[aria-current="true"]:hover { color: #1b140b; }

.nav-toggle {
  display: none;
  width: 2.75rem;
  height: 2.75rem;
  margin-left: auto;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--ivory);
  align-items: center;
  justify-content: center;
}

.nav-toggle-lines,
.nav-toggle-lines::before,
.nav-toggle-lines::after {
  display: block;
  width: 1rem;
  height: 1.5px;
  background: currentColor;
  border-radius: 1px;
}

.nav-toggle-lines { position: relative; }

.nav-toggle-lines::before,
.nav-toggle-lines::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle-lines::before { top: -6px; }
.nav-toggle-lines::after { top: 6px; }

.nav-toggle[aria-expanded="true"] .nav-toggle-lines { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-lines::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-lines::after { top: 0; transform: rotate(-45deg); }

.hero {
  padding: clamp(2rem, 6vh, 4.5rem) 0 0;
  background:
    radial-gradient(ellipse at 85% 10%, rgba(228, 194, 122, 0.16), transparent 42%),
    radial-gradient(ellipse at 0% 80%, rgba(142, 174, 147, 0.1), transparent 40%);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: center;
  padding-bottom: 2.2rem;
}

.hero h1 {
  max-width: 9em;
  font-size: clamp(1.85rem, 4.6vw, 4.35rem);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.hero h1 span { display: block; }
.line-gold { color: var(--gold); }

html[lang="en"] .hero h1 {
  max-width: 12em;
  font-size: clamp(2rem, 4.2vw, 3.6rem);
  letter-spacing: -0.02em;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.6rem; }

.tabs { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-bottom: 0.85rem; }

.tab {
  min-height: 2.5rem;
  padding: 0 0.9rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--ivory);
}

.tab[aria-selected="true"] {
  border-color: var(--gold);
  background: var(--gold);
  color: #1b140b;
}

.trace {
  position: relative;
  padding: 1.2rem 1.25rem 1.3rem 1.35rem;
  border: 1px solid var(--line-strong);
  border-radius: 1.2rem;
  background: linear-gradient(180deg, rgba(255, 252, 246, 0.045), rgba(255, 252, 246, 0.02));
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.trace::before {
  content: "";
  position: absolute;
  top: 1.15rem;
  bottom: 1.15rem;
  left: 0;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(var(--gold), transparent);
}

.trace-top {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--gold);
  font-family: var(--display);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.trace dt {
  margin-top: 0.9rem;
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.trace dl > div:first-child dt { margin-top: 0.85rem; }
.trace dd { margin: 0.2rem 0 0; }

.industry-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1.2rem;
  margin: 0;
  padding: 1rem 0 1.15rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.95rem;
}

.industry-row li::before {
  content: "";
  display: inline-block;
  width: 0.35rem;
  height: 0.35rem;
  margin-right: 0.45rem;
  border-radius: 50%;
  background: var(--gold);
  transform: translateY(-0.12em);
}

#solutions { scroll-margin-top: calc(var(--header) + 0.75rem); }

.band { padding: clamp(3.5rem, 7vw, 6.2rem) 0; }

.section-head {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.5rem 2rem;
  align-items: end;
  margin-bottom: 2rem;
}

.section-title { margin: 3rem 0 1.2rem; }

.cards-3,
.steps,
.team-grid,
.split,
.case-cols,
.about-grid,
.contact-layout,
.footer-grid {
  display: grid;
  gap: 1rem;
}

.cards-3 { grid-template-columns: repeat(3, 1fr); }
.split { grid-template-columns: 1fr 1fr; }
.case-cols { grid-template-columns: repeat(3, 1fr); }
.steps,
.team-grid { grid-template-columns: repeat(4, 1fr); }
.about-grid,
.contact-layout { grid-template-columns: 1.25fr 0.75fr; gap: 2.5rem; align-items: start; }
.footer-grid { grid-template-columns: 1.3fr 0.7fr 1fr; gap: 1.5rem; }

.principle {
  border-radius: 1rem;
  padding: 1.3rem 1.2rem 1.4rem;
}

.principle {
  background: var(--paper-2);
  color: var(--ink-text);
  border: 1px solid #e6ddcf;
}

.principle .idx,
.steps .idx { margin-bottom: 0.7rem; font-size: 1.25rem; }
.principle p:last-child,
.steps p:last-child { color: var(--muted-ink); }

.idx { color: var(--gold); font-variant-numeric: tabular-nums; }

.sol-list { border-bottom: 1px solid var(--line); }

.sol-row {
  display: grid;
  grid-template-columns: 4rem minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 1.3rem 0.3rem;
  border-top: 1px solid var(--line);
  text-decoration: none;
}

.sol-row strong { display: block; font-size: 1.25rem; }
.sol-row .quiet { display: block; margin-top: 0.25rem; }
.sol-row:hover { background: rgba(228, 194, 122, 0.06); }
.arrow { color: var(--gold); }

.steps { gap: 1.25rem; }
.steps li { border-top: 2px solid #e0d6c6; padding-top: 0.9rem; }

.cta-panel {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1.5rem;
  margin-top: 2rem;
  padding: clamp(1.4rem, 3vw, 2.4rem);
  border: 1px solid #e0d6c6;
  border-radius: 1.25rem;
  background: var(--paper);
  color: var(--ink-text);
}

.cta-panel .quiet { color: var(--muted-ink); }
.cta-panel .kicker { color: var(--gold-deep); }
.cta-panel h2 { margin-bottom: 0.45rem; }

.cta-panel-paper {
  background:
    radial-gradient(circle at 100% 0%, rgba(228, 194, 122, 0.28), transparent 42%),
    #e7efe8;
}

.page-hero { padding: clamp(3rem, 6vw, 5rem) 0 clamp(2.2rem, 4vw, 3.4rem); }
.page-hero h1 {
  max-width: 12em;
  font-size: clamp(2rem, 4.4vw, 3.6rem);
  line-height: 1.25;
  font-weight: 700;
}

.pull {
  margin-top: 1.4rem;
  padding-left: 1rem;
  border-left: 2px solid var(--gold-deep);
  color: var(--ink-text);
  font-size: 1.35rem;
  line-height: 1.6;
}

.facts { display: grid; grid-template-columns: 1fr; gap: 0.9rem; }
.facts div { border-top: 1px solid #e0d6c6; padding-top: 0.7rem; }
.facts dt { color: var(--gold-deep); font-size: 0.78rem; letter-spacing: 0.12em; }
.facts dd { margin: 0.15rem 0 0; }
.contact-facts { margin-top: 1.4rem; }

.timeline { margin-top: 0.4rem; border-left: 1px solid #e0d6c6; }
.timeline li { position: relative; padding: 0 0 1.35rem 1.25rem; }
.timeline li::before {
  content: "";
  position: absolute;
  left: -0.32rem;
  top: 0.45rem;
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: var(--gold-deep);
}
.year { display: block; }

.mono {
  color: var(--gold-deep);
  font-size: 1.7rem;
  font-weight: 700;
  line-height: 1;
}
.person { border-top: 1px solid #e0d6c6; padding-top: 1rem; }
.role { margin: 0.2rem 0 0.35rem; }

.solution,
.case-detail { padding: 2rem 0; border-top: 1px solid #e0d6c6; }
.solution { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr); gap: 0.5rem 1rem; }
.solution .quiet,
.case-detail .kicker { margin-bottom: 0.7rem; }
.solution p + p { margin-top: 0.8rem; }
.split { margin-top: 1.1rem; }
.split ul { list-style: disc; padding-left: 1.15rem; margin-top: 0.35rem; }
.split li + li { margin-top: 0.25rem; }
.outcome { margin-top: 1rem; padding-top: 0.8rem; border-top: 1px solid #e7dece; }
.case-detail h2 { margin-bottom: 1rem; }

.flash-wrap { padding-top: 1rem; }
.flash {
  margin: 0;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(228, 194, 122, 0.5);
  border-radius: 0.85rem;
  background: rgba(228, 194, 122, 0.12);
  color: var(--ivory);
}

.form-errors {
  margin-bottom: 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid #e4c4bc;
  border-radius: 0.85rem;
  background: #f8ece8;
  color: #6e2c26;
}

.field { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 1rem; }
.field label { font-weight: 700; }

.field input,
.field textarea,
.field select {
  width: 100%;
  min-height: 2.9rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid #ddd4c4;
  border-radius: 0.75rem;
  background: #fff;
  color: var(--ink-text);
}

.field textarea { min-height: 9rem; resize: vertical; }
.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"],
.field select[aria-invalid="true"] { border-color: var(--danger); }
.field-error { margin: 0; color: var(--danger); font-size: 0.9rem; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.8rem 1rem; }
.form-actions .fine { margin-top: 0; }

.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.site-footer {
  padding-top: 2.5rem;
  border-top: 1px solid var(--line);
  background: #0d100f;
}

.footer-brand {
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.site-footer nav { display: flex; flex-direction: column; }
.site-footer nav a { text-decoration: none; min-height: 2rem; }

.footer-mark-wrap { overflow: hidden; margin-top: 1.5rem; }
.footer-mark {
  margin: 0;
  color: rgba(228, 194, 122, 0.16);
  font-family: var(--display);
  font-size: clamp(4.2rem, 16vw, 11rem);
  font-weight: 700;
  line-height: 0.82;
  letter-spacing: -0.045em;
  user-select: none;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.8rem 0 1.4rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.js .trace { display: none; }
.js .trace.is-active { display: block; }
.no-js .tabs { display: none; }
.no-js .trace + .trace { margin-top: 0.8rem; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .hero-copy > *,
  .hero-stage {
    animation: rise 0.7s ease both;
  }
  .hero-copy > *:nth-child(2) { animation-delay: 0.06s; }
  .hero-copy > *:nth-child(3) { animation-delay: 0.12s; }
  .hero-copy > *:nth-child(4) { animation-delay: 0.18s; }
  .hero-copy > *:nth-child(5) { animation-delay: 0.24s; }
  .hero-stage { animation-delay: 0.12s; }
  .nav-toggle-lines,
  .nav-toggle-lines::before,
  .nav-toggle-lines::after,
  .arrow { transition: transform 0.2s ease, top 0.2s ease, background 0.2s ease; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

@media (max-width: 980px) {
  .hero-grid,
  .section-head,
  .about-grid,
  .contact-layout,
  .footer-grid,
  .cards-3,
  .case-cols { grid-template-columns: 1fr; }
  .steps,
  .team-grid,
  .split { grid-template-columns: 1fr 1fr; }
  .cta-panel { align-items: start; flex-direction: column; }
}

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; margin-left: 0.45rem; }
  .lang-switch { margin-left: auto; }
  .lang-switch a { min-width: 2.5rem; min-height: 2.5rem; }
  .header-cta { display: none; }
  .site-nav .nav-cta { display: inline-flex; margin-top: 0.6rem; align-self: flex-start; }
  .site-nav {
    position: fixed;
    top: var(--header);
    right: 0;
    bottom: 0;
    z-index: 45;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: min(20rem, 88vw);
    margin: 0;
    padding: 1rem 1.15rem 2rem;
    background: #24302b;
    border-left: 1px solid var(--line-strong);
    box-shadow: -18px 0 48px rgba(0, 0, 0, 0.35);
    transform: translateX(105%);
    visibility: hidden;
    transition: transform 0.25s ease, visibility 0.25s;
  }
  .site-nav.is-open { transform: none; visibility: visible; }
  body.nav-open { overflow: hidden; }
  body.nav-open::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 30;
    background: rgba(8, 10, 9, 0.55);
  }
}

@media (max-width: 640px) {
  .container { width: min(1120px, calc(100% - 2rem)); }
  .steps,
  .team-grid,
  .split,
  .form-row,
  .footer-bottom { grid-template-columns: 1fr; }
  .footer-bottom { display: grid; }
  .sol-row { grid-template-columns: 2.5rem minmax(0, 1fr); }
  .arrow { display: none; }
  .solution { grid-template-columns: 1fr; }
  .form-actions .btn { width: 100%; }
}
