/* ============================================================
   kiwi stadium · shared site kit
   1 reset / 2 tokens / 3 typography / 4 header / 5 footer
   6 components / 7 motion / 8 responsive
   ============================================================ */

/* ---------- 1. reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

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

body,
h1, h2, h3, h4, h5, p,
figure, blockquote, dl, dd, ul, ol { margin: 0; }

ul, ol { padding: 0; list-style: none; }

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

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

a { color: inherit; }

hr { border: 0; border-top: 1px solid var(--line); margin: 0; }

:where(a, button, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- 2. tokens ---------- */
:root {
  --kiwi: #18B76A;
  --kiwi-bright: #45D97C;
  --deep: #0B2E23;
  --ink: #101614;
  --gold: #F3B63F;
  --pale: #E4F8EB;
  --paper: #F6F8F4;
  --turf: #1F7A4D;
  --alert: #D9732F;
  --glass: rgba(255, 255, 255, 0.16);

  --line: rgba(16, 22, 20, 0.12);
  --line-dark: rgba(246, 248, 244, 0.16);

  --font-display: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC",
    "Source Han Sans SC", "Microsoft YaHei", system-ui, -apple-system,
    "Segoe UI", sans-serif;
  --font-body: var(--font-display);
  --font-mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", "Roboto Mono",
    Menlo, Consolas, "Courier New", monospace;

  --shell: 1200px;
  --radius: 18px;
  --radius-lg: 26px;
  --header-offset: 104px;
  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
}

/* ---------- 3. typography & page base ---------- */
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.75;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

#main-content { padding-top: var(--header-offset); }

.h-display {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin: 0;
}

.h-section {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(26px, 3.4vw, 36px);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--turf);
  margin: 0;
}

.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

.prose {
  max-width: 40em;
  color: var(--ink);
  line-height: 1.75;
  font-size: 16.5px;
}
.prose p + p { margin-top: 1em; }
.prose strong { color: var(--deep); }

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 32px);
}

/* ---------- 4. header ---------- */
.skip-link {
  position: fixed;
  top: -120px;
  left: 16px;
  z-index: 120;
  padding: 12px 20px;
  border-radius: 0 0 14px 14px;
  background: var(--gold);
  color: #2a1c00;
  font-weight: 800;
  font-size: 14px;
  text-decoration: none;
  transition: top 0.2s var(--ease);
}
.skip-link:focus-visible { top: 0; }

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 90;
  padding: 18px clamp(12px, 3vw, 32px);
  pointer-events: none;
  transition: padding 0.3s var(--ease);
}

.header-shell {
  position: relative;
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: var(--shell);
  margin-inline: auto;
  padding: 9px 10px 9px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(11, 46, 35, 0.82);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
  box-shadow: 0 20px 46px -28px rgba(11, 46, 35, 0.95);
  color: var(--paper);
  transition: padding 0.3s var(--ease), background 0.3s var(--ease);
}

.site-header[data-compact] { padding-top: 8px; }
.site-header[data-compact] .header-shell {
  padding: 6px 8px 6px 14px;
  background: rgba(11, 46, 35, 0.95);
}

/* brand */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  text-decoration: none;
  color: inherit;
}

.brand-mark {
  --mark: 26px;
  position: relative;
  flex: 0 0 auto;
  width: var(--mark);
  height: var(--mark);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, var(--gold) 0 15%, var(--kiwi) 18% 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}
.brand-mark i {
  position: absolute;
  left: 50%;
  top: 50%;
  width: calc(var(--mark) * 0.11);
  height: calc(var(--mark) * 0.23);
  margin-left: calc(var(--mark) * -0.055);
  margin-top: calc(var(--mark) * -0.115);
  border-radius: 999px;
  background: var(--ink);
  transform: rotate(var(--r, 0deg)) translateY(calc(var(--mark) * 0.31));
}
.brand-mark i:nth-child(1) { --r: 0deg; }
.brand-mark i:nth-child(2) { --r: 60deg; }
.brand-mark i:nth-child(3) { --r: 120deg; }
.brand-mark i:nth-child(4) { --r: 180deg; }
.brand-mark i:nth-child(5) { --r: 240deg; }
.brand-mark i:nth-child(6) { --r: 300deg; }

.brand-text {
  font-weight: 900;
  font-size: 17px;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.brand-tag {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  color: var(--kiwi-bright);
  padding-left: 9px;
  border-left: 1px solid rgba(255, 255, 255, 0.22);
  white-space: nowrap;
}

/* navigation */
.nav-pill {
  flex: 1 1 auto;
  display: flex;
  justify-content: center;
  min-width: 0;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: nowrap;
}

.nav-list a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 12px;
  border-radius: 999px;
  font-size: 13.5px;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  color: rgba(246, 248, 244, 0.76);
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.nav-list a::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: transparent;
  transition: background 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.nav-list a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
.nav-list a[aria-current="page"] {
  background: rgba(24, 183, 106, 0.2);
  color: #fff;
  font-weight: 700;
}
.nav-list a[aria-current="page"]::before {
  background: var(--kiwi-bright);
  box-shadow: 0 0 0 3px rgba(69, 217, 124, 0.2);
}

/* header actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.date-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.1);
  font-size: 12px;
  line-height: 1;
  text-decoration: none;
  color: var(--paper);
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
}
.date-chip:hover {
  background: rgba(69, 217, 124, 0.22);
  border-color: rgba(69, 217, 124, 0.45);
}
.date-chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--kiwi-bright);
}
.date-chip-label { font-weight: 600; white-space: nowrap; }
.date-chip-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--gold);
}

.status-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 13px;
  border-radius: 999px;
  background: var(--kiwi);
  color: #06231a;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s var(--ease), transform 0.2s var(--ease);
}
.status-link:hover { background: var(--kiwi-bright); }

.status-dot {
  position: relative;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #06231a;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 42px;
  height: 38px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: background 0.2s var(--ease);
}
.nav-toggle:hover { background: rgba(255, 255, 255, 0.18); }
.nav-toggle-bar {
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: var(--paper);
  transition: transform 0.22s var(--ease), opacity 0.18s var(--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);
}

/* ---------- 5. footer ---------- */
.site-footer {
  position: relative;
  overflow: hidden;
  margin-top: clamp(56px, 8vw, 104px);
  background: var(--deep);
  color: rgba(246, 248, 244, 0.76);
}
.site-footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--kiwi), var(--kiwi-bright), var(--gold), var(--turf));
}
.site-footer::after {
  content: "";
  position: absolute;
  right: -120px;
  bottom: -160px;
  width: 440px;
  height: 440px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, rgba(24, 183, 106, 0.34), transparent 62%);
  pointer-events: none;
}

.footer-shell {
  position: relative;
  z-index: 1;
  max-width: var(--shell);
  margin-inline: auto;
  padding: clamp(48px, 6vw, 72px) clamp(16px, 4vw, 32px) 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.35fr 1fr;
  gap: 44px 36px;
}

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

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: var(--paper);
}
.footer-brand .brand-mark { --mark: 30px; }

.footer-brand-text {
  font-weight: 900;
  font-size: 18px;
  letter-spacing: 0.03em;
}

.footer-note {
  margin-top: 16px;
  max-width: 26em;
  font-size: 14px;
  line-height: 1.8;
  color: rgba(246, 248, 244, 0.66);
}

.footer-version {
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: var(--kiwi-bright);
}

.footer-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--gold);
  margin-bottom: 16px;
}

.footer-list {
  display: grid;
  gap: 10px;
  font-size: 14px;
}
.footer-list a {
  text-decoration: none;
  color: rgba(246, 248, 244, 0.74);
  transition: color 0.18s var(--ease);
}
.footer-list a:hover { color: var(--kiwi-bright); }

.footer-list--contact { gap: 12px; }
.footer-list--contact li {
  display: grid;
  gap: 2px;
  font-size: 13.5px;
  line-height: 1.7;
  color: rgba(246, 248, 244, 0.74);
  word-break: break-word;
}
.footer-key {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: rgba(69, 217, 124, 0.85);
}

.footer-base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  margin-top: clamp(36px, 5vw, 56px);
  padding: 20px 0 28px;
  border-top: 1px solid var(--line-dark);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: rgba(246, 248, 244, 0.52);
}

/* ---------- 6. shared components ---------- */
.section {
  position: relative;
  padding-block: clamp(56px, 7vw, 96px);
}
.section--pale { background: var(--pale); }
.section--deep { background: var(--deep); color: rgba(246, 248, 244, 0.82); }
.section--deep .h-section,
.section--deep .h-display { color: var(--paper); }
.section--turf {
  background: linear-gradient(140deg, var(--turf) 0%, var(--deep) 78%);
  color: rgba(246, 248, 244, 0.84);
}
.section--turf .h-section { color: var(--paper); }

.grid {
  display: grid;
  gap: clamp(18px, 2.4vw, 28px);
}
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--split {
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  align-items: start;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.18s var(--ease), color 0.18s var(--ease),
    border-color 0.18s var(--ease), transform 0.18s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn--solid { background: var(--kiwi); color: #06231a; }
.btn--solid:hover { background: var(--kiwi-bright); }
.btn--gold { background: var(--gold); color: #2a1c00; }
.btn--gold:hover { background: #ffc959; }
.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: rgba(16, 22, 20, 0.24);
}
.btn--ghost:hover { background: var(--pale); border-color: var(--kiwi); }
.btn--on-dark {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.24);
  color: var(--paper);
}
.btn--on-dark:hover { background: rgba(69, 217, 124, 0.2); }

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: rgba(16, 22, 20, 0.55);
}
.section--deep .breadcrumb,
.section--turf .breadcrumb { color: rgba(246, 248, 244, 0.6); }
.breadcrumb li { display: inline-flex; align-items: center; }
.breadcrumb li:not(:first-child)::before {
  content: "/";
  margin: 0 8px;
  opacity: 0.4;
}
.breadcrumb a { text-decoration: none; }
.breadcrumb a:hover { color: var(--kiwi); }
.breadcrumb [aria-current="page"] { color: var(--kiwi); }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--deep);
  color: var(--kiwi-bright);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  line-height: 1.6;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid rgba(31, 122, 77, 0.18);
  background: var(--pale);
  color: var(--turf);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  line-height: 1.6;
}

.stat { display: grid; gap: 6px; }
.stat-value {
  display: block;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: clamp(32px, 4.4vw, 48px);
  font-weight: 700;
  line-height: 1;
  color: var(--deep);
}
.section--deep .stat-value,
.section--turf .stat-value { color: var(--gold); }
.stat-label {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  color: rgba(16, 22, 20, 0.55);
}
.section--deep .stat-label,
.section--turf .stat-label { color: rgba(246, 248, 244, 0.6); }

/* image containers */
.media {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: var(--radius);
  background: linear-gradient(150deg, var(--turf) 0%, var(--deep) 100%);
  aspect-ratio: 16 / 10;
}
.media--wide { aspect-ratio: 21 / 9; }
.media--square { aspect-ratio: 1 / 1; }
.media--portrait { aspect-ratio: 3 / 4; }
.media__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(175deg, rgba(24, 183, 106, 0) 45%, rgba(11, 46, 35, 0.62) 100%);
  pointer-events: none;
}
.media__caption {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 1;
  padding: 14px 16px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: rgba(246, 248, 244, 0.86);
}

/* table */
.table-wrap {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #fff;
}
.table-wrap table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 14.5px;
}
.table-wrap th,
.table-wrap td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
.table-wrap thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--deep);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  white-space: nowrap;
}
.table-wrap tbody tr:nth-child(even) { background: var(--pale); }

/* scroll progress meter (injected by site.js) */
.scroll-meter {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 110;
  height: 3px;
  pointer-events: none;
  background: transparent;
}
.scroll-meter span {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--kiwi), var(--kiwi-bright) 55%, var(--gold));
}

/* ---------- 7. motion ---------- */
.js-reveal [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}
.js-reveal [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: no-preference) {
  .status-dot::after {
    content: "";
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 1px solid rgba(6, 35, 26, 0.55);
    animation: kiwi-pulse 2.6s var(--ease) infinite;
  }
  @keyframes kiwi-pulse {
    0% { transform: scale(0.7); opacity: 0.9; }
    70% { transform: scale(1.5); opacity: 0; }
    100% { transform: scale(1.5); opacity: 0; }
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .js-reveal [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .btn:hover { transform: none; }
}

/* ---------- 8. responsive ---------- */
@media (max-width: 1080px) {
  .brand-tag { display: none; }

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

  .nav-pill {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(11, 46, 35, 0.97);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    box-shadow: 0 26px 50px -30px rgba(0, 0, 0, 0.9);
  }
  .nav-pill[data-open] { display: flex; }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
  }
  .nav-list a {
    padding: 13px 14px;
    border-radius: 14px;
    font-size: 15px;
  }

  .site-header[data-open] .header-shell {
    border-color: rgba(69, 217, 124, 0.45);
  }
}

@media (max-width: 900px) {
  .date-chip { display: none; }
  .grid--split { grid-template-columns: minmax(0, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  :root { --header-offset: 96px; }
  .brand-text { font-size: 15.5px; }
  .grid--2,
  .grid--3 { grid-template-columns: minmax(0, 1fr); }
  .footer-base { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 520px) {
  body { font-size: 16px; }
  .header-shell { gap: 10px; padding: 8px 8px 8px 14px; }
  .status-link { padding: 8px 11px; font-size: 11.5px; }
  .nav-toggle { width: 38px; height: 36px; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
}
