/* ============================================
   云开体育 · Site Shared CSS
   ============================================ */

/* ---------- Design Tokens ---------- */
:root {
  --c-deep: #0B1E33;
  --c-ocean: #1E3A5F;
  --c-electric: #2E6BFF;
  --c-flame: #FF6B35;
  --c-yellow: #FFD700;
  --c-sand: #F5F0E8;
  --c-green: #006B5E;
  --c-wine: #800020;
  --c-indigo: #3B0A5E;
  --c-gray: #B0B5BE;
  --c-white: #FFFFFF;

  --font-heading: "Alfa Slab One", Impact, "思源黑体", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --font-body: "Inter", "思源黑体", "Noto Sans SC", "Microsoft YaHei", sans-serif;

  --container-w: 1200px;
  --header-h: 76px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --radius: 2px;
  --cut: 12px;
}

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

* {
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  letter-spacing: 0.01em;
  color: var(--c-deep);
  background: var(--c-sand);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body.site-nav-visible {
  overflow: hidden;
}

main {
  display: block;
  flex: 1;
}

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

ul,
ol {
  list-style: none;
}

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

a {
  color: var(--c-electric);
  text-decoration: none;
  transition: color 0.25s;
}

a:hover {
  color: var(--c-flame);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: inherit;
  text-wrap: balance;
}

:focus-visible {
  outline: 3px solid var(--c-yellow);
  outline-offset: 2px;
}

/* ---------- Container ---------- */
.container {
  width: 100%;
  max-width: var(--container-w);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2rem);
}

/* ---------- Skip Link ---------- */
.skip-link {
  position: fixed;
  top: -100%;
  left: 1rem;
  z-index: 9999;
  background: var(--c-sand);
  color: var(--c-deep);
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  font-size: 0.9375rem;
  border-radius: 0 0 4px 4px;
  box-shadow: 0 8px 24px rgba(11, 30, 51, 0.2);
  transition: top 0.25s var(--ease-out);
}

.skip-link:focus-visible {
  top: 0;
  outline: 3px solid var(--c-flame);
  outline-offset: 0;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--c-deep);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.site-header__progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1100;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--c-electric) 0%, var(--c-flame) 50%, var(--c-yellow) 100%);
  transform: scaleX(0);
  transform-origin: left center;
  pointer-events: none;
  will-change: transform;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  min-height: var(--header-h);
}

/* ---------- Brand ---------- */
.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.875rem;
  flex-shrink: 0;
  position: relative;
  z-index: 220;
  text-decoration: none;
}

.site-brand:hover .site-brand__name {
  color: var(--c-yellow);
}

.site-brand__mark {
  position: relative;
  display: block;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--c-flame) 0%, var(--c-electric) 60%, var(--c-deep) 100%);
  clip-path: polygon(25% 0%, 100% 0%, 100% 75%, 75% 100%, 0% 100%, 0% 25%);
}

.site-brand__dot {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  background: var(--c-yellow);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.7);
}

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

.site-brand__name {
  font-family: var(--font-heading);
  font-size: 1.375rem;
  letter-spacing: 0.08em;
  color: var(--c-white);
  transition: color 0.25s;
}

.site-brand__tag {
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--c-gray);
  margin-top: 3px;
  white-space: nowrap;
}

/* ---------- Nav Toggle ---------- */
.nav-toggle {
  display: none;
  position: relative;
  z-index: 220;
  width: 46px;
  height: 46px;
  padding: 10px;
  cursor: pointer;
  flex-shrink: 0;
}

.nav-toggle__bar {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--c-white);
  border-radius: 1px;
  transition: transform 0.3s var(--ease-out), opacity 0.3s, background 0.3s;
}

.nav-toggle__bar + .nav-toggle__bar {
  margin-top: 8px;
}

.nav-toggle[data-open] .nav-toggle__bar:nth-child(1) {
  transform: translateY(10px) rotate(45deg);
}

.nav-toggle[data-open] .nav-toggle__bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[data-open] .nav-toggle__bar:nth-child(3) {
  transform: translateY(-10px) rotate(-45deg);
}

/* ---------- Nav ---------- */
.site-nav__list {
  display: flex;
  align-items: center;
  gap: 2px;
}

.site-nav__link {
  position: relative;
  display: inline-block;
  padding: 0.5rem 1rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--c-gray);
  letter-spacing: 0.02em;
  white-space: nowrap;
  transition: color 0.25s;
}

.site-nav__link::after {
  content: "";
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--c-flame) 0%, var(--c-yellow) 100%);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.35s var(--ease-out);
}

.site-nav__link:hover {
  color: var(--c-white);
}

.site-nav__link:hover::after,
.site-nav__link[aria-current="page"]::after {
  transform: scaleX(1);
}

.site-nav__link[aria-current="page"] {
  color: var(--c-flame);
}

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  margin-top: auto;
  background:
    radial-gradient(circle at 85% 15%, rgba(255, 107, 53, 0.06), transparent 42%),
    var(--c-deep);
  color: var(--c-gray);
  overflow: hidden;
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--c-electric) 0%, var(--c-flame) 50%, var(--c-yellow) 100%);
  z-index: 2;
  pointer-events: none;
}

.site-footer::after {
  content: "";
  position: absolute;
  right: -80px;
  top: 40px;
  width: 280px;
  height: 280px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  box-shadow:
    0 0 0 45px rgba(255, 255, 255, 0.015),
    0 0 0 90px rgba(255, 255, 255, 0.01);
}

.site-footer__pattern {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(135deg, transparent 0px, transparent 10px, rgba(255, 255, 255, 0.015) 10px, rgba(255, 255, 255, 0.015) 12px);
  pointer-events: none;
  z-index: 0;
}

.site-footer__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(260px, 5fr) 7fr;
  gap: clamp(2rem, 5vw, 4rem);
  padding-top: clamp(3rem, 6vw, 4.5rem);
  padding-bottom: clamp(2rem, 4vw, 3rem);
}

.site-footer__brand {
  max-width: 320px;
}

.site-footer__note {
  margin-top: 1.25rem;
  font-size: 0.9375rem;
  line-height: 1.8;
  color: var(--c-gray);
}

.site-footer__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
}

.site-footer__heading {
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-white);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.site-footer__heading::before {
  content: "";
  width: 18px;
  height: 2px;
  background: linear-gradient(90deg, var(--c-flame), var(--c-yellow));
  flex-shrink: 0;
}

.site-footer__links li + li,
.site-footer__contact li + li {
  margin-top: 0.625rem;
}

.site-footer__links a {
  display: inline-block;
  font-size: 0.9375rem;
  color: var(--c-gray);
  padding: 0.125rem 0;
  transition: color 0.25s, transform 0.25s var(--ease-out);
}

.site-footer__links a:hover {
  color: var(--c-yellow);
  transform: translateX(4px);
}

.site-footer__contact {
  font-size: 0.9375rem;
  line-height: 1.7;
}

.site-footer__label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-gray);
  opacity: 0.75;
  margin-bottom: 2px;
}

.site-footer__value {
  color: var(--c-sand);
  word-break: break-word;
}

.site-footer__bottom {
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-block: 1.25rem;
}

.site-footer__bottom-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  font-size: 0.8125rem;
  color: var(--c-gray);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8125rem 1.75rem;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.04em;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.3s, background-color 0.3s, border-color 0.3s, transform 0.3s var(--ease-out), filter 0.3s;
}

.btn--primary {
  background: var(--c-flame);
  color: var(--c-deep);
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}

.btn--primary:hover {
  background: #ff8552;
  color: var(--c-deep);
  transform: translateY(-2px);
  filter: drop-shadow(0 8px 16px rgba(255, 107, 53, 0.3));
}

.btn--ghost {
  border: 2px solid rgba(11, 30, 51, 0.3);
  color: var(--c-deep);
}

.btn--ghost:hover {
  border-color: var(--c-electric);
  color: var(--c-electric);
  transform: translateY(-2px);
}

.btn--outline-light {
  border: 2px solid rgba(255, 255, 255, 0.4);
  color: var(--c-white);
}

.btn--outline-light:hover {
  border-color: var(--c-yellow);
  color: var(--c-yellow);
  transform: translateY(-2px);
}

.btn--dark {
  background: var(--c-deep);
  color: var(--c-white);
}

.btn--dark:hover {
  background: var(--c-indigo);
  color: var(--c-white);
  transform: translateY(-2px);
}

/* ---------- Sections ---------- */
.section {
  padding-block: clamp(3rem, 7vw, 5.5rem);
}

.section--dark {
  background: var(--c-deep);
  color: var(--c-sand);
}

.section--indigo {
  background: var(--c-indigo);
  color: var(--c-sand);
}

.section--sand {
  background: var(--c-sand);
  color: var(--c-deep);
}

.section-head {
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.section-head__kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--c-flame);
  margin-bottom: 0.75rem;
}

.section-head__kicker::before {
  content: "";
  width: 32px;
  height: 2px;
  background: linear-gradient(90deg, var(--c-flame), var(--c-yellow));
  flex-shrink: 0;
}

.section-head__title {
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 4.5vw, 2.75rem);
  line-height: 1.15;
  letter-spacing: 0.02em;
  margin-bottom: 0.75rem;
}

.section-head__desc {
  max-width: 640px;
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--c-gray);
}

.section--dark .section-head__title,
.section--indigo .section-head__title {
  color: var(--c-white);
}

.section--dark .section-head__desc,
.section--indigo .section-head__desc {
  color: var(--c-gray);
}

/* ---------- Panels & Cards ---------- */
.panel {
  position: relative;
  background: var(--c-white);
  padding: clamp(1.5rem, 3.5vw, 2.5rem);
  clip-path: polygon(
    12px 0,
    calc(100% - 12px) 0,
    100% 12px,
    100% calc(100% - 12px),
    calc(100% - 12px) 100%,
    12px 100%,
    0 calc(100% - 12px),
    0 12px
  );
  transition: transform 0.35s var(--ease-out), filter 0.35s var(--ease-out);
}

.panel:hover {
  transform: translateY(-4px);
  filter: drop-shadow(0 12px 28px rgba(11, 30, 51, 0.12));
}

.panel--dark {
  background: var(--c-ocean);
  color: var(--c-white);
}

.panel--dark .section-head__desc {
  color: var(--c-gray);
}

.card {
  position: relative;
  background: var(--c-white);
  border: 1px solid rgba(11, 30, 51, 0.08);
  padding: 1.5rem;
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(11, 30, 51, 0.1);
}

.card--dark {
  background: var(--c-ocean);
  border-color: rgba(255, 255, 255, 0.08);
  color: var(--c-white);
}

/* ---------- Tags ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.875rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  background: rgba(46, 107, 255, 0.1);
  color: var(--c-electric);
  border-left: 3px solid var(--c-electric);
}

.tag--flame {
  background: rgba(255, 107, 53, 0.1);
  color: var(--c-flame);
  border-left-color: var(--c-flame);
}

.tag--yellow {
  background: rgba(255, 215, 0, 0.12);
  color: #7a6400;
  border-left-color: var(--c-yellow);
}

.tag--wine {
  background: rgba(128, 0, 32, 0.08);
  color: var(--c-wine);
  border-left-color: var(--c-wine);
}

.tag--green {
  background: rgba(0, 107, 94, 0.1);
  color: var(--c-green);
  border-left-color: var(--c-green);
}

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--c-gray);
  margin-bottom: 1.5rem;
}

.breadcrumb a {
  color: var(--c-electric);
}

.breadcrumb a:hover {
  color: var(--c-flame);
}

.breadcrumb__sep {
  color: var(--c-gray);
  opacity: 0.6;
  font-size: 0.75rem;
}

.breadcrumb__current {
  color: var(--c-deep);
  font-weight: 500;
}

.section--dark .breadcrumb {
  color: var(--c-gray);
}

.section--dark .breadcrumb__current {
  color: var(--c-white);
}

.section--dark .breadcrumb a {
  color: var(--c-electric);
}

/* ---------- Grid ---------- */
.grid {
  display: grid;
  gap: clamp(1.25rem, 3vw, 2rem);
}

.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--fit {
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
}

/* ---------- Image Frames ---------- */
.image-frame {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--c-ocean);
  clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
}

.image-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out);
}

.image-frame:hover img {
  transform: scale(1.04);
}

.image-frame--wide {
  aspect-ratio: 21 / 9;
}

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

.image-frame--portrait {
  aspect-ratio: 3 / 4;
}

.image-frame--cut {
  clip-path: polygon(
    12px 0,
    calc(100% - 12px) 0,
    100% 12px,
    100% calc(100% - 12px),
    calc(100% - 12px) 100%,
    12px 100%,
    0 calc(100% - 12px),
    0 12px
  );
}

/* ---------- Stats ---------- */
.stat {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 2.75rem);
  line-height: 1;
  color: var(--c-deep);
}

.stat--flame {
  color: var(--c-flame);
}

.stat--yellow {
  color: #b8860b;
}

.stat-label {
  font-size: 0.8125rem;
  color: var(--c-gray);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.section--dark .stat {
  color: var(--c-white);
}

.section--dark .stat--flame {
  color: var(--c-flame);
}

.section--dark .stat--yellow {
  color: var(--c-yellow);
}

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

.has-js [data-reveal="visible"] {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Media Queries ---------- */
@media (max-width: 960px) {
  .site-footer__inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .site-footer__brand {
    max-width: none;
  }

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

@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(80vw, 340px);
    background: var(--c-deep);
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    padding: calc(var(--header-h) + 1.5rem) 1.5rem 2rem;
    overflow-y: auto;
    z-index: 210;
    transform: translateX(105%);
    visibility: hidden;
    transition: transform 0.45s var(--ease-out), visibility 0.45s;
  }

  .site-nav[data-open] {
    transform: translateX(0);
    visibility: visible;
    box-shadow: -16px 0 48px rgba(0, 0, 0, 0.4);
  }

  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
  }

  .site-nav__link {
    display: block;
    padding: 0.875rem 1rem;
    font-size: 1.0625rem;
    border-left: 3px solid transparent;
    background: transparent;
  }

  .site-nav__link::after {
    display: none;
  }

  .site-nav__link:hover,
  .site-nav__link[aria-current="page"] {
    color: var(--c-flame);
    background: rgba(255, 107, 53, 0.08);
    border-left-color: var(--c-flame);
  }

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

@media (max-width: 640px) {
  .site-footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.75rem;
  }

  .site-footer__col:nth-child(3) {
    grid-column: 1 / -1;
  }

  .site-footer__bottom-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.375rem;
  }
}

/* ---------- 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;
    transition-delay: 0ms !important;
  }

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

  .site-header__progress {
    transition: none;
  }
}
