/* ============================================
   乐鱼体育 Site Kit — Shared CSS
   Path: /assets/site.css
   ============================================ */

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

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

body {
  font-family: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 16px;
  line-height: 1.75;
  color: #0A1F3C;
  background: #F7FAFC;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: #1B4F8A;
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #D9A62E;
}

ul,
ol {
  list-style: none;
}

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

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
  line-height: 1.35;
  color: #0A1F3C;
  font-weight: 800;
}

p {
  margin-bottom: 0.8em;
}

:focus-visible {
  outline: 3px solid #D9A62E;
  outline-offset: 3px;
}

::selection {
  background: #D9A62E;
  color: #0A1F3C;
}

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

/* ---------- CSS Variables ---------- */
:root {
  --c-deep: #0A1F3C;
  --c-main: #1B4F8A;
  --c-white: #F7FAFC;
  --c-gold: #D9A62E;
  --c-gold-light: #F0D183;
  --c-stone: #4A5568;
  --c-moss: #6B8F71;
  --c-terra: #C1694F;

  --font-heading: 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
  --font-body: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;

  --radius-cut: 20px;
  --transition: 0.6s ease-out;
  --nav-breakpoint: 768px;
}

/* ---------- Layout Primitives ---------- */
.container {
  width: min(1200px, 92vw);
  margin-inline: auto;
}

.section {
  padding: 72px 0;
}

.section--wide {
  padding: 96px 0;
}

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  color: #0A1F3C;
  background: #D9A62E;
  text-decoration: none;
  border: none;
  cursor: pointer;
  clip-path: polygon(0 0, 100% 0, calc(100% - 12px) 100%, 0 100%);
  transition: background-color 0.3s ease, transform 0.3s ease, color 0.3s ease;
}

.btn:hover {
  background: #F0D183;
  color: #0A1F3C;
  transform: translateX(3px);
}

.btn--primary {
  background: #D9A62E;
  color: #0A1F3C;
}

.btn--primary:hover {
  background: #F0D183;
  color: #0A1F3C;
}

.btn--ghost {
  background: transparent;
  color: #F7FAFC;
  border: 1px solid rgba(247, 250, 252, 0.4);
  clip-path: none;
  border-radius: 4px;
}

.btn--ghost:hover {
  border-color: #D9A62E;
  color: #D9A62E;
  transform: translateY(-2px);
}

/* ---------- Tags ---------- */
.tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  background: rgba(27, 79, 138, 0.1);
  color: #1B4F8A;
  clip-path: polygon(0 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
  white-space: nowrap;
}

.tag--gold {
  background: #D9A62E;
  color: #0A1F3C;
}

.tag--moss {
  background: #6B8F71;
  color: #F7FAFC;
}

.tag--terra {
  background: #C1694F;
  color: #F7FAFC;
}

/* ---------- Bento Grid & Cards ---------- */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
}

.bento-card {
  grid-column: span 4;
  background: #F7FAFC;
  border: 1px solid rgba(27, 79, 138, 0.15);
  padding: 28px;
  clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 20px 100%, 0 calc(100% - 20px));
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.bento-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(10, 31, 60, 0.12);
}

.bento-card--wide {
  grid-column: span 8;
}

.bento-card--focus {
  grid-column: span 6;
  background: linear-gradient(135deg, #0A1F3C 0%, #1B4F8A 100%);
  border-color: transparent;
  color: #F7FAFC;
}

.bento-card--focus h1,
.bento-card--focus h2,
.bento-card--focus h3 {
  color: #F7FAFC;
}

.bento-card--focus .tag {
  background: rgba(217, 166, 46, 0.2);
  color: #F0D183;
}

.bento-card--full {
  grid-column: span 12;
}

/* ---------- Data Card ---------- */
.data-card {
  background: #0A1F3C;
  color: #F7FAFC;
  padding: 24px;
  border-left: 4px solid #D9A62E;
  min-height: 140px;
}

.data-card__value {
  font-family: var(--font-mono);
  font-size: 36px;
  font-weight: 700;
  color: #F0D183;
  line-height: 1.2;
  display: block;
}

.data-card__label {
  font-size: 14px;
  color: rgba(247, 250, 252, 0.7);
  margin-top: 6px;
  display: block;
}

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  font-size: 14px;
  color: #4A5568;
  margin-bottom: 24px;
}

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

.breadcrumb__item:not(:last-child)::after {
  content: '/';
  font-family: var(--font-mono);
  color: #D9A62E;
  font-weight: 600;
}

.breadcrumb a {
  color: #1B4F8A;
}

.breadcrumb a:hover {
  color: #D9A62E;
}

/* ---------- Media Frame ---------- */
.media-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background:
    linear-gradient(135deg, rgba(27, 79, 138, 0.35) 0%, rgba(10, 31, 60, 0.6) 100%),
    #0A1F3C;
  clip-path: polygon(0 0, calc(100% - 24px) 0, 100% 24px, 100% 100%, 24px 100%, 0 calc(100% - 24px));
}

.media-frame--wide {
  aspect-ratio: 16 / 7;
}

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

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

/* ---------- Scroll Reveal ---------- */
html.has-reveal [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

html.has-reveal [data-reveal="visible"] {
  opacity: 1;
  transform: none;
}

/* ---------- Scroll Progress ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  width: 0;
  background: linear-gradient(90deg, #D9A62E, #F0D183);
  z-index: 1000;
  pointer-events: none;
  transition: width 0.2s linear;
}

/* ---------- Header: Top Brand Bar ---------- */
.site-header {
  position: relative;
  background: #0A1F3C;
  border-top: 4px solid #D9A62E;
}

.header-top {
  position: relative;
  border-bottom: 1px solid rgba(217, 166, 46, 0.25);
}

.header-top::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(217, 166, 46, 0.5), transparent);
}

.header-top__inner {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 32px;
  padding: 32px 0 28px;
  position: relative;
}

.header-top__inner::before,
.header-top__inner::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 16%;
  height: 2px;
  pointer-events: none;
}

.header-top__inner::before {
  left: 4%;
  background: linear-gradient(90deg, transparent, #D9A62E);
}

.header-top__inner::after {
  right: 4%;
  background: linear-gradient(270deg, transparent, #D9A62E);
}

.header-index {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  color: rgba(247, 250, 252, 0.55);
  background: rgba(27, 79, 138, 0.3);
  padding: 5px 12px;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
  white-space: nowrap;
}

.header-index--right {
  color: rgba(217, 166, 46, 0.7);
}

.brand-block {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  text-decoration: none;
  transition: opacity 0.3s ease;
}

.brand-block:hover {
  opacity: 0.85;
}

.brand-block__name {
  font-family: var(--font-heading);
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 900;
  letter-spacing: 0.08em;
  color: #F7FAFC;
  line-height: 1.2;
}

.brand-block__tagline {
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.35em;
  color: #D9A62E;
  text-indent: 0.35em;
}

/* ---------- Header: Navigation ---------- */
.navbar-shell {
  position: relative;
  background-color: #1B4F8A;
  background-image:
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.04) 0,
      rgba(255, 255, 255, 0.04) 1px,
      transparent 1px,
      transparent 20px
    ),
    linear-gradient(180deg, rgba(10, 31, 60, 0.35) 0%, rgba(10, 31, 60, 0) 100%);
  border-top: 2px solid #D9A62E;
}

.site-nav {
  display: flex;
  justify-content: center;
  min-height: 56px;
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
}

.nav-item {
  display: flex;
  align-items: stretch;
}

.nav-link {
  display: flex;
  align-items: center;
  padding: 16px 24px;
  color: rgba(247, 250, 252, 0.92);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.04em;
  position: relative;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 10px;
  height: 2px;
  background: #D9A62E;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.nav-link:hover::after,
.nav-link:focus-visible::after {
  transform: scaleX(1);
}

.nav-link:hover {
  color: #F7FAFC;
}

.nav-link[aria-current="page"] {
  background: #D9A62E;
  color: #0A1F3C;
  clip-path: polygon(0 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
}

.nav-link[aria-current="page"]::after {
  display: none;
}

.nav-link[aria-current="page"]:focus-visible {
  outline: 2px solid #F7FAFC;
  outline-offset: -3px;
}

/* ---------- Header: Mobile Nav Toggle ---------- */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 48px;
  height: 48px;
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 200;
  border-radius: 4px;
}

.nav-toggle__line {
  display: block;
  width: 22px;
  height: 2px;
  background: #F7FAFC;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

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

.nav-toggle[aria-expanded="true"] .nav-toggle__line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Footer ---------- */
.site-footer {
  background: #0A1F3C;
  color: rgba(247, 250, 252, 0.85);
  border-top: 4px solid #D9A62E;
  margin-top: auto;
}

.footer-inner {
  width: min(1200px, 92vw);
  margin-inline: auto;
  padding: 56px 0 32px;
}

.footer-cols {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.5fr;
  gap: 48px;
}

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

.footer-brand-name {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 900;
  color: #F7FAFC;
  letter-spacing: 0.08em;
  line-height: 1.3;
  margin-bottom: 12px;
  display: inline-block;
}

.footer-brand-name::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: #D9A62E;
  margin-top: 8px;
}

.footer-brand-desc {
  font-size: 14px;
  line-height: 1.9;
  color: rgba(247, 250, 252, 0.65);
  margin-bottom: 16px;
}

.footer-brand-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: rgba(217, 166, 46, 0.75);
  padding-left: 10px;
  border-left: 2px solid #D9A62E;
}

.footer-col-title {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: #D9A62E;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(217, 166, 46, 0.3);
}

.footer-nav-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-nav-list a {
  color: rgba(247, 250, 252, 0.78);
  font-size: 14px;
  transition: color 0.3s ease, padding-left 0.3s ease;
  display: inline-block;
}

.footer-nav-list a:hover {
  color: #D9A62E;
  padding-left: 6px;
}

.footer-contact {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-contact-line {
  font-size: 13px;
  line-height: 1.8;
  color: rgba(247, 250, 252, 0.65);
  margin: 0;
}

.footer-meta {
  margin-top: 48px;
  border-top: 1px solid rgba(247, 250, 252, 0.12);
  padding-top: 24px;
  text-align: center;
}

.footer-trust {
  font-size: 12px;
  color: rgba(247, 250, 252, 0.45);
  margin-bottom: 12px;
  max-width: 720px;
  margin-inline: auto;
}

.footer-icp {
  font-family: var(--font-mono);
  font-size: 14px;
  color: rgba(247, 250, 252, 0.7);
  letter-spacing: 0.08em;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .footer-cols {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }

  .footer-col--brand {
    grid-column: span 2;
  }

  .header-top__inner::before,
  .header-top__inner::after {
    width: 10%;
  }
}

@media (max-width: 768px) {
  /* Navigation becomes mobile drawer */
  .nav-toggle {
    display: flex;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    max-width: none;
    margin: 0;
    background: #0A1F3C;
    z-index: 300;
    border-bottom: 2px solid #D9A62E;
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.25);
  }

  .site-nav[data-open] {
    display: block;
    animation: navFadeIn 0.3s ease-out;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
  }

  .nav-item {
    border-bottom: 1px solid rgba(247, 250, 252, 0.08);
  }

  .nav-link {
    padding: 16px 28px;
    justify-content: flex-start;
    width: 100%;
  }

  .nav-link::after {
    left: 28px;
  }

  .nav-link[aria-current="page"] {
    clip-path: none;
    border-left: 4px solid #D9A62E;
    padding-left: 28px;
  }

  .header-top__inner {
    flex-direction: column;
    gap: 12px;
    padding: 24px 16px 20px;
  }

  .header-top__inner::before,
  .header-top__inner::after {
    display: none;
  }

  .header-index {
    font-size: 11px;
  }

  .header-index--right {
    display: none;
  }

  .brand-block__name {
    font-size: 24px;
  }

  .brand-block__tagline {
    font-size: 12px;
    letter-spacing: 0.25em;
  }

  .footer-cols {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .footer-col--brand {
    grid-column: span 1;
  }

  .footer-inner {
    padding: 40px 0 24px;
  }

  .footer-meta {
    margin-top: 32px;
  }

  .bento-card,
  .bento-card--wide,
  .bento-card--focus {
    grid-column: span 12;
  }

  .scroll-progress {
    height: 3px;
  }
}

@keyframes navFadeIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

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

  html.has-reveal [data-reveal],
  html.has-reveal [data-reveal="visible"] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .site-nav[data-open] {
    animation: none;
  }

  .bento-card:hover,
  .btn:hover {
    transform: none;
  }
}
