/* ============================================================
   亚星娱乐赛场 · 共享样式 /assets/site.css
   深空蓝基底 + 荧光青数据高亮 + 琥珀橙状态点
   ============================================================ */

/* ---------- 1. Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100vh;
}

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

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

hr {
  border: 0;
  height: 1px;
  background: var(--steel);
  margin: 0;
}

/* ---------- 2. Tokens ---------- */
:root {
  --ink:        #0A1633;
  --ink-2:      #12224A;
  --steel:      #1E3A6E;
  --grid-line:  #24406B;
  --cream:      #F4EFE4;
  --brown:      #17110D;
  --cyan:       #35F0D0;
  --cyan-soft:  #6FF7E2;
  --amber:      #FF9A2E;
  --muted:      #8FA3C8;
  --coral:      #FF5E6C;
  --grass:      #2F7D63;
  --paper-line: #E3D9C6;

  --rail-w:      92px;
  --rail-w-open: 264px;

  --gutter: clamp(16px, 3.4vw, 40px);
  --maxw:   1280px;
  --gap:    clamp(16px, 2.2vw, 28px);

  --font-sans: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Hiragino Sans GB",
               "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", "Roboto Mono", ui-monospace, SFMono-Regular, Menlo,
               Consolas, "Courier New", monospace;

  --r-lg: 28px;
  --r-md: 18px;
  --r-sm: 12px;
  --r-pill: 999px;

  --shadow-card: 0 18px 42px -22px rgba(0, 0, 0, .78);
  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- 3. Typography ---------- */
body {
  padding-inline-start: var(--rail-w);
  background-color: var(--ink);
  background-image:
    linear-gradient(rgba(36, 64, 107, .22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(36, 64, 107, .22) 1px, transparent 1px);
  background-size: 64px 64px, 64px 64px;
  color: var(--cream);
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  margin: 0 0 .6em;
  font-weight: 900;
  line-height: 1.14;
  letter-spacing: -.01em;
  color: var(--cream);
}

h1 { line-height: .98; }

a {
  color: var(--cyan);
  text-decoration: none;
  transition: color .16s var(--ease);
}

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

strong, b { font-weight: 700; }

small { font-size: .8125rem; }

code, kbd, samp {
  font-family: var(--font-mono);
  font-size: .9em;
  color: var(--cyan);
}

.num,
.data-figure,
[data-num] {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  letter-spacing: -.02em;
}

.display-title {
  margin: 0;
  font-size: clamp(2.6rem, 5.4vw, 5.2rem);
  font-weight: 900;
  line-height: .98;
  letter-spacing: -.02em;
}

.section-title {
  margin: 0;
  font-size: clamp(1.6rem, 2.6vw, 2.4rem);
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -.01em;
}

.block-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.4;
}

.data-figure {
  font-size: clamp(2.4rem, 4.4vw, 4.6rem);
  font-weight: 700;
  line-height: 1;
  color: var(--cyan);
}

.annotation {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
}

.annotation--vertical {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  letter-spacing: .34em;
}

/* ---------- 4. Focus / a11y ---------- */
:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 6px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 10px;
  inset-inline-start: 10px;
  z-index: 600;
  padding: 10px 20px;
  border-radius: var(--r-pill);
  background: var(--cyan);
  color: #04231E;
  font-weight: 700;
  font-size: .9375rem;
  transform: translateY(-180%);
  transition: transform .2s var(--ease);
}

.skip-link:focus {
  transform: translateY(0);
  color: #04231E;
}

/* ---------- 5. Layout primitives ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--auto { grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); }

/* ---------- 6. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: .55rem 1.3rem;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--cream);
  font-family: inherit;
  font-size: .9375rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: transform .18s var(--ease), background-color .18s var(--ease),
              border-color .18s var(--ease), color .18s var(--ease),
              box-shadow .18s var(--ease);
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.985); }

.btn--amber {
  background: var(--amber);
  color: #2A1402;
  box-shadow: 0 12px 28px -16px rgba(255, 154, 46, .95);
}
.btn--amber:hover {
  background: #FFAB52;
  color: #2A1402;
  box-shadow: 0 16px 32px -16px rgba(255, 154, 46, 1);
}

.btn--ghost {
  border-color: rgba(53, 240, 208, .5);
  color: var(--cyan);
  background: rgba(53, 240, 208, .04);
}
.btn--ghost:hover {
  border-color: var(--cyan);
  background: rgba(53, 240, 208, .12);
  color: var(--cyan);
}

.btn--solid {
  background: var(--cyan);
  color: #04231E;
}
.btn--solid:hover {
  background: var(--cyan-soft);
  color: #04231E;
}

/* ---------- 7. Chips ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: .35rem 1rem;
  border: 1px solid var(--steel);
  border-radius: var(--r-pill);
  background: rgba(18, 34, 74, .72);
  color: var(--muted);
  font-family: inherit;
  font-size: .875rem;
  font-weight: 500;
  line-height: 1.4;
  cursor: pointer;
  transition: color .16s var(--ease), border-color .16s var(--ease),
              background-color .16s var(--ease), box-shadow .16s var(--ease),
              transform .16s var(--ease);
}

.chip:hover {
  color: var(--cream);
  border-color: rgba(53, 240, 208, .45);
  transform: translateY(-1px);
}

.chip[aria-pressed="true"],
.chip.is-active {
  border-color: var(--cyan);
  background: rgba(53, 240, 208, .13);
  color: var(--cream);
  box-shadow: 0 0 0 1px rgba(53, 240, 208, .22), 0 0 20px -8px rgba(53, 240, 208, .8);
}

/* ---------- 8. Cards / Media ---------- */
.card {
  padding: clamp(16px, 2vw, 26px);
  border: 1px solid var(--steel);
  border-radius: var(--r-md);
  background: linear-gradient(160deg, rgba(18, 34, 74, .96), rgba(12, 26, 60, .96));
  box-shadow: var(--shadow-card);
  color: var(--cream);
}

.card--glow {
  border-color: rgba(53, 240, 208, .42);
  box-shadow: 0 0 0 1px rgba(53, 240, 208, .12), 0 24px 50px -26px rgba(53, 240, 208, .38);
}

.card--cream {
  background: var(--cream);
  border-color: var(--paper-line);
  color: var(--brown);
  box-shadow: 0 20px 44px -30px rgba(0, 0, 0, .8);
}

.card--cream h2,
.card--cream h3,
.card--cream h4 { color: var(--brown); }

.card--cream a { color: #0E6B5A; }
.card--cream a:hover { color: #0A4C40; }

.media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--steel);
  border-radius: var(--r-md);
  background:
    linear-gradient(140deg, rgba(18, 34, 74, .98), rgba(10, 22, 51, .98));
}

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

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

.media__caption {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  margin: 0;
  padding: 14px 18px;
  background: linear-gradient(0deg, rgba(6, 12, 28, .92), rgba(6, 12, 28, 0));
  font-size: .75rem;
  letter-spacing: .04em;
  color: var(--muted);
}

/* ---------- 9. Breadcrumb ---------- */
.breadcrumb {
  font-family: var(--font-mono);
  font-size: .75rem;
  letter-spacing: .08em;
  color: var(--muted);
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

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

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

.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--cyan); }
.breadcrumb [aria-current="page"] { color: var(--cream); }

/* ---------- 10. Accordion ---------- */
.accordion {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.accordion__item {
  border: 1px solid var(--steel);
  border-radius: var(--r-md);
  background: rgba(18, 34, 74, .55);
  overflow: hidden;
  transition: border-color .2s var(--ease), background-color .2s var(--ease);
}

.accordion__item[data-open="true"] {
  border-color: rgba(53, 240, 208, .45);
  background: rgba(18, 34, 74, .8);
}

.accordion__trigger {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 52px;
  padding: 16px 18px;
  border: 0;
  background: none;
  color: var(--cream);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.5;
  text-align: start;
  cursor: pointer;
}

.accordion__trigger::after {
  content: "+";
  margin-inline-start: auto;
  font-family: var(--font-mono);
  font-size: 1.1rem;
  color: var(--cyan);
  transition: transform .22s var(--ease);
}

.accordion__item[data-open="true"] .accordion__trigger::after {
  transform: rotate(45deg);
}

.accordion__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .26s var(--ease);
}

.accordion__panel > div { overflow: hidden; }

.accordion__item[data-open="true"] .accordion__panel {
  grid-template-rows: 1fr;
}

.accordion__body {
  padding: 0 18px 18px;
  color: var(--muted);
  font-size: .9375rem;
  line-height: 1.8;
}

/* ---------- 11. Header: rail + topbar ---------- */
.site-header {
  position: relative;
}

.rail {
  position: fixed;
  inset-block: 0;
  inset-inline-start: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: var(--rail-w);
  padding: 16px 12px 18px;
  background:
    radial-gradient(120% 42% at 0% 0%, rgba(53, 240, 208, .10), transparent 62%),
    linear-gradient(180deg, #0C1A3C 0%, #0A1633 58%, #071026 100%);
  border-inline-end: 1px solid var(--steel);
  box-shadow: 22px 0 48px -34px rgba(0, 0, 0, .95);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--steel) transparent;
  transition: width .26s var(--ease);
}

.rail::-webkit-scrollbar { width: 6px; }
.rail::-webkit-scrollbar-thumb {
  background: var(--steel);
  border-radius: var(--r-pill);
}

.rail:hover,
.rail:focus-within { width: var(--rail-w-open); }

/* rail head */
.rail__head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.rail__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: var(--cream);
  text-decoration: none;
}

.rail__brand:hover { color: var(--cream); }

.rail__mark {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(53, 240, 208, .55);
  border-radius: 16px;
  background: linear-gradient(150deg, rgba(53, 240, 208, .22), rgba(255, 154, 46, .12));
  color: var(--cyan);
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1;
  box-shadow: inset 0 0 18px rgba(53, 240, 208, .24);
}

.rail__brand-text {
  display: flex;
  flex-direction: column;
  width: 0;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  opacity: 0;
  transition: opacity .18s var(--ease);
}

.rail__brand-name {
  font-size: .9375rem;
  font-weight: 900;
  letter-spacing: .02em;
  line-height: 1.3;
}

.rail__brand-sub {
  font-family: var(--font-mono);
  font-size: .6875rem;
  letter-spacing: .2em;
  color: var(--cyan);
  line-height: 1.4;
}

.rail:hover .rail__brand-text,
.rail:focus-within .rail__brand-text,
.rail[data-open="true"] .rail__brand-text {
  width: auto;
  opacity: 1;
}

.rail__close {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-inline-start: auto;
  border: 1px solid var(--steel);
  border-radius: var(--r-pill);
  background: rgba(18, 34, 74, .8);
  cursor: pointer;
}

.rail__close-icon {
  position: relative;
  display: block;
  width: 16px;
  height: 16px;
}

.rail__close-icon::before,
.rail__close-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  inset-inline-start: 0;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: var(--cyan);
}

.rail__close-icon::before { transform: rotate(45deg); }
.rail__close-icon::after { transform: rotate(-45deg); }

/* rail nav */
.rail__nav {
  flex: 1 1 auto;
  min-height: 0;
}

.rail__list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.rail__link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 10px;
  border: 1px solid transparent;
  border-radius: 14px;
  color: var(--muted);
  font-size: .9375rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  transition: background-color .16s var(--ease), color .16s var(--ease),
              border-color .16s var(--ease), box-shadow .16s var(--ease);
}

.rail__link:hover {
  background: rgba(53, 240, 208, .08);
  color: var(--cream);
}

.rail__link[aria-current="page"] {
  background: linear-gradient(90deg, rgba(53, 240, 208, .17), rgba(53, 240, 208, .02));
  border-color: rgba(53, 240, 208, .4);
  color: var(--cream);
  box-shadow: inset 3px 0 0 var(--cyan);
}

.rail__idx {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: .6875rem;
  letter-spacing: .04em;
  color: var(--steel);
  transition: color .16s var(--ease);
}

.rail__link:hover .rail__idx,
.rail__link[aria-current="page"] .rail__idx { color: var(--cyan); }

.rail__label {
  min-width: 0;
  overflow: hidden;
  text-overflow: clip;
  opacity: 0;
  transition: opacity .18s var(--ease);
}

.rail:hover .rail__label,
.rail:focus-within .rail__label,
.rail[data-open="true"] .rail__label {
  opacity: 1;
  transition-delay: .05s;
}

/* rail meta */
.rail__meta {
  flex: 0 0 auto;
  max-height: 0;
  padding: 0 12px;
  border: 0 solid var(--steel);
  border-radius: 16px;
  background: rgba(18, 34, 74, .92);
  overflow: hidden;
  opacity: 0;
  transition: max-height .28s var(--ease), opacity .2s var(--ease),
              padding .28s var(--ease), border-width .28s var(--ease);
}

.rail:hover .rail__meta,
.rail:focus-within .rail__meta,
.rail[data-open="true"] .rail__meta {
  max-height: 240px;
  padding: 12px;
  border-width: 1px;
  opacity: 1;
}

.rail__meta-title {
  margin: 0 0 8px;
  font-family: var(--font-mono);
  font-size: .6875rem;
  letter-spacing: .18em;
  color: var(--cyan);
  white-space: nowrap;
}

.rail__meta-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rail__meta-list li {
  display: flex;
  align-items: baseline;
  gap: 8px;
  white-space: nowrap;
}

.rail__meta-num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1;
  color: var(--amber);
}

.rail__meta-label {
  font-size: .75rem;
  color: var(--muted);
}

/* rail foot */
.rail__foot {
  flex: 0 0 auto;
  padding-top: 12px;
  border-top: 1px solid rgba(30, 58, 110, .8);
}

.rail__fix {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 14px;
  color: var(--muted);
  font-size: .875rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  transition: color .16s var(--ease), background-color .16s var(--ease);
}

.rail__fix:hover {
  color: var(--cream);
  background: rgba(255, 94, 108, .1);
}

.rail__fix-dot {
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 12px rgba(255, 94, 108, .9);
}

/* topbar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px var(--gutter);
  background: rgba(10, 22, 51, .86);
  border-bottom: 1px solid rgba(30, 58, 110, .85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.topbar__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-inline-start: auto;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid rgba(53, 240, 208, .45);
  border-radius: var(--r-pill);
  background: rgba(18, 34, 74, .85);
  color: var(--cream);
  font-family: inherit;
  font-size: .9375rem;
  font-weight: 700;
  cursor: pointer;
}

.nav-toggle__bars {
  position: relative;
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--cyan);
  transition: background-color .18s var(--ease);
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--cyan);
  transition: transform .2s var(--ease), top .2s var(--ease);
}

.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after  { top: 6px; }

.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after  { top: 0; transform: rotate(-45deg); }

/* ---------- 12. Footer ---------- */
.site-footer {
  margin-top: clamp(48px, 7vw, 96px);
  background:
    radial-gradient(90% 70% at 100% 0%, rgba(53, 240, 208, .07), transparent 62%),
    linear-gradient(180deg, #0C1A3C 0%, #070F24 100%);
  border-top: 1px solid var(--steel);
  color: var(--muted);
}

.footer__rule {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), var(--amber), transparent);
  opacity: .55;
}

.footer__inner {
  display: grid;
  gap: clamp(24px, 3vw, 48px);
  grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
  max-width: var(--maxw);
  margin-inline: auto;
  padding: clamp(40px, 5vw, 72px) var(--gutter) clamp(24px, 3vw, 40px);
}

.footer__logo {
  margin: 0 0 6px;
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: -.01em;
  color: var(--cream);
}

.footer__tag {
  margin: 0 0 16px;
  font-family: var(--font-mono);
  font-size: .6875rem;
  letter-spacing: .22em;
  color: var(--cyan);
}

.footer__note {
  max-width: 34em;
  margin: 0;
  font-size: .875rem;
  line-height: 1.85;
}

.footer__title {
  margin: 0 0 14px;
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--cream);
}

.footer__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: .9375rem;
}

.footer__list a {
  display: inline-flex;
  align-items: center;
  color: var(--muted);
}

.footer__list a::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-inline-end: 10px;
  border-radius: 50%;
  background: var(--steel);
  transition: background-color .16s var(--ease), box-shadow .16s var(--ease);
}

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

.footer__list a:hover::before {
  background: var(--cyan);
  box-shadow: 0 0 10px rgba(53, 240, 208, .9);
}

.footer__list--plain li {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.footer__k {
  font-family: var(--font-mono);
  font-size: .6875rem;
  letter-spacing: .16em;
  color: rgba(143, 163, 200, .75);
}

.footer__v {
  color: var(--cream);
  font-size: .9375rem;
  line-height: 1.6;
  word-break: break-word;
}

.footer__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 18px var(--gutter) 30px;
  border-top: 1px solid rgba(30, 58, 110, .7);
  font-family: var(--font-mono);
  font-size: .75rem;
  letter-spacing: .08em;
}

.footer__icp,
.footer__copy { margin: 0; }

/* ---------- 13. Motion: reveal + progress ---------- */
html.js-ready [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}

html.js-ready [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

.scroll-progress {
  position: fixed;
  top: 0;
  inset-inline: 0;
  z-index: 300;
  height: 2px;
  pointer-events: none;
}

.scroll-progress__bar {
  height: 100%;
  width: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--cyan), var(--amber));
  box-shadow: 0 0 14px rgba(53, 240, 208, .7);
}

/* ---------- 14. Body state ---------- */
body.is-nav-open { overflow: hidden; }

@media (max-width: 900px) {
  body.is-nav-open::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 150;
    background: rgba(5, 10, 24, .66);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
  }
}

/* ---------- 15. Responsive ---------- */
@media (max-width: 1100px) {
  .footer__inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  body { padding-inline-start: 0; }

  .rail {
    width: min(88vw, 340px);
    padding: 18px 16px 22px;
    transform: translateX(-104%);
    box-shadow: 30px 0 60px -30px rgba(0, 0, 0, .95);
    transition: transform .28s var(--ease);
  }

  .rail[data-open="true"] { transform: translateX(0); }

  .rail__brand-text { width: auto; opacity: 1; }
  .rail__label { opacity: 1; }

  .rail__meta {
    max-height: 240px;
    padding: 12px;
    border-width: 1px;
    opacity: 1;
  }

  .rail__close { display: inline-flex; }
  .nav-toggle { display: inline-flex; }

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

  .topbar__ghost { display: none; }

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

@media (max-width: 600px) {
  .grid--2,
  .grid--3,
  .grid--4 { grid-template-columns: minmax(0, 1fr); }

  .display-title { font-size: 2.6rem; }

  .btn { padding: .55rem 1.1rem; font-size: .875rem; }

  .footer__bar { justify-content: flex-start; }
}

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

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

  html.js-ready [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .scroll-progress { display: none; }
}
