/* ============================================================================
   杏鑫娱乐 · 航线测绘图 / FLIGHTLINE SURVEY
   survey.css — 图纸基座：令牌、排版、页框、页头页脚、HUD
   ========================================================================== */

:root {
  --paper: #efe9da;
  --paper-2: #e4dcc7;
  --paper-3: #f8f4e9;
  --ink: #1d211a;
  --ink-2: #49503f;
  --muted: #5d6454;
  --line: #c8bfa7;
  --line-soft: #dbd3bd;
  --zone: #1e6b51;
  --zone-dark: #134536;
  --signal: #d2541c;
  --water: #2b6b86;
  --side: clamp(16px, 4vw, 40px);
  --wrap: 1180px;
  --gap: clamp(18px, 2.6vw, 32px);
  --r: 2px;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.72;
  background-color: var(--paper);
  background-image:
    radial-gradient(120% 80% at 88% -10%, rgba(30, 107, 81, .07), transparent 62%),
    repeating-radial-gradient(circle at 92% 8%, rgba(29, 33, 26, .075) 0 1px, transparent 1px 38px),
    repeating-radial-gradient(circle at 4% 86%, rgba(43, 107, 134, .07) 0 1px, transparent 1px 46px),
    linear-gradient(90deg, rgba(29, 33, 26, .045) 1px, transparent 1px),
    linear-gradient(0deg, rgba(29, 33, 26, .045) 1px, transparent 1px);
  background-size: auto, auto, auto, 120px 120px, 120px 120px;
}

img, svg { max-width: 100%; }
figure { margin: 0; }
h1, h2, h3, h4 { margin: 0; font-weight: 800; line-height: 1.16; letter-spacing: -.015em; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
strong, b { font-weight: 700; }
a { color: var(--zone); text-decoration: none; transition: color .2s; }
a:hover { color: var(--signal); }
:focus-visible { outline: 2px dashed var(--signal); outline-offset: 3px; }
::selection { background: var(--signal); color: #fff; }

.wrap { width: min(100% - var(--side) * 2, var(--wrap)); margin-inline: auto; }
.mono { font-family: var(--mono); }
.skip {
  position: absolute; left: -9999px; top: 8px; z-index: 99;
  padding: 10px 16px; background: var(--ink); color: var(--paper-3); font-size: .86rem;
}
.skip:focus { left: 8px; color: var(--paper-3); }

/* ---------- 图纸页框 ---------- */
.frame { position: fixed; inset: 12px; z-index: 40; pointer-events: none; border: 1px solid rgba(29, 33, 26, .16); }
.frame::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 5px;
  background: repeating-linear-gradient(180deg, rgba(29, 33, 26, .3) 0 1px, transparent 1px 26px);
}
.frame::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 5px;
  background: repeating-linear-gradient(90deg, rgba(29, 33, 26, .3) 0 1px, transparent 1px 26px);
}
.frame i { position: absolute; width: 12px; height: 12px; border: 2px solid var(--ink); }
.frame i:nth-child(1) { top: -2px; left: -2px; border-right: 0; border-bottom: 0; }
.frame i:nth-child(2) { top: -2px; right: -2px; border-left: 0; border-bottom: 0; }
.frame i:nth-child(3) { bottom: -2px; left: -2px; border-right: 0; border-top: 0; }
.frame i:nth-child(4) { bottom: -2px; right: -2px; border-left: 0; border-top: 0; }

/* ---------- 页头 ---------- */
.site-head {
  position: sticky; top: 0; z-index: 50;
  background: rgba(239, 233, 218, .95);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(6px);
}
.head-in { display: flex; align-items: center; gap: clamp(10px, 1.6vw, 24px); height: 70px; }
.mark { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.mark:hover { color: var(--ink); }
.mark-glyph {
  display: grid; place-items: center; width: 34px; height: 34px;
  border: 1px solid var(--ink); border-radius: 50%;
  font-family: var(--mono); font-size: .82rem; line-height: 1; color: var(--zone);
}
.mark-txt { display: flex; flex-direction: column; font-size: 1.06rem; font-weight: 800; letter-spacing: .04em; }
.mark-txt em {
  font-family: var(--mono); font-style: normal; font-size: .58rem;
  font-weight: 400; letter-spacing: .16em; color: var(--muted); text-transform: uppercase;
}

.site-nav { display: flex; align-items: center; gap: clamp(6px, 1.2vw, 18px); margin-left: auto; }
.site-nav a { position: relative; padding: 6px 1px; font-size: .9rem; color: var(--ink-2); }
.site-nav a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 2px;
  background: var(--signal); transition: right .26s ease;
}
.site-nav a:hover::after, .site-nav a.is-on::after { right: 0; }
.site-nav a.is-on { color: var(--ink); font-weight: 700; }

.head-act { display: flex; align-items: center; gap: 8px; }
.nav-btn {
  display: none; width: 40px; height: 38px; padding: 0;
  background: transparent; border: 1px solid var(--line);
  color: var(--ink); cursor: pointer;
}
.nav-btn span { display: block; width: 16px; height: 1px; margin: 3px auto; background: currentColor; }

@media (max-width: 1100px) {
  .site-nav {
    position: fixed; inset: 70px 0 auto; z-index: 49;
    flex-direction: column; align-items: stretch; gap: 0;
    max-height: calc(100dvh - 70px); overflow: auto;
    padding: 8px var(--side) 20px;
    background: var(--paper-3); border-bottom: 1px solid var(--line);
    transform: translateY(-10px); opacity: 0; pointer-events: none; visibility: hidden;
    transition: opacity .22s ease, transform .22s ease, visibility .22s;
  }
  .site-nav.is-open { transform: none; opacity: 1; pointer-events: auto; visibility: visible; }
  .site-nav a { padding: 12px 0; border-bottom: 1px dashed var(--line-soft); font-size: .98rem; }
  .site-nav a::after { display: none; }
  .nav-btn { display: block; }
  .head-act .btn--ghost { display: none; }
}

/* ---------- 航段 HUD ---------- */
.hud {
  border-bottom: 1px solid var(--line);
  background: rgba(228, 220, 199, .45);
  color: var(--muted);
  font-family: var(--mono); font-size: .66rem; letter-spacing: .14em; text-transform: uppercase;
}
.hud-in { display: flex; align-items: center; gap: 18px; height: 30px; }
.hud-coord { white-space: nowrap; }
.hud-track { position: relative; flex: 1; height: 2px; background: var(--line-soft); }
.hud-fill { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--signal); transition: width .12s linear; }
.hud-dot {
  position: absolute; top: 50%; left: 0; width: 8px; height: 8px; margin-top: -4px;
  border-radius: 50%; background: var(--signal); transform: translateX(-50%);
  transition: left .12s linear;
}
.hud-zone { white-space: nowrap; }
.hud-zone b { color: var(--ink); font-weight: 700; }
@media (max-width: 720px) { .hud-coord { display: none; } .hud { font-size: .6rem; } }

/* ---------- 按钮与链接 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border: 1px solid var(--ink); border-radius: var(--r);
  background: transparent; color: var(--ink);
  font-family: var(--sans); font-size: .9rem; font-weight: 700; letter-spacing: .02em;
  cursor: pointer; transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.btn:hover { color: var(--ink); transform: translateY(-1px); }
.btn--solid { background: var(--zone); border-color: var(--zone); color: #f7f3e8; }
.btn--solid:hover { background: var(--zone-dark); border-color: var(--zone-dark); color: #fff; }
.btn--line:hover { background: var(--ink); border-color: var(--ink); color: var(--paper-3); }
.btn--ghost { border-color: var(--line); color: var(--ink-2); font-weight: 600; }
.btn--ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn--sm { padding: 7px 13px; font-size: .8rem; }
.link {
  display: inline-flex; align-items: center; gap: 6px;
  padding-bottom: 2px; border-bottom: 1px solid currentColor;
  font-size: .9rem; font-weight: 700;
}
.link::after { content: "→"; transition: transform .2s; }
.link:hover::after { transform: translateX(3px); }

/* ---------- 区块 ---------- */
.sec { position: relative; padding: clamp(46px, 7vw, 92px) 0; }
[id] { scroll-margin-top: 112px; }
.sec--tint { background: linear-gradient(180deg, rgba(228, 220, 199, .6), rgba(239, 233, 218, 0)); }
.sec--edge { border-top: 1px solid var(--line); }
.sec-hd { max-width: 780px; margin-bottom: clamp(26px, 3.6vw, 46px); }
.sec-idx {
  display: flex; align-items: center; gap: 10px; margin: 0 0 14px;
  font-family: var(--mono); font-size: .68rem; letter-spacing: .2em;
  text-transform: uppercase; color: var(--muted);
}
.sec-idx span {
  display: inline-grid; place-items: center; width: 26px; height: 26px;
  border: 1px solid var(--line); color: var(--ink); font-size: .68rem; letter-spacing: 0;
}
.sec-title { font-size: clamp(1.55rem, 3.1vw, 2.3rem); }
.sec-lead { margin-top: 14px; color: var(--ink-2); max-width: 66ch; }

.grid { display: grid; gap: var(--gap); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(258px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(208px, 1fr)); }
.grid--wide { grid-template-columns: 1.45fr 1fr; }
@media (max-width: 860px) { .grid--wide { grid-template-columns: 1fr; } }

/* ---------- 页脚 ---------- */
.site-foot {
  border-top: 1px solid var(--line);
  background: var(--paper-2);
  padding-top: clamp(34px, 5vw, 58px);
}
.foot-top { display: grid; grid-template-columns: 1.1fr 2fr; gap: var(--gap); }
.foot-brand .mark { margin-bottom: 14px; }
.foot-brand p { color: var(--ink-2); font-size: .88rem; max-width: 34ch; }
.foot-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); gap: var(--gap); }
.foot-col h4 {
  margin-bottom: 10px; font-family: var(--mono); font-size: .66rem;
  font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--muted);
}
.foot-col a { display: block; padding: 4px 0; font-size: .87rem; color: var(--ink-2); }
.foot-col a:hover { color: var(--signal); }
.foot-note {
  margin-top: 26px; padding-top: 16px; border-top: 1px dashed var(--line);
  font-size: .78rem; line-height: 1.9; color: var(--ink-2);
}
.foot-base {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 22px; padding: 14px 0 18px; border-top: 1px solid var(--line);
  font-family: var(--mono); font-size: .68rem; letter-spacing: .06em; color: var(--muted);
}
@media (max-width: 860px) { .foot-top { grid-template-columns: 1fr; } }

/* ---------- 入场动效 ---------- */
.rv-ready .rv { opacity: 0; transform: translateY(14px); }
.rv { transition: opacity .55s ease, transform .55s cubic-bezier(.2, .7, .2, 1); }
.rv.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rv-ready .rv, .rv { opacity: 1; transform: none; transition: none; }
  .hud-fill, .hud-dot { transition: none; }
}
