/* Yellow Baar – site styles. Mobile first; no external resources. */

/* Inter (SIL OFL 1.1, see /static/fonts/OFL.txt), Latin + Latin-1 subsets. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/static/fonts/Inter-Regular.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/static/fonts/Inter-SemiBold.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/static/fonts/Inter-Bold.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("/static/fonts/Inter-ExtraBold.woff2") format("woff2");
}

:root {
  /* Palette (binding) */
  --yellow: #FFD60A;
  --ink: #0E0F12;
  --ink-2: #14161A;
  --paper: #FAFAF7;
  --blue: #2344AE;
  /* Supporting tones */
  --white: #FFFFFF;
  --ink-3: #262A33;
  --muted: #575E6B;
  --on-ink-muted: #B4BAC4;
  --line: #E7E7E0;
  --soft: #FFF4C7;
  --badge-grey: #E9E9E3;
  --placeholder: #E4E4DD;

  --radius: 20px;
  --gutter: 16px;
  --shadow: 0 1px 2px rgba(14, 15, 18, 0.06), 0 14px 34px rgba(14, 15, 18, 0.12);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}

/* contrast-pairs (text on background; checked by tests/test_design.py, WCAG AA >= 4.5:1).
   Yellow text is only ever used on the dark tones, never on paper or white.
   --ink on --paper
   --ink on --white
   --muted on --paper
   --muted on --white
   --blue on --paper
   --blue on --white
   --paper on --ink
   --paper on --ink-2
   --paper on --ink-3
   --on-ink-muted on --ink
   --on-ink-muted on --ink-2
   --on-ink-muted on --ink-3
   --yellow on --ink
   --yellow on --ink-2
   --yellow on --ink-3
   --ink on --yellow
   --ink on --soft
   --blue on --soft
   --muted on --soft
   --ink on --badge-grey
   --muted on --badge-grey
   --muted on --placeholder
*/

/* --- Base ---------------------------------------------------------------- */

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

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1 0 auto;
  overflow-wrap: anywhere; /* long unbroken words never cause horizontal scroll */
}

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

img {
  height: auto;
}

h1,
h2,
h3 {
  line-height: 1.15;
  letter-spacing: -0.02em;
  hyphens: auto;
}

p {
  margin: 0 0 0.75em;
}

a {
  color: var(--blue);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 2px;
}

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

.site-header :focus-visible,
.hero :focus-visible,
.page-head :focus-visible,
.site-footer :focus-visible,
.skip-link:focus-visible {
  outline-color: var(--yellow);
}

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

.wrap {
  width: 100%;
  max-width: 1104px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 10;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--yellow);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

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

.site-header {
  background: var(--ink);
  color: var(--paper);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 24px;
  padding-block: 14px 4px;
}

.logo {
  display: inline-flex;
  padding: 6px 0;
}

.logo img {
  display: block;
  height: 22px;
  width: auto;
}

.lang-switch {
  margin-left: auto;
  display: flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid rgba(250, 250, 247, 0.3);
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.2;
}

.lang-switch a,
.lang-switch span {
  min-width: 2.75em;
  padding: 6px 10px;
  border-radius: 999px;
  text-align: center;
}

.lang-switch a {
  color: var(--paper);
  text-decoration: none;
}

.lang-switch a:hover {
  background: rgba(250, 250, 247, 0.12);
}

.lang-switch [aria-current] {
  background: var(--yellow);
  color: var(--ink);
}

.main-nav {
  order: 3;
  flex-basis: 100%;
}

.main-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.main-nav a {
  display: inline-block;
  padding: 10px 0;
  border-bottom: 2px solid transparent;
  color: var(--paper);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
}

.main-nav a:hover {
  border-bottom-color: var(--on-ink-muted);
}

.main-nav a[aria-current] {
  border-bottom-color: var(--yellow);
}

/* --- Dark bands: home hero and page heads --------------------------------- */

.hero,
.page-head {
  position: relative;
  color: var(--paper);
  background:
    radial-gradient(45% 75% at 84% 62%, rgba(255, 214, 10, 0.12), transparent 62%),
    radial-gradient(60% 80% at 0% 100%, rgba(35, 68, 174, 0.32), transparent 70%),
    linear-gradient(180deg, var(--ink) 0%, var(--ink-2) 55%, var(--ink-3) 100%);
}

.hero {
  padding: 36px 0 112px;
  overflow: hidden;
}

.hero-inner {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 22px;
  text-align: center;
}

.hero-logo {
  position: relative;
  margin: 0;
  line-height: 0;
}

/* Faint centre circle of a court around the logo. */
.hero-logo::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 150%;
  aspect-ratio: 1;
  border: 2px solid rgba(250, 250, 247, 0.07);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.hero-logo img {
  display: block;
  width: min(270px, 70vw);
}

.hero-text {
  max-width: 34rem;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--yellow);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.tagline {
  margin: 0;
  font-size: clamp(1.875rem, 1.2rem + 3.4vw, 3.5rem);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.03em;
}

.page-head {
  padding: 28px 0 92px;
}

.page-head h1 {
  margin: 0;
  max-width: 20ch;
  font-size: clamp(2rem, 1.4rem + 3vw, 3.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.page-head .meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 0 0 12px;
  color: var(--on-ink-muted);
  font-size: 0.875rem;
  font-weight: 600;
}

.page-head .category {
  padding: 2px 10px;
  border: 1px solid rgba(250, 250, 247, 0.3);
  border-radius: 999px;
  color: var(--paper);
}

/* --- Cards ----------------------------------------------------------------- */

.page-body,
.home-body {
  position: relative;
}

.page-body {
  margin-top: -64px;
  display: grid;
  gap: 20px;
  align-content: start;
}

.card {
  min-width: 0;
  padding: 20px 18px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.page-body > .card:first-child {
  box-shadow: var(--shadow);
}

.card h2 {
  margin: 0 0 14px;
  font-size: 1.25rem;
  font-weight: 700;
}

.card-action {
  margin: 18px 0 0;
}

.empty {
  color: var(--muted);
}

.button,
.soft-card .contact-mail {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
}

.button:hover,
.soft-card .contact-mail:hover {
  background: var(--ink-3);
}

.button--light {
  background: var(--badge-grey);
  color: var(--ink);
}

.button--light:hover {
  background: var(--yellow);
}

.soft-card {
  background: var(--soft);
  border-color: transparent;
}

.soft-card p {
  color: var(--ink);
}

.latest {
  margin: 18px 0 0;
}

.latest a {
  display: block;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--white);
  color: var(--ink);
  font-size: 0.9375rem;
  text-decoration: none;
}

.latest a:hover .latest-title {
  text-decoration: underline;
}

.latest-label {
  display: block;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 600;
}

.latest-title {
  font-weight: 700;
}

.latest-title::after {
  content: " →";
}

.back-link {
  margin: 4px 0 0;
  font-weight: 600;
}

/* --- Home: teams ------------------------------------------------------------ */

.home-body {
  margin-top: -80px;
}

.team-cards {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
}

.team-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.team-photo,
.photo-placeholder {
  display: block;
  width: 100%;
  aspect-ratio: 5 / 2;
  object-fit: cover;
  object-position: center 35%;
}

.photo-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: linear-gradient(135deg, #EDEDE7, var(--placeholder));
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 600;
}

.team-body {
  padding: 18px 20px 8px;
}

.team-card h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  font-size: 1.5rem;
  font-weight: 800;
}

.team-card h3::before {
  content: "";
  flex: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: inset 0 0 0 1px rgba(14, 15, 18, 0.12);
}

.no-training {
  color: var(--muted);
}

.team-info {
  margin: 0;
}

.team-info .row {
  display: grid;
  grid-template-columns: 5.75rem minmax(0, 1fr);
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  font-size: 0.9375rem;
}

.team-info dt {
  font-weight: 700;
}

.team-info dd {
  margin: 0;
  color: var(--muted);
}

.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  margin-top: 20px;
  align-items: start;
}

/* --- Events ------------------------------------------------------------------ */

.event-list,
.news-list,
.board-list,
.year-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.event {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.event-list--plain .event:first-child {
  padding-top: 0;
  border-top: 0;
}

.date-badge {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 56px;
  min-height: 56px;
  padding: 6px 0;
  border-radius: 14px;
  background: var(--yellow);
  color: var(--ink);
  font-weight: 800;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
  overflow-wrap: normal;
}

.date-badge .day {
  font-size: 1.25rem;
}

.date-badge .month {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.date-badge--year .day {
  font-size: 1rem;
}

.date-badge--undated {
  background: var(--badge-grey);
  color: var(--muted);
  font-size: 1.375rem;
}

.event-body {
  min-width: 0;
  padding-top: 2px;
}

.event-title {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.event-date {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.9375rem;
}

.event-desc {
  margin-top: 6px;
  font-size: 0.9375rem;
}

.event-desc p {
  margin: 0 0 0.5em;
}

.year-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.year-list a {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--badge-grey);
  color: var(--ink);
  font-size: 0.9375rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-decoration: none;
}

.year-list a:hover {
  background: var(--yellow);
}

/* --- News -------------------------------------------------------------------- */

.news-teaser {
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.news-teaser:first-child {
  padding-top: 0;
  border-top: 0;
}

.news-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 600;
}

.news-meta .category {
  padding: 1px 10px;
  border-radius: 999px;
  background: var(--badge-grey);
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 700;
}

.news-teaser h2 {
  margin: 0;
  font-size: 1.1875rem;
  font-weight: 700;
  line-height: 1.3;
}

.news-teaser h2 a {
  color: var(--ink);
  text-decoration: none;
}

.news-teaser h2 a:hover {
  color: var(--blue);
  text-decoration: underline;
}

.prose {
  max-width: 820px;
  padding: 22px 18px;
}

.prose > * {
  max-width: 68ch;
}

.news-image {
  display: block;
  width: 100%;
  margin-bottom: 20px;
  border-radius: 14px;
}

.news-body p,
.legal-text p {
  margin: 0 0 1em;
}

/* --- Contact and legal --------------------------------------------------------- */

.contact-card .card-action {
  margin-top: 6px;
}

.board-list li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2px 16px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.board-list .name {
  font-weight: 700;
}

.board-list .role {
  color: var(--muted);
}

.legal-note {
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--soft);
  color: var(--ink);
}

.legal-text h2 {
  margin: 1.6em 0 0.5em;
  font-size: 1.25rem;
}

.legal-text h2:first-child {
  margin-top: 0;
}

.legal-text ul {
  margin: 0 0 1em;
  padding-left: 1.25em;
}

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

.site-footer {
  margin-top: 64px;
  padding: 40px 0 32px;
  background: var(--ink);
  color: var(--on-ink-muted);
  font-size: 0.875rem;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.footer-logo {
  display: block;
  width: 120px;
}

.footer-claim {
  margin: 0;
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer a {
  display: inline-block;
  padding: 6px 0;
  color: var(--paper);
  font-weight: 600;
}

.site-footer .footer-edit {
  color: var(--on-ink-muted);
  font-weight: 400;
}

/* --- Larger screens ----------------------------------------------------------- */

@media (min-width: 640px) {
  :root {
    --gutter: 24px;
  }

  .card,
  .prose {
    padding: 24px 26px;
  }

  .team-body {
    padding: 20px 24px 10px;
  }

  .team-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 800px) {
  .header-inner {
    padding-block: 18px;
    gap: 24px 32px;
  }

  .logo img {
    height: 26px;
  }

  .main-nav {
    order: 0;
    flex-basis: auto;
    margin-left: auto;
  }

  .main-nav ul {
    gap: 0 28px;
  }

  .lang-switch {
    margin-left: 0;
  }

  .hero {
    padding: 56px 0 148px;
  }

  .hero-inner {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    align-items: center;
    justify-items: start;
    text-align: left;
  }

  .hero-logo {
    order: 2;
    justify-self: center;
  }

  .hero-logo img {
    width: min(360px, 100%);
  }

  .hero-text {
    max-width: none;
  }

  .eyebrow {
    font-size: 0.8125rem;
  }

  .home-body {
    margin-top: -96px;
  }

  .home-grid {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  }

  .page-head {
    padding: 44px 0 104px;
  }

  .contact-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    align-items: start;
  }

  .contact-grid > .card {
    box-shadow: var(--shadow);
  }
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }

  .button,
  .soft-card .contact-mail,
  .year-list a,
  .lang-switch a,
  .main-nav a {
    transition: background-color 0.15s ease, border-color 0.15s ease;
  }

  .team-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }

  .team-card:hover {
    transform: translateY(-2px);
  }
}

/* --- Fotoarchiv -------------------------------------------------------------- */

.gallery-intro {
  margin: 0 0 16px;
  color: var(--muted);
}

.gallery-year {
  border-top: 1px solid var(--line);
}

.gallery-year > summary {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  cursor: pointer;
  font-size: 1.125rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.gallery-count {
  color: var(--muted);
  font-size: 0.9375rem;
  font-weight: 400;
}

.gallery-entry {
  padding: 12px 0 16px;
  border-top: 1px solid var(--line);
}

.gallery-entry h3 {
  margin: 0;
  font-size: 1.0625rem;
  line-height: 1.3;
}

.gallery-date {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.9375rem;
}

.gallery-text {
  margin-top: 6px;
  font-size: 0.9375rem;
}

.gallery-text p {
  margin: 0 0 0.5em;
}

.gallery-photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.gallery-photos img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.gallery-link {
  margin: 20px 0 0;
}
