/* ==========================================================================
   BCA 官网 · 基础层
   设计语言：工程图纸 / 铭牌几何。近黑、暖白、单一品牌红；零圆角、1px 细线、无投影。
   本文件只保留令牌、排版、按钮、表单、联系区块、页脚与通用动效；
   门户版式组件在 assets/css/portal.css。
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. 变量
   -------------------------------------------------------------------------- */
:root {
  --ink: #0c0c0d;
  --ink-2: #141416;
  --ink-3: #1b1b1e;
  --paper: #f2efe9;
  --paper-2: #e7e3da;
  --red: #d81f24;
  --red-deep: #a81418;
  --ash: #7c7c80;

  --font-display: "Bahnschrift", "DIN Alternate", "Arial Narrow", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-sans: "PingFang SC", "HarmonyOS Sans SC", "Source Han Sans SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
  --font-mono: "Cascadia Mono", "Consolas", "SFMono-Regular", "Menlo", "Courier New", monospace;

  --wrap: 1320px;
  --gutter: clamp(20px, 5vw, 72px);
  --section-y: clamp(72px, 9vh, 132px);

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --speed: 0.2s;
}

.theme-dark {
  --bg: var(--ink);
  --fg: var(--paper);
  --muted: #91918f;
  --hair: rgba(242, 239, 233, 0.14);
  --hair-strong: rgba(242, 239, 233, 0.26);
  --tint: rgba(242, 239, 233, 0.04);
  color-scheme: dark;
}

.theme-light {
  --bg: var(--paper);
  --fg: #0c0c0d;
  --muted: #5f5f63;
  --hair: rgba(12, 12, 13, 0.14);
  --hair-strong: rgba(12, 12, 13, 0.28);
  --tint: rgba(12, 12, 13, 0.035);
  color-scheme: light;
}

/* --------------------------------------------------------------------------
   2. 复位与基础
   -------------------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-sans);
  font-size: 18px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

a { color: inherit; text-decoration: none; }

p { margin: 0 0 1.2em; text-wrap: pretty; }

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  text-wrap: balance;
}

ul, ol { margin: 0; padding: 0; list-style: none; }

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

::selection { background: var(--red); color: #fff; }

:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link:focus {
  position: fixed; top: 12px; left: 12px; z-index: 200;
  width: auto; height: auto; clip: auto;
  background: var(--paper); color: var(--ink);
  padding: 10px 16px; font-family: var(--font-mono); font-size: 13px;
}

/* 纸张噪点，避免大面积纯色发平 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.028;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* --------------------------------------------------------------------------
   3. 布局工具
   -------------------------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
  position: relative;
  z-index: 2;
}

.section {
  background: var(--bg);
  color: var(--fg);
  padding-block: var(--section-y);
  position: relative;
  z-index: 2;
}

.mono {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  line-height: 1.6;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--red);
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--red);
  display: block;
}

/* --------------------------------------------------------------------------
   4. 按钮
   -------------------------------------------------------------------------- */
.btn {
  --btn-bg: transparent;
  --btn-fg: var(--fg);
  --btn-line: var(--hair-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 24px;
  border: 1px solid var(--btn-line);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: 0;
  white-space: nowrap;
  transition: background var(--speed) var(--ease), color var(--speed) var(--ease), border-color var(--speed) var(--ease);
}

.btn svg { width: 16px; height: 16px; flex: none; }

.btn__arrow { transition: transform var(--speed) var(--ease); }
.btn:hover .btn__arrow { transform: translateX(4px); }

.btn--solid { --btn-bg: var(--red); --btn-fg: #fff; --btn-line: var(--red); }
.btn--solid:hover { --btn-bg: var(--red-deep); --btn-line: var(--red-deep); }

.btn--paper { --btn-bg: var(--paper); --btn-fg: var(--ink); --btn-line: var(--paper); }
.btn--paper:hover { --btn-bg: transparent; --btn-fg: var(--paper); }

.btn--ghost:hover { --btn-line: var(--red); --btn-fg: var(--red); }

.btn--block { width: 100%; }

/* --------------------------------------------------------------------------
   5. 表单
   -------------------------------------------------------------------------- */
.form { display: grid; gap: 18px; }

.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

.field { position: relative; display: block; }

.field__label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.18em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--hair-strong);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 16px;
  padding: 10px 0 12px;
  border-radius: 0;
  transition: border-color var(--speed) var(--ease);
  appearance: none;
}

.field textarea { min-height: 96px; resize: vertical; line-height: 1.7; }

.field input::placeholder,
.field textarea::placeholder { color: rgba(145, 145, 143, 0.65); }

.field input:focus,
.field textarea:focus,
.field select:focus { outline: none; border-bottom-color: var(--red); }

.field select option { background: var(--ink-2); color: var(--paper); }

.form__note {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  color: var(--muted);
  line-height: 1.8;
}

.form__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; justify-content: space-between; }

.form__msg {
  border: 1px solid var(--red);
  padding: 12px 16px;
  font-size: 14px;
  color: var(--fg);
  background: rgba(216, 31, 36, 0.08);
  margin-bottom: 18px;
}

/* --------------------------------------------------------------------------
   6. 联系区块
   -------------------------------------------------------------------------- */
.contact { position: relative; overflow: hidden; }

.contact__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(36px, 6vw, 96px);
}

.contact h2 {
  font-family: var(--font-display);
  font-size: clamp(34px, 4.6vw, 62px);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.03em;
  margin: 0;
}

.contact__lead { color: var(--muted); margin-top: 22px; max-width: 40ch; font-size: 16px; }

.contact__list { margin-top: 40px; border-top: 1px solid var(--hair); }

.contact__row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 16px;
  padding: 15px 0;
  border-bottom: 1px solid var(--hair);
  align-items: baseline;
}

.contact__row dt {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.18em;
  color: var(--muted);
  text-transform: uppercase;
}

.contact__row dd { margin: 0; font-size: 16px; }
.contact__row dd a:hover { color: var(--red); }

/* --------------------------------------------------------------------------
   7. 页脚
   -------------------------------------------------------------------------- */
.footer {
  background: var(--ink-2);
  color: var(--paper);
  padding-top: clamp(48px, 6vw, 76px);
  position: relative;
  z-index: 2;
  border-top: 1px solid rgba(242, 239, 233, 0.1);
}

.footer__top {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) repeat(3, minmax(0, 0.7fr));
  gap: clamp(24px, 4vw, 56px);
  padding-bottom: 44px;
}

.footer__logo { display: inline-flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.footer__logo img { width: 46px; height: 46px; object-fit: contain; transition: transform 0.5s var(--ease); }
.footer__logo:hover img { transform: rotate(-90deg); }
.footer__logotext { display: flex; flex-direction: column; line-height: 1.2; }
.footer__logotext b {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.16em;
}
.footer__logotext i {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.24em;
  color: var(--ash);
  margin-top: 4px;
}
.footer__brand p { color: var(--ash); font-size: 14px; line-height: 1.9; max-width: 30ch; margin: 0; }

.footer__col h4 {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 400;
  letter-spacing: 0.2em;
  color: var(--ash);
  text-transform: uppercase;
  margin-bottom: 14px;
}

.footer__col a,
.footer__col span {
  display: block;
  font-size: 14.5px;
  color: rgba(242, 239, 233, 0.76);
  padding: 6px 0;
  transition: color var(--speed) var(--ease);
}
.footer__col a:hover { color: var(--red); }

.footer__bottom {
  border-top: 1px solid rgba(242, 239, 233, 0.1);
  padding: 20px 0 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  color: var(--ash);
}

/* --------------------------------------------------------------------------
   8. 入场动效
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: var(--d, 0ms);
}
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------------------
   9. 响应式
   -------------------------------------------------------------------------- */
@media (max-width: 960px) {
  body { font-size: 17px; }
  .contact__grid { grid-template-columns: 1fr; }
  .footer__top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 620px) {
  .form__row { grid-template-columns: 1fr; }
  .contact__row { grid-template-columns: 1fr; gap: 4px; }
  .footer__top { grid-template-columns: 1fr; }
  .footer__bottom { flex-direction: column; }
}
