:root {
  --seal: #a51218;
  --seal-dark: #721016;
  --paper: #f4f0e7;
  --paper-deep: #e9e2d4;
  --ink: #20201e;
  --muted: #68635c;
  --line: #cfc6b6;
  --brass: #a57c3e;
  --white: #fffdf8;
  --serif-zh: "Noto Serif TC", "Source Han Serif TC", "PMingLiU", "MingLiU", serif;
  --serif-en: Georgia, "Times New Roman", serif;
  --sans: "Noto Sans TC", "Source Han Sans TC", "Microsoft JhengHei", Arial, sans-serif;
  --shell: min(1180px, calc(100% - 48px));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

body.menu-open {
  overflow: hidden;
}

a {
  color: inherit;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 3px solid var(--brass);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1000;
  padding: 10px 16px;
  background: var(--white);
  color: var(--seal);
  font-weight: 700;
  transform: translateY(-150%);
}

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

.shell {
  width: var(--shell);
  margin-inline: auto;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  border-bottom: 1px solid rgba(255, 253, 248, 0.16);
  background: rgba(114, 16, 22, 0.92);
  color: var(--white);
  transition: background-color 180ms ease, box-shadow 180ms ease;
}

.site-header.is-scrolled {
  background: rgba(114, 16, 22, 0.98);
  box-shadow: 0 10px 30px rgba(32, 32, 30, 0.16);
}

.header-inner {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 13px;
  text-decoration: none;
}

.brand-mark {
  flex: 0 0 54px;
  width: 54px;
  height: 54px;
  padding: 5px;
  border-radius: 50%;
  background: var(--paper);
}

.brand-name {
  display: grid;
  line-height: 1.2;
}

.brand-name strong {
  font-family: var(--serif-zh);
  font-size: 1.1rem;
  letter-spacing: 0.09em;
}

.brand-name small {
  margin-top: 5px;
  font-family: var(--serif-en);
  font-size: 0.57rem;
  letter-spacing: 0.13em;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.3vw, 30px);
}

.primary-nav a {
  position: relative;
  display: grid;
  color: var(--white);
  font-family: var(--serif-zh);
  font-size: 0.92rem;
  line-height: 1.2;
  text-decoration: none;
}

.primary-nav a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -8px;
  left: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}

.primary-nav a:hover::after,
.primary-nav a:focus-visible::after {
  transform: scaleX(1);
}

.primary-nav a span {
  margin-top: 3px;
  font-family: var(--sans);
  font-size: 0.55rem;
  letter-spacing: 0.12em;
  opacity: 0.7;
}

.primary-nav .nav-contact {
  padding: 10px 16px;
  border: 1px solid rgba(255, 253, 248, 0.55);
}

.primary-nav .nav-contact::after {
  display: none;
}

.primary-nav .nav-contact:hover {
  background: var(--white);
  color: var(--seal-dark);
}

.menu-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  color: var(--white);
  font: 700 0.7rem/1 var(--sans);
  letter-spacing: 0.08em;
  cursor: pointer;
}

.menu-toggle-lines,
.menu-toggle-lines::before,
.menu-toggle-lines::after {
  display: block;
  width: 24px;
  height: 1px;
  background: currentColor;
  transition: transform 180ms ease, opacity 180ms ease;
}

.menu-toggle-lines {
  position: relative;
}

.menu-toggle-lines::before,
.menu-toggle-lines::after {
  content: "";
  position: absolute;
  left: 0;
}

.menu-toggle-lines::before { top: -7px; }
.menu-toggle-lines::after { top: 7px; }

.menu-toggle[aria-expanded="true"] .menu-toggle-lines {
  background: transparent;
}

.menu-toggle[aria-expanded="true"] .menu-toggle-lines::before {
  top: 0;
  transform: rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-toggle-lines::after {
  top: 0;
  transform: rotate(-45deg);
}

.hero {
  position: relative;
  min-height: 760px;
  padding-top: 82px;
  overflow: hidden;
  background: var(--paper);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 10px;
  background: var(--seal);
}

.hero-grid {
  position: absolute;
  inset: 82px 0 0 52%;
  opacity: 0.22;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(90deg, transparent, #000 20%, #000 80%, transparent);
}

.hero-layout {
  min-height: 640px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(400px, 0.95fr);
  align-items: center;
  gap: clamp(48px, 7vw, 100px);
  padding-block: 88px 60px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 20px;
  color: var(--seal);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.eyebrow::before {
  content: "";
  width: 38px;
  height: 1px;
  background: currentColor;
}

.eyebrow span {
  font-family: var(--serif-zh);
  font-size: 0.83rem;
  letter-spacing: 0.18em;
}

.hero h1,
.section-heading h2,
.innovation h2,
.about h2,
.contact h2 {
  margin: 0;
  font-family: var(--serif-zh);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.02em;
}

.hero h1 {
  max-width: 740px;
  font-size: clamp(2.8rem, 5.2vw, 5.25rem);
}

.hero-title-line,
.hero h1 em {
  display: block;
}

.hero-title-line {
  white-space: nowrap;
}

.hero h1 em {
  color: var(--seal);
  font-style: normal;
}

.hero-english {
  max-width: 720px;
  margin: 22px 0 26px;
  color: var(--seal-dark);
  font-family: var(--serif-en);
  font-size: clamp(1.25rem, 2vw, 1.72rem);
  font-style: italic;
  line-height: 1.42;
}

.hero-intro {
  max-width: 670px;
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.98rem;
}

.hero-intro[lang="en"] {
  font-family: var(--serif-en);
  font-size: 1rem;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 28px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 12px 22px;
  text-decoration: none;
  transition: transform 180ms ease, background-color 180ms ease;
}

.button span {
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  opacity: 0.78;
}

.button-primary {
  background: var(--seal);
  color: var(--white);
  box-shadow: 6px 6px 0 var(--paper-deep);
}

.button-primary:hover {
  background: var(--seal-dark);
  transform: translate(-2px, -2px);
}

.text-link {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  color: var(--seal-dark);
  font-weight: 800;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}

.text-link span {
  font-size: 0.75rem;
  font-weight: 600;
}

.text-link i {
  font-style: normal;
}

.hero-emblem {
  position: relative;
  display: grid;
  place-items: center;
}

.emblem-frame {
  position: relative;
  width: min(100%, 470px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.58);
  box-shadow: 20px 20px 0 rgba(165, 18, 24, 0.08);
}

.emblem-frame::before,
.emblem-frame::after {
  content: "";
  position: absolute;
  inset: 30px;
  border: 1px solid rgba(165, 18, 24, 0.22);
  border-radius: 50%;
}

.emblem-frame::after {
  inset: 48px;
  border-color: rgba(165, 124, 62, 0.34);
}

.emblem-frame img {
  position: relative;
  z-index: 1;
  width: 66%;
  height: 66%;
}

.emblem-frame > p {
  position: absolute;
  right: 0;
  bottom: 15px;
  left: 0;
  z-index: 2;
  margin: 0;
  color: var(--seal-dark);
  font-family: var(--serif-zh);
  font-size: 0.82rem;
  letter-spacing: 0.28em;
  text-align: center;
}

.emblem-axis {
  position: absolute;
  inset: 15px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-content: space-between;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 0.56rem;
  letter-spacing: 0.16em;
}

.emblem-axis span:nth-child(even) { text-align: right; }

.corner {
  position: absolute;
  z-index: 3;
  width: 22px;
  height: 22px;
  border-color: var(--seal);
}

.corner-one {
  top: -1px;
  left: -1px;
  border-top: 3px solid;
  border-left: 3px solid;
}

.corner-two {
  right: -1px;
  bottom: -1px;
  border-right: 3px solid;
  border-bottom: 3px solid;
}

.discipline-rail {
  position: relative;
  background: var(--seal-dark);
  color: var(--white);
}

.rail-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.rail-inner > span {
  display: grid;
  padding: 20px 22px;
  border-left: 1px solid rgba(255, 253, 248, 0.18);
  font-family: var(--serif-zh);
  font-size: 0.9rem;
  letter-spacing: 0.05em;
}

.rail-inner > span:last-child {
  border-right: 1px solid rgba(255, 253, 248, 0.18);
}

.rail-inner small {
  margin-top: 2px;
  font-family: var(--sans);
  font-size: 0.56rem;
  letter-spacing: 0.14em;
  opacity: 0.6;
}

.section {
  padding-block: clamp(82px, 10vw, 132px);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.6fr);
  align-items: end;
  gap: 50px;
  margin-bottom: 58px;
}

.section-heading h2,
.innovation h2,
.about h2,
.contact h2 {
  font-size: clamp(2.1rem, 4vw, 3.7rem);
}

.section-heading > p {
  margin: 0 0 4px;
  color: var(--muted);
}

.capabilities {
  background: var(--white);
}

.capability-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.capability-card {
  position: relative;
  min-height: 380px;
  padding: clamp(30px, 4vw, 54px);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  transition: background-color 180ms ease, color 180ms ease;
}

.capability-card::after {
  content: "波";
  position: absolute;
  right: -20px;
  bottom: -78px;
  color: rgba(165, 18, 24, 0.035);
  font-family: var(--serif-zh);
  font-size: 13rem;
  line-height: 1;
  pointer-events: none;
}

.capability-card:hover {
  background: var(--paper);
}

.card-number {
  display: block;
  margin-bottom: 26px;
  color: var(--seal);
  font-family: var(--serif-zh);
  font-size: 0.78rem;
  letter-spacing: 0.15em;
}

.capability-card h3 {
  margin: 0 0 20px;
  color: var(--seal-dark);
  font-family: var(--serif-zh);
  font-size: clamp(1.5rem, 2.5vw, 2.15rem);
  line-height: 1.4;
}

.capability-card h3 span {
  font-family: var(--serif-en);
  font-size: 0.6em;
  font-style: italic;
  font-weight: 400;
}

.capability-card p {
  max-width: 520px;
  margin: 0 0 24px;
  color: var(--muted);
}

.capability-card ul {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.capability-card li {
  padding: 5px 10px;
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.58);
  color: var(--ink);
  font-size: 0.7rem;
  letter-spacing: 0.03em;
}

.innovation {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  color: var(--white);
}

.innovation::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 34%;
  height: 5px;
  background: var(--seal);
}

.innovation-lines {
  position: absolute;
  inset: 0;
  opacity: 0.08;
  background-image: repeating-linear-gradient(135deg, transparent 0 34px, var(--white) 35px, transparent 36px);
}

.innovation-layout {
  position: relative;
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(480px, 1.28fr);
  gap: clamp(50px, 9vw, 120px);
}

.eyebrow-light {
  color: #e3bd83;
}

.innovation-heading p:last-child {
  max-width: 500px;
  margin-top: 26px;
  color: rgba(255, 253, 248, 0.68);
}

.innovation-list {
  border-top: 1px solid rgba(255, 253, 248, 0.22);
}

.innovation-list article {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 20px;
  padding-block: 30px;
  border-bottom: 1px solid rgba(255, 253, 248, 0.22);
}

.innovation-list article > span {
  color: #e3bd83;
  font-family: var(--serif-en);
  font-size: 0.78rem;
}

.innovation-list h3 {
  margin: 0 0 10px;
  font-family: var(--serif-zh);
  font-size: 1.35rem;
}

.innovation-list h3 small {
  display: block;
  margin-top: 3px;
  color: rgba(255, 253, 248, 0.52);
  font: 0.72rem/1.4 var(--sans);
  letter-spacing: 0.08em;
}

.innovation-list p {
  margin: 0;
  color: rgba(255, 253, 248, 0.68);
  font-size: 0.92rem;
}

.method {
  background: var(--paper);
}

.compact-heading {
  grid-template-columns: 1fr;
  margin-bottom: 48px;
}

.method-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.method-steps li {
  min-height: 220px;
  padding: 28px 26px;
  border-right: 1px solid var(--line);
}

.method-steps li:first-child {
  border-left: 1px solid var(--line);
}

.method-steps li > span {
  color: var(--seal);
  font-family: var(--serif-en);
  font-size: 0.74rem;
}

.method-steps h3 {
  margin: 42px 0 12px;
  color: var(--seal-dark);
  font: 700 1.35rem/1.3 var(--serif-zh);
}

.method-steps p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.about {
  background: var(--paper-deep);
}

.about-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.7fr) minmax(480px, 1.3fr);
  align-items: center;
  gap: clamp(60px, 10vw, 140px);
}

.about-seal {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border: 1px solid var(--line);
}

.about-seal::before,
.about-seal::after {
  content: "";
  position: absolute;
  width: 58%;
  height: 1px;
  background: var(--line);
}

.about-seal::after {
  transform: rotate(90deg);
}

.about-seal img {
  position: relative;
  z-index: 1;
  width: 62%;
  padding: 10px;
  background: var(--paper-deep);
}

.about-seal span {
  position: absolute;
  right: 12px;
  bottom: 6px;
  color: var(--seal);
  font-family: var(--serif-zh);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
}

.about-copy > p:not(.eyebrow) {
  max-width: 720px;
  margin: 26px 0 0;
  color: var(--muted);
  font-size: 1.02rem;
}

.about-copy > p[lang="en"] {
  font-family: var(--serif-en);
  font-size: 1.08rem;
}

.contact {
  padding-block: clamp(76px, 9vw, 118px);
  background: var(--seal-dark);
  color: var(--white);
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr);
  align-items: end;
  gap: clamp(50px, 9vw, 120px);
}

.contact h2 {
  max-width: 650px;
}

.contact-layout > div:first-child > p:last-child {
  max-width: 560px;
  margin: 22px 0 0;
  color: rgba(255, 253, 248, 0.72);
}

.contact-actions {
  border-top: 1px solid rgba(255, 253, 248, 0.28);
}

.contact-actions a {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  padding: 23px 4px;
  border-bottom: 1px solid rgba(255, 253, 248, 0.28);
  text-decoration: none;
  transition: padding 180ms ease, background-color 180ms ease;
}

.contact-actions a:hover {
  padding-inline: 14px;
  background: rgba(255, 253, 248, 0.06);
}

.contact-actions small,
.contact-actions strong {
  grid-column: 1;
}

.contact-actions small {
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  opacity: 0.58;
}

.contact-actions strong {
  margin-top: 3px;
  font-family: var(--serif-en);
  font-size: clamp(1rem, 2vw, 1.35rem);
  overflow-wrap: anywhere;
}

.contact-actions a > span {
  grid-column: 2;
  grid-row: 1 / 3;
  color: #e3bd83;
  font-size: 1.35rem;
}

.site-footer {
  background: #181816;
  color: rgba(255, 253, 248, 0.62);
}

.footer-inner {
  min-height: 112px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-brand img {
  width: 42px;
  height: 42px;
  padding: 4px;
  border-radius: 50%;
  background: var(--paper);
}

.footer-brand span {
  display: grid;
  line-height: 1.2;
}

.footer-brand strong {
  color: var(--white);
  font-family: var(--serif-zh);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
}

.footer-brand small {
  margin-top: 4px;
  font-size: 0.48rem;
  letter-spacing: 0.09em;
}

.footer-inner > p {
  margin: 0;
  font-size: 0.72rem;
}

@media (max-width: 980px) {
  :root { --shell: min(100% - 40px, 820px); }

  .menu-toggle { display: inline-flex; }

  .primary-nav {
    position: fixed;
    inset: 82px 0 auto;
    max-height: 0;
    display: grid;
    gap: 0;
    overflow: hidden;
    background: var(--seal-dark);
    opacity: 0;
    pointer-events: none;
    transition: max-height 220ms ease, opacity 180ms ease;
  }

  .primary-nav.is-open {
    max-height: calc(100vh - 82px);
    opacity: 1;
    pointer-events: auto;
  }

  .primary-nav a,
  .primary-nav .nav-contact {
    grid-template-columns: auto 1fr;
    align-items: baseline;
    gap: 12px;
    padding: 17px max(24px, calc((100vw - 820px) / 2));
    border: 0;
    border-bottom: 1px solid rgba(255, 253, 248, 0.14);
    font-size: 1.05rem;
  }

  .primary-nav a span { margin: 0; }
  .primary-nav a::after { display: none; }

  .hero-layout {
    grid-template-columns: 1fr;
    padding-top: 76px;
  }

  .hero-grid { left: 30%; }
  .hero-emblem { width: min(560px, 100%); margin: 0 auto; }

  .rail-inner { grid-template-columns: repeat(2, 1fr); }
  .rail-inner > span:nth-child(3) { border-top: 1px solid rgba(255, 253, 248, 0.18); }
  .rail-inner > span:nth-child(4) { border-top: 1px solid rgba(255, 253, 248, 0.18); }

  .section-heading,
  .innovation-layout,
  .about-layout,
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .section-heading { align-items: start; gap: 22px; }
  .capability-card { min-height: 0; }
  .about-seal { width: min(400px, 100%); }
  .contact-actions { width: 100%; }
}

@media (max-width: 680px) {
  :root { --shell: calc(100% - 28px); }

  html { scroll-padding-top: 72px; }
  .header-inner { min-height: 72px; }
  .brand-mark { width: 44px; height: 44px; flex-basis: 44px; }
  .brand-name strong { font-size: 0.9rem; }
  .brand-name small { max-width: 190px; font-size: 0.47rem; }
  .menu-toggle-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .primary-nav { top: 72px; }

  .hero { padding-top: 72px; }
  .hero::before { width: 5px; }
  .hero-layout { min-height: auto; padding-block: 58px 48px; gap: 56px; }
  .hero h1 { font-size: clamp(2.55rem, 12vw, 4rem); }
  .hero-english { font-size: 1.18rem; }
  .hero-actions { align-items: stretch; flex-direction: column; gap: 20px; }
  .button { justify-content: center; }
  .text-link { width: fit-content; }
  .emblem-frame { box-shadow: 10px 10px 0 rgba(165, 18, 24, 0.08); }
  .emblem-frame > p { font-size: 0.7rem; }

  .rail-inner { grid-template-columns: 1fr; }
  .rail-inner > span { border-right: 1px solid rgba(255, 253, 248, 0.18); border-bottom: 1px solid rgba(255, 253, 248, 0.18); }

  .section { padding-block: 72px; }
  .section-heading { margin-bottom: 38px; }
  .section-heading h2,
  .innovation h2,
  .about h2,
  .contact h2 { font-size: 2.15rem; }

  .capability-grid { grid-template-columns: 1fr; }
  .capability-card { padding: 30px 24px; }
  .innovation-layout { gap: 42px; }
  .innovation-list article { grid-template-columns: 40px 1fr; gap: 12px; }

  .method-steps { grid-template-columns: 1fr; border-left: 1px solid var(--line); }
  .method-steps li { min-height: 0; border-left: 0; border-bottom: 1px solid var(--line); }
  .method-steps h3 { margin-top: 24px; }
  .about-layout { gap: 46px; }
  .contact-layout { gap: 42px; }

  .footer-inner { align-items: flex-start; flex-direction: column; justify-content: center; padding-block: 26px; }
}

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