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

:root {
  --navy-950: #0B1B2D;
  --navy-800: #102A43;
  --gold-500: #D4AF37;
  --gold-300: #E6C878;
  --red-500: #E23B2E;
  --cream-50: #FAF6EF;
  --ink-900: #1C1F26;
  --slate-400: #7A8794;
  --blue-400: #3D8BD9;

  --font-heading: 'Noto Sans SC', 'PingFang SC', sans-serif;
  --font-body: 'Source Sans Pro', 'PingFang SC', sans-serif;
  --font-mono: 'Roboto Mono', 'SF Mono', monospace;
  --font-serif: 'Noto Serif SC', serif;

  --rail-width: 280px;
  --topbar-height: 72px;
  --container-max: 1280px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --transition: 0.24s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============ BASE ============ */
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--cream-50);
  background: var(--navy-950);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  padding-left: var(--rail-width);
  padding-top: var(--topbar-height);
}

main { display: block; }

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

a {
  color: var(--gold-500);
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

a:hover { color: var(--gold-300); }

ul, ol { list-style: none; }

button {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  cursor: pointer;
  background: none;
  border: none;
  color: inherit;
  padding: 0;
}

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

::selection {
  background: var(--gold-500);
  color: var(--navy-950);
}

/* ============ UTILITIES ============ */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 0;
  z-index: 9999;
  background: var(--gold-500);
  color: var(--navy-950);
  padding: 12px 24px;
  font-weight: 700;
  font-size: 14px;
  border-radius: 0 0 6px 0;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 0;
}

#main-content {
  scroll-margin-top: calc(var(--topbar-height) + 8px);
  min-height: 60vh;
}

/* ============ HEADER ============ */
.site-header {
  position: relative;
  z-index: 1000;
}

.site-header__rail {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--rail-width);
  background: var(--navy-950);
  border-right: 1px solid rgba(212, 175, 55, 0.18);
  display: flex;
  flex-direction: column;
  padding: 28px 24px 24px;
  z-index: 1001;
  overflow-y: auto;
  transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}

.site-header__rail::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--gold-500) 0%, rgba(212, 175, 55, 0.2) 70%, transparent 100%);
}

.site-header__rail::after {
  content: "";
  position: absolute;
  bottom: 86px;
  left: -24px;
  width: 180px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-500));
  transform: rotate(-14deg);
  opacity: 0.35;
  pointer-events: none;
}

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

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

.brand__mark {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gold-500);
  color: var(--navy-950);
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 22px;
  border-radius: var(--radius-sm);
  transform: skewX(-8deg);
  box-shadow: 0 2px 12px rgba(212, 175, 55, 0.35);
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand__name {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 20px;
  letter-spacing: 0.04em;
  color: var(--cream-50);
}

.brand__tagline {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.28em;
  color: var(--gold-500);
  margin-top: 2px;
  text-transform: uppercase;
}

.brand--topbar {
  display: none;
}

.brand--footer .brand__name {
  color: var(--cream-50);
}

.brand--footer .brand__tagline {
  color: var(--gold-500);
}

/* Navigation */
.site-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  margin-top: 40px;
}

.site-nav__list {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.site-nav__link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 6px;
  color: var(--slate-400);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 15px;
  border-left: 2px solid transparent;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.site-nav__link:hover {
  color: var(--cream-50);
  background: rgba(212, 175, 55, 0.08);
  border-left-color: var(--gold-500);
}

.site-nav__link[aria-current="page"] {
  color: var(--gold-500);
  background: linear-gradient(90deg, rgba(212, 175, 55, 0.16), rgba(212, 175, 55, 0.02));
  border-left-color: var(--gold-500);
}

.site-nav__index {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--gold-500);
  opacity: 0.8;
  letter-spacing: 0.06em;
}

.site-nav__label {
  flex: 1;
}

.site-nav__mark {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red-500);
  display: none;
}

.site-nav__link[aria-current="page"] .site-nav__mark {
  display: block;
}

.site-nav__meta {
  margin-top: auto;
  padding-top: 28px;
  border-top: 1px solid rgba(212, 175, 55, 0.15);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.site-nav__cta-group {
  display: none;
  flex-direction: column;
  gap: 10px;
}

.site-nav__contact {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--slate-400);
  word-break: break-all;
}

.site-nav__reply {
  font-size: 12px;
  color: var(--gold-500);
  opacity: 0.85;
}

/* ============ TOPBAR ============ */
.site-header__topbar {
  position: fixed;
  top: 0;
  left: var(--rail-width);
  right: 0;
  height: var(--topbar-height);
  background: rgba(11, 27, 45, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  padding: 0 32px;
  z-index: 999;
}

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

.site-header__actions .live-badge {
  margin-right: 6px;
}

.scroll-progress {
  position: absolute;
  bottom: -1px;
  left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--gold-500), var(--red-500));
  z-index: 2;
  transition: width 0.05s linear;
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.04em;
  border: 1px solid transparent;
  cursor: pointer;
  text-align: center;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.btn--small {
  padding: 7px 16px;
  font-size: 13px;
  border-radius: 3px;
}

.btn--gold {
  background: var(--gold-500);
  color: var(--navy-950);
}

.btn--gold:hover {
  background: var(--gold-300);
  color: var(--navy-950);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(212, 175, 55, 0.3);
}

.btn--ghost {
  background: transparent;
  color: var(--cream-50);
  border-color: rgba(212, 175, 55, 0.45);
}

.btn--ghost:hover {
  border-color: var(--gold-500);
  color: var(--gold-300);
  background: rgba(212, 175, 55, 0.06);
}

/* ============ LIVE BADGE ============ */
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid rgba(226, 59, 46, 0.55);
  background: rgba(226, 59, 46, 0.12);
  color: #FF6B5E;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
}

.live-badge__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red-500);
  animation: live-pulse 1.8s ease-in-out infinite;
}

@keyframes live-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.75); }
}

/* ============ NAV TOGGLE ============ */
.nav-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 6px;
  border: 1px solid rgba(212, 175, 55, 0.35);
  background: transparent;
  flex-shrink: 0;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.nav-toggle:hover {
  border-color: var(--gold-500);
  background: rgba(212, 175, 55, 0.08);
}

.nav-toggle__box {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 20px;
}

.nav-toggle__bar {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--gold-500);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) {
  transform: translateY(7px) 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) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ============ BACK TO TOP ============ */
.back-to-top {
  position: fixed;
  right: 28px;
  bottom: 28px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--gold-500);
  color: var(--navy-950);
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(212, 175, 55, 0.35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
  z-index: 900;
}

.back-to-top:hover {
  background: var(--gold-300);
  transform: translateY(-2px);
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top__icon {
  line-height: 1;
}

/* ============ FOOTER ============ */
.site-footer {
  background: var(--navy-950);
  border-top: 2px solid rgba(212, 175, 55, 0.22);
  margin-left: calc(-1 * var(--rail-width));
  padding-left: var(--rail-width);
  padding-top: 64px;
  position: relative;
  z-index: 0;
}

.site-footer__inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 32px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 48px;
}

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

.site-footer__desc {
  color: var(--slate-400);
  font-size: 14px;
  line-height: 1.8;
  max-width: 320px;
}

.site-footer__col {
  display: flex;
  flex-direction: column;
}

.site-footer__col--nav {
  padding-left: 12px;
}

.site-footer__col--legal {
  padding-left: 12px;
}

.site-footer__col--contact {
  padding-left: 12px;
}

.site-footer__title {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--gold-500);
  margin-bottom: 18px;
  text-transform: uppercase;
}

.site-footer__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 14px;
  color: var(--slate-400);
}

.site-footer__list a {
  color: var(--slate-400);
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.site-footer__list a:hover {
  color: var(--gold-500);
  padding-left: 4px;
}

.site-footer__bottom {
  border-top: 1px solid rgba(212, 175, 55, 0.12);
  margin-top: 56px;
  padding: 18px 0;
}

.site-footer__bottom-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 32px;
  justify-content: space-between;
  font-size: 13px;
  color: var(--slate-400);
}

/* ============ SHARED COMPONENTS ============ */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 32px;
}

.container--wide {
  max-width: 1440px;
}

.container--narrow {
  max-width: 880px;
}

.page-header {
  padding: 48px 0 32px;
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
  margin-bottom: 48px;
  position: relative;
}

.page-header::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 120px;
  height: 3px;
  background: var(--gold-500);
}

.page-title {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.1;
  color: var(--cream-50);
  letter-spacing: -0.02em;
}

.page-subtitle {
  font-family: var(--font-serif);
  font-size: 18px;
  color: var(--slate-400);
  margin-top: 12px;
  max-width: 640px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--slate-400);
  margin-bottom: 24px;
}

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

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

.breadcrumb__sep {
  color: var(--slate-400);
  opacity: 0.5;
}

.card {
  background: var(--navy-800);
  border-radius: var(--radius-md);
  border: 1px solid rgba(212, 175, 55, 0.12);
  padding: 24px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  border-color: rgba(212, 175, 55, 0.3);
}

.card--light {
  background: var(--cream-50);
  color: var(--ink-900);
}

.card--light .card__title {
  color: var(--ink-900);
}

.card--light .card__text {
  color: var(--ink-900);
  opacity: 0.78;
}

.card__title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 18px;
  color: var(--gold-500);
  margin-bottom: 12px;
}

.card__text {
  color: var(--slate-400);
  font-size: 14px;
  line-height: 1.7;
}

.data-card {
  background: linear-gradient(135deg, var(--navy-800), var(--navy-950));
  border: 1px solid rgba(212, 175, 55, 0.22);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  overflow: hidden;
}

.data-card::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, transparent 50%, rgba(212, 175, 55, 0.18) 50%);
}

.data-card__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--slate-400);
  text-transform: uppercase;
}

.data-card__value {
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 700;
  color: var(--gold-500);
  line-height: 1.2;
}

.data-card__value--red {
  color: var(--red-500);
}

.data-card__meta {
  font-size: 12px;
  color: var(--slate-400);
}

.feature-image {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--navy-800), var(--navy-950));
  border-radius: var(--radius-md);
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(212, 175, 55, 0.15);
}

.feature-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 62%, rgba(212, 175, 55, 0.16) 62%, rgba(212, 175, 55, 0.16) 64%, transparent 64%);
  pointer-events: none;
}

.feature-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.prose {
  color: var(--cream-50);
  max-width: 720px;
}

.prose p {
  margin-bottom: 16px;
}

.prose h2,
.prose h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--gold-500);
  margin-top: 40px;
  margin-bottom: 12px;
}

.prose ul {
  list-style: disc;
  padding-left: 24px;
  margin-bottom: 16px;
}

.prose ol {
  list-style: decimal;
  padding-left: 24px;
  margin-bottom: 16px;
}

.prose li {
  margin-bottom: 6px;
}

.tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  border: 1px solid rgba(212, 175, 55, 0.32);
  color: var(--gold-500);
  background: rgba(212, 175, 55, 0.08);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1023px) {
  body {
    padding-left: 0;
  }

  .site-header__rail {
    top: var(--topbar-height);
    bottom: 0;
    transform: translateX(-100%);
    width: 300px;
    padding: 24px 20px 20px;
    box-shadow: none;
  }

  .site-header__rail[data-open="true"] {
    transform: translateX(0);
    box-shadow: 4px 0 32px rgba(0, 0, 0, 0.5);
  }

  .site-header__rail .brand {
    display: none;
  }

  .site-nav {
    margin-top: 8px;
  }

  .site-nav__cta-group {
    display: flex;
  }

  .site-header__topbar {
    left: 0;
    right: 0;
    justify-content: space-between;
    padding: 0 16px;
    gap: 10px;
  }

  .brand--topbar {
    display: flex;
    margin-right: auto;
  }

  .site-header__actions {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .scroll-progress {
    bottom: 0;
  }

  .site-footer {
    margin-left: 0;
    padding-left: 0;
  }

  .site-footer__inner {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

@media (max-width: 640px) {
  .site-header__topbar {
    padding: 0 12px;
  }

  .brand--topbar .brand__name {
    font-size: 17px;
  }

  .brand--topbar .brand__mark {
    width: 36px;
    height: 36px;
    font-size: 18px;
  }

  .brand--topbar .brand__tagline {
    font-size: 9px;
  }

  .site-header__rail {
    width: 100%;
    max-width: 320px;
  }

  .site-footer__inner {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 0 20px;
  }

  .site-footer__bottom-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0 20px;
  }

  .site-footer__col {
    padding-left: 0;
  }

  .container {
    padding: 0 20px;
  }

  .page-header {
    padding: 32px 0 24px;
    margin-bottom: 32px;
  }

  .page-title {
    font-size: clamp(26px, 8vw, 36px);
  }

  .back-to-top {
    right: 16px;
    bottom: 16px;
    width: 42px;
    height: 42px;
  }
}

/* ============ 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;
  }

  .site-header__rail,
  .site-header__topbar,
  .back-to-top,
  .btn,
  .card,
  .nav-toggle__bar {
    transition: none !important;
  }
}
