/* Crailsheimer Bogenschützen e.V. – statische Neuauflage
   Farben aus dem bisherigen Blocksy-Theme übernommen (Schwarz, Anthrazit, Gold). */

@font-face { font-family: "Barlow"; src: url("../fonts/barlow-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("../fonts/barlow-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("../fonts/barlow-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("../fonts/barlow-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("../fonts/barlow-condensed-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("../fonts/barlow-condensed-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --black: #000000;
  --surface: #1a1a1a;
  --surface-2: #2b2b2b;
  --line: #3d3d3d;
  --gold: #ffd700;
  --gold-deep: #ffbb00;
  --white: #ffffff;
  --muted: #b9b9b9;
  --ink-on-gold: #1a1600;

  --font-body: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;

  --wrap: 72rem;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5.5rem; }
body {
  margin: 0;
  background: var(--black);
  color: var(--white);
  font: 400 1.0625rem/1.65 var(--font-body);
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold); text-underline-offset: 0.18em; }
a:hover { color: var(--gold-deep); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: 0.005em;
  margin: 0 0 0.6em;
}
h1 { font-size: clamp(2.6rem, 7vw, 5rem); }
h2 { font-size: clamp(2rem, 4.2vw, 3rem); }
h3 { font-size: 1.6rem; }
p { margin: 0 0 1em; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 0; background: var(--gold); color: var(--ink-on-gold); padding: .6rem 1rem; z-index: 100; }
.skip:focus { left: 1rem; top: 1rem; }

/* ---------- Kopfbereich ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #1f1f1f;
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.75rem; }
.brand { display: flex; align-items: center; gap: .85rem; text-decoration: none; color: var(--white); }
.brand img { width: 3.6rem; }
.brand span { font-family: var(--font-display); font-weight: 600; font-size: 1.35rem; line-height: 1.05; }
.brand small { display: block; font-family: var(--font-body); font-weight: 500; font-size: .8rem; color: var(--muted); letter-spacing: .02em; }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--line); color: var(--white);
  font: 600 1rem var(--font-body); padding: .5rem .9rem; border-radius: 4px; cursor: pointer;
}
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .25rem; }
.nav a {
  display: block; padding: .55rem .9rem; color: var(--white); text-decoration: none;
  font-family: var(--font-display); font-weight: 600; font-size: 1.2rem;
  border-bottom: 3px solid transparent;
}
.nav a:hover { color: var(--gold); }
.nav a[aria-current="page"] { border-bottom-color: var(--gold); }

@media (max-width: 52rem) {
  .nav-toggle { display: inline-block; }
  .nav { position: absolute; inset: 100% 0 auto 0; background: var(--black); border-bottom: 1px solid var(--line); display: none; }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; padding: .5rem var(--gutter) 1rem; }
  .nav a { border-bottom: 0; border-left: 3px solid transparent; padding-left: 1rem; }
  .nav a[aria-current="page"] { border-left-color: var(--gold); }
  .brand span { font-size: 1.15rem; }
}

/* ---------- Hero ---------- */
.hero { position: relative; min-height: min(78vh, 46rem); display: grid; align-items: end; overflow: hidden; }
.hero picture, .hero picture img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 60%; }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.15) 0%, rgba(0,0,0,.35) 45%, rgba(0,0,0,.92) 100%);
}
.hero .wrap { position: relative; z-index: 1; padding-block: 4rem clamp(2.5rem, 7vh, 5rem); }
.hero-inner { display: grid; grid-template-columns: auto 1fr; gap: clamp(1.25rem, 3vw, 2.5rem); align-items: end; }
.hero-logo { width: clamp(7rem, 16vw, 12rem); filter: drop-shadow(0 4px 18px rgba(0,0,0,.6)); }
.hero h1 { margin-bottom: .25em; text-shadow: 0 2px 20px rgba(0,0,0,.5); }
.hero p { font-size: clamp(1.1rem, 2vw, 1.35rem); max-width: 38rem; color: #f2f2f2; }
@media (max-width: 40rem) { .hero-inner { grid-template-columns: 1fr; } .hero-logo { width: 6.5rem; } }

.button {
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--gold); color: var(--ink-on-gold);
  font: 700 1.05rem var(--font-body); text-decoration: none;
  padding: .85rem 1.5rem; border-radius: 3px; border: 0;
}
.button:hover { background: var(--gold-deep); color: var(--ink-on-gold); }
.button.ghost { background: transparent; color: var(--white); box-shadow: inset 0 0 0 2px var(--white); }
.button.ghost:hover { color: var(--gold); box-shadow: inset 0 0 0 2px var(--gold); }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }

/* ---------- Abschnitte ---------- */
.section { padding-block: clamp(3.5rem, 8vw, 6rem); }
.section.alt { background: var(--surface); }
.lead { font-size: 1.25rem; max-width: 40rem; }
.intro { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.intro .motto { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1.15; color: var(--gold); border-left: 4px solid var(--gold); padding-left: 1.25rem; margin: 0; }
@media (max-width: 48rem) { .intro { grid-template-columns: 1fr; } }

/* Termine – Zielscheiben-Markierung */
.events { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; gap: 0; max-width: 46rem; }
.event { display: grid; grid-template-columns: 5.5rem 2.5rem 1fr; align-items: start; padding: 1.1rem 0; border-top: 1px solid var(--line); }
.event:last-child { border-bottom: 1px solid var(--line); }
.event time { font-family: var(--font-display); font-weight: 700; line-height: 1; }
.event time .d { display: block; font-size: 2.4rem; color: var(--gold); }
.event time .m { font-size: 1.05rem; color: var(--muted); }
.target {
  width: 1.4rem; height: 1.4rem; border-radius: 50%; margin-top: .55rem;
  background: radial-gradient(circle, var(--gold) 0 22%, var(--black) 23% 40%, #e2e2e2 41% 58%, var(--black) 59% 74%, var(--gold-deep) 75% 100%);
}
.event h3 { font-size: 1.5rem; margin: 0 0 .1em; }
.event p { margin: 0; color: var(--muted); }
.event.past { opacity: .5; }
.event.past .target { filter: grayscale(1); }
.event .tag { display: inline-block; font-size: .8rem; font-weight: 600; color: var(--muted); border: 1px solid var(--line); padding: 0 .45rem; border-radius: 2px; margin-left: .4rem; vertical-align: middle; }
.events-note { color: var(--muted); margin-top: 1.25rem; }

/* Training */
.training { display: grid; grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr)); gap: clamp(1.5rem, 4vw, 3rem); margin-top: 2rem; }
.place { border-top: 4px solid var(--gold); padding-top: 1.25rem; }
.place h3 { margin-bottom: .75rem; }
.times { width: 100%; border-collapse: collapse; margin-bottom: 1.25rem; }
.times th, .times td { text-align: left; padding: .55rem 0; border-bottom: 1px solid var(--line); }
.times th { font-weight: 600; }
.times td { text-align: right; font-variant-numeric: tabular-nums; }
.place address { font-style: normal; color: #e6e6e6; }
.place address strong { color: var(--white); display: block; font-size: 1.1rem; }
.place .hint { color: var(--muted); }

/* Kontakt */
.people { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1.5rem; margin-top: 2rem; }
.person { background: var(--surface-2); padding: 1.5rem; border-radius: 4px; }
.person .role { color: var(--gold); font-weight: 600; margin: 0 0 .25rem; }
.person h3 { font-size: 1.7rem; margin-bottom: .5rem; }
.person p { margin: 0; }

/* Galerie */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: .6rem; margin: 1.5rem 0 3rem; }
.gallery figure { margin: 0; aspect-ratio: 4 / 3; overflow: hidden; background: var(--surface-2); }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
.gallery .missing {
  display: grid; place-content: center; text-align: center; padding: 1rem; gap: .35rem;
  color: var(--muted); font-size: .85rem; border: 1px dashed var(--line); background: var(--surface);
}
.gallery .missing b { color: var(--white); font-weight: 600; word-break: break-all; }

/* Hinweis-Box (nur für die Vorschau) */
.notice { background: #2a2400; border-left: 4px solid var(--gold); padding: 1rem 1.25rem; margin: 0 0 2rem; color: #fff6c2; border-radius: 0 4px 4px 0; }
.notice p:last-child { margin: 0; }

/* Textseiten (Impressum, Datenschutz) */
.page-head { padding-block: clamp(3rem, 7vw, 5rem) 1rem; border-bottom: 1px solid var(--line); }
.prose { max-width: 46rem; padding-block: 2.5rem 5rem; }
.prose h2 { font-size: 2rem; margin-top: 2rem; }
.prose h3 { font-size: 1.45rem; margin-top: 1.75rem; }
.prose h4 { font-size: 1.1rem; margin: 1.5rem 0 .4rem; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: .35rem; }
.prose .index { columns: 2 16rem; }

/* ---------- Fußbereich ---------- */
.site-footer { background: var(--surface); border-top: 4px solid var(--gold); padding-block: 3rem 2rem; color: var(--muted); }
.site-footer .wrap { display: grid; grid-template-columns: auto 1fr auto; gap: 2rem; align-items: center; }
.site-footer img { width: 4.5rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }
.site-footer a { color: var(--white); text-decoration: none; }
.site-footer a:hover { color: var(--gold); text-decoration: underline; }
.site-footer .copy { grid-column: 1 / -1; font-size: .9rem; border-top: 1px solid var(--line); padding-top: 1.25rem; margin: 0; }
@media (max-width: 40rem) { .site-footer .wrap { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: no-preference) {
  .hero-inner { animation: rise .9s cubic-bezier(.2,.7,.2,1) both; }
  @keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
}
@media print {
  .site-header, .site-footer, .hero picture { display: none; }
  body { background: #fff; color: #000; }
}
.page-body { padding-block: 2.5rem 4rem; }
@media (max-width: 30rem) { .event { grid-template-columns: 4.25rem 2rem 1fr; } .event h3 { font-size: 1.3rem; } }
.empty-state { color: var(--muted); border: 1px dashed var(--line); padding: 2.5rem 1.5rem; text-align: center; border-radius: 4px; margin: 2rem 0; }
.toc { list-style: none; padding: 0; margin: 1rem 0 0; border-top: 1px solid var(--line); }
.toc li { display: grid; grid-template-columns: 3.5rem 1fr; padding: .55rem 0; border-bottom: 1px solid var(--line); margin: 0; }
.toc .par { font-family: var(--font-display); font-weight: 700; color: var(--gold); font-size: 1.15rem; }
.filemeta { color: var(--muted); font-size: .9rem; margin-top: .75rem; }
