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

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

body, h1, h2, h3, h4, h5, h6, p, ul, ol, li, figure, blockquote, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }

:root {
  --ink: #0A0B0E;
  --ink-2: #15171C;
  --steel: #232830;
  --paper: #F4EDE3;
  --paper-2: #E6DCCC;
  --orange: #FF5A1F;
  --orange-soft: #FF8A47;
  --lava: #F0281E;
  --blue: #2E6BFF;
  --teal: #17BFA0;
  --mist: #9BA3B0;
  --ink-text: #12141A;
  --text-dim: #C9CFD9;
  --rail-w: 88px;
  --quick-h: 40px;
  --mob-h: 60px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font-sans: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-serif: "Source Han Serif SC", "Noto Serif SC", "Songti SC", "SimSun", Georgia, serif;
  --font-mono: "SFMono-Regular", "JetBrains Mono", "Roboto Mono", Consolas, "Courier New", monospace;
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: 0.01em;
  color: var(--paper);
  background-color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  padding-top: var(--mob-h);
  overflow-x: hidden;
}

@media (min-width: 1024px) {
  body { padding-top: var(--quick-h); padding-left: var(--rail-w); }
}

h1, h2, h3, h4 { font-weight: 900; line-height: 1.05; letter-spacing: -0.01em; }

:where(a, button, [tabindex], summary, input, textarea, select):focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
}

#main-content {
  display: block;
  scroll-margin-top: calc(var(--mob-h) + 8px);
}

@media (min-width: 1024px) {
  #main-content { scroll-margin-top: calc(var(--quick-h) + 8px); }
}

/* ---------- skip link ---------- */
.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 300;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
  background: var(--orange);
  transform: translateY(-220%);
  transition: transform 0.18s var(--ease);
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
}
.skip-link:focus { transform: translateY(0); }

/* ---------- shell ---------- */
.site-header { position: relative; z-index: 120; }

/* ---------- quickbar ---------- */
.quickbar {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 130;
  height: var(--quick-h);
  background: #06070A;
  border-bottom: 1px solid var(--steel);
}
.quickbar__inner {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 100%;
  padding: 0 24px 0 calc(var(--rail-w) + 20px);
}
.quickbar__tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--mist);
  white-space: nowrap;
}
.quickbar__tag::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 3px rgba(255, 90, 31, 0.18);
}
.quickbar__list { display: flex; align-items: center; gap: 2px; }
.quickbar__link {
  display: inline-block;
  padding: 5px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
  border-radius: 2px;
  transition: color 0.16s, background 0.16s;
}
.quickbar__link:hover { color: #FFFFFF; background: var(--ink-2); }
.quickbar__link[aria-current="page"] { color: var(--orange); }

@media (min-width: 1024px) { .quickbar { display: block; } }

/* ---------- track / rail ---------- */
.track {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: var(--mob-h);
  padding: 0 16px 0 14px;
  background: var(--ink);
  border-bottom: 1px solid var(--steel);
  transition: box-shadow 0.2s var(--ease), border-color 0.2s var(--ease);
}
.site-header[data-scrolled="true"] .track { box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55); }

@media (min-width: 1024px) {
  .track {
    top: var(--quick-h);
    right: auto;
    bottom: 0;
    height: auto;
    width: var(--rail-w);
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0;
    padding: 18px 8px 14px;
    background: var(--ink-2);
    border-bottom: 0;
    border-right: 1px solid var(--steel);
  }
  .site-header[data-scrolled="true"] .track { box-shadow: none; }
}

/* ---------- brand ---------- */
.brand { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.brand__mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  font-size: 19px;
  font-weight: 900;
  line-height: 1;
  color: var(--ink);
  background: var(--orange);
  clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 9px, 100% 100%, 9px 100%, 0 calc(100% - 9px));
  transition: background 0.18s var(--ease);
}
.brand:hover .brand__mark { background: var(--orange-soft); }
.brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.brand__name { font-size: 14px; font-weight: 900; letter-spacing: 0.12em; color: var(--paper); }
.brand__sub {
  display: none;
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--mist);
}

@media (min-width: 1024px) {
  .brand { flex-direction: column; gap: 8px; width: 100%; }
  .brand__text { align-items: center; gap: 3px; }
  .brand__name { font-size: 11px; letter-spacing: 0.04em; }
  .brand__sub { display: block; }
}

/* ---------- nav ---------- */
.track__nav {
  position: fixed;
  top: var(--mob-h);
  left: 0;
  right: 0;
  z-index: 118;
  max-height: calc(100vh - var(--mob-h));
  max-height: calc(100dvh - var(--mob-h));
  overflow-y: auto;
  padding: 10px 12px 18px;
  background: var(--ink);
  border-bottom: 1px solid var(--steel);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  pointer-events: none;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), visibility 0.2s;
}
.site-header[data-open="true"] .track__nav {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.track__list { display: flex; flex-direction: column; gap: 2px; }
.track__link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text-dim);
  border-radius: 2px;
  transition: color 0.16s, background 0.16s;
}
.track__link:hover { color: #FFFFFF; background: var(--ink-2); }
.track__link[aria-current="page"] { color: var(--orange); background: rgba(255, 90, 31, 0.1); }
.track__num {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
  color: var(--mist);
}
.track__link[aria-current="page"] .track__num { color: var(--orange); }

@media (min-width: 1024px) {
  .track__nav,
  .site-header[data-open="true"] .track__nav {
    position: static;
    z-index: auto;
    width: 100%;
    flex: 1 1 auto;
    max-height: none;
    overflow: visible;
    padding: 16px 0 0;
    background: transparent;
    border: 0;
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
    transition: none;
  }
  .track__list { gap: 1px; }
  .track__link {
    position: relative;
    flex-direction: column;
    gap: 1px;
    justify-content: center;
    padding: 10px 0;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-align: center;
    border-radius: 0;
  }
  .track__link[aria-current="page"] { background: transparent; }
  .track__link[aria-current="page"]::before {
    content: "";
    position: absolute;
    left: -8px;
    top: 6px;
    bottom: 6px;
    width: 3px;
    background: var(--orange);
    border-radius: 0 2px 2px 0;
  }
  .track__num { font-size: 9px; }
}

/* ---------- toggle ---------- */
.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  border: 1px solid var(--steel);
  border-radius: 2px;
  background: var(--ink-2);
  transition: border-color 0.16s, background 0.16s;
}
.nav-toggle:hover { border-color: var(--orange); }
.nav-toggle__bar {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--paper);
  transition: transform 0.22s var(--ease), opacity 0.16s;
}
.site-header[data-open="true"] .nav-toggle__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.site-header[data-open="true"] .nav-toggle__bar:nth-child(2) { opacity: 0; }
.site-header[data-open="true"] .nav-toggle__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (min-width: 1024px) { .nav-toggle { display: none; } }

/* ---------- scrim ---------- */
.nav-scrim {
  position: fixed;
  top: var(--mob-h);
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 116;
  background: rgba(4, 5, 7, 0.68);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s var(--ease), visibility 0.2s;
}
.site-header[data-open="true"] .nav-scrim { opacity: 1; visibility: visible; }

@media (min-width: 1024px) { .nav-scrim { display: none; } }

@media (max-width: 1023px) {
  html.nav-open, html.nav-open body { overflow: hidden; }
}

/* ---------- footer ---------- */
.site-footer {
  position: relative;
  background: var(--paper);
  color: var(--ink-text);
}
.site-footer::before {
  content: "";
  display: block;
  height: 8px;
  background: linear-gradient(
    90deg,
    var(--orange) 0 18%,
    var(--lava) 18% 30%,
    var(--ink) 30% 72%,
    var(--blue) 72% 87%,
    var(--teal) 87% 100%
  );
}
.footer__inner {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 52px 20px 30px;
}
@media (min-width: 768px) { .footer__inner { padding: 64px 32px 36px; } }

.footer__top { display: grid; gap: 36px; }
@media (min-width: 900px) {
  .footer__top { grid-template-columns: 300px 1fr; gap: 56px; align-items: start; }
}

.footer__brand { display: block; }
.footer__mark {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
  color: var(--ink);
  background: var(--orange);
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
}
.footer__wordmark {
  margin-top: 14px;
  font-size: clamp(26px, 4vw, 34px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--ink-text);
}
.footer__closing {
  margin-top: 10px;
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.6;
  color: #3A3F49;
}
.footer__tagline {
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: #7A7164;
}

.footer__nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 28px 24px;
}
.footer__col { min-width: 0; }
.footer__col-title {
  margin-bottom: 10px;
  padding-bottom: 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: #6E6659;
  border-bottom: 1px solid rgba(18, 20, 26, 0.16);
}
.footer__links { display: flex; flex-direction: column; gap: 1px; }
.footer__link {
  display: inline-block;
  align-self: flex-start;
  padding: 6px 0;
  font-size: 15px;
  font-weight: 600;
  color: #2A2D35;
  transition: color 0.16s, box-shadow 0.16s;
}
.footer__link:hover { color: var(--lava); box-shadow: inset 0 -1px 0 var(--lava); }
.footer__link[aria-current="page"] { color: var(--lava); font-weight: 800; }

.footer__contact {
  margin-top: 40px;
  padding: 18px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 32px;
  background: var(--paper-2);
  border-left: 4px solid var(--orange);
}
.footer__contact-item { font-size: 14px; line-height: 1.6; color: #2A2D35; }
.footer__contact-label {
  margin-right: 10px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: #6E6659;
}
.footer__contact-value { font-variant-numeric: tabular-nums; font-weight: 600; }
.footer__contact-note { width: 100%; font-size: 12.5px; color: #6E6659; }

.footer__meta {
  margin-top: 32px;
  padding-top: 18px;
  border-top: 1px solid rgba(18, 20, 26, 0.16);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
}
.footer__legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 20px;
  font-size: 13px;
  color: #5C5548;
}
.footer__copy { font-variant-numeric: tabular-nums; }
.footer__icp { font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }

.to-top {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-text);
  border: 1px solid rgba(18, 20, 26, 0.26);
  border-radius: 2px;
  transition: background 0.16s, color 0.16s, border-color 0.16s;
}
.to-top:hover { background: var(--ink-text); color: var(--paper); border-color: var(--ink-text); }

/* ---------- layout helpers ---------- */
.container {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: 20px;
}
@media (min-width: 768px) { .container { padding-inline: 32px; } }
@media (min-width: 1024px) { .container { padding-inline: 40px 24px; } }

.grid { display: grid; gap: 24px; }
.grid--2 { grid-template-columns: 1fr; }
.grid--3 { grid-template-columns: 1fr; }
@media (min-width: 768px) {
  .grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.2;
  border: 1px solid transparent;
  border-radius: 0;
  cursor: pointer;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
  transition: background 0.18s var(--ease), color 0.18s, transform 0.18s var(--ease), border-color 0.18s;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--orange); color: var(--ink); }
.btn--primary:hover { background: var(--orange-soft); }
.btn--ghost { background: transparent; color: var(--paper); border-color: var(--steel); }
.btn--ghost:hover { border-color: var(--orange); color: var(--orange); }
.btn--ink { background: var(--ink-text); color: var(--paper); }
.btn--ink:hover { background: #2A2D35; }

/* ---------- breadcrumb ---------- */
.breadcrumb {
  --bc: var(--mist);
  --bc-strong: var(--paper);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--bc);
}
.breadcrumb a { color: var(--bc); transition: color 0.16s; }
.breadcrumb a:hover { color: var(--orange); }
.breadcrumb__sep { color: #4A505C; }
.breadcrumb__current { color: var(--bc-strong); font-weight: 700; }
.breadcrumb--light { --bc: #6E6659; --bc-strong: var(--ink-text); }

/* ---------- section scaffolding ---------- */
.section { position: relative; padding: 64px 0; }
@media (min-width: 768px) { .section { padding: 84px 0; } }
.section__index {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18em;
  font-variant-numeric: tabular-nums;
  color: var(--orange);
}
.section__title {
  margin-top: 6px;
  font-size: clamp(28px, 4vw, 46px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.01em;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--orange);
}

/* ---------- bands & texture ---------- */
.band { height: 8px; background: var(--orange); border: 0; }
.band--split {
  background: linear-gradient(90deg, var(--orange) 0 52%, var(--ink-2) 52% 84%, var(--blue) 84% 100%);
}
.grid-bg {
  background-image:
    linear-gradient(rgba(155, 163, 176, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(155, 163, 176, 0.09) 1px, transparent 1px);
  background-size: 48px 48px;
}

/* ---------- media ---------- */
.media {
  position: relative;
  overflow: hidden;
  background: var(--ink-2);
  aspect-ratio: 16 / 9;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
}
.media img { width: 100%; height: 100%; object-fit: cover; }
.media--wide { aspect-ratio: 21 / 9; }
.media--tall { aspect-ratio: 3 / 4; }
.media--square { aspect-ratio: 1 / 1; }
.media--paper { background: var(--paper-2); }
.media__caption {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 10px 14px;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--paper);
  background: linear-gradient(transparent, rgba(10, 11, 14, 0.85));
}

/* ---------- reveal ---------- */
.js-ready [data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
}
.js-ready [data-reveal].is-visible { opacity: 1; transform: none; }

/* ---------- reduced motion ---------- */
@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;
  }
  .btn:hover { transform: none; }
  .js-ready [data-reveal] { opacity: 1; transform: none; }
}
