/* ==========================================================================
   奇异果竞技 · Site Core / 共享样式
   ========================================================================== */

/* ---------- Reset & Variables ---------- */

:root {
  --kiwi: #7CB342;
  --kiwi-dark: #33691E;
  --yellow: #F7D117;
  --blue: #1A237E;
  --cream: #FFFDF5;
  --fruit-bg: #E8F5E9;
  --ink: #263238;
  --gray: #546E7A;
  --cyan: #00B8D4;
  --violet: #B39DDB;
  --container-max: 1200px;
  --font-heading: 'Songti SC', 'Noto Serif CJK SC', 'Source Han Serif SC', 'SimSun', Georgia, 'Times New Roman', serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans CJK SC', sans-serif;
  --font-mono: ui-monospace, 'SF Mono', 'Cascadia Code', 'Roboto Mono', 'Liberation Mono', Consolas, monospace;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink);
  background: linear-gradient(165deg, var(--fruit-bg) 0%, var(--cream) 38%, var(--cream) 100%);
  -webkit-font-smoothing: antialiased;
}

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

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

a {
  color: var(--kiwi-dark);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
a:hover {
  color: var(--blue);
}

h1, h2, h3, h4 {
  margin: 0 0 0.5em;
  font-family: var(--font-heading);
  font-weight: 900;
  line-height: 1.18;
  color: var(--blue);
}
h1 { font-size: clamp(2.1rem, 4.2vw, 3.6rem); line-height: 1.08; }
h2 { font-size: clamp(1.6rem, 3vw, 2.5rem); }
h3 { font-size: clamp(1.15rem, 1.8vw, 1.5rem); }

p {
  margin-top: 0;
}

::selection {
  background: var(--yellow);
  color: var(--blue);
}

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}

#main-content {
  scroll-margin-top: 2rem;
}

/* ---------- Utilities ---------- */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 3rem);
}

.site-content {
  min-height: 60vh;
}

/* ---------- Header ---------- */

.skip-link {
  position: fixed;
  top: -100%;
  left: clamp(1rem, 4vw, 3rem);
  z-index: 2000;
  padding: 0.75rem 1.25rem;
  background: var(--blue);
  color: #fff;
  border: 2px solid var(--yellow);
  box-shadow: 5px 5px 0 rgba(247, 209, 23, 0.55);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  transition: top 0.25s ease;
}
.skip-link:focus {
  top: 0.75rem;
}
.skip-link:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 2px;
}

.site-header {
  position: relative;
  z-index: 50;
  background: var(--cream);
  box-shadow: 0 6px 24px rgba(26, 35, 126, 0.08);
}

.site-header__strip {
  background: linear-gradient(90deg, var(--blue) 0%, #2E3B8E 68%, #3B4A9C 100%);
  border-bottom: 2px solid var(--yellow);
}

.site-header__inner {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 3rem);
}

.site-header__notice {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin: 0;
  padding: 0.45rem 0;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.86);
}

.site-header__notice-ver {
  color: var(--yellow);
  border: 1px solid rgba(247, 209, 23, 0.5);
  padding: 0.1em 0.5em;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.site-header__brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-top: 1.1rem;
  padding-bottom: 0.9rem;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  text-decoration: none;
  color: var(--ink);
}
.site-brand:hover {
  color: var(--ink);
}

.site-brand__mark {
  position: relative;
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 3px solid var(--kiwi-dark);
  background:
    radial-gradient(circle at 50% 50%, var(--yellow) 0 18%, transparent 19%),
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.22) 0 62%, transparent 64%),
    linear-gradient(145deg, #9CCC65 0%, var(--kiwi) 55%, #558B2F 100%);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.3), 4px 4px 0 rgba(26, 35, 126, 0.2);
}

.site-brand__mark::after {
  content: "";
  position: absolute;
  top: 11px;
  right: 13px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(51, 105, 30, 0.7);
  box-shadow:
    -11px 15px 0 rgba(51, 105, 30, 0.55),
    9px 23px 0 rgba(51, 105, 30, 0.5),
    -17px 7px 0 rgba(51, 105, 30, 0.45);
}

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

.site-brand__name {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.55rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: var(--blue);
}

.site-brand__tagline {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--gray);
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.6rem 0.95rem;
  background: var(--yellow);
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--blue);
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.nav-toggle:hover {
  transform: translate(1px, 1px);
  box-shadow: 2px 2px 0 var(--ink);
}

.nav-toggle__icon {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 20px;
}

.nav-toggle__bar {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

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

.nav-toggle__label {
  line-height: 1;
}

.site-nav {
  background: var(--cream);
}

.site-nav__list {
  display: flex;
  align-items: stretch;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 2px solid var(--ink);
  border-bottom: 4px solid var(--kiwi);
}

.site-nav__item {
  flex: 1 1 0;
  text-align: center;
  border-right: 1px solid rgba(38, 50, 56, 0.12);
}
.site-nav__item:last-child {
  border-right: 0;
}

.site-nav__link {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 0.55rem;
  font-family: var(--font-body);
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--kiwi-dark);
  text-decoration: none;
  transition: color 0.2s ease, background 0.2s ease;
}

.site-nav__link::before {
  content: "";
  display: inline-block;
  width: 0.6em;
  height: 0.6em;
  margin-right: 0.4em;
  border: 2px solid var(--kiwi);
  transform: rotate(45deg);
  opacity: 0;
  transition: opacity 0.2s ease, background 0.2s ease;
  flex-shrink: 0;
}

.site-nav__link:hover {
  background: var(--fruit-bg);
  color: var(--blue);
}
.site-nav__link:hover::before,
.site-nav__link[aria-current="page"]::before {
  opacity: 1;
  background: var(--yellow);
}

.site-nav__link[aria-current="page"] {
  color: var(--blue);
  font-weight: 900;
  background: linear-gradient(180deg, rgba(124, 179, 66, 0.12), rgba(247, 209, 23, 0.22));
}

/* ---------- Footer ---------- */

.site-footer {
  position: relative;
  margin-top: 4rem;
  background: var(--ink);
  color: rgba(255, 255, 255, 0.82);
  border-top: 6px solid var(--kiwi);
}

.site-footer::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 0;
  width: min(240px, 50vw);
  height: 6px;
  background: repeating-linear-gradient(115deg, var(--yellow) 0 14px, rgba(247, 209, 23, 0.25) 14px 18px, var(--kiwi) 18px 28px);
}

.site-footer__inner {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 3rem);
}

.site-footer__top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  padding: 2.2rem 0 1.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.site-footer__slug {
  display: inline-block;
  padding: 0.3em 0.85em;
  border: 2px solid rgba(247, 209, 23, 0.55);
  background: rgba(26, 35, 126, 0.35);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  color: var(--yellow);
}

.site-footer__claim {
  margin: 0;
  max-width: 24em;
  font-family: var(--font-heading);
  font-size: clamp(1.3rem, 2.4vw, 2rem);
  font-weight: 900;
  line-height: 1.25;
  color: #fff;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1.2fr;
  gap: clamp(1.5rem, 5vw, 4rem);
  padding: 2.4rem 0 2.8rem;
}

.site-footer__name {
  margin: 0 0 0.5rem;
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: 0.03em;
  color: var(--yellow);
}

.site-footer__about {
  max-width: 32em;
  margin: 0;
  font-size: 0.94rem;
  color: rgba(255, 255, 255, 0.66);
}

.site-footer__heading {
  margin: 0 0 0.85rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid rgba(247, 209, 23, 0.3);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--yellow);
}

.site-footer__list {
  display: grid;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer__list li {
  line-height: 1.5;
}

.site-footer__list a {
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-bottom-color 0.2s ease;
}
.site-footer__list a:hover {
  color: var(--yellow);
  border-bottom-color: var(--yellow);
}

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.35rem 1.5rem;
  padding: 1.1rem 0 1.6rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 0.84rem;
  color: rgba(255, 255, 255, 0.52);
}

.site-footer__bottom p {
  margin: 0;
}

/* ---------- Components ---------- */

.section-kicker {
  display: inline-block;
  margin: 0;
  padding: 0.35em 0.85em;
  border: 2px solid var(--kiwi-dark);
  background: var(--yellow);
  color: var(--blue);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  box-shadow: 3px 3px 0 rgba(38, 50, 56, 0.2);
}

.section-title {
  margin: 0.5rem 0 0.25rem;
  font-family: var(--font-heading);
  font-size: clamp(1.9rem, 3.5vw, 3.2rem);
  font-weight: 900;
  line-height: 1.1;
  color: var(--blue);
  letter-spacing: 0.01em;
}
.section-title em {
  color: var(--kiwi-dark);
  font-style: normal;
}

.lead {
  max-width: 65ch;
  margin-bottom: 1.2rem;
  font-size: 1.06rem;
  line-height: 1.8;
  color: var(--gray);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 0.7em 1.35em;
  border: 2px solid var(--ink);
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.96rem;
  text-decoration: none;
  box-shadow: 4px 4px 0 var(--ink);
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, color 0.16s ease;
}
.btn:hover {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--ink);
}
.btn:active {
  transform: translate(4px, 4px);
  box-shadow: 0 0 0 var(--ink);
}
.btn--primary {
  background: var(--kiwi);
  color: #fff;
}
.btn--accent {
  background: var(--yellow);
  color: var(--blue);
}

.card {
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 2px solid var(--ink);
  background: var(--cream);
  box-shadow: 4px 4px 0 rgba(38, 50, 56, 0.16);
}
.card__title {
  margin: 0 0 0.5em;
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--blue);
}
.card--flat {
  padding: 0 0 0 1.25rem;
  border: 0;
  border-left: 4px solid var(--kiwi);
  background: transparent;
  box-shadow: none;
}

.panel {
  margin-bottom: 1rem;
  border: 2px solid var(--ink);
  background: var(--cream);
  box-shadow: 4px 4px 0 rgba(38, 50, 56, 0.16);
}
.panel__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  padding: 1.1rem 1.4rem;
  border: 0;
  background: transparent;
  font-family: var(--font-heading);
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--blue);
  text-align: left;
  cursor: pointer;
}
.panel__trigger:hover {
  background: var(--fruit-bg);
}
.panel__icon {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 1.9em;
  height: 1.9em;
  border: 2px solid var(--ink);
  background: var(--yellow);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 900;
  color: var(--blue);
}
.panel__icon::before {
  content: "+";
}
.panel[data-open] .panel__icon::before {
  content: "−";
}
.panel__content {
  display: none;
  padding: 0 1.4rem 1.3rem;
  border-top: 2px dashed rgba(38, 50, 56, 0.15);
  color: var(--gray);
}
.panel[data-open] .panel__content {
  display: block;
}

.tabs__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--ink);
}
.tabs__btn {
  padding: 0.55em 1.25em;
  border: 2px solid var(--ink);
  background: var(--cream);
  box-shadow: 3px 3px 0 var(--ink);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.94rem;
  color: var(--ink);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.tabs__btn:hover {
  transform: translate(1px, 1px);
  box-shadow: 2px 2px 0 var(--ink);
}
.tabs__btn[aria-selected="true"] {
  background: var(--kiwi);
  color: #fff;
  box-shadow: 1px 1px 0 var(--ink);
  transform: translate(2px, 2px);
}
.tabs__panel {
  display: none;
}
.tabs__panel.is-active {
  display: block;
}

.tag {
  display: inline-block;
  padding: 0.3em 0.8em;
  border: 2px solid var(--ink);
  background: var(--cream);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink);
  box-shadow: 2px 2px 0 rgba(38, 50, 56, 0.18);
}
.tag--green {
  background: var(--kiwi);
  color: #fff;
}
.tag--yellow {
  background: var(--yellow);
  color: var(--blue);
}
.tag--blue {
  background: var(--blue);
  color: #fff;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1.3rem;
  margin: 0;
  padding: 0.8rem 1rem;
  border: 2px solid var(--ink);
  background: var(--cream);
  box-shadow: 3px 3px 0 rgba(38, 50, 56, 0.15);
  list-style: none;
}
.legend__item {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-size: 0.86rem;
  color: var(--gray);
}
.legend__swatch {
  width: 0.8em;
  height: 0.8em;
  border: 2px solid rgba(38, 50, 56, 0.55);
  background: var(--swatch, var(--kiwi));
}
.legend__swatch--yellow { --swatch: var(--yellow); }
.legend__swatch--cyan { --swatch: var(--cyan); }
.legend__swatch--blue { --swatch: var(--blue); }
.legend__swatch--gray { --swatch: var(--gray); }

.breadcrumbs {
  margin: 1.5rem 0 0;
}
.breadcrumbs__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.88rem;
}
.breadcrumbs__item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.breadcrumbs__item + .breadcrumbs__item::before {
  content: "›";
  font-weight: 700;
  color: var(--gray);
}
.breadcrumbs__link {
  color: var(--kiwi-dark);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
.breadcrumbs__link:hover {
  border-bottom-color: var(--kiwi);
}
.breadcrumbs__current {
  color: var(--gray);
}

.image-frame {
  position: relative;
  display: block;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 3px solid var(--ink);
  background: linear-gradient(135deg, var(--fruit-bg), var(--cream));
  box-shadow: 6px 6px 0 rgba(26, 35, 126, 0.14);
}
.image-frame img,
.image-frame picture {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.image-frame:empty::before {
  content: "IMAGE";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.24em;
  color: var(--gray);
  background:
    repeating-linear-gradient(-45deg, transparent 0 12px, rgba(124, 179, 66, 0.1) 12px 24px),
    linear-gradient(135deg, var(--fruit-bg), var(--cream));
}
.image-frame--wide {
  aspect-ratio: 21 / 9;
}
.image-frame--portrait {
  aspect-ratio: 3 / 4;
}

.diag-stripe {
  height: 10px;
  border-block: 2px solid var(--ink);
  background: repeating-linear-gradient(115deg, var(--kiwi) 0 14px, var(--yellow) 14px 28px, var(--blue) 28px 42px);
}

/* ---------- Interactions ---------- */

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  width: 0%;
  height: 4px;
  background: linear-gradient(90deg, var(--kiwi), var(--yellow), var(--cyan));
  box-shadow: 0 2px 4px rgba(26, 35, 126, 0.25);
  pointer-events: none;
}

html.js-reveal [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
html.js-reveal [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- Responsive ---------- */

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

  .site-nav {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
  }
  .site-nav[data-open] {
    max-height: 480px;
  }
  .site-nav[data-open] .site-nav__list {
    border-bottom: 4px solid var(--kiwi);
  }
  .site-nav__list {
    flex-direction: column;
    border-bottom: 0;
  }
  .site-nav__item {
    flex: none;
    text-align: left;
    border-right: 0;
    border-bottom: 1px solid rgba(38, 50, 56, 0.12);
  }
  .site-nav__item:last-child {
    border-bottom: 0;
  }
  .site-nav__link {
    justify-content: flex-start;
    padding: 0.95rem 0.5rem;
  }

  .site-footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem 2.5rem;
  }
  .site-footer__brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 600px) {
  .site-header__brand-row {
    padding-top: 0.85rem;
  }
  .site-brand__mark {
    width: 42px;
    height: 42px;
  }
  .site-brand__name {
    font-size: 1.25rem;
  }
  .site-brand__tagline {
    display: none;
  }
  .site-header__notice-ver {
    display: none;
  }
  .site-footer__grid {
    grid-template-columns: 1fr;
  }
  .site-footer__brand {
    grid-column: auto;
  }
  .site-footer__bottom {
    flex-direction: column;
  }
}

/* ---------- 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: 0s !important;
  }
  .scroll-progress {
    transition: none;
  }
  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }
}
