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

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

body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
figure,
dl,
dd,
ul,
ol {
  margin: 0;
}

ul,
ol {
  padding: 0;
}

[hidden] {
  display: none !important;
}

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

a {
  color: var(--color-orange);
  text-decoration-thickness: 1px;
  text-underline-offset: .2em;
}

button {
  font: inherit;
}

:root {
  --color-navy: #0A1E3C;
  --color-orange: #FF6B35;
  --color-volt: #39FF14;
  --color-sheet: #E6EBF0;
  --color-slate: #7A8B99;
  --color-clay: #BC6C4A;
  --color-moss: #4A7C59;
  --color-cream: #F4EFE6;
  --font-display: 'Archivo Black', 'Noto Sans SC', 'PingFang SC', 'Hiragino Sans GB', sans-serif;
  --font-body: 'Inter', 'PingFang SC', 'Noto Sans SC', 'Hiragino Sans GB', sans-serif;
  --rail-width: 16.5rem;
  --content-max: 82rem;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --radius: 3px;
  --shadow-sm: 0 1px 2px rgba(3, 10, 24, .04), 0 6px 18px rgba(3, 10, 24, .07);
  --shadow-md: 0 2px 4px rgba(3, 10, 24, .05), 0 18px 42px rgba(3, 10, 24, .12);
  --line: 1px solid rgba(122, 139, 153, .2);
  --line-soft: 1px solid rgba(122, 139, 153, .14);
  --header-z: 100;
  --backdrop-z: 200;
  --drawer-z: 220;
  --bp-rail: 1060px;
}

/* ============ Base ============ */
body {
  background: var(--color-sheet);
  color: #152436;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

main {
  display: block;
}

#main-content {
  min-height: 60vh;
  outline: none;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -.01em;
}

h1 {
  font-size: clamp(2rem, 5.5vw, 4.25rem);
  margin-bottom: 1.25rem;
}

h2 {
  font-size: clamp(1.5rem, 3.2vw, 2.25rem);
  margin-bottom: .75rem;
}

h3 {
  font-size: clamp(1.125rem, 2vw, 1.375rem);
  margin-bottom: .5rem;
}

p {
  margin-bottom: 1rem;
}

a {
  color: var(--color-orange);
  text-decoration-thickness: 1px;
  text-underline-offset: .2em;
}

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

/* ============ Layout ============ */
.container {
  width: min(calc(100% - 2rem), var(--content-max));
  margin-inline: auto;
}

.section {
  padding-block: clamp(3rem, 7vw, 5.5rem);
}

.section--tight {
  padding-block: 1.5rem;
}

.layout-index {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gutter);
  align-items: start;
}

@media (min-width: 860px) {
  .layout-index {
    grid-template-columns: minmax(11rem, 15rem) minmax(0, 1fr);
  }
}

.layout-index__note {
  font-size: .875rem;
  color: var(--color-slate);
  line-height: 1.6;
  padding-left: .875rem;
  border-left: 2px solid var(--color-clay);
}

@media (min-width: 860px) {
  .layout-index__note {
    position: sticky;
    top: 2rem;
  }
}

.layout-index__content {
  min-width: 0;
}

.grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
}

.card {
  background: var(--color-cream);
  border: var(--line-soft);
  border-top: 2px solid var(--color-clay);
  box-shadow: var(--shadow-sm);
  padding: 1.25rem;
}

/* ============ Buttons / Tags / Status ============ */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .625rem 1rem;
  border: 1px solid var(--color-orange);
  background: var(--color-orange);
  color: #fff;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: .875rem;
  line-height: 1.4;
  text-decoration: none;
  cursor: pointer;
  border-radius: var(--radius);
  transition: background .2s, color .2s, border-color .2s;
}

.button:hover {
  background: #e65a2a;
  border-color: #e65a2a;
  color: #fff;
}

.button--ghost {
  background: transparent;
  color: var(--color-orange);
}

.button--ghost:hover {
  background: rgba(255, 107, 53, .1);
}

.button--small {
  padding: .4rem .75rem;
  font-size: .8125rem;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .2rem .5rem;
  background: rgba(122, 139, 153, .1);
  border: 1px solid rgba(122, 139, 153, .25);
  font-size: .75rem;
  letter-spacing: .04em;
  color: var(--color-slate);
}

.tag--live {
  color: var(--color-volt);
  border-color: rgba(57, 255, 20, .4);
  background: rgba(57, 255, 20, .06);
}

.tag--alert {
  color: var(--color-orange);
  border-color: rgba(255, 107, 53, .4);
  background: rgba(255, 107, 53, .08);
}

.status-dot {
  display: inline-block;
  width: .375rem;
  height: .375rem;
  border-radius: 50%;
  background: var(--color-moss);
}

.status-dot--live {
  background: var(--color-volt);
  box-shadow: 0 0 6px rgba(57, 255, 20, .8);
}

.status-dot--warn {
  background: var(--color-orange);
}

/* ============ Breadcrumbs ============ */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: .375rem .75rem;
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
  font-size: .8125rem;
  color: var(--color-slate);
}

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

.breadcrumbs li + li::before {
  content: "/";
  margin-right: .75rem;
  color: var(--color-slate);
  opacity: .55;
}

.breadcrumbs a {
  color: inherit;
  text-decoration: none;
}

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

/* ============ Tabs ============ */
.tabs__list {
  display: flex;
  gap: .25rem;
  overflow-x: auto;
  border-bottom: 1px solid rgba(122, 139, 153, .25);
}

.tabs__tab {
  appearance: none;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: .5rem .875rem .4rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: .875rem;
  line-height: 1.2;
  color: var(--color-slate);
  cursor: pointer;
  white-space: nowrap;
}

.tabs__tab:hover {
  color: var(--color-navy);
}

.tabs__tab[aria-selected="true"] {
  color: var(--color-navy);
  border-bottom-color: var(--color-orange);
}

.tabs__panel {
  padding: 1.25rem 0;
}

/* ============ Media Frame ============ */
.media-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background:
    linear-gradient(150deg, rgba(255, 107, 53, .14), transparent 35%),
    linear-gradient(320deg, rgba(57, 255, 20, .06), transparent 40%),
    var(--color-navy);
  border: 1px solid rgba(122, 139, 153, .18);
}

.media-frame--tall {
  aspect-ratio: 4 / 5;
}

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

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

.media-frame > img,
.media-frame__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-frame__caption {
  position: absolute;
  left: .75rem;
  bottom: .75rem;
  background: rgba(10, 30, 60, .72);
  color: var(--color-sheet);
  padding: .25rem .5rem;
  font-size: .75rem;
  letter-spacing: .04em;
}

/* ============ Skip Link ============ */
.skip-link {
  position: fixed;
  top: .5rem;
  left: .75rem;
  z-index: 999;
  transform: translateY(-250%);
  background: var(--color-orange);
  color: #fff;
  padding: .5rem .75rem;
  font-size: .875rem;
  font-weight: 600;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

.skip-link:focus {
  transform: translateY(0);
}

@media (min-width: 1060px) {
  .skip-link {
    left: calc(var(--rail-width) + .75rem);
  }

  body {
    margin-left: var(--rail-width);
  }
}

/* ============ Site Header ============ */
.site-header {
  position: relative;
  z-index: var(--header-z);
  background: var(--color-navy);
  color: var(--color-sheet);
  border-bottom: 1px solid rgba(122, 139, 153, .22);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  padding: .625rem 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  color: var(--color-sheet);
  text-decoration: none;
}

.brand__mark {
  flex: none;
  display: grid;
  place-items: center;
  width: 2.35rem;
  height: 2.35rem;
  background: rgba(57, 255, 20, .05);
  border: 1px solid rgba(57, 255, 20, .4);
  color: var(--color-volt);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: .9rem;
  letter-spacing: -.04em;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - .5rem), calc(100% - .5rem) 100%, 0 100%);
}

.brand__text {
  display: grid;
  gap: .1rem;
}

.brand__name {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.05rem;
  line-height: 1.2;
  letter-spacing: .02em;
  color: #fff;
}

.brand__sub {
  font-size: .64rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--color-slate);
  white-space: nowrap;
}

.site-nav__caption {
  margin: 0 0 .75rem;
  font-size: .68rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--color-slate);
}

.site-nav__list {
  display: flex;
  flex-direction: column;
  gap: .15rem;
}

.site-nav__item {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav__link {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .55rem .625rem;
  color: rgba(230, 235, 240, .66);
  text-decoration: none;
  border-left: 2px solid transparent;
  font-size: .9375rem;
  line-height: 1.45;
  transition: background .2s, color .2s, border-color .2s;
}

.site-nav__index {
  min-width: 1.6rem;
  font-size: .68rem;
  letter-spacing: .08em;
  color: var(--color-slate);
  font-variant-numeric: tabular-nums;
}

.site-nav__label {
  flex: 1;
}

.site-nav__link:hover {
  color: #fff;
  background: rgba(255, 255, 255, .035);
}

.site-nav__link[aria-current="page"] {
  color: #fff;
  border-left-color: var(--color-orange);
  background: linear-gradient(90deg, rgba(255, 107, 53, .14), rgba(10, 30, 60, 0));
}

.site-nav__link[aria-current="page"] .site-nav__index {
  color: var(--color-orange);
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}

.version-badge {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .3rem .55rem;
  border: 1px solid rgba(57, 255, 20, .35);
  background: rgba(57, 255, 20, .06);
  color: var(--color-volt);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  border-radius: var(--radius);
}

.version-badge::before {
  content: "";
  width: .375rem;
  height: .375rem;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px rgba(57, 255, 20, .8);
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .4rem .65rem;
  border: 1px solid rgba(230, 235, 240, .18);
  background: transparent;
  color: var(--color-sheet);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: .8125rem;
  line-height: 1.4;
  cursor: pointer;
  border-radius: var(--radius);
}

.nav-toggle__box {
  position: relative;
  width: 1rem;
  height: .875rem;
  flex: none;
}

.nav-toggle__bar {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: top .2s, transform .2s, opacity .2s;
}

.nav-toggle__bar:nth-child(1) {
  top: 0;
}

.nav-toggle__bar:nth-child(2) {
  top: .375rem;
}

.nav-toggle__bar:nth-child(3) {
  top: .75rem;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) {
  top: .375rem;
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) {
  top: .375rem;
  transform: rotate(-45deg);
}

.nav-toggle__label {
  line-height: 1;
}

.header-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-orange), var(--color-volt));
  transform: scaleX(var(--scroll-progress, 0));
  transform-origin: left;
  pointer-events: none;
  z-index: 2;
}

/* ============ Desktop Rail ============ */
@media (min-width: 1060px) {
  .site-header {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--rail-width);
    border-bottom: 0;
    border-right: 1px solid rgba(122, 139, 153, .22);
    overflow-y: auto;
  }

  .site-header__inner {
    min-height: 100%;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    padding: 1.5rem 1.25rem 1.25rem;
  }

  .site-nav {
    margin-top: 1.5rem;
  }

  .header-actions {
    width: 100%;
    margin-top: auto;
    padding-top: 1rem;
  }

  .nav-toggle {
    display: none;
  }

  .header-progress {
    top: 0;
    bottom: 0;
    left: auto;
    right: 0;
    width: 2px;
    height: auto;
    background: linear-gradient(180deg, var(--color-orange), var(--color-volt));
    transform: scaleY(var(--scroll-progress, 0));
    transform-origin: top;
  }
}

/* ============ Mobile Drawer ============ */
@media (max-width: 1059.98px) {
  .brand__sub {
    display: none;
  }

  .brand__mark {
    width: 2rem;
    height: 2rem;
  }

  .site-nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: var(--drawer-z);
    width: min(22rem, 88vw);
    padding: 2rem 1.25rem 1.5rem;
    background: var(--color-navy);
    border-left: 1px solid rgba(122, 139, 153, .22);
    transform: translateX(100%);
    visibility: hidden;
    transition: transform .28s ease, visibility .28s;
    overflow-y: auto;
  }

  .site-nav[data-open] {
    transform: translateX(0);
    visibility: visible;
  }

  html.nav-open,
  body.nav-open {
    overflow: hidden;
  }

  body.nav-open::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: var(--backdrop-z);
    background: rgba(2, 8, 20, .58);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
  }

  body.nav-open .site-header {
    z-index: calc(var(--backdrop-z) + 1);
  }
}

/* ============ Site Footer ============ */
.site-footer {
  position: relative;
  background: var(--color-navy);
  color: rgba(230, 235, 240, .74);
}

.site-footer::before {
  content: "";
  display: block;
  height: 2px;
  background: linear-gradient(90deg, var(--color-orange) 0%, var(--color-clay) 35%, transparent 72%);
}

.site-footer__inner {
  width: min(calc(100% - 2rem), var(--content-max));
  margin-inline: auto;
  padding-block: 2.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem 2rem;
}

.footer-brand .brand {
  color: var(--color-sheet);
}

.brand--footer .brand__name {
  font-size: 1.15rem;
}

.brand--footer .brand__mark {
  width: 2.15rem;
  height: 2.15rem;
  font-size: .8rem;
}

.footer-trust {
  margin-top: 1rem;
  max-width: 34rem;
  font-size: .875rem;
  line-height: 1.7;
  color: var(--color-slate);
}

.footer-heading {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: .75rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--color-volt);
}

.footer-list {
  display: grid;
  gap: .45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-list a {
  color: rgba(230, 235, 240, .7);
  text-decoration: none;
  font-size: .875rem;
  transition: color .2s, padding-left .2s;
}

.footer-list a:hover {
  color: var(--color-orange);
  padding-left: .25rem;
}

.footer-contact p {
  margin: 0 0 .5rem;
}

.footer-contact__item {
  font-size: .875rem;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem 1rem;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(122, 139, 153, .2);
  font-size: .8125rem;
  color: var(--color-slate);
}

.footer-copyright,
.footer-icp {
  margin: 0;
}

@media (min-width: 700px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (min-width: 1200px) {
  .footer-grid {
    grid-template-columns: 1.3fr .8fr .8fr 1.2fr;
  }

  .footer-brand {
    grid-column: auto;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
