/* ==========================================================================
   云开体育 · Yun-Kai Sports Site Kit
   File: /assets/site.css
   1. Tokens & reset
   2. Base typography
   3. Layout utilities & grid
   4. Buttons, badges, decorative language
   5. Scroll progress
   6. Header & navigation
   7. Footer
   8. Reveal motion
   9. Focus & reduced motion
   ========================================================================== */

/* 1. Tokens & reset */
:root {
  --bg-cream: #F5F0E8;
  --bg-deep: #1B3A5C;
  --bg-deep-2: #142B42;
  --text-main: #2B201A;
  --accent: #FF6B35;
  --gold: #D4AF37;
  --cyan: #00B4D8;
  --cyan-deep: #0096C7;
  --line: #E5E0D8;
  --font-headline: 'Noto Sans SC', Arial, sans-serif;
  --font-body: 'Noto Sans SC', 'PingFang SC', sans-serif;
  --container-max: 1320px;
  --header-height: 76px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  background: var(--bg-cream);
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 12px);
}

body {
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: 0.02em;
  color: var(--text-main);
  background-color: var(--bg-cream);
  background-image: linear-gradient(to bottom, rgba(43, 32, 26, 0.035) 1px, transparent 1px);
  background-size: 100% 28px;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-headline);
  font-weight: 700;
  letter-spacing: 0.05em;
  line-height: 1.25;
  color: var(--text-main);
}

h1 {
  font-size: clamp(30px, 4.5vw, 36px);
}

h2 {
  font-size: 24px;
}

h3 {
  font-size: 18px;
}

p {
  margin: 0 0 0.8em;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent);
  text-decoration: underline;
}

ul,
ol {
  list-style: none;
}

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

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

#main-content {
  scroll-margin-top: calc(var(--header-height) + 12px);
}

/* 2. Base typography helpers */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* 3. Layout utilities & grid */
.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 48px);
}

.section {
  padding-block: clamp(32px, 7vw, 84px);
}

.page-main {
  min-height: 65vh;
}

.page-header {
  position: relative;
  padding-block: clamp(28px, 6vw, 64px) clamp(20px, 4vw, 40px);
}

.page-header h1 {
  display: inline-block;
}

.page-header h1::after {
  content: '';
  display: block;
  width: 72px;
  height: 3px;
  margin-top: 16px;
  background: linear-gradient(90deg, var(--accent), var(--cyan));
}

.page-header-lead {
  max-width: 680px;
  margin-top: 10px;
  color: rgba(43, 32, 26, 0.74);
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding-block: 18px 6px;
  font-size: 13px;
  color: rgba(43, 32, 26, 0.6);
}

.breadcrumbs-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.breadcrumbs-list li + li::before {
  content: '/';
  margin-inline: 4px;
  color: var(--accent);
}

.breadcrumbs a {
  color: rgba(43, 32, 26, 0.72);
  transition: color 0.25s ease;
}

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

.breadcrumbs [aria-current="page"] {
  color: var(--text-main);
  font-weight: 700;
}

.grid {
  display: grid;
  gap: clamp(20px, 3vw, 36px);
}

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

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

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

.grid-12 {
  grid-template-columns: repeat(12, 1fr);
}

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

.col-span-3 {
  grid-column: span 3;
}

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

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

@media (max-width: 560px) {
  .grid-3,
  .grid-4,
  .grid-12,
  .col-span-2,
  .col-span-3 {
    grid-template-columns: 1fr;
    grid-column: span 1;
  }
}

/* 4. Buttons, badges, decorative language */
.chamfer {
  clip-path: polygon(
    14px 0,
    calc(100% - 14px) 0,
    100% 14px,
    100% calc(100% - 14px),
    calc(100% - 14px) 100%,
    14px 100%,
    0 calc(100% - 14px),
    0 14px
  );
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.28em 0.85em;
  background: var(--bg-deep);
  color: var(--bg-cream);
  font-family: var(--font-headline);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}

.badge--gold {
  background: var(--gold);
  color: var(--text-main);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  padding: 0.8em 1.7em;
  font-family: var(--font-headline);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1;
  color: var(--bg-cream);
  background: var(--text-main);
  border: 2px solid var(--text-main);
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  text-decoration: none;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
  text-decoration: none;
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--bg-deep);
  border-color: var(--bg-deep);
  color: var(--bg-cream);
}

.speed-lines {
  position: absolute;
  height: 10px;
  background: repeating-linear-gradient(-45deg, var(--cyan) 0 6px, transparent 6px 14px);
  pointer-events: none;
}

/* 5. Scroll progress */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  z-index: 2000;
  background: linear-gradient(90deg, var(--accent), var(--gold), var(--cyan));
  transform: scaleX(0);
  transform-origin: 0 50%;
  pointer-events: none;
}

/* 6. Header & navigation */
.skip-link {
  position: fixed;
  top: 10px;
  left: 12px;
  z-index: 3000;
  display: inline-flex;
  align-items: center;
  padding: 0.65em 1.2em;
  background: var(--text-main);
  color: var(--bg-cream);
  font-family: var(--font-headline);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 0.2s ease;
}

.skip-link:hover {
  color: var(--bg-cream);
  text-decoration: none;
}

.skip-link:focus,
.skip-link:focus-visible {
  outline: none;
  transform: translateY(0);
  box-shadow: 0 0 0 3px var(--accent);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(27, 58, 92, 0.88);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(245, 240, 232, 0.12);
  box-shadow: 0 1px 24px rgba(27, 58, 92, 0.16);
}

.header-inner {
  max-width: 1440px;
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 56px);
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: none;
  color: var(--bg-cream);
  text-decoration: none;
}

.brand:hover {
  color: var(--bg-cream);
  text-decoration: none;
}

.brand-mark {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--cyan) 100%);
  clip-path: polygon(0 0, 72% 0, 100% 28%, 100% 100%, 28% 100%, 0 72%);
  transition: transform 0.3s var(--ease-out);
}

.brand:hover .brand-mark {
  transform: translateY(-2px) rotate(-3deg);
}

.brand-mark::after {
  content: '云';
  font-family: var(--font-headline);
  font-style: normal;
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
  color: var(--bg-cream);
}

.brand-name {
  font-family: var(--font-headline);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  color: var(--bg-cream);
  white-space: nowrap;
}

.brand-name em {
  font-style: normal;
  color: var(--accent);
}

.brand-tagline {
  margin-left: 4px;
  padding-left: 12px;
  border-left: 1px solid rgba(245, 240, 232, 0.25);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: rgba(245, 240, 232, 0.55);
  white-space: nowrap;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 1.6vw, 28px);
}

.primary-nav-head {
  display: none;
}

.nav-link {
  position: relative;
  padding: 10px 2px;
  font-family: var(--font-headline);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: rgba(245, 240, 232, 0.86);
  white-space: nowrap;
  text-decoration: none;
  transition: color 0.25s ease;
}

.nav-link::before {
  content: '/';
  margin-right: 0.45em;
  font-weight: 700;
  color: rgba(0, 180, 216, 0.8);
  transition: color 0.25s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--cyan));
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.3s var(--ease-out);
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--bg-cream);
  text-decoration: none;
}

.nav-link:hover::before,
.nav-link:focus-visible::before {
  color: var(--accent);
}

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

.nav-link[aria-current="page"] {
  color: var(--accent);
}

.nav-link[aria-current="page"]::before {
  color: var(--accent);
}

.nav-link[aria-current="page"]::after {
  transform: scaleX(1);
}

.nav-toggle {
  position: relative;
  z-index: 300;
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid rgba(245, 240, 232, 0.28);
  background: rgba(27, 58, 92, 0.65);
  border-radius: 2px;
  transition: border-color 0.25s ease, background 0.25s ease;
}

.nav-toggle:hover {
  border-color: var(--accent);
}

.nav-toggle-bar {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--bg-cream);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle[aria-expanded="true"] {
  border-color: var(--accent);
}

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

body.is-locked {
  overflow: hidden;
}

@media (max-width: 1024px) {
  .nav-toggle {
    display: inline-flex;
  }

  .primary-nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 200;
    width: min(340px, 86vw);
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 4px;
    padding: calc(var(--header-height) + 24px) clamp(24px, 6vw, 36px) 40px;
    background: linear-gradient(165deg, var(--bg-deep) 0%, var(--bg-deep-2) 100%);
    border-left: 1px solid rgba(212, 175, 55, 0.4);
    box-shadow: -18px 0 44px rgba(13, 32, 52, 0.45);
    transform: translateX(100%);
    visibility: hidden;
    overflow-y: auto;
    transition: transform 0.38s var(--ease-out), visibility 0s linear 0.38s;
  }

  .primary-nav[data-open] {
    transform: translateX(0);
    visibility: visible;
    transition: transform 0.38s var(--ease-out);
  }

  .primary-nav-head {
    display: block;
    padding-bottom: 14px;
    margin-bottom: 6px;
    border-bottom: 1px solid rgba(245, 240, 232, 0.14);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: rgba(245, 240, 232, 0.5);
  }

  .nav-link {
    padding: 15px 6px;
    font-size: 17px;
    color: rgba(245, 240, 232, 0.92);
    border-bottom: 1px solid rgba(245, 240, 232, 0.1);
  }

  .nav-link::before {
    color: var(--accent);
  }
}

@media (max-width: 480px) {
  .brand-tagline {
    display: none;
  }
}

/* 7. Footer */
.site-footer {
  position: relative;
  margin-top: clamp(48px, 8vw, 104px);
  background: linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-deep-2) 100%);
  color: rgba(245, 240, 232, 0.78);
  overflow: hidden;
}

.site-footer::after {
  content: '';
  position: absolute;
  right: -4rem;
  bottom: -6rem;
  width: 18rem;
  height: 18rem;
  background: repeating-linear-gradient(135deg, rgba(0, 180, 216, 0.08) 0 2px, transparent 2px 12px);
  pointer-events: none;
}

.footer-decor {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  z-index: 2;
  background: linear-gradient(90deg, var(--accent) 0%, var(--gold) 45%, var(--cyan) 100%);
  pointer-events: none;
}

.footer-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 2.2fr 1.1fr 1.1fr 1.7fr;
  gap: clamp(28px, 4vw, 64px);
  padding-block: clamp(44px, 7vw, 76px) clamp(32px, 5vw, 56px);
}

.footer-brand .brand-name {
  font-size: 22px;
}

.footer-tagline {
  margin-top: 18px;
  font-family: var(--font-headline);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--gold);
}

.footer-desc {
  margin-top: 10px;
  max-width: 46ch;
  font-size: 13px;
  line-height: 1.8;
  color: rgba(245, 240, 232, 0.58);
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

.footer-heading {
  padding-bottom: 10px;
  border-bottom: 2px solid rgba(212, 175, 55, 0.5);
  font-size: 15px;
  letter-spacing: 0.2em;
  color: var(--bg-cream);
}

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

.footer-link-item {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5em;
  font-size: 14px;
  color: rgba(245, 240, 232, 0.72);
  text-decoration: none;
  transition: color 0.25s ease, padding-left 0.25s ease;
}

.footer-link-item::before {
  content: '/';
  font-weight: 700;
  color: var(--accent);
}

.footer-link-item:hover {
  padding-left: 4px;
  color: var(--bg-cream);
  text-decoration: none;
}

.footer-contact .footer-list {
  gap: 14px;
}

.footer-label {
  display: block;
  margin-bottom: 3px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(212, 175, 55, 0.8);
}

.footer-value {
  display: block;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(245, 240, 232, 0.88);
  word-break: break-word;
}

.footer-bottom {
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(245, 240, 232, 0.14);
  padding-block: 18px 22px;
}

.footer-bottom-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  font-size: 13px;
  color: rgba(245, 240, 232, 0.5);
}

.footer-bottom .footer-copy {
  margin: 0;
}

.footer-icp {
  letter-spacing: 0.08em;
  color: rgba(245, 240, 232, 0.68);
}

.footer-address {
  color: rgba(245, 240, 232, 0.45);
}

@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr;
  }

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

@media (max-width: 640px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px 24px;
  }

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

  .footer-bottom-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

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

/* 8. Reveal motion */
html.js [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* 9. Focus & reduced motion */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001s !important;
    animation-delay: 0s !important;
    transition-duration: 0.001s !important;
    transition-delay: 0s !important;
  }

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

  .primary-nav {
    transition: none !important;
  }
}
