@font-face {
  font-family: "Huang Noto CJK";
  src: url("/assets/fonts/noto-sans-cjk-sc/NotoSansCJKsc-Regular.woff2") format("woff2");
  font-display: swap;
  font-style: normal;
  font-weight: 100 500;
}

@font-face {
  font-family: "Huang Noto CJK";
  src: url("/assets/fonts/noto-sans-cjk-sc/NotoSansCJKsc-Bold.woff2") format("woff2");
  font-display: swap;
  font-style: normal;
  font-weight: 600 900;
}

:root {
  --bg: #f5f8fc;
  --surface: #ffffff;
  --surface-soft: #f0f4fa;
  --ink: #111827;
  --muted: #657188;
  --line: #d8e2f0;
  --blue: #3f63ff;
  --blue-dark: #2f4de0;
  --focus: #18a9d8;
  --shadow: 0 22px 64px rgba(42, 67, 116, 0.1);
  --font-sans: "Huang Noto CJK", "Noto Sans CJK SC", "Noto Sans CJK JP", system-ui, sans-serif;
}

[data-theme="dark"] {
  --bg: #07101f;
  --surface: #101a2c;
  --surface-soft: #152136;
  --ink: #eef4ff;
  --muted: #a8b4c8;
  --line: #2a3a53;
  --blue: #5374ff;
  --blue-dark: #6c87ff;
  --focus: #2fc2e9;
  --shadow: 0 26px 80px rgba(0, 0, 0, 0.3);
}

* { box-sizing: border-box; }

html {
  min-width: 320px;
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  line-height: 1.65;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

button,
input,
select,
textarea { font: inherit; }

a { color: inherit; }

.skip-link {
  position: fixed;
  z-index: 10;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--surface);
  transform: translateY(-160%);
}

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

.page-shell {
  width: min(1240px, calc(100% - 40px));
  margin: 24px auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.site-header {
  display: grid;
  grid-template-columns: minmax(210px, 1fr) auto minmax(250px, 1fr);
  align-items: center;
  min-height: 82px;
  padding: 0 34px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  width: max-content;
  gap: 10px;
  color: var(--ink);
  font-size: 20px;
  font-weight: 850;
  text-decoration: none;
}

.brand-glyph {
  color: var(--blue);
  font-size: 25px;
  font-weight: 900;
}

.nav {
  display: flex;
  gap: 34px;
  font-size: 14px;
  font-weight: 750;
}

.nav a {
  position: relative;
  padding: 8px 0;
  color: var(--muted);
  text-decoration: none;
}

.nav a::after {
  position: absolute;
  right: 0;
  bottom: 1px;
  left: 0;
  height: 2px;
  background: var(--blue);
  content: "";
  opacity: 0;
  transform: scaleX(0.5);
  transition: opacity 160ms ease, transform 180ms ease;
}

.nav a:hover,
.nav a[aria-current="page"] { color: var(--ink); }

.nav a:hover::after,
.nav a[aria-current="page"]::after {
  opacity: 1;
  transform: scaleX(1);
}

.header-tools {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.lang-switcher {
  display: grid;
  grid-template-columns: repeat(3, 42px);
  min-height: 42px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.lang-switcher button,
.theme-toggle {
  display: grid;
  place-items: center;
  min-width: 42px;
  min-height: 42px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 850;
  cursor: pointer;
}

.lang-switcher button + button { border-left: 1px solid var(--line); }

.lang-switcher button.is-active {
  background: var(--blue);
  color: #fff;
}

.theme-toggle {
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
}

.contact-main {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(520px, 1.1fr);
  gap: clamp(50px, 7vw, 96px);
  min-height: 730px;
  padding: clamp(58px, 7vw, 92px);
}

.contact-intro { padding-top: 16px; }

.eyebrow,
.form-kicker {
  margin: 0 0 20px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.contact-intro h1 {
  max-width: 620px;
  margin: 0;
  font-size: 64px;
  line-height: 1.08;
  letter-spacing: 0;
}

.intro-copy {
  max-width: 600px;
  margin: 30px 0 0;
  color: var(--muted);
  font-size: 18px;
}

.contact-notes {
  display: grid;
  gap: 0;
  margin-top: 54px;
  border-top: 1px solid var(--line);
}

.contact-notes > div {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 18px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.note-index {
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.contact-notes strong { display: block; margin-bottom: 4px; }
.contact-notes p { margin: 0; color: var(--muted); font-size: 14px; }

.direct-email { margin: 30px 0 0; color: var(--muted); font-size: 14px; }
.direct-email a { margin-left: 8px; color: var(--blue); font-weight: 800; }

.form-panel {
  align-self: start;
  padding: clamp(30px, 4vw, 46px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.form-heading h2 { margin: 0; font-size: 30px; line-height: 1.2; }
.form-heading > p:last-child { margin: 10px 0 0; color: var(--muted); font-size: 13px; }
.form-kicker { margin-bottom: 12px; }

form { margin-top: 34px; }

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.field-grid + .field-grid,
.field-message { margin-top: 18px; }

.field { display: grid; gap: 8px; }
.field > span { font-size: 13px; font-weight: 800; }
.field b { color: #d43f55; }

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  outline: 0;
  background: var(--surface);
  color: var(--ink);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

input,
select { min-height: 48px; padding: 0 13px; }
textarea { min-height: 178px; padding: 13px; line-height: 1.6; resize: vertical; }

input::placeholder,
textarea::placeholder { color: color-mix(in srgb, var(--muted) 72%, transparent); }

input:focus,
select:focus,
textarea:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 18%, transparent);
}

.honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-footer {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 24px;
  margin-top: 22px;
}

.privacy-note { max-width: 390px; margin: 0; color: var(--muted); font-size: 12px; }

.submit-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 50px;
  padding: 0 20px;
  border: 0;
  border-radius: 6px;
  background: var(--blue);
  color: #fff;
  font-weight: 850;
  cursor: pointer;
  transition: background 160ms ease, transform 160ms ease;
}

.submit-button:hover { background: var(--blue-dark); transform: translateY(-1px); }
.submit-button:active { transform: translateY(0); }
.submit-button:disabled { cursor: wait; opacity: 0.68; transform: none; }

.form-status {
  min-height: 24px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.form-status.is-success { color: #167b43; }
.form-status.is-error { color: #bd3047; }
[data-theme="dark"] .form-status.is-success { color: #66d795; }
[data-theme="dark"] .form-status.is-error { color: #ff899b; }

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 34px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.site-footer div { display: flex; gap: 24px; }
.site-footer a:hover { color: var(--blue); }

:focus-visible { outline: 3px solid color-mix(in srgb, var(--focus) 45%, transparent); outline-offset: 3px; }

@media (max-width: 980px) {
  .site-header { grid-template-columns: 1fr auto; padding: 0 24px; }
  .nav { display: none; }
  .contact-main { grid-template-columns: 1fr; gap: 48px; padding: 56px clamp(24px, 7vw, 64px); }
  .contact-intro { padding-top: 0; }
  .contact-intro h1 { max-width: 760px; font-size: 58px; }
  .contact-notes { grid-template-columns: 1fr 1fr; gap: 24px; }
  .contact-notes > div { border-top: 1px solid var(--line); }
}

@media (max-width: 640px) {
  .page-shell { width: calc(100% - 20px); margin: 10px auto; }
  .site-header { min-height: 70px; padding: 0 16px; }
  .brand { font-size: 17px; }
  .brand-glyph { font-size: 21px; }
  .lang-switcher { grid-template-columns: repeat(3, 36px); min-height: 38px; }
  .lang-switcher button,
  .theme-toggle { min-width: 36px; min-height: 38px; }
  .contact-main { padding: 42px 20px 52px; }
  .contact-intro h1 { font-size: 42px; }
  .intro-copy { font-size: 16px; }
  .contact-notes { grid-template-columns: 1fr; gap: 0; margin-top: 40px; }
  .contact-notes > div:first-child { border-top: 1px solid var(--line); }
  .form-panel { padding: 24px 18px; }
  .field-grid { grid-template-columns: 1fr; gap: 18px; }
  .form-footer { grid-template-columns: 1fr; }
  .submit-button { width: 100%; }
  .site-footer { align-items: flex-start; padding: 22px 20px; }
  .site-footer div { flex-wrap: wrap; justify-content: flex-end; gap: 12px 18px; }
}

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