/* =========================================================
   VolleyABLE — design tokens
   Palette drawn from the volleyball itself (blue / orange panels)
   plus a warm sand background and a teal reserved for inclusion
   & diversity content.
   ========================================================= */
:root {
  --court-blue: #1B3A5C;
  --court-blue-dark: #122A44;
  --court-blue-tint: #E7EEF4;
  --sand: #F6F1E9;
  --surface: #FFFFFF;
  --orange: #F4A73C;
  --orange-deep: #D9861C;
  --teal: #2E8B7E;
  --teal-deep: #1F665C;
  --teal-tint: #E4F2EF;
  --ink: #212B33;
  --ink-soft: #4B5A66;
  --ink-faint: #7C8994;
  --line: #DED4C2;
  --line-strong: #C9BC9E;
  --shadow-sm: 0 1px 3px rgba(27, 58, 92, 0.08);
  --shadow-md: 0 8px 24px rgba(27, 58, 92, 0.10);
  --radius: 12px;
  --radius-sm: 8px;
  --font-display: 'Poppins', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Inter', 'Segoe UI', system-ui, sans-serif;
}

:root[data-theme="dark"] {
  --court-blue: #7FB3E0;
  --court-blue-dark: #DCEBFA;
  --court-blue-tint: #1C2733;
  --sand: #171C22;
  --surface: #1F262E;
  --orange: #F4A73C;
  --orange-deep: #FFC873;
  --teal: #4FBBAC;
  --teal-deep: #7BD9CB;
  --teal-tint: #17272A;
  --ink: #E7EBEE;
  --ink-soft: #B7C2CB;
  --ink-faint: #8996A1;
  --line: #333D46;
  --line-strong: #45505A;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 10px 28px rgba(0, 0, 0, 0.32);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --court-blue: #7FB3E0;
    --court-blue-dark: #DCEBFA;
    --court-blue-tint: #1C2733;
    --sand: #171C22;
    --surface: #1F262E;
    --orange: #F4A73C;
    --orange-deep: #FFC873;
    --teal: #4FBBAC;
    --teal-deep: #7BD9CB;
    --teal-tint: #17272A;
    --ink: #E7EBEE;
    --ink-soft: #B7C2CB;
    --ink-faint: #8996A1;
    --line: #333D46;
    --line-strong: #45505A;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 10px 28px rgba(0, 0, 0, 0.32);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body {
  background: var(--sand);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.65;
}

h1, h2, h3, h4, h5, .display-font {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--ink);
  text-wrap: balance;
}

a { color: var(--teal-deep); }
a:hover { color: var(--teal); }

.skip-link {
  position: absolute;
  top: 0; left: 0;
  background: var(--court-blue);
  color: #fff;
  padding: 10px 16px;
  z-index: 2000;
}

/* ---------- Header / Nav ---------- */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 1030;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--court-blue) !important;
}
.brand-mark { color: var(--orange); display: inline-flex; }
.brand-able { color: var(--teal-deep); }

.navbar .nav-link {
  color: var(--ink-soft);
  font-weight: 600;
  padding: 0.55rem 0.9rem !important;
}
.navbar .nav-link:hover,
.navbar .nav-link.active {
  color: var(--court-blue);
}
.navbar .nav-link.active {
  position: relative;
}
.navbar .nav-link.active::after {
  content: "";
  position: absolute;
  left: 0.9rem;
  right: 0.9rem;
  bottom: 0.15rem;
  height: 3px;
  border-radius: 2px;
  background: var(--orange);
}

.dropdown-menu {
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  border-radius: var(--radius-sm);
}
.dropdown-item:active, .dropdown-item:hover {
  background: var(--court-blue-tint);
  color: var(--court-blue);
}

.btn-brand-accent {
  background: var(--orange);
  border: none;
  color: #1a1204;
  font-weight: 700;
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
}
.btn-brand-accent:hover { background: var(--orange-deep); color: #1a1204; }

.btn-brand-primary {
  background: var(--court-blue);
  border: none;
  color: #fff;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.65rem 1.4rem;
}
.btn-brand-primary:hover { background: var(--court-blue-dark); color: #fff; }

.btn-brand-outline {
  background: transparent;
  border: 1.5px solid var(--court-blue);
  color: var(--court-blue);
  font-weight: 700;
  border-radius: 999px;
  padding: 0.6rem 1.35rem;
}
.btn-brand-outline:hover { background: var(--court-blue); color: #fff; }

/* ---------- Hero ---------- */
.page-hero {
  background: linear-gradient(135deg, var(--court-blue) 0%, var(--court-blue-dark) 100%);
  color: #fff;
  padding: 3.5rem 0 3rem;
  position: relative;
  overflow: hidden;
}
:root[data-theme="dark"] .page-hero,
@media (prefers-color-scheme: dark) { .page-hero { color: #0F151B; } }

.page-hero .court-motif {
  position: absolute;
  right: -70px;
  top: -60px;
  width: 420px;
  height: 420px;
  opacity: 0.14;
  pointer-events: none;
}
.page-hero h1 { color: #fff; font-size: clamp(1.9rem, 3.4vw, 2.8rem); margin-bottom: 0.75rem; }
:root[data-theme="dark"] .page-hero h1,
@media (prefers-color-scheme: dark) { .page-hero h1 { color: #0F151B; } }
.page-hero .lead { font-size: 1.1rem; opacity: 0.92; max-width: 620px; }
.page-hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(255,255,255,0.15);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 1rem;
}
.page-hero .eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--orange); display: inline-block; }

.hero-home {
  padding: 4.5rem 0 4rem;
}

/* ---------- Sections ---------- */
.section { padding: 3.5rem 0; }
.section-tight { padding: 2.25rem 0; }
.section-alt { background: var(--surface); }

.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--teal-deep);
  margin-bottom: 0.5rem;
}

.section-lead {
  color: var(--ink-soft);
  max-width: 62ch;
  font-size: 1.02rem;
}

/* ---------- Cards ---------- */
.card-plain {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
  height: 100%;
}
.card-plain.accent-top-orange { border-top: 3px solid var(--orange); }
.card-plain.accent-top-teal { border-top: 3px solid var(--teal); }
.card-plain.accent-top-blue { border-top: 3px solid var(--court-blue); }

.icon-tile {
  width: 46px; height: 46px;
  border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 0.9rem;
}
.icon-tile.tile-blue { background: var(--court-blue-tint); color: var(--court-blue); }
.icon-tile.tile-teal { background: var(--teal-tint); color: var(--teal-deep); }
.icon-tile.tile-orange { background: color-mix(in srgb, var(--orange) 20%, var(--surface)); color: var(--orange-deep); }

/* ---------- Stat strip ---------- */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.stat-cell {
  background: var(--surface);
  padding: 1.4rem 1rem;
  text-align: center;
}
.stat-cell .num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2rem;
  color: var(--court-blue);
  font-variant-numeric: tabular-nums;
  display: block;
}
.stat-cell .label {
  font-size: 0.82rem;
  color: var(--ink-soft);
  margin-top: 0.2rem;
}
@media (max-width: 767px) {
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Partner logo strip ---------- */
.partner-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  align-items: stretch;
}
.partner-strip .placeholder-logo,
.partner-strip .logo-tile { flex: 1 1 160px; max-width: 220px; }

/* Real partner logo tiles. Plain white background works for both
   transparent-PNG logos and JPEGs that were exported on white, and reads
   consistently in both light and dark mode. */
.logo-tile {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 84px;
  padding: 0.85rem 1.1rem;
}
.logo-tile img {
  max-width: 100%;
  max-height: 64px;
  width: auto;
  height: auto;
  object-fit: contain;
}
.logo-tile-on-white {
  background: #FFFFFF;
}

.placeholder-logo {
  --logo-accent: var(--court-blue);
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 74px;
  padding: 0.75rem 1rem;
}
.placeholder-logo span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--logo-accent);
  text-align: center;
}

.placeholder-block {
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--court-blue-tint);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: var(--ink-faint);
  width: 100%;
}
.placeholder-block i { font-size: 1.8rem; }
.placeholder-block span { font-size: 0.82rem; font-weight: 600; }

.placeholder-avatar { border-radius: 50%; display: block; }

/* ---------- Timeline (activities/build) ---------- */
.wp-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
@media (max-width: 767px) { .wp-grid { grid-template-columns: 1fr; } }

.wp-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem;
  box-shadow: var(--shadow-sm);
}
.wp-card .wp-num {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 30px; height: 30px;
  border-radius: 8px;
  background: var(--teal);
  color: #fff;
  font-weight: 800;
  font-size: 0.85rem;
  margin-bottom: 0.6rem;
}
.wp-card h3 { font-size: 1.05rem; margin-bottom: 0.35rem; }
.wp-card .wp-lead { font-size: 0.82rem; color: var(--teal-deep); font-weight: 700; margin-bottom: 0.4rem; }
.wp-card p { font-size: 0.92rem; color: var(--ink-soft); margin: 0; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
table.brand-table { width: 100%; border-collapse: collapse; background: var(--surface); font-size: 0.92rem; }
table.brand-table th, table.brand-table td { padding: 0.7rem 1rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.brand-table th { background: var(--court-blue-tint); color: var(--court-blue); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.03em; font-weight: 700; }
table.brand-table tr:last-child td { border-bottom: none; }

/* ---------- Event cards ---------- */
.event-card {
  display: flex;
  gap: 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem;
  box-shadow: var(--shadow-sm);
}
.event-date {
  flex: 0 0 64px;
  text-align: center;
  background: var(--court-blue-tint);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.25rem;
  color: var(--court-blue);
}
.event-date .day { display: block; font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; line-height: 1; }
.event-date .mon { display: block; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em; }
.event-body h3 { font-size: 1rem; margin-bottom: 0.2rem; }
.event-meta { font-size: 0.8rem; color: var(--ink-faint); }
.badge-status {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
}
.badge-status.upcoming { background: color-mix(in srgb, var(--orange) 22%, var(--surface)); color: var(--orange-deep); }
.badge-status.past { background: var(--line); color: var(--ink-soft); }

/* ---------- News ---------- */
.news-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem;
  box-shadow: var(--shadow-sm);
  height: 100%;
}
.news-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--teal-deep);
  background: var(--teal-tint);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  margin-bottom: 0.6rem;
}
.news-date { font-size: 0.8rem; color: var(--ink-faint); margin-bottom: 0.3rem; }
.news-card h3 { font-size: 1.05rem; margin-bottom: 0.4rem; }
.news-card p { font-size: 0.92rem; color: var(--ink-soft); }

/* ---------- Callouts ---------- */
.callout {
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  font-size: 0.94rem;
  border: 1px solid;
}
.callout-orange { background: color-mix(in srgb, var(--orange) 12%, var(--surface)); border-color: color-mix(in srgb, var(--orange) 40%, var(--line)); }
.callout-blue { background: var(--court-blue-tint); border-color: color-mix(in srgb, var(--court-blue) 30%, var(--line)); }
.callout-teal { background: var(--teal-tint); border-color: color-mix(in srgb, var(--teal) 35%, var(--line)); }

/* ---------- Forms ---------- */
.form-control, .form-select {
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
}
.form-control:focus, .form-select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 0.2rem color-mix(in srgb, var(--teal) 25%, transparent);
}
label.form-label { font-weight: 600; font-size: 0.9rem; }

/* Honeypot spam-trap field: visually hidden but still reachable by
   screen readers turning off assistive tech and by bots, without
   escaping normal document flow (a bare position:absolute with no
   positioned ancestor can drift and overlap unrelated page content). */
.form-honeypot {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--court-blue-dark);
  color: rgba(255,255,255,0.82);
  padding: 3rem 0 1.5rem;
  margin-top: 3rem;
}
:root[data-theme="dark"] .site-footer,
@media (prefers-color-scheme: dark) { .site-footer { background: #10151A; } }

.site-footer a { color: rgba(255,255,255,0.82); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }

.footer-top {
  display: grid;
  grid-template-columns: 1.2fr 2fr;
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255,255,255,0.14);
}
@media (max-width: 767px) { .footer-top { grid-template-columns: 1fr; } }

.footer-brand { display: flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; color: #fff; }
.footer-brand .brand-mark { color: var(--orange); }
.footer-brand .brand-able { color: var(--teal); }
.footer-tagline { font-size: 0.9rem; opacity: 0.75; margin-top: 0.6rem; max-width: 30ch; }

.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
@media (max-width: 575px) { .footer-cols { grid-template-columns: 1fr 1fr; } }

.footer-heading { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: rgba(255,255,255,0.5); margin-bottom: 0.7rem; }
.footer-links { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.45rem; font-size: 0.9rem; }

.footer-partners {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  padding: 1.5rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.14);
  font-size: 0.82rem;
}
.footer-partners-label { text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.72rem; opacity: 0.55; margin-right: 0.4rem; }
.partner-chip { background: rgba(255,255,255,0.08); padding: 0.3rem 0.7rem; border-radius: 999px; }

.footer-partners .logo-tile {
  min-height: 0;
  padding: 0.4rem 0.7rem;
  border: none;
  border-radius: 6px;
}
.footer-partners .logo-tile img { max-height: 28px; }

.footer-eu {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.5rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.14);
  font-size: 0.78rem;
  opacity: 0.75;
  line-height: 1.55;
}
.eu-emblem {
  flex: 0 0 auto;
  background: #FFFFFF;
  border-radius: 6px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
}
.eu-emblem img { display: block; height: 40px; width: auto; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-top: 1.2rem;
  font-size: 0.8rem;
  opacity: 0.6;
}

/* ---------- Misc ---------- */
.max-prose { max-width: 68ch; }
.text-teal-deep { color: var(--teal-deep) !important; }
.text-orange-deep { color: var(--orange-deep) !important; }
.bg-surface { background: var(--surface); }
