@font-face {
  font-family: "Allura";
  src: url("assets/fonts/Allura-Regular.woff2") format("woff2");
  font-display: swap;
  font-style: normal;
  font-weight: 400;
}

:root {
  --paper: #f7f7f4;
  --surface: #ffffff;
  --ink: #151917;
  --muted: #626b65;
  --line: #d9dcd8;
  --red: #e11d24;
  --green: #12613f;
  --amber: #b3771f;
  --blue: #315775;
  --shadow: 0 16px 36px rgba(20, 27, 23, 0.09);
  --shell: min(1440px, calc(100% - 48px));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

button,
a {
  color: inherit;
}

button {
  border: 0;
  font: inherit;
}

a {
  text-decoration: none;
}

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

svg {
  flex: 0 0 auto;
}

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

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

.masthead {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.masthead-inner {
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 14px 0 11px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  max-width: 100%;
}

.brand-mark {
  width: 76px;
  height: 76px;
  flex: 0 0 76px;
  object-fit: contain;
}

.brand-name {
  min-width: 0;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 29px;
  font-weight: 900;
  line-height: 1.04;
  overflow-wrap: anywhere;
}

.masthead-tagline {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: -4px 0 0 95px;
  color: #8e6734;
  font-family: "Allura", "Segoe Script", "Snell Roundhand", "Apple Chancery", cursive;
  font-size: 28px;
  line-height: 1;
  white-space: nowrap;
}

.masthead-tagline::before,
.masthead-tagline::after {
  width: 84px;
  height: 1px;
  background: #c8b796;
  content: "";
}

.menu-band {
  padding: 18px 0 22px;
  background: #f0f1ee;
  border-bottom: 1px solid var(--line);
}

.menu-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.menu-kicker::before {
  width: 24px;
  height: 2px;
  background: var(--red);
  content: "";
}

.menu-kicker span {
  color: var(--ink);
}

.menu-grid {
  display: grid;
  width: var(--shell);
  margin: 0 auto;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.menu-tab {
  --accent: var(--green);
  position: relative;
  display: grid;
  height: 300px;
  padding: 0;
  overflow: hidden;
  text-align: left;
  background: #2c332f;
  border: 1px solid rgba(20, 25, 22, 0.14);
  border-radius: 5px;
  cursor: pointer;
  isolation: isolate;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.menu-tab::before {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: var(--tab-image) center / cover no-repeat;
  content: "";
  transition: transform 240ms ease;
}

.menu-tab::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(12, 16, 14, 0.08) 0%, rgba(12, 16, 14, 0.15) 42%, rgba(12, 16, 14, 0.9) 100%);
  content: "";
}

.menu-tab:hover,
.menu-tab.is-active {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: var(--shadow);
}

.menu-tab:hover::before,
.menu-tab.is-active::before {
  transform: scale(1.04);
}

.menu-tab[data-section="about"]::before {
  background-position: center 27%;
}

.menu-tab:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.menu-tab-top {
  position: absolute;
  top: 12px;
  right: 12px;
  left: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #ffffff;
}

.menu-tab-index {
  font-size: 12px;
  font-weight: 800;
}

.menu-tab-top svg {
  width: 20px;
  height: 20px;
}

.menu-tab-periodic {
  position: absolute;
  top: 48px;
  left: 14px;
  display: flex;
  align-items: end;
  gap: 7px;
}

.element-tile {
  display: grid;
  width: 48px;
  height: 54px;
  align-content: center;
  justify-items: center;
  color: #ffffff;
  background: rgba(16, 20, 18, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.75);
}

.element-tile small {
  font-size: 8px;
  line-height: 1;
}

.element-tile strong {
  font-size: 22px;
  line-height: 1.08;
}

.menu-tab-content {
  align-self: end;
  display: grid;
  gap: 7px;
  width: 100%;
  min-height: 130px;
  padding: 16px 14px 15px;
}

.menu-tab-title,
.menu-tab-en,
.menu-tab-caption span,
.menu-tab-caption strong {
  display: block;
  position: static;
  margin: 0;
  padding: 0;
}

.menu-tab-title {
  color: #ffffff;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.2;
}

.menu-tab-en {
  min-height: 34px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
}

.menu-tab-caption {
  padding-top: 8px;
  color: #ffffff;
  border-top: 1px solid rgba(255, 255, 255, 0.42);
}

.menu-tab-caption span {
  font-size: 11px;
  line-height: 1.4;
}

.menu-tab-caption strong {
  font-size: 15px;
  line-height: 1.3;
}

.panel-stage {
  background: var(--surface);
}

.panel {
  --accent: var(--green);
}

.panel-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(390px, 0.95fr);
  min-height: 500px;
  background: #171c19;
}

.panel-media {
  position: relative;
  min-height: 500px;
  margin: 0;
  overflow: hidden;
}

.panel-media::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(12, 16, 14, 0.05), rgba(12, 16, 14, 0.32));
  content: "";
}

.panel-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.panel-about .panel-media img {
  object-position: center 25%;
}

.panel-periodic {
  position: absolute;
  z-index: 2;
  right: 24px;
  bottom: 24px;
  display: flex;
  align-items: end;
  gap: 12px;
}

.panel-periodic .element-tile {
  width: 86px;
  height: 96px;
  background: rgba(14, 18, 16, 0.74);
  backdrop-filter: blur(6px);
}

.panel-periodic .element-tile small {
  font-size: 11px;
}

.panel-periodic .element-tile strong {
  font-size: 42px;
}

.panel-intro {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 54px max(28px, calc((100vw - 1440px) / 2));
  color: #ffffff;
  border-left: 5px solid var(--accent);
}

.eyebrow {
  margin: 0 0 12px;
  color: #c5d1ca;
  font-size: 12px;
  font-weight: 800;
}

.panel-title {
  display: grid;
  gap: 5px;
  margin: 0;
}

.panel-title .zh {
  font-size: 42px;
  font-weight: 800;
  line-height: 1.15;
}

.panel-title .en {
  color: #c9d2cd;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
}

.panel-lead {
  display: grid;
  gap: 10px;
  margin: 26px 0 0;
}

.panel-lead .zh,
.panel-lead .en {
  display: block;
  margin: 0;
}

.panel-lead .zh {
  font-size: 18px;
  line-height: 1.7;
}

.panel-lead .en {
  color: #adb9b2;
  font-size: 14px;
  line-height: 1.65;
}

.panel-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 28px;
}

.tag {
  padding: 6px 9px;
  color: #f7faf8;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 3px;
  font-size: 12px;
}

.content-band {
  padding: 64px 0;
}

.content-band + .content-band {
  border-top: 1px solid var(--line);
}

.content-band.is-soft {
  background: #f0f2ef;
}

.section-heading {
  display: grid;
  gap: 3px;
  margin-bottom: 26px;
}

.section-heading .index {
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
}

.section-heading h3 {
  margin: 0;
  font-size: 30px;
  line-height: 1.25;
}

.section-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.overview-item {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 14px;
  min-height: 190px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: 5px;
}

.overview-item svg,
.case-card svg,
.contact-row svg {
  width: 22px;
  height: 22px;
  color: var(--accent);
}

.bilingual-copy h4 {
  display: grid;
  gap: 2px;
  margin: 0 0 12px;
  font-size: 18px;
  line-height: 1.35;
}

.bilingual-copy h4 small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.bilingual-copy p {
  margin: 0;
}

.bilingual-copy p + p {
  margin-top: 8px;
}

.bilingual-copy .zh-copy {
  color: #343b37;
  font-size: 15px;
}

.bilingual-copy .en-copy {
  color: var(--muted);
  font-size: 13px;
}

.cases-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.case-card {
  display: flex;
  min-height: 264px;
  flex-direction: column;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 5px;
}

.case-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 32px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.case-card h4 {
  display: grid;
  gap: 3px;
  margin: auto 0 12px;
  font-size: 18px;
  line-height: 1.35;
}

.case-card h4 small {
  color: var(--muted);
  font-size: 12px;
}

.case-card p {
  margin: 0;
  color: #434a46;
  font-size: 14px;
}

.case-card p + p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.8fr);
  gap: 28px;
}

.contact-list {
  display: grid;
  align-content: start;
  border-top: 1px solid var(--line);
}

.contact-row {
  display: grid;
  grid-template-columns: 28px 150px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-height: 82px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.contact-label {
  display: grid;
  line-height: 1.35;
}

.contact-label strong {
  font-size: 14px;
}

.contact-label small {
  color: var(--muted);
  font-size: 11px;
}

.contact-value {
  color: #343b37;
  font-size: 14px;
}

.contact-note {
  padding: 26px;
  color: #ffffff;
  background: #171c19;
  border-top: 4px solid var(--accent);
}

.contact-note h4 {
  display: grid;
  gap: 3px;
  margin: 0 0 18px;
  font-size: 22px;
}

.contact-note h4 small {
  color: #b7c1bb;
  font-size: 12px;
}

.contact-note p {
  margin: 0;
  color: #d2d9d5;
}

.contact-note p + p {
  margin-top: 10px;
  color: #aeb9b2;
  font-size: 13px;
}

.site-footer {
  color: #d5dbd7;
  background: #111513;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  padding: 24px 0;
  font-size: 12px;
}

.footer-inner strong {
  color: #ffffff;
}

@media (max-width: 1180px) {
  .menu-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .menu-tab {
    height: 280px;
  }

  .panel-hero {
    grid-template-columns: 1fr 1fr;
  }

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

@media (max-width: 760px) {
  :root {
    --shell: min(100% - 24px, 1440px);
  }

  .masthead-inner {
    padding-top: 10px;
  }

  .brand-lockup {
    gap: 10px;
    width: 100%;
  }

  .brand-mark {
    width: 58px;
    height: 58px;
    flex-basis: 58px;
  }

  .brand-name {
    font-size: 16px;
    line-height: 1.15;
  }

  .masthead-tagline {
    gap: 9px;
    margin: 0;
    font-size: 23px;
  }

  .masthead-tagline::before,
  .masthead-tagline::after {
    width: 38px;
  }

  .menu-band {
    padding-top: 14px;
  }

  .menu-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .menu-tab {
    height: 236px;
  }

  .menu-tab-content {
    min-height: 122px;
    padding: 13px 11px;
  }

  .menu-tab-title {
    font-size: 17px;
  }

  .menu-tab-en {
    min-height: 31px;
    font-size: 10px;
  }

  .menu-tab-caption strong {
    font-size: 13px;
  }

  .menu-tab-periodic {
    top: 42px;
    left: 10px;
    gap: 5px;
  }

  .element-tile {
    width: 39px;
    height: 44px;
  }

  .element-tile strong {
    font-size: 18px;
  }

  .panel-hero {
    grid-template-columns: 1fr;
  }

  .panel-media {
    min-height: 310px;
  }

  .panel-intro {
    min-height: 370px;
    padding: 36px 20px 42px;
    border-top: 5px solid var(--accent);
    border-left: 0;
  }

  .panel-title .zh {
    font-size: 34px;
  }

  .panel-title .en {
    font-size: 14px;
  }

  .panel-lead {
    margin-top: 20px;
  }

  .panel-periodic {
    right: 14px;
    bottom: 14px;
  }

  .panel-periodic .element-tile {
    width: 62px;
    height: 70px;
  }

  .panel-periodic .element-tile strong {
    font-size: 30px;
  }

  .content-band {
    padding: 44px 0;
  }

  .section-heading h3 {
    font-size: 25px;
  }

  .overview-grid,
  .cases-grid,
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .overview-item {
    min-height: 0;
    padding: 20px;
  }

  .case-card {
    min-height: 230px;
  }

  .contact-row {
    grid-template-columns: 26px minmax(0, 1fr);
    gap: 8px 12px;
  }

  .contact-value {
    grid-column: 2;
  }

  .footer-inner {
    flex-direction: column;
  }
}

@media (max-width: 340px) {
  .brand-name {
    font-size: 14px;
  }

  .menu-grid {
    grid-template-columns: 1fr;
  }

  .menu-tab {
    height: 250px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
