/* ==========================================================
   万博竞技 MANXBET — 共享核心样式
   Path: /assets/site.css
   ========================================================== */

/* ---------- Design Tokens ---------- */
:root {
  --color-space-900: #0B1E3A;
  --color-space-700: #132E54;
  --color-space-500: #1E4C7E;
  --color-gold-300: #E8C87A;
  --color-gold-500: #C9A84C;
  --color-orange: #FF7A3D;
  --color-ink: #10203A;
  --color-body-bg: #F4F7FB;
  --color-muted: #5A6B82;
  --color-success: #23B57E;
  --color-white: #FFFFFF;

  --font-heading: 'PingFang SC', 'HarmonyOS Sans', 'Microsoft YaHei', sans-serif;
  --font-body: 'PingFang SC', 'Source Sans Pro', 'Microsoft YaHei', sans-serif;
  --font-mono: 'JetBrains Mono', 'Roboto Mono', ui-monospace, 'SF Mono', Consolas, monospace;

  --shadow-soft: 0 4px 24px rgba(11, 30, 58, 0.08);
  --shadow-capsule: 0 10px 40px rgba(11, 30, 58, 0.32);
  --shadow-card: 0 6px 28px rgba(11, 30, 58, 0.08);

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  --container-width: 1200px;
  --header-offset: 100px;
}

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

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

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  color: var(--color-ink);
  background: var(--color-body-bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

ul,
ol {
  list-style: none;
}

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

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

::selection {
  background: rgba(232, 200, 122, 0.35);
  color: var(--color-space-900);
}

/* ---------- Typography ---------- */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 800;
  line-height: 1.25;
  color: inherit;
}

h1 {
  font-size: clamp(32px, 5vw, 56px);
}

h2 {
  font-size: clamp(26px, 3.5vw, 40px);
}

h3 {
  font-size: clamp(20px, 2.2vw, 26px);
}

p {
  margin-block-end: 1em;
}

.text-gold {
  color: var(--color-gold-300);
  background: linear-gradient(120deg, var(--color-gold-300) 0%, var(--color-gold-500) 55%, var(--color-gold-300) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ---------- Layout Utilities ---------- */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin-inline: auto;
  padding-inline: 24px;
}

.container-narrow {
  width: 100%;
  max-width: 860px;
  margin-inline: auto;
  padding-inline: 24px;
}

.page-shell {
  padding-top: var(--header-offset);
  min-height: 60vh;
}

#main-content {
  scroll-margin-top: var(--header-offset);
}

#main-content:focus {
  outline: none;
}

.section {
  position: relative;
  padding-block: clamp(56px, 8vw, 96px);
}

.section-light {
  background: var(--color-body-bg);
  color: var(--color-ink);
}

.section-dark {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--color-space-900) 0%, #081629 100%);
  color: rgba(255, 255, 255, 0.85);
}

.section-dark::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}

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

.section-heading {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 32px;
}

.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--color-gold-500);
}

.section-title {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
  line-height: 1.2;
  color: var(--color-ink);
}

.section-dark .section-title,
.section-blue .section-title {
  color: var(--color-white);
}

/* ---------- Grids ---------- */
.grid-2,
.grid-3 {
  display: grid;
  gap: 24px;
  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: 1025px) {
  .grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 14px;
  line-height: 1.5;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary {
  background: var(--color-orange);
  color: var(--color-white);
  box-shadow: 0 4px 16px rgba(255, 122, 61, 0.35);
}

.btn-primary:hover {
  background: #f96828;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(255, 122, 61, 0.4);
}

.btn-outline {
  background: transparent;
  border-color: var(--color-gold-500);
  color: var(--color-gold-500);
}

.btn-outline:hover {
  background: rgba(201, 168, 76, 0.1);
  border-color: var(--color-gold-300);
  color: var(--color-gold-300);
}

/* ---------- Cards ---------- */
.card {
  background: var(--color-space-700);
  border: 1px solid rgba(201, 168, 76, 0.2);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(11, 30, 58, 0.18);
}

.card-light {
  background: var(--color-white);
  border: 1px solid #E8EDF5;
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: 0 4px 24px rgba(11, 30, 58, 0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-light:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(11, 30, 58, 0.12);
}

/* ---------- Tags ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: rgba(201, 168, 76, 0.12);
  color: var(--color-gold-500);
  border: 1px solid rgba(201, 168, 76, 0.3);
}

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--color-muted);
  padding-block: 16px;
}

.breadcrumb li + li::before {
  content: '/';
  margin-right: 8px;
  color: var(--color-muted);
}

.breadcrumb a {
  color: var(--color-space-500);
  transition: color 0.2s;
}

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

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

/* ---------- Image Shell ---------- */
.img-shell {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, var(--color-space-700), var(--color-space-900));
  aspect-ratio: 16 / 9;
}

.img-shell--portrait {
  aspect-ratio: 3 / 4;
}

.img-shell--square {
  aspect-ratio: 1 / 1;
}

.img-shell > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 24px;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  max-width: 1280px;
  background: rgba(11, 30, 58, 0.92);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(201, 168, 76, 0.3);
  border-radius: 56px;
  padding: 10px 12px 10px 20px;
  box-shadow: var(--shadow-capsule);
  pointer-events: auto;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* ---------- Brand ---------- */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--color-gold-300) 0%, var(--color-gold-500) 100%);
  color: var(--color-space-900);
  font-weight: 900;
  font-size: 22px;
  line-height: 1;
  box-shadow: 0 2px 12px rgba(201, 168, 76, 0.4);
}

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

.brand-name {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 17px;
  color: var(--color-white);
  letter-spacing: 0.02em;
  transition: color 0.2s ease;
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 3px;
  color: var(--color-gold-300);
  text-transform: uppercase;
}

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

/* ---------- Navigation ---------- */
.main-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex: 1;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-list a {
  display: block;
  padding: 10px 14px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.nav-list a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-gold-300);
}

.nav-list a[aria-current="page"] {
  background: rgba(232, 200, 122, 0.14);
  color: var(--color-gold-300);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  background: var(--color-orange);
  color: var(--color-white);
  font-weight: 700;
  font-size: 14px;
  line-height: 1.5;
  box-shadow: 0 4px 16px rgba(255, 122, 61, 0.3);
  transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.nav-cta:hover {
  background: #f96828;
  box-shadow: 0 6px 20px rgba(255, 122, 61, 0.4);
  transform: translateY(-1px);
}

/* ---------- Mobile Nav Toggle ---------- */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 8px;
  border-radius: 50%;
  border: 1px solid rgba(201, 168, 76, 0.3);
  background: rgba(11, 30, 58, 0.6);
  flex-shrink: 0;
  transition: border-color 0.2s ease;
}

.nav-toggle:hover {
  border-color: rgba(232, 200, 122, 0.6);
}

.nav-toggle-bar {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: var(--color-gold-300);
  transition: transform 0.2s ease, opacity 0.2s 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);
}

/* ---------- Mobile Nav Panel ---------- */
@media (max-width: 1024px) {
  .site-header {
    padding: 14px 16px;
  }

  .header-inner {
    border-radius: 36px;
    padding: 8px 8px 8px 16px;
  }

  .main-nav {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--color-space-900);
    border: 1px solid rgba(201, 168, 76, 0.25);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-capsule);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s linear 0.3s;
    z-index: 100;
  }

  .main-nav[data-open] {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    margin-bottom: 8px;
  }

  .nav-list a {
    padding: 13px 16px;
    border-radius: 12px;
    font-size: 15px;
  }

  .nav-list a[aria-current="page"] {
    background: rgba(232, 200, 122, 0.12);
  }

  .nav-cta {
    display: block;
    width: 100%;
    text-align: center;
    margin-top: 12px;
    padding: 13px 20px;
  }

  .nav-toggle {
    display: flex;
  }
}

/* ---------- Skip Link & Progress ---------- */
.skip-link {
  position: fixed;
  top: -80px;
  left: 24px;
  z-index: 1300;
  padding: 12px 24px;
  background: var(--color-orange);
  color: var(--color-white);
  font-weight: 700;
  font-size: 14px;
  border-radius: 0 0 12px 12px;
  text-decoration: none;
  transition: top 0.2s ease;
}

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

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--color-gold-300) 0%, var(--color-gold-500) 50%, var(--color-orange) 100%);
  border-radius: 0 3px 3px 0;
  z-index: 1200;
  pointer-events: none;
}

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--color-space-900) 0%, #081629 100%);
  color: rgba(255, 255, 255, 0.72);
  border-top: 1px solid rgba(201, 168, 76, 0.2);
}

.site-footer::before {
  content: '';
  position: absolute;
  top: -120px;
  right: -80px;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(232, 200, 122, 0.07) 0%, transparent 70%);
  pointer-events: none;
}

.footer-main {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  padding-block: 64px 40px;
  position: relative;
  z-index: 1;
}

.footer-col {
  min-width: 0;
}

.footer-brand-col .brand {
  margin-bottom: 20px;
}

.footer-about {
  font-size: 14px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 16px;
}

.footer-trust {
  font-size: 13px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.45);
  padding-left: 14px;
  border-left: 2px solid rgba(232, 200, 122, 0.4);
}

.footer-col-title {
  position: relative;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--color-gold-500);
  margin-bottom: 20px;
  padding-bottom: 12px;
}

.footer-col-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 32px;
  height: 2px;
  background: linear-gradient(90deg, var(--color-gold-500) 0%, transparent 100%);
  border-radius: 2px;
}

.footer-nav-list li + li,
.footer-link-list li + li {
  margin-top: 10px;
}

.footer-nav-list a,
.footer-link-list a {
  color: rgba(255, 255, 255, 0.68);
  font-size: 14px;
  line-height: 1.5;
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.footer-nav-list a:hover,
.footer-link-list a:hover {
  color: var(--color-gold-300);
  padding-left: 4px;
}

.footer-contact-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.72);
  word-break: break-all;
}

.footer-contact-dot {
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-gold-500);
  margin-top: 9px;
}

.footer-contact-note {
  margin-top: 18px;
  font-size: 12px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.45);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-block: 18px;
  position: relative;
  z-index: 1;
}

.footer-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 24px;
}

.footer-icp,
.footer-copy {
  font-size: 13px;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.48);
}

/* ---------- Footer Responsive ---------- */
@media (min-width: 768px) {
  .footer-main {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 48px 40px;
  }
}

@media (min-width: 1025px) {
  .footer-main {
    grid-template-columns: 2.2fr 1fr 1fr 1.5fr;
    gap: 48px;
    padding-block: 72px 48px;
  }
}

/* ---------- Reveal Animation ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

[data-reveal].is-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Visually Hidden ---------- */
.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;
}

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

  .scroll-progress {
    transition: none;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .main-nav {
    transition: opacity 0.01ms ease, transform 0.01ms ease, visibility 0s;
  }
}
