:root {
  --ink-950: #060D14;
  --ink-900: #0B1B2B;
  --ink-800: #102A3A;
  --ink-750: #143247;
  --stone: #6F7B7A;
  --mist: #F2EFE7;
  --red: #E23D3D;
  --cyan: #28D6C4;
  --moss: #7C8F5A;
  --clay: #C96B4B;
  --glow: #4C8DFF;

  --line: rgba(111, 123, 122, 0.26);
  --line-soft: rgba(111, 123, 122, 0.16);
  --line-strong: rgba(111, 123, 122, 0.5);

  --text: rgba(242, 239, 231, 0.92);
  --text-soft: rgba(242, 239, 231, 0.66);
  --text-mute: rgba(242, 239, 231, 0.46);

  --font-display: "Helvetica Neue", "Arial Black", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "Problems Mono", Menlo, Consolas, monospace;

  --shell: 1320px;
  --pad-x: clamp(16px, 3.4vw, 40px);
  --head-h: 56px;
  --cut: 22px;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--ink-900);
  background-image:
    radial-gradient(1100px 640px at 84% -12%, rgba(40, 214, 196, 0.11), transparent 62%),
    radial-gradient(900px 560px at 4% 2%, rgba(226, 61, 61, 0.11), transparent 60%),
    radial-gradient(760px 520px at 60% 100%, rgba(76, 141, 255, 0.08), transparent 64%),
    linear-gradient(180deg, #0B1B2B 0%, #0B1B2B 48%, #091623 100%);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.75;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg, picture, video { max-width: 100%; }

h1, h2, h3, h4, h5 {
  margin: 0 0 0.5em;
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: var(--mist);
}

h1 { font-size: clamp(2.6rem, 6vw, 5.6rem); line-height: 1.02; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.2rem); }
h3 { font-size: clamp(1.15rem, 1.7vw, 1.4rem); line-height: 1.2; }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

a { color: inherit; }

ul, ol { margin: 0 0 1.1em; padding-left: 1.15em; }
li { margin-bottom: 0.35em; }

strong { color: var(--mist); font-weight: 700; }

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

::selection {
  background: rgba(226, 61, 61, 0.85);
  color: #fff;
}

/* ---------- skip link ---------- */
.skip-link {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 300;
  padding: 0.7rem 1.15rem;
  background: var(--cyan);
  color: #05161b;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: top 0.18s ease;
}

.skip-link:focus,
.skip-link:focus-visible {
  top: 10px;
  outline: 2px solid var(--mist);
  outline-offset: 2px;
}

/* ---------- shell / grid ---------- */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--pad-x);
}

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.75rem);
}

/* ---------- header ---------- */
.site-head {
  position: sticky;
  top: 0;
  z-index: 120;
  background: linear-gradient(180deg, rgba(11, 27, 43, 0.99), rgba(11, 27, 43, 0.95));
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: box-shadow 0.25s ease;
}

.site-head[data-stuck] {
  box-shadow: 0 22px 44px -30px #000, 0 1px 0 rgba(40, 214, 196, 0.18);
}

.head-bar {
  display: flex;
  align-items: center;
  gap: 1.15rem;
  max-width: var(--shell);
  margin-inline: auto;
  padding: 0 var(--pad-x);
  min-height: var(--head-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  margin-right: auto;
  padding: 0.35rem 0.9rem 0.35rem 0;
  color: var(--mist);
  text-decoration: none;
  border-right: 1px solid var(--line-soft);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  color: var(--cyan);
  border: 1px solid rgba(40, 214, 196, 0.3);
  flex: none;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.02rem;
  letter-spacing: 0.04em;
  color: var(--mist);
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--stone);
}

.head-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  padding: 0.32rem 0.68rem;
  border: 1px solid rgba(40, 214, 196, 0.28);
  background: rgba(40, 214, 196, 0.05);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.09em;
  color: #9df0e6;
  white-space: nowrap;
}

.status-dot {
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 0 rgba(40, 214, 196, 0.55);
  animation: status-pulse 2.8s ease-out infinite;
}

.status-time {
  color: var(--mist);
  letter-spacing: 0.06em;
}

@keyframes status-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(40, 214, 196, 0.5); }
  70%  { box-shadow: 0 0 0 7px rgba(40, 214, 196, 0); }
  100% { box-shadow: 0 0 0 0 rgba(40, 214, 196, 0); }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.72rem 1.15rem;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  background: transparent;
  color: var(--mist);
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn:hover {
  background: rgba(242, 239, 231, 0.07);
  border-color: var(--mist);
}

.btn--heat {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

.btn--heat:hover {
  background: #ef5151;
  border-color: #ef5151;
  color: #fff;
}

.head-cta {
  padding: 0.6rem 0.95rem;
  font-size: 0.82rem;
  white-space: nowrap;
}

/* ---------- nav toggle ---------- */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  background: rgba(16, 42, 58, 0.6);
  color: var(--mist);
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  cursor: pointer;
}

.nav-toggle:hover { border-color: var(--cyan); color: var(--cyan); }

.nav-toggle-glyph {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 18px;
  flex: none;
}

.nav-toggle-glyph span {
  display: block;
  height: 2px;
  background: currentColor;
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.nav-toggle-glyph span:nth-child(2) { width: 70%; }

.site-head[data-open] .nav-toggle-glyph span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.site-head[data-open] .nav-toggle-glyph span:nth-child(2) { opacity: 0; }
.site-head[data-open] .nav-toggle-glyph span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- primary nav ---------- */
.site-nav {
  border-top: 1px solid var(--line-soft);
  background: linear-gradient(90deg, rgba(16, 42, 58, 0.55), rgba(11, 27, 43, 0.25) 62%, transparent);
}

.nav-list {
  display: flex;
  align-items: stretch;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 var(--pad-x);
  list-style: none;
}

.nav-item { margin: 0; }

.nav-list a {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 0.55rem;
  padding: 0.78rem 1.15rem 0.74rem;
  color: var(--text-soft);
  font-size: 0.89rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  border-right: 1px solid var(--line-soft);
  transition: color 0.2s ease, background-color 0.2s ease;
}

.nav-item:first-child .nav-list a,
.nav-list > .nav-item:first-child > a { border-left: 1px solid var(--line-soft); }

.nav-idx {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.1em;
  color: var(--stone);
  transform: translateY(-1px);
  transition: color 0.2s ease;
}

.nav-list a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.25s ease;
}

.nav-list a:hover {
  color: var(--mist);
  background: rgba(242, 239, 231, 0.045);
}

.nav-list a:hover .nav-idx { color: var(--cyan); }
.nav-list a:hover::after { transform: scaleX(1); }

.nav-list a[aria-current="page"] {
  color: var(--mist);
  background: rgba(226, 61, 61, 0.09);
}

.nav-list a[aria-current="page"] .nav-idx { color: var(--cyan); }
.nav-list a[aria-current="page"]::after { transform: scaleX(1); }

/* ---------- scroll progress ---------- */
.head-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  overflow: hidden;
  pointer-events: none;
}

.head-progress i {
  display: block;
  height: 100%;
  width: var(--progress, 0%);
  background: linear-gradient(90deg, var(--cyan), var(--red));
  transition: width 0.12s linear;
}

/* ---------- footer ---------- */
.site-foot {
  position: relative;
  margin-top: clamp(3.5rem, 8vw, 7rem);
  border-top: 1px solid var(--line);
  background: linear-gradient(162deg, #0B1B2B 0%, #0A1A28 44%, #060D14 100%);
  color: var(--text-soft);
  overflow: hidden;
}

.site-foot::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(111, 123, 122, 0.09) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(111, 123, 122, 0.07) 1px, transparent 1px);
  background-size: 96px 96px;
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.6), transparent 72%);
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.6), transparent 72%);
}

.foot-top {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.9rem 2rem;
  max-width: var(--shell);
  margin-inline: auto;
  padding: clamp(2.4rem, 5vw, 3.8rem) var(--pad-x) clamp(1.4rem, 2.6vw, 2.2rem);
  border-bottom: 1px solid var(--line);
}

.foot-kicker {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--cyan);
}

.foot-closing {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.05rem, 2.1vw, 1.5rem);
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--mist);
  max-width: 34ch;
}

.foot-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(220px, 1.55fr) repeat(3, minmax(110px, 0.8fr)) minmax(215px, 1.3fr);
  gap: clamp(1.5rem, 3vw, 3rem);
  max-width: var(--shell);
  margin-inline: auto;
  padding: clamp(2rem, 4vw, 3rem) var(--pad-x);
}

.brand--foot {
  margin-right: 0;
  padding-right: 0;
  border-right: 0;
  margin-bottom: 0.9rem;
}

.foot-note {
  margin: 0;
  max-width: 34ch;
  font-size: 0.86rem;
  line-height: 1.7;
  color: var(--text-mute);
}

.foot-title {
  position: relative;
  margin: 0 0 1rem;
  padding-bottom: 0.6rem;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--stone);
}

.foot-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 28px;
  height: 2px;
  background: var(--clay);
}

.foot-links,
.foot-contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.foot-links li,
.foot-contact-list li { margin: 0; }

.foot-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text-soft);
  font-size: 0.9rem;
  text-decoration: none;
  transition: color 0.18s ease;
}

.foot-links a::before {
  content: "";
  width: 6px;
  height: 1px;
  background: var(--stone);
  transition: width 0.2s ease, background-color 0.2s ease;
}

.foot-links a:hover { color: var(--mist); }
.foot-links a:hover::before { width: 16px; background: var(--cyan); }

.foot-contact-list li {
  display: grid;
  gap: 0.15rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--line-soft);
}

.foot-key {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--stone);
}

.foot-val {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text);
  word-break: break-word;
}

.foot-base {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem 1.5rem;
  max-width: var(--shell);
  margin-inline: auto;
  padding: 1.1rem var(--pad-x) 2rem;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--text-mute);
}

.foot-copy { margin: 0; }

/* ---------- shared building blocks ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 1rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cyan);
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
  opacity: 0.7;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.24rem 0.6rem;
  border: 1px solid rgba(111, 123, 122, 0.45);
  background: rgba(16, 42, 58, 0.5);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-soft);
  white-space: nowrap;
}

.tag--cyan { color: #9df0e6; border-color: rgba(40, 214, 196, 0.42); }
.tag--red { color: #ff9c9c; border-color: rgba(226, 61, 61, 0.46); }
.tag--clay { color: #e8ab92; border-color: rgba(201, 107, 75, 0.48); }

.stat-num {
  font-family: var(--font-mono);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--mist);
}

.panel {
  position: relative;
  padding: clamp(1.2rem, 2.4vw, 2rem);
  border: 1px solid var(--line);
  background: linear-gradient(168deg, rgba(16, 42, 58, 0.92), rgba(11, 27, 43, 0.92));
}

.breadcrumbs {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.07em;
  color: var(--text-mute);
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.breadcrumbs li { margin: 0; display: inline-flex; align-items: center; }

.breadcrumbs li:not(:last-child)::after {
  content: "/";
  margin-left: 0.4rem;
  color: var(--stone);
}

.breadcrumbs a {
  color: var(--text-soft);
  text-decoration: none;
}

.breadcrumbs a:hover { color: var(--cyan); }

.prose {
  max-width: 72ch;
  font-size: 1rem;
  line-height: 1.85;
  color: var(--text);
}

.prose h2 {
  margin-top: 2.3em;
  padding-top: 0.7em;
  border-top: 1px solid var(--line);
  font-size: clamp(1.3rem, 2vw, 1.7rem);
}

.prose h3 { margin-top: 1.8em; }

.prose > :first-child { margin-top: 0; }

.prose ul,
.prose ol { padding-left: 1.25em; }

.prose a {
  color: var(--mist);
  text-decoration: underline;
  text-decoration-color: var(--clay);
  text-underline-offset: 0.22em;
}

.prose a:hover { color: var(--clay); }

/* ---------- media frame base ---------- */
.media-frame {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background:
    radial-gradient(120% 90% at 16% 10%, rgba(40, 214, 196, 0.18), transparent 58%),
    radial-gradient(90% 80% at 88% 96%, rgba(226, 61, 61, 0.16), transparent 60%),
    linear-gradient(150deg, #102A3A 0%, #0B1B2B 62%, #060D14 100%);
  border: 1px solid var(--line);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%);
}

.media-frame > img,
.media-frame > svg,
.media-frame > picture,
.media-frame > picture > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 16.666% 25%;
}

.media-frame--wide { aspect-ratio: 21 / 9; }
.media-frame--tall { aspect-ratio: 4 / 5; }
.media-frame--square { aspect-ratio: 1 / 1; }

.media-frame__label {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 2;
  padding: 0.42rem 0.8rem;
  background: rgba(6, 13, 20, 0.84);
  color: #9df0e6;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* ---------- reveal ---------- */
.reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.55s ease, transform 0.55s ease;
  }
  .reveal.is-in {
    opacity: 1;
    transform: none;
  }
}

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .foot-grid {
    grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 0.9fr));
  }
  .foot-brand { grid-column: 1 / -1; }
  .foot-contact { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  .head-bar {
    gap: 0.65rem;
    min-height: 54px;
  }
  .brand { padding-right: 0.65rem; }
  .brand-sub { display: none; }
  .head-status { display: none; }
  .nav-toggle { display: inline-flex; }
  .head-cta { padding: 0.52rem 0.72rem; font-size: 0.76rem; }

  .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    display: none;
    max-height: calc(100vh - 56px);
    overflow-y: auto;
    background: var(--ink-800);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 30px 60px -30px #000;
  }

  .site-head[data-open] .site-nav { display: block; }

  .nav-list {
    flex-direction: column;
    padding: 0;
  }

  .nav-item { border-bottom: 1px solid var(--line-soft); }
  .nav-item:last-child { border-bottom: 0; }

  .nav-list a {
    display: flex;
    width: 100%;
    padding: 0.95rem var(--pad-x);
    border-right: 0;
    border-left: 3px solid transparent;
    font-size: 0.95rem;
  }

  .nav-item:first-child .nav-list a,
  .nav-list > .nav-item:first-child > a { border-left: 3px solid transparent; }

  .nav-list a::after { display: none; }
  .nav-list a[aria-current="page"] { border-left-color: var(--red); }

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

  .foot-top { align-items: flex-start; }
  .foot-closing { max-width: none; }
}

@media (max-width: 620px) {
  .head-cta { display: none; }
  .foot-grid { grid-template-columns: 1fr; gap: 1.8rem; }
  .foot-base { flex-direction: column; align-items: flex-start; }
  .grid-12 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  :root { --cut: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .status-dot { animation: none; box-shadow: 0 0 0 3px rgba(40, 214, 196, 0.18); }
  .head-progress i { transition: none; }
}
