/* =====================================================
   WILLIAMHILL体育 · 共享样式
   文件：/assets/site.css
   ===================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  background: var(--wh-bg);
}

body {
  font-family: var(--wh-font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--wh-body-text);
  background: var(--wh-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

ul,
ol {
  list-style: none;
}

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

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

input,
textarea,
select {
  font: inherit;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--wh-font-titles);
  font-weight: 800;
  line-height: 1.2;
  color: var(--wh-navy);
}

::selection {
  background: var(--wh-navy);
  color: var(--wh-cream);
}

/* ---------- Design Tokens ---------- */
:root {
  --wh-navy: #0A1F44;
  --wh-navy-deep: #071732;
  --wh-orange: #FF6B00;
  --wh-green: #00C853;
  --wh-gray: #3E4E6B;
  --wh-moss: #7A8A6A;
  --wh-terracotta: #B8573A;
  --wh-cream: #F5F0E8;
  --wh-white: #FFFFFF;

  --wh-bg: #F5F0E8;
  --wh-body-text: #1C2A47;
  --wh-text-soft: #4E5D76;

  --wh-font-titles: "Titillium Web", "Arial Black", "Noto Sans SC", "Microsoft YaHei", "PingFang SC", sans-serif;
  --wh-font-body: "Roboto", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --wh-font-data: "IBM Plex Mono", "Roboto Mono", "SFMono-Regular", "Consolas", monospace;

  --wh-space-1: 0.25rem;
  --wh-space-2: 0.5rem;
  --wh-space-3: 0.75rem;
  --wh-space-4: 1rem;
  --wh-space-5: 1.5rem;
  --wh-space-6: 2rem;
  --wh-space-7: 3rem;
  --wh-space-8: 4rem;

  --wh-container: 1240px;
  --wh-radius-sm: 4px;
  --wh-radius-md: 10px;
  --wh-radius-lg: 18px;

  --wh-fast: 160ms ease;
  --wh-base: 280ms ease;
}

/* ---------- Focus ---------- */
:focus-visible {
  outline: 3px solid var(--wh-orange);
  outline-offset: 2px;
}

/* ---------- Skip Link ---------- */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 1000;
  background: var(--wh-orange);
  color: var(--wh-white);
  padding: 0.6rem 1rem;
  border-radius: var(--wh-radius-sm);
  font-weight: 700;
  transition: top var(--wh-fast);
}

.skip-link:focus {
  top: 0.75rem;
}

/* ---------- Container / Main ---------- */
.site-container {
  width: min(100% - 2rem, var(--wh-container));
  margin-inline: auto;
}

#main-content {
  outline: none;
}

/* ---------- Header ---------- */
.site-header {
  position: relative;
  z-index: 50;
  background: var(--wh-navy);
  color: var(--wh-cream);
}

.site-header::after {
  content: "";
  display: block;
  height: 4px;
  background: linear-gradient(90deg,
    var(--wh-orange) 0 18%,
    var(--wh-white) 18% 19%,
    var(--wh-orange) 19% 40%,
    var(--wh-green) 40% 42%,
    var(--wh-orange) 42% 65%,
    var(--wh-white) 65% 66%,
    var(--wh-orange) 66% 100%);
}

.site-header__inner {
  width: min(100% - 2rem, var(--wh-container));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--wh-space-5);
  min-height: 76px;
  padding-block: 0.75rem;
}

.site-header__brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--wh-space-4);
  flex-shrink: 0;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: var(--wh-space-3);
  color: var(--wh-cream);
}

.brand-mark__emblem {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  background: var(--wh-orange);
  clip-path: polygon(0 0, 100% 0, 100% 72%, 50% 100%, 0 72%);
  font-family: var(--wh-font-data);
  font-weight: 800;
  font-size: 19px;
  color: var(--wh-white);
}

.brand-mark__letter {
  transform: translateY(-2px);
}

.brand-mark__pulse {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--wh-green);
  box-shadow: 0 0 0 0 rgba(0, 200, 83, 0.55);
  animation: brand-pulse 2.4s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes brand-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 200, 83, 0.55);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(0, 200, 83, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(0, 200, 83, 0);
  }
}

.brand-mark__text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-mark__text strong {
  font-family: var(--wh-font-titles);
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--wh-cream);
}

.brand-mark__text small {
  font-family: var(--wh-font-data);
  font-size: 9px;
  letter-spacing: 0.12em;
  color: rgba(245, 240, 232, 0.7);
  margin-top: 2px;
}

/* ---------- Nav Toggle ---------- */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 10px;
  border-radius: var(--wh-radius-sm);
  background: rgba(245, 240, 232, 0.08);
  border: 1px solid rgba(245, 240, 232, 0.14);
}

.nav-toggle__bar {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--wh-cream);
  border-radius: 2px;
  transition: transform var(--wh-fast), opacity var(--wh-fast);
}

.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);
}

/* ---------- Header Panel ---------- */
.site-header__panel {
  display: flex;
  align-items: center;
  gap: var(--wh-space-5);
}

/* ---------- Site Nav ---------- */
.site-nav {
  display: flex;
}

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

.site-nav__link {
  position: relative;
  display: inline-block;
  padding: 0.55rem 0.85rem;
  font-size: 15px;
  font-weight: 500;
  color: rgba(245, 240, 232, 0.82);
  border-radius: var(--wh-radius-sm);
  transition: color var(--wh-fast), background var(--wh-fast), transform var(--wh-fast);
}

.site-nav__link::after {
  content: "";
  position: absolute;
  left: 0.85rem;
  right: 0.85rem;
  bottom: 0.15rem;
  height: 2px;
  background: var(--wh-orange);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform var(--wh-base);
}

.site-nav__link:hover {
  color: var(--wh-white);
  background: rgba(245, 240, 232, 0.06);
}

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

.site-nav__link[aria-current="page"] {
  color: var(--wh-orange);
  font-weight: 700;
}

/* ---------- Header Command ---------- */
.header-command {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(245, 240, 232, 0.16);
  border-radius: 999px;
  background: rgba(245, 240, 232, 0.05);
}

.header-command::before {
  content: "INDEX";
  margin-left: 0.9rem;
  font-family: var(--wh-font-data);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--wh-green);
  font-weight: 700;
}

.header-command__link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  font-size: 13px;
  color: rgba(245, 240, 232, 0.86);
  transition: background var(--wh-fast), color var(--wh-fast);
}

.header-command__link:hover {
  background: rgba(245, 240, 232, 0.12);
  color: var(--wh-white);
}

.header-command__tag {
  font-family: var(--wh-font-data);
  color: var(--wh-orange);
  font-weight: 700;
}

.header-command__link--accent {
  background: var(--wh-orange);
  color: var(--wh-white);
  font-weight: 700;
}

.header-command__link--accent:hover {
  background: #ff8128;
  color: var(--wh-white);
}

.header-command__link--accent .header-command__tag {
  color: var(--wh-navy);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--wh-navy-deep);
  color: var(--wh-cream);
}

.site-footer__topline {
  height: 4px;
  background: linear-gradient(90deg,
    var(--wh-orange) 0 16%,
    var(--wh-moss) 16% 18%,
    var(--wh-gray) 18% 56%,
    var(--wh-terracotta) 56% 58%,
    var(--wh-green) 58% 100%);
}

.site-footer__inner {
  width: min(100% - 2rem, var(--wh-container));
  margin-inline: auto;
  padding-block: var(--wh-space-7) 1.5rem;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.4fr;
  gap: var(--wh-space-6);
  padding-bottom: var(--wh-space-6);
}

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

.site-footer__brand .brand-mark {
  margin-bottom: var(--wh-space-4);
}

.brand-mark--footer .brand-mark__emblem {
  width: 46px;
  height: 46px;
}

.brand-mark--footer .brand-mark__text strong {
  color: var(--wh-white);
}

.site-footer__trust {
  font-size: 14px;
  line-height: 1.8;
  color: rgba(245, 240, 232, 0.7);
  border-left: 3px solid var(--wh-orange);
  padding-left: var(--wh-space-4);
  margin-top: var(--wh-space-5);
}

.site-footer__title {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--wh-white);
  padding-bottom: 0.6rem;
  margin-bottom: var(--wh-space-4);
  border-bottom: 1px solid rgba(245, 240, 232, 0.18);
  position: relative;
}

.site-footer__title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 32px;
  height: 2px;
  background: var(--wh-orange);
}

.site-footer__list {
  display: grid;
  gap: 0.5rem;
  font-size: 14px;
}

.site-footer__list a {
  color: rgba(245, 240, 232, 0.72);
  transition: color var(--wh-fast), padding-left var(--wh-fast);
}

.site-footer__list a:hover {
  color: var(--wh-orange);
  padding-left: 4px;
}

.site-footer__contact-list {
  overflow-wrap: anywhere;
}

.site-footer__contact-list li {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
  color: rgba(245, 240, 232, 0.82);
  line-height: 1.6;
}

.site-footer__label {
  flex-shrink: 0;
  min-width: 2.6em;
  font-family: var(--wh-font-data);
  font-size: 12px;
  color: var(--wh-moss);
  letter-spacing: 0.05em;
}

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
  padding-block: 1rem;
  border-top: 1px solid rgba(245, 240, 232, 0.12);
  font-size: 13px;
  color: rgba(245, 240, 232, 0.55);
}

.site-footer__copy {
  margin-right: auto;
}

.site-footer__icp {
  font-family: var(--wh-font-data);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--wh-radius-md);
  font-weight: 700;
  font-size: 15px;
  line-height: 1.2;
  background: var(--wh-cream);
  border: 2px solid transparent;
  cursor: pointer;
  transition: background var(--wh-fast), border-color var(--wh-fast), color var(--wh-fast), transform var(--wh-fast);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: var(--wh-orange);
  color: var(--wh-white);
}

.btn--primary:hover {
  background: #ff8128;
  color: var(--wh-white);
}

.btn--ghost {
  background: transparent;
  border-color: var(--wh-navy);
  color: var(--wh-navy);
}

.btn--ghost:hover {
  background: var(--wh-navy);
  color: var(--wh-cream);
}

.btn--on-dark {
  background: transparent;
  border-color: rgba(245, 240, 232, 0.5);
  color: var(--wh-cream);
}

.btn--on-dark:hover {
  background: rgba(245, 240, 232, 0.1);
  color: var(--wh-white);
}

/* ---------- Breadcrumbs ---------- */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  font-size: 14px;
  color: var(--wh-text-soft);
  padding-block: 1rem 0;
}

.breadcrumbs a {
  color: var(--wh-navy);
  font-weight: 500;
  transition: color var(--wh-fast);
}

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

.breadcrumbs [aria-current="page"] {
  color: var(--wh-text-soft);
}

/* ---------- Section Titles ---------- */
.section-kicker {
  font-family: var(--wh-font-data);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--wh-orange);
}

.section-title {
  display: flex;
  align-items: baseline;
  gap: var(--wh-space-4);
  margin-bottom: var(--wh-space-5);
}

.section-title__index {
  font-family: var(--wh-font-data);
  font-size: 14px;
  color: var(--wh-orange);
  border: 1px solid currentColor;
  border-radius: 50%;
  min-width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.section-title__text {
  font-family: var(--wh-font-titles);
  font-size: clamp(24px, 3vw, 34px);
  color: var(--wh-navy);
  font-weight: 800;
  line-height: 1.15;
}

/* ---------- Grid Utilities ---------- */
.grid {
  display: grid;
  gap: var(--wh-space-5);
}

.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));
}

/* ---------- Media Frame ---------- */
.media-frame {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  overflow: hidden;
  background: var(--wh-gray);
  border-radius: var(--wh-radius-md);
  color: rgba(245, 240, 232, 0.5);
  font-size: 14px;
  min-height: 120px;
}

.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(245, 240, 232, 0.08) 31% 33%, transparent 34%);
}

.media-frame--16x9 {
  aspect-ratio: 16 / 9;
}

.media-frame--4x3 {
  aspect-ratio: 4 / 3;
}

.media-frame--3x2 {
  aspect-ratio: 3 / 2;
}

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

.media-frame__ph {
  position: relative;
  z-index: 1;
  padding: var(--wh-space-5);
  text-align: center;
}

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

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

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
  .site-header__inner {
    flex-wrap: wrap;
    min-height: 64px;
    padding-block: 0.75rem;
    gap: 0.5rem;
  }

  .site-header__brand {
    width: 100%;
  }

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

  .site-header__panel {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: var(--wh-space-4);
    padding: var(--wh-space-4) 0 var(--wh-space-3);
    border-top: 1px solid rgba(245, 240, 232, 0.12);
  }

  .site-header__panel[data-open] {
    display: flex;
  }

  .site-nav__list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }

  .site-nav__link {
    text-align: center;
    padding: 0.65rem 0.5rem;
    background: rgba(245, 240, 232, 0.05);
  }

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

  .site-nav__link[aria-current="page"] {
    background: rgba(255, 107, 0, 0.18);
    color: var(--wh-orange);
  }

  .header-command {
    justify-content: center;
    flex-wrap: wrap;
  }

  .site-footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--wh-space-5);
  }

  .site-footer__brand {
    grid-column: 1 / -1;
    max-width: none;
  }

  .site-footer__col--contact {
    grid-column: 1 / -1;
  }
}

@media (max-width: 575px) {
  .site-nav__list {
    grid-template-columns: repeat(2, 1fr);
  }

  .header-command::before {
    display: none;
  }

  .header-command__link {
    padding: 0.35rem 0.6rem;
    font-size: 12px;
  }

  .brand-mark__text strong {
    font-size: 19px;
  }

  .brand-mark__text small {
    font-size: 8px;
  }

  .site-footer__grid {
    grid-template-columns: 1fr;
  }

  .site-footer__brand,
  .site-footer__col--contact {
    grid-column: auto;
  }

  .site-footer__contact-list li {
    display: block;
  }

  .site-footer__label {
    display: block;
    margin-bottom: 2px;
  }

  .site-footer__bottom {
    justify-content: center;
    text-align: center;
  }

  .site-footer__copy {
    margin-right: 0;
  }

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

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

/* ---------- 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.js-enabled [data-reveal],
  html.js-enabled [data-reveal][data-revealed] {
    opacity: 1;
    transform: none;
  }
}
