/* ═══════════════════════════════════════════════════════════════
   KSC Wiedikon — Website Design System
   Athletic Precision: bold, energetic, block-based
   ═══════════════════════════════════════════════════════════════ */

/* ── Design Tokens ─────────────────────────────────────────── */
:root {
  color-scheme: dark light;

  /* Brand */
  --kscw-blue: #4A55A2;
  --kscw-blue-dark: #3a4382;
  --kscw-blue-light: #6b74b8;
  --kscw-gold: #FFC832;
  --kscw-gold-dark: #e6b42d;
  --kscw-gold-light: #ffd966;

  /* Surfaces */
  --bg-white: #ffffff;
  --bg-light: #f5f6fa;
  --bg-dark: #1a1f36;
  --bg-darker: #12162a;

  /* Text */
  --text-primary: #1e293b;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-on-dark: #e2e8f0;
  --text-on-blue: #ffffff;
  --text-on-gold: #1a1f36;

  /* Sport Accents */
  --vb-blue: #1e40af;
  --vb-rose: #be123c;
  --bb-orange: #ea580c;
  --bb-purple: #7e22ce;

  /* Functional */
  --success: #059669;
  --danger: #dc2626;
  --border: #e2e8f0;
  --border-dark: #334155;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;

  /* Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.05);

  /* Typography */
  --font-display: 'Inter', sans-serif;
  --font-body: 'Inter', sans-serif;
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: clamp(1.25rem, 2vw, 1.5rem);
  --text-3xl: clamp(1.5rem, 3vw, 1.875rem);
  --text-4xl: clamp(1.875rem, 4vw, 2.25rem);
  --text-5xl: clamp(2.25rem, 5vw, 3rem);
  --text-hero: clamp(2.5rem, 6vw, 4rem);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;

  /* Z-Index Scale */
  --z-base: 1;
  --z-dropdown: 10;
  --z-sticky: 20;
  --z-overlay: 30;
  --z-modal: 40;
  --z-toast: 50;
}

/* ── Dark Mode (default) ───────────────────────────────────── */
:root {
  --bg-white: #0f1729;
  --bg-light: #1a2234;
  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border: #2d3a52;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.2);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.3), 0 2px 4px -2px rgba(0,0,0,0.2);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.3), 0 4px 6px -4px rgba(0,0,0,0.2);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.4), 0 8px 10px -6px rgba(0,0,0,0.2);
}
.light {
  --bg-white: #ffffff;
  --bg-light: #f5f6fa;
  --text-primary: #1e293b;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.05);
}

/* Dark mode overrides for specific components */
:root .site-header {
  background: rgba(15, 23, 41, 0.95);
  border-bottom-color: var(--kscw-blue);
}
.light .site-header {
  background: rgba(255, 255, 255, 0.95);
}
:root .nav-link:hover, :root .nav-link.active {
  background: rgba(74, 85, 162, 0.15);
}
:root .nav-dropdown {
  background: #1a2234;
  border-color: var(--border);
}
.light .nav-dropdown {
  background: #ffffff;
}
:root .dropdown-link:hover {
  background: rgba(74, 85, 162, 0.15);
}
:root .mobile-nav {
  background: #0f1729;
}
.light .mobile-nav {
  background: #ffffff;
}
:root .card {
  background: #1a2234;
  border-color: #2d3a52;
}
.light .card {
  background: #ffffff;
  border-color: #e2e8f0;
}
:root .card-img-placeholder {
  background: linear-gradient(135deg, #1a2234 0%, #2d3a52 100%);
}
.light .card-img-placeholder {
  background: linear-gradient(135deg, #f5f6fa 0%, #dde0f0 100%);
}
:root tr:hover td {
  background: rgba(74, 85, 162, 0.08);
}
:root .game-row:hover {
  background: rgba(74, 85, 162, 0.08);
}
:root .badge {
  background: rgba(255,255,255,0.08);
}
.light .badge {
  background: #f5f6fa;
}
:root .badge-blue {
  background: rgba(74, 85, 162, 0.2);
}
:root .badge-gold {
  background: rgba(255, 200, 50, 0.2);
}
:root .form-input,
:root .form-textarea,
:root .form-select {
  background: #1a2234;
  border-color: #2d3a52;
  color: var(--text-primary);
}
.light .form-input,
.light .form-textarea,
.light .form-select {
  background: #ffffff;
  border-color: #e2e8f0;
}
:root .roster-card {
  border-color: #2d3a52;
}
:root .roster-avatar {
  background: #2d3a52;
}
.light .roster-avatar {
  background: #f5f6fa;
}
:root .sponsor-item {
  background: #1a2234;
  border-color: #2d3a52;
}
.light .sponsor-item {
  background: #ffffff;
  border-color: #e2e8f0;
}
:root .sponsor-card {
  background: #1a2234;
  border-color: #2d3a52;
}
.light .sponsor-card {
  background: #ffffff;
  border-color: #e2e8f0;
}
:root .sponsor-overflow::before {
  background: linear-gradient(to right, #1a2234, transparent);
}
:root .sponsor-overflow::after {
  background: linear-gradient(to left, #1a2234, transparent);
}
.light .sponsor-overflow::before {
  background: linear-gradient(to right, #f5f6fa, transparent);
}
.light .sponsor-overflow::after {
  background: linear-gradient(to left, #f5f6fa, transparent);
}
:root .nav-logo span {
  color: #e2e8f0;
}
.light .nav-logo span {
  color: var(--kscw-blue);
}
:root .hamburger-icon span {
  background: #e2e8f0;
}
.light .hamburger-icon span {
  background: var(--text-primary);
}

/* ── Theme Toggle ──────────────────────────────────────────── */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
}
.theme-toggle:hover {
  background: rgba(255,255,255,0.15);
  color: var(--text-primary);
}
.light .theme-toggle {
  background: rgba(0,0,0,0.04);
}
.light .theme-toggle:hover {
  background: rgba(0,0,0,0.08);
}

/* ── Prevent Samsung Internet / Chrome forced dark mode ────── */
:root, body, .hero, .site-header, .site-footer,
.card, .contact-form, .contact-info-card,
.section, .section-alt, .section-dark, .cta-section,
.page-header, .team-hero, .mobile-nav {
  -webkit-color-adjust: exact;
  color-adjust: exact;
  forced-color-adjust: none;
}
@media (prefers-color-scheme: dark) {
  :root { color-scheme: dark; }
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::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: var(--text-base);
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background var(--transition-base), color var(--transition-base);
}
body.nav-open { overflow: hidden; }
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
ul, ol { list-style: none; }
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

/* ── Layout ────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.section {
  padding: var(--space-3xl) 0;
}
.section-alt {
  padding: var(--space-3xl) 0;
  background: var(--bg-light);
}
.section-dark {
  padding: var(--space-3xl) 0;
  background: var(--bg-dark);
  color: var(--text-on-dark);
}

.grid { display: grid; gap: var(--space-lg); }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: 1fr; }

@media (min-width: 640px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 768px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.gap-xl { gap: var(--space-xl); }
.text-center { text-align: center; }

/* ── Header / Navigation ──────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 3px solid var(--kscw-blue);
  transition: box-shadow var(--transition-base);
}
.site-header.scrolled {
  box-shadow: var(--shadow-lg);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}
.nav-logo img {
  height: 48px;
  width: auto;
}
.nav-logo span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-xl);
  color: var(--kscw-blue);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* Desktop nav */
.nav-menu {
  display: none;
  align-items: center;
  gap: var(--space-xs);
}
.nav-item {
  position: relative;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: var(--space-sm) var(--space-md);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  transition: color var(--transition-fast), background var(--transition-fast);
  min-height: 44px;
}
.nav-link:hover, .nav-link.active {
  color: var(--kscw-blue);
  background: rgba(74, 85, 162, 0.06);
}
.nav-link .chevron {
  width: 14px;
  height: 14px;
  transition: transform var(--transition-fast);
}
.nav-item:hover .chevron,
.nav-item.open .chevron {
  transform: rotate(180deg);
}

/* Dropdown */
.nav-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  padding: var(--space-sm);
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  z-index: var(--z-dropdown);
}
.nav-item:hover .nav-dropdown,
.nav-item.open .nav-dropdown {
  display: block;
}
.dropdown-link {
  display: block;
  padding: var(--space-sm) var(--space-md);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast), color var(--transition-fast);
  min-height: 44px;
  display: flex;
  align-items: center;
}
.dropdown-link:hover {
  background: rgba(74, 85, 162, 0.06);
  color: var(--kscw-blue);
}
.dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: var(--space-xs) 0;
}
.dropdown-label {
  padding: var(--space-xs) var(--space-md);
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

/* Hamburger */
.nav-hamburger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  transition: background var(--transition-fast);
}
.nav-hamburger:hover {
  background: rgba(74, 85, 162, 0.06);
}
.hamburger-icon {
  width: 24px;
  height: 24px;
  position: relative;
}
.hamburger-icon span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  position: absolute;
  left: 0;
  transition: transform var(--transition-base), opacity var(--transition-fast);
}
.hamburger-icon span:nth-child(1) { top: 4px; }
.hamburger-icon span:nth-child(2) { top: 11px; }
.hamburger-icon span:nth-child(3) { top: 18px; }
.nav-open .hamburger-icon span:nth-child(1) { top: 11px; transform: rotate(45deg); }
.nav-open .hamburger-icon span:nth-child(2) { opacity: 0; }
.nav-open .hamburger-icon span:nth-child(3) { top: 11px; transform: rotate(-45deg); }

/* Mobile nav overlay */
.mobile-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: calc(100vh - 75px);
  max-height: calc(100dvh - 75px);
  background: var(--bg-white);
  z-index: var(--z-overlay);
  overflow-y: auto;
  padding: var(--space-lg);
  box-shadow: var(--shadow-xl);
}
.nav-open .mobile-nav {
  display: block;
}
.mobile-nav-item {
  border-bottom: 1px solid var(--border);
}
.mobile-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-lg);
  text-transform: uppercase;
  min-height: 48px;
}
.mobile-subnav {
  display: none;
  padding-bottom: var(--space-md);
}
.mobile-nav-item.open .mobile-subnav {
  display: block;
}
.mobile-nav-item.open .mobile-chevron {
  transform: rotate(180deg);
}
.mobile-chevron {
  width: 20px;
  height: 20px;
  transition: transform var(--transition-base);
}
.mobile-sublink {
  display: block;
  padding: var(--space-sm) var(--space-md);
  color: var(--text-secondary);
  font-size: var(--text-base);
  min-height: 44px;
  display: flex;
  align-items: center;
}
.mobile-sublink:hover {
  color: var(--kscw-blue);
}
.mobile-sub-label {
  padding: var(--space-xs) var(--space-md);
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-top: var(--space-sm);
}

@media (min-width: 1024px) {
  .nav-menu { display: flex; }
  .nav-hamburger { display: none; }
  .mobile-nav { display: none !important; }
}

/* ── Footer ────────────────────────────────────────────────── */
.site-footer {
  background: var(--bg-dark);
  color: var(--text-on-dark);
  border-top: 4px solid var(--kscw-gold);
}
.footer-inner {
  padding: var(--space-3xl) 0 var(--space-xl);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2xl);
}
@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }
}
.footer-brand p {
  color: var(--text-muted);
  margin-top: var(--space-sm);
  font-size: var(--text-sm);
  max-width: 300px;
}
.footer-heading {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--kscw-gold);
  margin-bottom: var(--space-md);
}
.footer-links a {
  display: block;
  padding: var(--space-xs) 0;
  color: var(--text-muted);
  font-size: var(--text-sm);
  transition: color var(--transition-fast);
}
.footer-links a:hover {
  color: var(--kscw-gold);
}
.footer-social {
  display: flex;
  gap: var(--space-md);
  margin-top: var(--space-md);
}
.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.08);
  color: var(--text-on-dark);
  transition: background var(--transition-fast), color var(--transition-fast);
}
.footer-social a:hover {
  background: var(--kscw-gold);
  color: var(--text-on-gold);
}
.footer-bottom {
  border-top: 1px solid var(--border-dark);
  padding: var(--space-lg) 0;
  text-align: center;
  color: var(--text-muted);
  font-size: var(--text-sm);
}
.footer-bottom a {
  color: var(--kscw-gold);
}
.footer-bottom a:hover {
  text-decoration: underline;
}

/* ── Hero ──────────────────────────────────────────────────── */
.hero {
  position: relative;
  background: var(--kscw-blue);
  color: var(--text-on-blue);
  overflow: hidden;
  padding: var(--space-4xl) 0;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 70%;
  height: 200%;
  background: var(--kscw-gold);
  transform: rotate(-12deg);
  opacity: 0.12;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--kscw-gold);
}
.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}
.hero-logo {
  width: 120px;
  height: auto;
  margin: 0 auto var(--space-xl);
}
.hero h1 {
  font-size: var(--text-hero);
  margin-bottom: var(--space-md);
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.hero-subtitle {
  font-size: var(--text-xl);
  opacity: 0.9;
  font-weight: 400;
  margin-bottom: var(--space-2xl);
}
.hero-buttons {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Team Hero (smaller, with accent color) ────────────────── */
.team-hero {
  position: relative;
  background: var(--team-color, var(--kscw-blue));
  color: white;
  padding: var(--space-2xl) 0 var(--space-xl);
  overflow: hidden;
}
.team-hero::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 40%;
  height: 100%;
  background: rgba(255,255,255,0.08);
  transform: skewX(-12deg) translateX(20%);
}
.team-hero .container {
  position: relative;
  z-index: 1;
}
.team-hero h1 {
  font-size: var(--text-4xl);
  margin-bottom: var(--space-xs);
}
.team-league {
  font-size: var(--text-lg);
  opacity: 0.85;
  font-weight: 400;
}

/* ── Team Photo (individual team pages) ───────────────────── */
.team-photo {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  object-position: center 30%;
  display: block;
  background: var(--bg-light);
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 0.75rem 1.75rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
  min-height: 44px;
  white-space: nowrap;
}
.btn-primary {
  background: var(--kscw-blue);
  color: var(--text-on-blue);
}
.btn-primary:hover {
  background: var(--kscw-blue-dark);
  box-shadow: 0 4px 12px rgba(74, 85, 162, 0.4);
}
.btn-gold {
  background: var(--kscw-gold);
  color: var(--text-on-gold);
}
.btn-gold:hover {
  background: var(--kscw-gold-dark);
  box-shadow: 0 4px 12px rgba(255, 200, 50, 0.4);
}
.btn-outline {
  border: 2px solid currentColor;
  background: transparent;
}
.btn-outline:hover {
  background: rgba(255,255,255,0.12);
}
.btn-outline-white {
  border: 2px solid rgba(255,255,255,0.6);
  color: white;
}
.btn-outline-white:hover {
  background: rgba(255,255,255,0.12);
  border-color: white;
}
.btn-sm {
  padding: 0.5rem 1rem;
  font-size: var(--text-xs);
}

/* ── Cards ─────────────────────────────────────────────────── */
.card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow var(--transition-base), transform var(--transition-base);
}
.card:hover {
  box-shadow: var(--shadow-lg);
}
.card-accent {
  border-top: 4px solid var(--card-accent, var(--kscw-blue));
}
.card-body {
  padding: var(--space-lg);
}
.card-img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  background: var(--bg-light);
}
.card-img-placeholder {
  width: 100%;
  aspect-ratio: 16/10;
  background: linear-gradient(135deg, var(--bg-light) 0%, #dde0f0 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: var(--text-sm);
}

/* ── Team Chips ────────────────────────────────────────────── */
.chip {
  display: inline-flex;
  align-items: center;
  padding: 0.2em 0.7em;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: var(--radius-full);
  white-space: nowrap;
}
.chip-sm {
  font-size: 0.65rem;
  padding: 0.15em 0.5em;
}

/* ── Badges ────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25em 0.65em;
  font-size: var(--text-xs);
  font-weight: 600;
  border-radius: var(--radius-sm);
  background: var(--bg-light);
  color: var(--text-secondary);
}
.badge-blue { background: rgba(74, 85, 162, 0.1); color: var(--kscw-blue); }
.badge-gold { background: rgba(255, 200, 50, 0.15); color: #92710a; }
.badge-success { background: rgba(5, 150, 105, 0.1); color: var(--success); }
.badge-danger { background: rgba(220, 38, 38, 0.1); color: var(--danger); }

/* ── Tables ────────────────────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}
th {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding: var(--space-sm) var(--space-md);
  text-align: left;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}
td {
  padding: var(--space-sm) var(--space-md);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
tr:hover td {
  background: rgba(74, 85, 162, 0.03);
}
.table-rank {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text-muted);
}
.table-team {
  font-weight: 600;
}
.table-highlight td {
  background: rgba(74, 85, 162, 0.06);
  font-weight: 600;
}

/* ── Tabs ──────────────────────────────────────────────────── */
.tab-bar {
  display: flex;
  gap: var(--space-xs);
  border-bottom: 2px solid var(--border);
  margin-bottom: var(--space-xl);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.tab-bar::-webkit-scrollbar {
  display: none;
}
.tab-btn {
  padding: var(--space-sm) var(--space-lg);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: color var(--transition-fast), border-color var(--transition-fast);
  white-space: nowrap;
  min-height: 44px;
}
.tab-btn:hover {
  color: var(--text-primary);
}
.tab-btn.active {
  color: var(--kscw-blue);
  border-bottom-color: var(--kscw-blue);
}
.tab-panel {
  display: none;
}
.tab-panel.active {
  display: block;
}

/* ── Game Rows ─────────────────────────────────────────────── */
.game-row {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  align-items: center;
  gap: var(--space-sm) var(--space-md);
  padding: var(--space-md);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition-fast);
  overflow: hidden;
}
.game-row:hover {
  background: rgba(74, 85, 162, 0.03);
}
.game-date {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--text-muted);
  white-space: nowrap;
  text-transform: uppercase;
}
.game-teams {
  font-weight: 500;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.game-teams .vs { color: var(--text-muted); margin: 0 0.3em; font-weight: 400; }
.game-score {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-lg);
  color: var(--kscw-blue);
  text-align: right;
  white-space: nowrap;
}
.game-score.win { color: var(--success); }
.game-score.loss { color: var(--danger); }
.game-badge {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.game-badge.home { color: var(--kscw-blue); }
.game-badge.away { color: var(--bb-orange); }

/* Mobile: compact 2-row game cards */
@media (max-width: 639px) {
  .game-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-xs) var(--space-sm);
    padding: var(--space-sm) var(--space-md);
  }
  /* Row 1: date, chip, badge — with time/score pushed right */
  .game-date { order: 1; }
  .game-row .chip { order: 2; }
  .game-badge { order: 3; flex: 1; }
  .game-score { order: 4; text-align: right; font-size: var(--text-base); }
  /* Row 2: teams span full width */
  .game-teams {
    order: 5;
    flex-basis: 100%;
    white-space: normal;
    font-size: var(--text-sm);
    line-height: 1.4;
  }
}

/* ── Section Headers ───────────────────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-xl);
  flex-wrap: wrap;
  gap: var(--space-md);
}
.section-header h2 {
  font-size: var(--text-3xl);
  color: var(--text-primary);
}
.section-header .gold-bar {
  width: 48px;
  height: 4px;
  background: var(--kscw-gold);
  border-radius: 2px;
  margin-top: var(--space-sm);
}
.section-dark .section-header h2 {
  color: var(--text-on-dark);
}

/* ── News Cards ────────────────────────────────────────────── */
.news-card {
  cursor: pointer;
}
.news-card .card-body h3 {
  font-size: var(--text-lg);
  text-transform: none;
  letter-spacing: 0;
  margin-bottom: var(--space-sm);
  transition: color var(--transition-fast);
}
.news-card:hover .card-body h3 {
  color: var(--kscw-blue);
}
.news-date {
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-weight: 500;
}
.news-excerpt {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-top: var(--space-sm);
  line-height: 1.65;
}

/* ── Team Cards (sport overview) ───────────────────────────── */
.team-card {
  cursor: pointer;
}
.team-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}
.team-card-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}
.team-card-header h3 {
  font-size: var(--text-xl);
  text-transform: none;
}
.team-card-meta {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}
.team-card-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
/* Team card with photo */
.team-card--photo .team-card-img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  object-position: center 25%;
  display: block;
  background: var(--bg-light);
}

/* ── Sponsor Carousel ──────────────────────────────────────── */
.sponsor-track {
  display: flex;
  gap: var(--space-2xl);
  animation: scroll-sponsors 60s linear infinite;
  width: max-content;
}
.sponsor-track:hover {
  animation-play-state: paused;
}
.sponsor-item {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 140px;
  height: 70px;
  background: var(--bg-white);
  border-radius: var(--radius-md);
  padding: var(--space-sm);
  border: 1px solid var(--border);
}
.sponsor-item span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-sm);
  color: var(--text-muted);
  text-transform: uppercase;
}
@keyframes scroll-sponsors {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.sponsor-overflow {
  overflow: hidden;
  position: relative;
}
.sponsor-overflow::before,
.sponsor-overflow::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 60px;
  z-index: 1;
  pointer-events: none;
}
.sponsor-overflow::before {
  left: 0;
  background: linear-gradient(to right, var(--bg-light), transparent);
}
.sponsor-overflow::after {
  right: 0;
  background: linear-gradient(to left, var(--bg-light), transparent);
}

/* ── Sponsor Grid (tiers) ──────────────────────────────────── */
.sponsor-tier {
  margin-bottom: var(--space-2xl);
}
.sponsor-tier-label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-md);
}
.sponsor-tier-label.gold { color: #b8860b; }
.sponsor-tier-label.silver { color: #6b7280; }
.sponsor-tier-label.bronze { color: #92400e; }
.sponsor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--space-md);
}
.sponsor-card {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  transition: box-shadow var(--transition-base);
}
.sponsor-card:hover {
  box-shadow: var(--shadow-md);
}

/* ── Board Member Cards ────────────────────────────────────── */
.board-card {
  text-align: center;
}
.board-avatar {
  width: 96px;
  height: 96px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--kscw-blue), var(--kscw-blue-light));
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-md);
  color: white;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-2xl);
}
.board-card h3 {
  font-size: var(--text-lg);
  text-transform: none;
  margin-bottom: var(--space-xs);
}
.board-role {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

/* ── Contact Form ──────────────────────────────────────────── */
.form-group {
  margin-bottom: var(--space-lg);
}
.form-label {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: var(--space-sm);
  color: var(--text-secondary);
}
.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  font-size: var(--text-base);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  background: var(--bg-white);
}
.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--kscw-blue);
  box-shadow: 0 0 0 3px rgba(74, 85, 162, 0.15);
}
.form-textarea {
  resize: vertical;
  min-height: 120px;
}

/* ── Stats Counter ─────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
}
@media (min-width: 768px) {
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
}
.stat-item {
  text-align: center;
  padding: var(--space-lg);
}
.stat-number {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-5xl);
  color: var(--kscw-gold);
  line-height: 1;
}
.stat-label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-on-dark);
  margin-top: var(--space-sm);
  opacity: 0.8;
}

/* ── Roster ────────────────────────────────────────────────── */
.roster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-md);
}
.roster-card {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.roster-avatar {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: var(--bg-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-sm);
  color: var(--text-muted);
  flex-shrink: 0;
}
.roster-name {
  font-weight: 600;
  font-size: var(--text-sm);
}
.roster-position {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* ── Scroll Animations ─────────────────────────────────────── */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--transition-slow), transform var(--transition-slow);
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}
.fade-in-delay-1 { transition-delay: 100ms; }
.fade-in-delay-2 { transition-delay: 200ms; }
.fade-in-delay-3 { transition-delay: 300ms; }

@media (prefers-reduced-motion: reduce) {
  .fade-in {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .sponsor-track {
    animation: none;
  }
}

/* ── Angled Section Divider ────────────────────────────────── */
.angle-top {
  position: relative;
}
.angle-top::before {
  content: '';
  position: absolute;
  top: -40px;
  left: 0;
  right: 0;
  height: 40px;
  background: inherit;
  clip-path: polygon(0 100%, 100% 0, 100% 100%);
}

/* ── Utility ───────────────────────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
.text-gold { color: var(--kscw-gold); }
.text-blue { color: var(--kscw-blue); }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: var(--text-sm); }
.font-display { font-family: var(--font-display); }
.font-bold { font-weight: 700; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.w-full { width: 100%; }

/* ── Sport Buttons (Hero) ──────────────────────────────────── */
.sport-btn {
  min-width: 180px;
  padding: 0.85rem 2.5rem;
  font-size: var(--text-base);
  font-weight: 800;
  border: 2px solid rgba(0,0,0,0.3);
  position: relative;
  z-index: 0;
  isolation: isolate;
}
/* Volleyball: Mikasa V200W yellow/blue with curved divider */
.sport-btn--vb {
  background: #2255AA;
  color: #ffffff;
  position: relative;
  overflow: hidden;
  z-index: 0;
  text-shadow: 0 0 6px rgba(0,0,0,0.6), 0 0 12px rgba(0,0,0,0.3);
}
.sport-btn--vb::before {
  content: '';
  position: absolute;
  inset: 0;
  background: #FFE14D;
  clip-path: polygon(
    0 0, 60% 0,
    62% 10%, 63% 20%, 63% 30%, 62% 40%,
    60% 50%,
    57% 60%, 54% 70%, 48% 80%, 43% 90%,
    40% 100%, 0 100%
  );
  z-index: -1;
}
.sport-btn--vb:hover {
  box-shadow: 0 6px 24px rgba(255, 225, 77, 0.45);
}
/* Basketball: orange with single curved black seam */
.sport-btn--bb {
  background: linear-gradient(135deg, #F08030 0%, #E87121 40%, #D06018 100%);
  color: #ffffff;
  position: relative;
  overflow: hidden;
  text-shadow: 0 0 6px rgba(0,0,0,0.4), 0 0 12px rgba(0,0,0,0.2);
}
.sport-btn--bb::before {
  content: '';
  position: absolute;
  inset: 0;
  /* Same 60%→40% curve as VB, thicker dark seam */
  background: rgba(0,0,0,0.2);
  clip-path: polygon(
    59% 0, 61% 0,
    63% 10%, 64% 20%, 64% 30%, 63% 40%,
    61% 50%,
    58% 60%, 55% 70%, 49% 80%, 44% 90%,
    41% 100%, 39% 100%,
    42% 90%, 47% 80%, 53% 70%, 56% 60%,
    59% 50%,
    61% 40%, 62% 30%, 62% 20%, 61% 10%
  );
  z-index: -1;
  pointer-events: none;
}
.sport-btn--bb:hover {
  box-shadow: 0 6px 24px rgba(232, 113, 33, 0.45);
  background: linear-gradient(135deg, #F89040 0%, #F08030 40%, #E07020 100%);
}

/* ── Focus States ──────────────────────────────────────────── */
:focus-visible {
  outline: 3px solid var(--kscw-blue);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}
a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--kscw-blue);
  outline-offset: 2px;
}

/* ── Page-specific ─────────────────────────────────────────── */
.page-header {
  background: var(--kscw-blue);
  color: var(--text-on-blue);
  padding: var(--space-2xl) 0 var(--space-xl);
  position: relative;
  overflow: hidden;
}
.page-header::before {
  content: '';
  position: absolute;
  top: 0;
  right: -10%;
  width: 50%;
  height: 100%;
  background: rgba(255,255,255,0.05);
  transform: skewX(-12deg);
}
.page-header h1 {
  font-size: var(--text-4xl);
  position: relative;
  z-index: 1;
}
.page-header p {
  font-size: var(--text-lg);
  opacity: 0.85;
  position: relative;
  z-index: 1;
  margin-top: var(--space-sm);
}

/* ── CTA Section ───────────────────────────────────────────── */
.cta-section {
  background: linear-gradient(135deg, var(--kscw-blue) 0%, var(--kscw-blue-dark) 100%);
  color: var(--text-on-blue);
  padding: var(--space-3xl) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-section::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -10%;
  width: 60%;
  height: 200%;
  background: var(--kscw-gold);
  transform: rotate(12deg);
  opacity: 0.08;
}
.cta-section h2 {
  font-size: var(--text-4xl);
  margin-bottom: var(--space-md);
  position: relative;
}
.cta-section p {
  font-size: var(--text-lg);
  opacity: 0.85;
  margin-bottom: var(--space-xl);
  position: relative;
}

/* ── Training Schedule ─────────────────────────────────────── */
.training-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--border);
}
.training-day {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-sm);
  text-transform: uppercase;
  min-width: 100px;
  color: var(--kscw-blue);
}
.training-time {
  font-weight: 500;
}
.training-hall {
  color: var(--text-muted);
  font-size: var(--text-sm);
}
