:root {
  --bg: #061426;
  --cyan: #22c9f0;
  --cyan-bright: #22d2ff;
  --gold: #e2a53f;
  --text: #f5f8fc;
  --muted: #cbd9e8;
  --ok: #7ee2b8;
  --error: #ffb5a8;
  --gutter: clamp(20px, 5.7vw, 95px);
  --font: Arial, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.7;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 4px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 10;
  padding: 10px 16px;
  background: var(--cyan);
  color: #04162a;
  font-weight: 700;
  border-radius: 6px;
}
.skip-link:focus { top: 16px; }

/* ---------- Header ---------- */
.header {
  position: absolute;
  z-index: 2;
  inset: 0 0 auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 35px;
  padding: 35px var(--gutter);
}

.brand { display: block; flex: none; line-height: 0; }
.brand img { display: block; width: auto; height: 54px; }

.header nav {
  display: flex;
  gap: clamp(18px, 3.4vw, 60px);
  font-size: 16px;
  font-weight: 700;
  white-space: nowrap;
}
.header nav a { transition: color .15s; }
.header nav a:hover,
.header nav a[aria-current="page"] { color: var(--cyan); }

main { flex: 1; display: flex; flex-direction: column; }

/* ---------- Hero ---------- */
.hero {
  flex: 1;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 125px var(--gutter) 75px;
  background-color: #0a1c33;
  background-image:
    linear-gradient(90deg, rgba(2, 14, 30, .33) 0%, rgba(2, 14, 30, .13) 80%),
    url("/assets/bg.jpg");
  background-image:
    linear-gradient(90deg, rgba(2, 14, 30, .33) 0%, rgba(2, 14, 30, .13) 80%),
    image-set(url("/assets/bg.avif") type("image/avif"), url("/assets/bg.webp") type("image/webp"), url("/assets/bg.jpg") type("image/jpeg"));
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.hero-inner { max-width: 850px; }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 0 0 20px;
  color: var(--cyan-bright);
  font-size: clamp(15px, 1.7vw, 23px);
  font-weight: 700;
  letter-spacing: .06em;
}
.eyebrow span {
  display: inline-block;
  width: 72px;
  height: 2px;
  background: var(--gold);
}

.hero h1 {
  margin: 0 0 25px;
  font-size: clamp(38px, 5.45vw, 86px);
  font-weight: 800;
  line-height: 1.26;
  letter-spacing: .02em;
  text-wrap: balance;
}

.lead {
  max-width: 800px;
  margin: 0 0 32px;
  color: #e6edf5;
  font-size: clamp(16px, 1.55vw, 22px);
  line-height: 1.85;
  text-shadow: 0 2px 10px #071322;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 52px;
  padding: 10px 29px;
  background: linear-gradient(125deg, #02bce9, #1987ed);
  color: #fff;
  border: 1px solid #4cdbff;
  border-radius: 10px;
  box-shadow: 0 8px 25px rgba(0, 115, 220, .27);
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  cursor: pointer;
  transition: filter .15s, transform .15s;
}
.button:hover { filter: brightness(1.13); }
.button:active { transform: translateY(1px); }
.button:disabled { opacity: .65; cursor: progress; filter: none; }

/* ---------- Inner pages ---------- */
.inner-page { padding-top: 160px; padding-bottom: 105px; }
.inner-page h1 { font-size: clamp(38px, 5.1vw, 76px); }

/* ---------- Contact form ---------- */
.contact-form { max-width: 680px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.field { margin: 20px 0; }
.field label { display: block; margin-bottom: 7px; color: #e9f4ff; font-weight: 700; }
.field label small { margin-left: 6px; color: var(--muted); font-weight: 400; font-size: 13px; }
.field input,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  background: #fff;
  color: #142b42;
  border: 1px solid #a6b8c8;
  border-radius: 7px;
  font: inherit;
  font-size: 16px; /* 防止 iOS 聚焦时自动放大 */
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:user-invalid,
.field textarea:user-invalid { border-color: #ff7a66; box-shadow: 0 0 0 2px rgba(255, 122, 102, .35); }

.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-status { min-height: 1.6em; margin: 4px 0 16px; font-weight: 700; text-shadow: 0 1px 6px #071322; }
.form-status.is-error { color: var(--error); }
.form-status.is-ok { color: var(--ok); }

/* ---------- Footer ---------- */
footer {
  padding: 25px var(--gutter);
  background: var(--bg);
  color: #b7c7d6;
  font-size: 13px;
  text-align: center;
}

/* ---------- 404 ---------- */
.not-found .hero-inner { max-width: 640px; }

/* ---------- Mobile ---------- */
@media (max-width: 760px) {
  .header {
    position: relative;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 20px 12px;
    background: #07172a;
  }
  .brand img { height: 42px; }
  .header nav {
    width: 100%;
    justify-content: space-between;
    gap: 8px;
    font-size: 14px;
  }
  .header nav a { padding: 6px 0; } /* 加大触控区域 */
  .hero {
    min-height: calc(100svh - 112px);
    padding: 64px 20px 72px;
    background-position: 55% center;
  }
  .hero h1, .inner-page h1 { font-size: clamp(30px, 9.6vw, 61px); }
  .eyebrow { gap: 12px; }
  .eyebrow span { width: 30px; }
  .inner-page { min-height: auto; padding-top: 56px; padding-bottom: 72px; }
  .field-row { grid-template-columns: 1fr; }
}

@media (max-width: 340px) {
  .header nav { font-size: 13px; }
}
