/* =====================================================================
   Sportverein Beispiel e.V. — Site Chrome (Header / Footer / Hero)
   ===================================================================== */

/* ---- Brand / Logo ---- */
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--color-text); }
.brand__mark {
  width: 44px; height: 44px; border-radius: 12px; flex: 0 0 auto;
  background: var(--color-primary);
  color: #fff; display: grid; place-items: center;
  font-family: var(--font-heading); font-weight: var(--fw-xbold); font-size: 20px;
  box-shadow: var(--shadow-xs);
  position: relative; overflow: hidden;
}
.brand__mark::after { content: ""; position: absolute; inset: 0; background: linear-gradient(135deg, transparent 55%, rgba(255,255,255,.18) 55%); }
.brand__name { display: flex; flex-direction: column; line-height: 1.15; gap: 1px; }
.brand__name b { font-family: var(--font-heading); font-weight: var(--fw-xbold); font-size: 1.02rem; letter-spacing: -0.01em; white-space: nowrap; }
.brand__name span { font-size: var(--fs-caption); color: var(--color-text-muted); font-weight: var(--fw-medium); white-space: nowrap; }

/* ---- Header ---- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--color-surface) 88%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--color-border);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); height: var(--header-h); }
.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav a {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 14px; border-radius: var(--radius-md);
  text-decoration: none; color: var(--color-text-muted);
  font-weight: var(--fw-medium); font-size: var(--fs-sm);
  transition: .14s; white-space: nowrap;
}
.main-nav a:hover { background: var(--color-surface-alt); color: var(--color-text); }
.main-nav a.is-active { color: var(--color-primary); background: var(--color-primary-tint); font-weight: var(--fw-semibold); }
.header-actions { display: flex; align-items: center; gap: var(--space-2); }

.burger { display: none; width: 46px; height: 46px; border: 1px solid var(--color-border); background: var(--color-surface); border-radius: var(--radius-md); cursor: pointer; align-items: center; justify-content: center; color: var(--color-text); }
.burger:hover { background: var(--color-surface-alt); }
.burger svg { width: 24px; height: 24px; }

/* ---- Dropdown / Sub-navigation ---- */
.has-sub { position: relative; display: flex; align-items: center; }
.sub-toggle { display: inline-flex; align-items: center; justify-content: center; background: none; border: 0; cursor: pointer; color: var(--color-text-muted); padding: 8px 4px; border-radius: var(--radius-sm); margin-left: -6px; }
.sub-toggle svg { width: 14px; height: 14px; transition: transform .2s ease; }
.has-sub:hover .sub-toggle, .has-sub.is-active-parent .sub-toggle { color: var(--color-text); }
.has-sub.is-active-parent > .nav-top { color: var(--color-primary); }
/* invisible hover bridge to the dropdown */
.has-sub::before { content: ""; position: absolute; top: 100%; left: 0; right: 0; height: 14px; }
.has-sub > .submenu { position: absolute; top: calc(100% + 12px); left: 0; min-width: 322px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 8px; opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity .16s ease, transform .16s ease, visibility .16s; z-index: 50; }
.has-sub:hover > .submenu, .has-sub:focus-within > .submenu { opacity: 1; visibility: visible; transform: translateY(0); }
.main-nav .submenu-item { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border-radius: var(--radius-md); text-decoration: none; color: var(--color-text); width: 100%; transition: background .14s ease; }
.main-nav .submenu-item:hover { background: var(--color-primary-tint); color: var(--color-text); }
.main-nav .submenu-item.is-active { background: var(--color-primary-tint); }
.submenu-ic { width: 36px; height: 36px; border-radius: 9px; background: var(--color-surface-alt); color: var(--color-primary); display: grid; place-items: center; flex: 0 0 auto; }
.submenu-ic svg { width: 18px; height: 18px; }
.submenu-tx b { display: block; font-size: var(--fs-sm); font-weight: var(--fw-semibold); line-height: 1.3; }
.submenu-tx span { font-size: var(--fs-caption); color: var(--color-text-muted); }

@media (max-width: 1040px) {
  /* backdrop-filter macht den Header zum Containing-Block + Clip für position:fixed →
     das mobile Menü würde sonst auf Headerhöhe beschnitten („verschwindet"). Auf
     Mobil daher solider Header ohne Blur, damit .main-nav viewport-fixed bleibt. */
  .site-header { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--color-surface); }
  .main-nav { position: fixed; inset: var(--header-h) 0 0 0; flex-direction: column; align-items: stretch; gap: 2px; background: var(--color-surface); padding: var(--space-4) var(--gutter); transform: translateX(100%); transition: transform .26s ease; overflow-y: auto; z-index: 99; border-top: 1px solid var(--color-border); }
  body.nav-open .main-nav { transform: translateX(0); }
  body.nav-open { overflow: hidden; }
  .main-nav a { padding: 14px 16px; font-size: var(--fs-lead); border-radius: var(--radius-md); }
  .has-sub { flex-wrap: wrap; align-items: center; }
  .has-sub::before { display: none; }
  .has-sub > .nav-top { flex: 1; }
  .has-sub > .sub-toggle { width: 52px; height: 52px; margin: 0; color: var(--color-text-muted); border-radius: var(--radius-md); }
  .has-sub > .sub-toggle svg { width: 20px; height: 20px; }
  .has-sub.is-open > .sub-toggle { background: var(--color-surface-alt); }
  .has-sub.is-open > .sub-toggle svg { transform: rotate(180deg); }
  .has-sub > .submenu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; background: transparent; padding: 0; min-width: 0; flex-basis: 100%; max-height: 0; overflow: hidden; transition: max-height .28s ease; }
  .has-sub.is-open > .submenu { max-height: 560px; }
  .main-nav .submenu-item { margin: 2px 0 2px var(--space-4); padding: 11px 12px; border-left: 2px solid var(--color-border); border-radius: 0 var(--radius-md) var(--radius-md) 0; }
  .burger { display: inline-flex; }
  .header-actions .btn--join-text { display: none; }
}
@media (max-width: 520px) { .brand__name span { display: none; } }

/* ---- Hero ---- */
.hero { position: relative; overflow: hidden; background: var(--color-primary); color: #fff; }
.hero::before { content: ""; position: absolute; inset: 0; background:
  radial-gradient(120% 130% at 88% -10%, color-mix(in srgb, var(--color-accent) 55%, transparent) 0%, transparent 45%),
  radial-gradient(90% 120% at 0% 110%, rgba(255,255,255,.10) 0%, transparent 50%);
  pointer-events: none; }
.hero__inner { position: relative; display: grid; grid-template-columns: 1.05fr 0.95fr; gap: var(--space-6); align-items: center; padding-block: clamp(48px, 7vw, 88px); }
.hero__eyebrow { color: color-mix(in srgb, var(--color-accent) 80%, white); }
.hero__eyebrow::before { background: color-mix(in srgb, var(--color-accent) 80%, white); }
.hero h1 { color: #fff; font-size: clamp(2.4rem, 1.6rem + 3.4vw, 3.6rem); }
.hero__sub { font-size: var(--fs-lead); color: rgba(255,255,255,.86); max-width: 46ch; line-height: var(--lh-snug); margin-top: var(--space-3); }
.hero__cta { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-5); }
.hero .btn--secondary { background: rgba(255,255,255,.10); border-color: rgba(255,255,255,.4); color: #fff; }
.hero .btn--secondary:hover { background: rgba(255,255,255,.18); border-color: #fff; color: #fff; }
.hero__stats { display: flex; gap: var(--space-5); margin-top: var(--space-6); flex-wrap: wrap; }
.hero__stat b { display: block; font-family: var(--font-heading); font-weight: var(--fw-xbold); font-size: 1.9rem; line-height: 1; }
.hero__stat span { font-size: var(--fs-caption); color: rgba(255,255,255,.75); }
.hero__media { position: relative; }
.hero__media .ph { aspect-ratio: 4/5; border: 0; background-color: rgba(255,255,255,.08); background-image: repeating-linear-gradient(-45deg, transparent 0 13px, rgba(255,255,255,.10) 13px 14px); color: rgba(255,255,255,.7); box-shadow: var(--shadow-lg); }
.hero__media .ph::after { background: rgba(0,0,0,.25); border-color: rgba(255,255,255,.25); color: #fff; }
.hero__badge { position: absolute; bottom: -18px; left: -18px; background: var(--color-surface); color: var(--color-text); border-radius: var(--radius-lg); padding: 14px 18px; box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 12px; }
.hero__badge .ic { width: 38px; height: 38px; border-radius: 10px; background: var(--color-accent-soft); color: var(--color-accent-hover); display: grid; place-items: center; }
.hero__badge b { display: block; font-family: var(--font-heading); }
.hero__badge span { font-size: var(--fs-caption); color: var(--color-text-muted); }
@media (max-width: 880px) {
  .hero__inner { grid-template-columns: 1fr; gap: var(--space-5); }
  .hero__media { order: -1; max-width: 360px; }
}

/* ---- Hero Variante B: Vollbild (club_fullscreen) ---- */
.hero-full { position: relative; min-height: min(88vh, 780px); display: flex; align-items: flex-end; color: #fff; overflow: hidden; isolation: isolate; }
.hero-full__bg { position: absolute; inset: 0; z-index: -2; background-color: #0c3d39;
  background-image: repeating-linear-gradient(-45deg, transparent 0 18px, rgba(255,255,255,.045) 18px 19px); }
.hero-full__bg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-full__bg[data-label]::after { content: attr(data-label); position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  font-family: ui-monospace, Menlo, monospace; font-size: var(--fs-caption); letter-spacing: .04em; color: rgba(255,255,255,.4);
  border: 1px solid rgba(255,255,255,.2); border-radius: var(--radius-full); padding: 6px 16px; }
.hero-full__overlay { position: absolute; inset: 0; z-index: -1; background:
  linear-gradient(180deg, rgba(8,28,26,.30) 0%, rgba(8,28,26,.45) 42%, rgba(8,28,26,.93) 100%),
  radial-gradient(120% 90% at 85% 0%, color-mix(in srgb, var(--color-accent) 38%, transparent) 0%, transparent 50%); }
.hero-full__inner { position: relative; padding-block: clamp(48px, 9vw, 104px); width: 100%; }
.hero-full__content { max-width: 60ch; }
.hero-full h1 { color: #fff; font-size: clamp(2.6rem, 1.5rem + 4.6vw, 4.4rem); line-height: 1.04; }
.hero-full .hero__sub { color: rgba(255,255,255,.9); max-width: 50ch; font-size: var(--fs-lead); line-height: var(--lh-snug); margin-top: var(--space-3); }
.hero-full .eyebrow { color: color-mix(in srgb, var(--color-accent) 82%, white); }
.hero-full .eyebrow::before { background: color-mix(in srgb, var(--color-accent) 82%, white); }
.hero-full .hero__cta { margin-top: var(--space-5); }
.hero-full .btn--secondary { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.45); color: #fff; backdrop-filter: blur(4px); }
.hero-full .btn--secondary:hover { background: rgba(255,255,255,.2); border-color: #fff; color: #fff; }
.hero-full__bar { position: relative; z-index: 1; margin-top: var(--space-6); display: flex; flex-wrap: wrap; gap: var(--space-6);
  padding-top: var(--space-5); border-top: 1px solid rgba(255,255,255,.18); }
.hero-full__bar .hero__stat b { font-size: 2.1rem; }
.hero-full__bar .hero__stat span { color: rgba(255,255,255,.78); }
.hero-scroll { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 1; color: rgba(255,255,255,.7);
  font-size: var(--fs-caption); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.hero-scroll .mouse { width: 22px; height: 34px; border: 2px solid rgba(255,255,255,.5); border-radius: 12px; position: relative; }
.hero-scroll .mouse::after { content: ""; position: absolute; top: 6px; left: 50%; transform: translateX(-50%); width: 3px; height: 7px; border-radius: 2px; background: rgba(255,255,255,.8); animation: scrolldot 1.6s ease-in-out infinite; }
@keyframes scrolldot { 0%,100% { opacity: 0; transform: translate(-50%, 0); } 50% { opacity: 1; transform: translate(-50%, 7px); } }
@media (prefers-reduced-motion: reduce) { .hero-scroll .mouse::after { animation: none; } }
@media (max-width: 640px) { .hero-scroll { display: none; } }

/* ---- Page header (interior pages) ---- */
.page-hero { background: var(--color-primary-tint); border-bottom: 1px solid var(--color-border); padding-block: var(--space-6); }
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: var(--fs-caption); color: var(--color-text-muted); margin-bottom: var(--space-3); }
.breadcrumb a { color: var(--color-text-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--color-primary); }
.breadcrumb .sep { color: var(--color-text-subtle); }
.page-hero h1 { margin-bottom: var(--space-2); }
.page-hero .lead { max-width: 62ch; }

/* ---- Sponsor strip ---- */
.sponsors { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--space-4); align-items: center; }
@media (max-width: 760px) { .sponsors { grid-template-columns: repeat(2, 1fr); } }

/* ---- Footer ---- */
.site-footer { background: #16201e; color: rgba(255,255,255,.72); margin-top: var(--space-7); }
.site-footer a { color: rgba(255,255,255,.72); text-decoration: none; }
.site-footer a:hover { color: #fff; }
.footer-top { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.3fr; gap: var(--space-5); padding-block: var(--space-7); }
@media (max-width: 880px) { .footer-top { grid-template-columns: 1fr 1fr; gap: var(--space-5); } }
@media (max-width: 520px) { .footer-top { grid-template-columns: 1fr; } }
.site-footer .brand { color: #fff; }
.site-footer .brand__name span { color: rgba(255,255,255,.6); }
.footer-col h5 { color: #fff; font-family: var(--font-body); font-size: var(--fs-caption); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: var(--space-3); }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: var(--fs-sm); }
.footer-about p { font-size: var(--fs-sm); color: rgba(255,255,255,.6); max-width: 34ch; margin-top: var(--space-3); }
.social { display: flex; gap: 10px; margin-top: var(--space-4); }
.social a { width: 40px; height: 40px; border-radius: 10px; background: rgba(255,255,255,.08); display: grid; place-items: center; transition: .14s; }
.social a:hover { background: var(--color-primary); }
.social svg { width: 20px; height: 20px; }
.footer-contact li { display: flex; gap: 10px; align-items: flex-start; }
.footer-contact .ic { width: 18px; height: 18px; flex: 0 0 auto; margin-top: 2px; color: color-mix(in srgb, var(--color-primary) 60%, white); display: inline-flex; }
.footer-contact .ic svg { width: 18px; height: 18px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-block: var(--space-4); display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); flex-wrap: wrap; font-size: var(--fs-caption); }
.footer-bottom nav { display: flex; gap: var(--space-4); flex-wrap: wrap; }

/* ---- Tweaks FAB + panel ---- */
.tweaks-fab { position: fixed; right: 20px; bottom: 20px; z-index: 300; width: 52px; height: 52px; border-radius: 50%; background: var(--color-text); color: #fff; border: 0; cursor: pointer; display: grid; place-items: center; box-shadow: var(--shadow-lg); transition: transform .16s; }
.tweaks-fab:hover { transform: scale(1.06) rotate(20deg); }
.tweaks-fab svg { width: 24px; height: 24px; }
.tweaks-panel { position: fixed; right: 20px; bottom: 84px; z-index: 301; width: 300px; max-width: calc(100vw - 40px); background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: var(--space-4); transform-origin: bottom right; transition: opacity .16s, transform .16s; }
.tweaks-panel[hidden] { display: none; }
.tweaks-panel.closing, .tweaks-panel.opening { opacity: 0; transform: scale(.94) translateY(8px); }
.tweaks-panel h4 { font-family: var(--font-body); font-size: var(--fs-sm); display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--space-3); }
.tweaks-panel .tw-close { border: 0; background: none; cursor: pointer; color: var(--color-text-subtle); padding: 4px; }
.tw-group { margin-bottom: var(--space-4); }
.tw-group:last-child { margin-bottom: 0; }
.tw-label { font-size: var(--fs-caption); font-weight: var(--fw-semibold); text-transform: uppercase; letter-spacing: 0.05em; color: var(--color-text-muted); margin-bottom: var(--space-2); display: block; }
.tw-swatches { display: flex; gap: 8px; }
.tw-swatch { width: 34px; height: 34px; border-radius: 9px; border: 2px solid transparent; cursor: pointer; position: relative; transition: transform .12s; }
.tw-swatch:hover { transform: scale(1.08); }
.tw-swatch.is-active { border-color: var(--color-text); box-shadow: 0 0 0 2px var(--color-surface) inset; }
.tw-seg { display: flex; background: var(--color-surface-alt); border-radius: var(--radius-md); padding: 3px; }
.tw-seg button { flex: 1; border: 0; background: none; padding: 8px 6px; border-radius: 7px; cursor: pointer; font-size: var(--fs-caption); font-weight: var(--fw-semibold); color: var(--color-text-muted); font-family: var(--font-body); }
.tw-seg button.is-active { background: var(--color-surface); color: var(--color-primary); box-shadow: var(--shadow-xs); }
