/* TC Ellwangen – site styles. Colours come from the club crest (blue/red) and the clay courts. */
@font-face {
  font-family: 'Inter';
  src: url('/fonts/inter-latin-wght-normal.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --blue: #1d4f9a;
  --blue-strong: #163d78;
  --red: #e2224f;
  --clay: #c0582f;
  --bg: #ffffff;
  --bg-soft: #f4f6f9;
  --surface: #ffffff;
  --text: #16202e;
  --muted: #5a6577;
  --line: #e2e6ec;
  --link: #1d4f9a;
  --radius: 14px;
  --shadow: 0 1px 2px rgb(16 24 40 / 6%), 0 6px 20px rgb(16 24 40 / 6%);
  --wrap: 1160px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f141c;
    --bg-soft: #151c27;
    --surface: #18202c;
    --text: #e8ecf2;
    --muted: #a3adbd;
    --line: #283243;
    --link: #8db4ff;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 6px 20px rgb(0 0 0 / 25%);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.25rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 750; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; border-radius: 4px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--blue); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
.plain { list-style: none; padding: 0; margin: 0; }
.muted { color: var(--muted); }
.after-grid { margin-top: 20px; }
.eyebrow { display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--red); margin-bottom: .6em; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  background: var(--red); color: #fff; text-decoration: none; font-weight: 650;
  padding: .8em 1.4em; border-radius: 999px; border: 2px solid var(--red);
  transition: transform .15s ease, background .15s ease;
}
.btn:hover { background: #c81b43; border-color: #c81b43; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: #fff; border-color: rgb(255 255 255 / 70%); }
.btn-ghost:hover { background: rgb(255 255 255 / 12%); border-color: #fff; }
.btn-outline { background: transparent; color: var(--link); border-color: currentColor; }
.btn-outline:hover { background: var(--bg-soft); border-color: currentColor; }
.btn-small { padding: .45em 1em; font-size: .9rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand strong { display: block; font-size: 1.05rem; letter-spacing: -0.01em; line-height: 1.1; }
.brand small { display: block; color: var(--muted); font-size: .75rem; }
.site-nav { display: flex; align-items: center; gap: 20px; }
.site-nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.site-nav ul a { display: block; padding: 8px 12px; border-radius: 8px; color: var(--text); text-decoration: none; font-weight: 550; font-size: .95rem; }
.site-nav ul a:hover { background: var(--bg-soft); }
.site-nav ul a[aria-current] { color: var(--link); background: var(--bg-soft); }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; color: var(--text); cursor: pointer; }
.nav-toggle svg { width: 28px; height: 28px; stroke: currentColor; stroke-width: 2; stroke-linecap: round; fill: none; }

@media (max-width: 960px) {
  .nav-toggle { display: block; }
  .site-nav {
    display: none; position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 12px;
    background: var(--bg); border-bottom: 1px solid var(--line); padding: 12px 20px 20px;
    box-shadow: var(--shadow);
  }
  .site-nav.open { display: flex; }
  .site-nav ul { flex-direction: column; }
  .site-nav ul a { padding: 12px; font-size: 1.05rem; }
  .site-nav .btn { justify-content: center; }
}

/* Hero */
.hero { position: relative; color: #fff; min-height: min(78vh, 680px); display: flex; align-items: flex-end; overflow: hidden; }
.hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: saturate(1.25) contrast(1.15); }
.hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, rgb(12 28 58 / 88%) 0%, rgb(12 28 58 / 60%) 45%, rgb(12 28 58 / 10%) 100%); }
.hero .wrap { position: relative; z-index: 1; padding-top: 96px; padding-bottom: 72px; width: 100%; }
.hero h1 { max-width: 14em; }
.hero p.lead { font-size: clamp(1.05rem, 1.8vw, 1.25rem); max-width: 36em; color: rgb(255 255 255 / 90%); }
.hero .eyebrow { color: #ffd1dc; }
.page-hero { position: relative; color: #fff; overflow: hidden; }
.page-hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: saturate(1.2) contrast(1.1); }
.page-hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, rgb(12 28 58 / 85%), rgb(12 28 58 / 45%)); }
.page-hero .wrap { position: relative; z-index: 1; padding-top: 88px; padding-bottom: 56px; }
.page-hero p { max-width: 40em; font-size: 1.15rem; color: rgb(255 255 255 / 90%); margin: 0; }
.page-head { background: var(--bg-soft); border-bottom: 1px solid var(--line); }
.page-head .wrap { padding-top: 64px; padding-bottom: 40px; }
.page-head p { max-width: 42em; color: var(--muted); font-size: 1.1rem; margin: 0; }

/* Facts strip */
.facts { background: var(--blue); color: #fff; }
.facts ul { list-style: none; margin: 0; padding: 22px 20px; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; }
.facts li { display: flex; flex-direction: column; }
.facts strong { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.02em; }
.facts span { font-size: .9rem; opacity: .85; }

/* Sections */
.section { padding: 80px 0; }
.section-soft { background: var(--bg-soft); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 32px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.section-head p { margin: .4em 0 0; color: var(--muted); max-width: 40em; }
.split { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.split.reverse > :first-child { order: 2; }
.split img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
@media (max-width: 860px) {
  .section { padding: 56px 0; }
  .split { grid-template-columns: 1fr; gap: 28px; }
  .split.reverse > :first-child { order: 0; }
}

/* Cards */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.card-body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-body h3 { margin: 0; }
.card-body p { margin: 0; color: var(--muted); font-size: .95rem; }

.offer { padding: 28px; gap: 10px; }
.offer .icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--red) 12%, transparent); color: var(--red); margin-bottom: 6px; }
.offer .icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.offer p { color: var(--muted); margin: 0 0 8px; }
.offer a.more { margin-top: auto; font-weight: 650; text-decoration: none; }
.offer a.more:hover { text-decoration: underline; }

/* Teams */
.team-card .card-body { gap: 10px; }
.team-card dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; font-size: .95rem; }
.team-card dt { color: var(--muted); }
.team-card dd { margin: 0; }

/* People */
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.person { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.person .role { font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--red); }
.person .name { font-weight: 650; margin: 4px 0; }
.person .detail { color: var(--muted); font-size: .92rem; margin: 0; }
.person a { font-size: .92rem; word-break: break-word; }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.gallery img { border-radius: 10px; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }

/* Downloads */
.downloads { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; list-style: none; padding: 0; margin: 0; }
.downloads a { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); text-decoration: none; color: var(--text); font-weight: 550; }
.downloads a:hover { border-color: var(--link); color: var(--link); }
.downloads a::before { content: 'PDF'; font-size: .7rem; font-weight: 800; color: #fff; background: var(--red); border-radius: 6px; padding: 4px 6px; }

/* Sponsors */
.sponsors { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; list-style: none; padding: 0; margin: 0; }
.sponsors a, .sponsors span { display: grid; place-items: center; height: 110px; padding: 18px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.sponsors img { max-height: 70px; width: auto; object-fit: contain; }
.sponsors a:hover { border-color: var(--link); }

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 28px 28px; }
.timeline li::before { content: ''; position: absolute; left: -8px; top: 6px; width: 14px; height: 14px; border-radius: 50%; background: var(--bg); border: 3px solid var(--red); }
.timeline .when { font-weight: 800; color: var(--link); display: block; }
.timeline p { margin: .2em 0 0; }

/* Call to action band */
.cta { background: linear-gradient(120deg, var(--blue-strong), var(--blue)); color: #fff; border-radius: 20px; padding: 48px; display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.cta h2 { margin: 0 0 .3em; }
.cta p { margin: 0; opacity: .9; max-width: 36em; }
@media (max-width: 600px) { .cta { padding: 32px 24px; } }

/* Long text */
.prose { max-width: 760px; }
.prose h2 { margin-top: 1.6em; font-size: 1.5rem; }
.prose h3 { margin-top: 1.4em; }
.prose img { border-radius: 12px; margin: 1.2em 0; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose table { border-collapse: collapse; width: 100%; font-size: .95rem; }
.prose td, .prose th { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.legal { padding-top: 56px; padding-bottom: 80px; }
.legal h2 { font-size: 1.25rem; }

.info-list, .prose .info-list { display: grid; gap: 14px; list-style: none; padding: 0; margin: 0 0 24px; }
.info-list li { display: flex; gap: 12px; }
.info-list li::before { content: '✓'; flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: .8rem; font-weight: 800; color: #fff; background: var(--clay); margin-top: 2px; }

.note { background: color-mix(in srgb, var(--clay) 10%, var(--surface)); border-left: 4px solid var(--clay); padding: 14px 18px; border-radius: 8px; }

/* Footer */
.site-footer { background: #0e1a2e; color: #c9d2e0; margin-top: 0; }
.site-footer a { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; padding-top: 56px; padding-bottom: 40px; }
.site-footer h2 { font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: #8e9bb2; margin-bottom: 12px; }
.site-footer p { margin: 0 0 .6em; }
.site-footer .plain li { margin-bottom: .4em; }
.brand-footer { color: #fff; }
.brand-footer small { color: #8e9bb2; }
.social { display: flex; gap: 10px; }
.social a { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: rgb(255 255 255 / 8%); }
.social a:hover { background: var(--red); }
.social svg { width: 20px; height: 20px; fill: none; stroke: #fff; stroke-width: 1.8; }
.social svg .fill { fill: #fff; stroke: none; }
.social a[aria-label="Facebook"] svg { fill: #fff; stroke: none; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-top: 20px; padding-bottom: 28px; border-top: 1px solid rgb(255 255 255 / 10%); font-size: .9rem; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
