/* ========== Reset & Tokens ========== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --cream: #F5F0E6;
  --ink: #2B1E16;
  --blue: #1E5B8A;
  --snow: #FAFAFA;
  --orange: #E8732A;
  --green: #3D7A4B;
  --red: #C8442E;
  --navy: #0D2B40;
  --navy-2: #16384F;
  --line: #D9D0C0;
  --sand: #F2E4C9;

  --font-sans: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", "Cascadia Mono", "IBM Plex Mono", Consolas, monospace;

  --radius-lg: 28px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --radius-pill: 999px;

  --header-h: 72px;
  --container-max: 1280px;
  --side-pad: 24px;

  --dur: 300ms;
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --shadow-soft: 0 6px 20px rgba(43, 30, 22, 0.08);
}

/* ========== Base ========== */
html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--blue);
  text-decoration: none;
  transition: color var(--dur) var(--ease);
}

a:hover {
  color: var(--orange);
}

button {
  font-family: inherit;
}

:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

::selection {
  background: var(--orange);
  color: var(--snow);
}

#main-content {
  scroll-margin-top: calc(var(--header-h) + 12px);
}

/* ========== Utilities ========== */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--side-pad);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: fixed;
  top: -48px;
  left: 16px;
  z-index: 2000;
  padding: 10px 20px;
  background: var(--navy);
  color: var(--snow);
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 700;
  transition: top var(--dur) var(--ease);
}

.skip-link:focus {
  top: 12px;
}

/* ========== Scroll Track ========== */
.scroll-track {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 900;
  width: 100%;
  height: 4px;
  background: rgba(232, 115, 42, 0.16);
  border-radius: 0 var(--radius-pill) var(--radius-pill) 0;
  pointer-events: none;
}

.scroll-track__bar {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--orange) 0%, #f0a050 70%, var(--blue) 130%);
  border-radius: inherit;
  transition: width 80ms linear;
}

/* ========== Buttons ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 26px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease), transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.btn--primary {
  background: var(--orange);
  color: var(--snow);
  box-shadow: 0 3px 0 rgba(200, 68, 46, 0.35);
}

.btn--primary:hover {
  background: #d95f1e;
  color: var(--snow);
  transform: translateY(-1px);
  box-shadow: 0 5px 0 rgba(200, 68, 46, 0.3);
}

.btn--primary:active {
  transform: translateY(1px);
  box-shadow: 0 1px 0 rgba(200, 68, 46, 0.35);
}

.btn--secondary {
  background: transparent;
  color: var(--blue);
  box-shadow: inset 0 0 0 1.5px var(--blue);
}

.btn--secondary:hover {
  background: var(--blue);
  color: var(--snow);
}

.btn--success {
  background: var(--green);
  color: var(--snow);
  box-shadow: 0 3px 0 rgba(61, 122, 75, 0.3);
}

.btn--success:hover {
  background: #2f6840;
  color: var(--snow);
}

.btn--ghost-light {
  background: transparent;
  color: var(--snow);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
}

.btn--ghost-light:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--snow);
}

.btn--sm {
  padding: 9px 18px;
  font-size: 13px;
}

/* ========== Brand ========== */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  color: var(--ink);
}

.brand:hover {
  color: var(--ink);
}

.brand__mark {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.brand__mark::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 7px;
  transform: translateX(-50%);
  width: 24px;
  height: 20px;
  background: var(--blue);
  clip-path: polygon(0 100%, 50% 0, 100% 100%);
}

.brand__mark::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 2px;
  transform: translateX(-50%) rotate(-8deg);
  width: 30px;
  height: 4px;
  border-radius: var(--radius-pill);
  background: var(--orange);
}

.brand__name {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.02em;
  line-height: 1.15;
  white-space: nowrap;
}

.brand__geo {
  display: none;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--blue);
  border-left: 1px solid var(--line);
  padding-left: 12px;
  margin-left: 4px;
  white-space: nowrap;
}

.brand--light {
  color: var(--snow);
}

.brand--light:hover {
  color: var(--snow);
}

.brand--light .brand__name {
  color: var(--snow);
}

.brand--light .brand__mark::before {
  background: var(--snow);
}

.brand--light .brand__mark::after {
  background: var(--orange);
}

/* ========== Header ========== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 800;
  background: var(--cream);
  border-bottom: 2px solid var(--ink);
}

.site-header__inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--header-h);
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.site-header__cta {
  flex-shrink: 0;
}

/* ========== Nav ========== */
.site-nav {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 2px;
}

.site-nav__link {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 8px 14px;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  border-radius: var(--radius-pill);
  white-space: nowrap;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}

.site-nav__num {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
  color: var(--blue);
  letter-spacing: 0.04em;
  opacity: 0.65;
}

.site-nav__label {
  display: inline-block;
}

.site-nav__link::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 2px;
  height: 3px;
  border-radius: var(--radius-pill);
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur) var(--ease);
}

.site-nav__link:hover {
  background: var(--sand);
  color: var(--ink);
}

.site-nav__link:hover::after {
  transform: scaleX(1);
}

.site-nav__link[aria-current="page"] {
  font-weight: 800;
  background: rgba(30, 91, 138, 0.08);
}

.site-nav__link[aria-current="page"]::after {
  transform: scaleX(1);
}

/* ========== Nav Toggle ========== */
.site-nav__toggle {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  border: none;
  background: transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  flex-shrink: 0;
}

.site-nav__toggle:hover {
  background: var(--sand);
}

.site-nav__toggle-bar {
  position: absolute;
  left: 10px;
  right: 10px;
  height: 3px;
  border-radius: var(--radius-pill);
  background: var(--ink);
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease), top var(--dur) var(--ease);
}

.site-nav__toggle-bar:nth-child(1) {
  top: 14px;
}

.site-nav__toggle-bar:nth-child(2) {
  top: 21px;
}

.site-nav__toggle-bar:nth-child(3) {
  top: 28px;
}

.site-nav__toggle[aria-expanded="true"] .site-nav__toggle-bar:nth-child(1) {
  top: 21px;
  transform: rotate(45deg);
}

.site-nav__toggle[aria-expanded="true"] .site-nav__toggle-bar:nth-child(2) {
  opacity: 0;
}

.site-nav__toggle[aria-expanded="true"] .site-nav__toggle-bar:nth-child(3) {
  top: 21px;
  transform: rotate(-45deg);
}

/* ========== Footer ========== */
.site-footer {
  position: relative;
  margin-top: 96px;
  background: var(--navy);
  color: rgba(255, 255, 255, 0.72);
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--orange) 0 33.33%, var(--blue) 33.33% 66.66%, var(--green) 66.66% 100%);
}

.site-footer__layout {
  display: grid;
  grid-template-columns: minmax(280px, 1.2fr) 2fr;
  gap: 56px;
  padding: 72px 0 48px;
}

.site-footer__intro {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}

.site-footer__tagline {
  font-size: 14px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.6);
  max-width: 320px;
}

.site-footer__meta {
  list-style: none;
  display: grid;
  gap: 8px;
  font-size: 13px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.55);
}

.site-footer__cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.site-footer__heading {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--orange);
  margin-bottom: 18px;
}

.site-footer__links {
  list-style: none;
  display: grid;
  gap: 12px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.72);
}

.site-footer__links a {
  color: rgba(255, 255, 255, 0.75);
  font-size: 14px;
  transition: color var(--dur) var(--ease), padding-left var(--dur) var(--ease);
}

.site-footer__links a:hover {
  color: var(--orange);
  padding-left: 4px;
}

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding: 24px 0 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-family: var(--font-mono);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
}

/* ========== Sections ========== */
.section {
  padding: 80px 0;
}

.section--sand {
  background: var(--sand);
}

.section--snow {
  background: var(--snow);
}

.section--navy {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.85);
}

.section--tight {
  padding: 48px 0;
}

.section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-bottom: 44px;
}

.section__title {
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.section__lead {
  margin-top: 6px;
  max-width: 640px;
  color: rgba(43, 30, 22, 0.7);
}

.section--navy .section__lead {
  color: rgba(255, 255, 255, 0.7);
}

/* ========== Data Index ========== */
.data-index {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--orange);
  background: rgba(232, 115, 42, 0.1);
}

.data-index--blue {
  color: var(--blue);
  background: rgba(30, 91, 138, 0.1);
}

.data-index--green {
  color: var(--green);
  background: rgba(61, 122, 75, 0.12);
}

.data-index--red {
  color: var(--red);
  background: rgba(200, 68, 46, 0.1);
}

/* ========== Grid ========== */
.grid {
  display: grid;
  gap: 24px;
}

.grid--2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid--4 {
  grid-template-columns: repeat(4, 1fr);
}

.grid--feature {
  grid-template-columns: 1.2fr 1fr;
}

/* ========== Card ========== */
.card {
  padding: 32px 28px;
  background: var(--snow);
  border-radius: var(--radius-lg);
  box-shadow: 0 2px 0 rgba(43, 30, 22, 0.04);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-soft);
}

.card--sand {
  background: var(--sand);
}

.card--navy {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.85);
}

.card__title {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 12px;
}

.card__text {
  font-size: 14px;
  line-height: 1.65;
  color: rgba(43, 30, 22, 0.75);
}

.card--navy .card__text {
  color: rgba(255, 255, 255, 0.65);
}

/* ========== Chip ========== */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 20px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--line);
  background: var(--snow);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: all var(--dur) var(--ease);
}

.chip:hover {
  border-color: var(--blue);
  color: var(--blue);
  transform: translateY(-1px);
}

.chip[data-active="true"],
.chip[aria-pressed="true"] {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--snow);
}

/* ========== Breadcrumb ========== */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  padding: 20px 0 0;
  font-family: var(--font-mono);
  font-size: 13px;
  list-style: none;
}

.breadcrumb li {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.breadcrumb li + li::before {
  content: "/";
  color: var(--line);
}

.breadcrumb a {
  color: var(--blue);
}

.breadcrumb a:hover {
  color: var(--orange);
}

.breadcrumb [aria-current="page"] {
  color: var(--ink);
  font-weight: 700;
}

/* ========== Prose ========== */
.prose {
  max-width: 760px;
  font-size: 16px;
  line-height: 1.75;
}

.prose p {
  margin-bottom: 1.2em;
  color: rgba(43, 30, 22, 0.82);
}

.prose h2 {
  font-size: 24px;
  font-weight: 900;
  margin: 1.6em 0 0.6em;
}

.prose h3 {
  font-size: 20px;
  font-weight: 800;
  margin: 1.4em 0 0.5em;
}

.prose ul {
  margin: 0 0 1.2em 1.4em;
}

.prose li {
  margin-bottom: 0.4em;
}

.prose strong {
  font-weight: 800;
  color: var(--ink);
}

.prose a {
  font-weight: 600;
  box-shadow: inset 0 -2px 0 rgba(30, 91, 138, 0.25);
}

.prose a:hover {
  box-shadow: inset 0 -2px 0 var(--orange);
}

/* ========== Media Frame ========== */
.media-frame {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: repeating-linear-gradient(-45deg, var(--sand) 0 8px, transparent 8px 16px), var(--cream);
  box-shadow: var(--shadow-soft);
}

.media-frame--21x9 {
  aspect-ratio: 21 / 9;
}

.media-frame--1x1 {
  aspect-ratio: 1 / 1;
}

.media-frame--3x4 {
  aspect-ratio: 3 / 4;
}

.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 400ms var(--ease);
}

.media-frame:hover img {
  transform: scale(1.03);
}

.media-frame__placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-family: var(--font-mono);
  font-size: 13px;
  color: rgba(43, 30, 22, 0.4);
}

/* ========== Decoration ========== */
.speedline {
  position: relative;
  overflow: hidden;
}

.speedline::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(-45deg, transparent 0 10px, rgba(30, 91, 138, 0.05) 10px 20px, transparent 20px 30px, rgba(232, 115, 42, 0.04) 30px 40px);
  pointer-events: none;
}

/* ========== Reveal ========== */
[data-reveal-enabled] [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}

[data-reveal-enabled] [data-reveal].is-revealed {
  opacity: 1;
  transform: none;
}

[data-reveal-enabled] [data-reveal="left"] {
  transform: translateX(-32px);
}

[data-reveal-enabled] [data-reveal="right"] {
  transform: translateX(32px);
}

[data-reveal-enabled] [data-reveal="zoom"] {
  transform: scale(0.96);
}

[data-reveal-enabled] [data-reveal][data-reveal-delay="100"] {
  --reveal-delay: 100ms;
}

[data-reveal-enabled] [data-reveal][data-reveal-delay="200"] {
  --reveal-delay: 200ms;
}

[data-reveal-enabled] [data-reveal][data-reveal-delay="300"] {
  --reveal-delay: 300ms;
}

/* ========== Responsive ========== */
@media (max-width: 1024px) {
  :root {
    --side-pad: 20px;
  }

  .brand__geo {
    display: none;
  }

  .site-nav {
    gap: 0;
  }

  .site-nav__link {
    padding: 8px 10px;
    font-size: 14px;
  }

  .site-nav__num {
    display: none;
  }

  .grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid--feature {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 64px 0;
  }
}

@media (max-width: 900px) {
  :root {
    --header-h: 64px;
  }

  .site-nav__toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    transform: none;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--cream);
    border-bottom: 2px solid var(--ink);
    box-shadow: var(--shadow-soft);
    padding: 12px 20px 20px;
  }

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

  .site-nav__num {
    display: inline;
    font-size: 11px;
    min-width: 24px;
  }

  .site-nav__link {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    font-size: 16px;
    border-radius: var(--radius-md);
  }

  .site-nav__link::after {
    display: none;
  }

  .site-nav__link[aria-current="page"] {
    background: rgba(30, 91, 138, 0.1);
  }

  .grid--3 {
    grid-template-columns: 1fr 1fr;
  }

  .site-footer__layout {
    grid-template-columns: 1fr;
    gap: 40px;
    padding-top: 56px;
  }

  .site-footer__cols {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  :root {
    --header-h: 62px;
    --side-pad: 16px;
  }

  .brand__name {
    font-size: 17px;
  }

  .brand__mark {
    width: 34px;
    height: 34px;
  }

  .grid--2,
  .grid--3 {
    grid-template-columns: 1fr;
  }

  .card {
    padding: 24px 20px;
  }

  .section {
    padding: 48px 0;
  }

  .section__head {
    margin-bottom: 32px;
  }

  .site-footer__cols {
    grid-template-columns: 1fr;
  }

  .site-footer__bottom {
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
  }
}

@media (max-width: 400px) {
  .site-header__cta {
    padding: 8px 12px;
    font-size: 12px;
  }
}

/* ========== Reduced Motion ========== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }
}
