/* =========================================================
   DESIGN "MEER" (ocean)
   Tiefsee-Look: animierte 3D-Wasseroberfläche im Hero (WebGL,
   assets/js/hero-ocean.js), Glaskarten, Lichtreflexe, Luftblasen.
   ========================================================= */

:root {
  --color-bg: #04141f;
  --color-bg-alt: #061d2c;
  --color-surface: rgba(255, 255, 255, 0.045);
  --color-text: #cfe3f1;
  --color-muted: #8ba7bd;
  --color-accent: #38bdf8;
  /* In diesem dunklen Design werden Überschriften hell statt dunkel */
  --color-accent-dark: #eaf6ff;
  --color-border: rgba(255, 255, 255, 0.12);
  --color-on-dark: #ffffff;

  --section-padding: 120px;
  --radius: 16px;
  --radius-lg: 26px;
}

body {
  background-color: #04141f;
  background-image:
    radial-gradient(90% 60% at 12% 0%, rgba(56, 189, 248, 0.16), transparent 60%),
    radial-gradient(70% 50% at 100% 30%, rgba(13, 148, 180, 0.14), transparent 65%),
    radial-gradient(80% 60% at 50% 100%, rgba(8, 82, 122, 0.3), transparent 70%);
  background-attachment: fixed;
  color: var(--color-text);
}

/* Inhalt über die Luftblasen-Ebene heben.
   ACHTUNG: .site-header hier NICHT aufführen – das würde das
   position: fixed aus base.css überschreiben, die Navigation würde
   wegscrollen und der Hero um die Kopfzeilenhöhe verrutschen. */
main, .site-footer { position: relative; z-index: 1; }

.section-alt {
  background: rgba(255, 255, 255, 0.028);
  border-block: 1px solid rgba(255, 255, 255, 0.06);
}

/* Luftblasen-Ebene (wird von premium.js eingefügt) */
.bubble-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.bubble {
  position: absolute;
  bottom: -60px;
  border-radius: 50%;
  /* "screen" sorgt dafür, dass Blasen den Hintergrund nur aufhellen –
     sonst wirken sie wie dunkle Kugeln. */
  mix-blend-mode: screen;
  opacity: 0.5;
  background:
    radial-gradient(circle at 30% 26%, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.10) 42%, rgba(255, 255, 255, 0) 62%),
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0) 62%, rgba(165, 225, 245, 0.30) 78%, rgba(255, 255, 255, 0) 88%);
  animation: bubble-rise linear infinite;
}

@keyframes bubble-rise {
  0%   { transform: translate3d(0, 0, 0) scale(0.9); opacity: 0; }
  10%  { opacity: 0.75; }
  50%  { transform: translate3d(22px, -52vh, 0) scale(1); }
  90%  { opacity: 0.5; }
  100% { transform: translate3d(-14px, -105vh, 0) scale(1.08); opacity: 0; }
}

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

.site-header {
  background: transparent;
}

.site-header .main-nav a,
.site-header .nav-toggle { color: #ffffff; }

.site-header .logo-img--dark { display: none; }
.site-header .logo-img--light { display: block; }

.site-header.scrolled {
  background: rgba(4, 20, 31, 0.72);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: 0 10px 40px rgba(0, 10, 20, 0.45);
}

.site-header.scrolled .logo-img { height: 38px; }

.main-nav a {
  color: rgba(255, 255, 255, 0.86);
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #38bdf8, #a5f3fc);
  border-radius: 2px;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.8);
  transition: width 0.35s var(--ease-out), left 0.35s var(--ease-out);
}

.main-nav a:hover { color: #ffffff; }
.main-nav a:hover::after { width: 100%; left: 0; }

@media (max-width: 900px) {
  .main-nav ul {
    background: rgba(4, 20, 31, 0.96);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  .main-nav ul li + li { border-top: 1px solid rgba(255, 255, 255, 0.07); }
}

/* ---------- Hero ---------- */

.hero {
  min-height: 100svh;
  background: #031019;
}

/* Fallback, falls WebGL nicht verfügbar ist */
.hero-bg {
  background: linear-gradient(175deg, #051f31 0%, #073b55 45%, #0a5f80 100%);
}

.hero-overlay {
  background:
    radial-gradient(70% 55% at 50% 42%, rgba(4, 20, 31, 0) 35%, rgba(4, 20, 31, 0.55) 100%),
    linear-gradient(to bottom, rgba(3, 16, 25, 0.5) 0%, rgba(3, 16, 25, 0) 30%, rgba(4, 20, 31, 0.85) 100%);
}

.hero-logo {
  filter: drop-shadow(0 14px 44px rgba(0, 0, 0, 0.55))
          drop-shadow(0 0 30px rgba(56, 189, 248, 0.35));
  animation: hero-logo-in 1.5s var(--ease-out) both, hero-float 7s ease-in-out 1.5s infinite;
}

@keyframes hero-logo-in {
  from { opacity: 0; transform: translateY(40px) scale(0.94); filter: blur(10px); }
  to   { opacity: 1; transform: none; filter: blur(0); }
}

@keyframes hero-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-14px); }
}

.hero-tagline {
  animation: fade-up 1.2s var(--ease-out) 0.7s both;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.6);
}

.hero-scroll { animation: fade-up 1.2s var(--ease-out) 1.1s both; }

.hero-scroll-arrow { animation: scroll-bob 2.2s ease-in-out infinite; }

@keyframes fade-up {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: none; }
}

@keyframes scroll-bob {
  0%, 100% { transform: rotate(45deg) translate(0, 0); }
  50%      { transform: rotate(45deg) translate(4px, 4px); }
}

/* Animierte Wellenkante unter dem Hero */
.hero-wave {
  height: clamp(70px, 10vw, 150px);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 140' preserveAspectRatio='none'%3E%3Cpath d='M0 70 C 180 120 300 24 480 62 C 660 100 780 20 960 58 C 1140 96 1260 32 1440 74 L1440 140 L0 140 Z' fill='%2304141f'/%3E%3C/svg%3E") repeat-x bottom / 1440px 100%;
  animation: wave-slide 18s linear infinite;
}

.hero::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: clamp(70px, 10vw, 150px);
  pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 140' preserveAspectRatio='none'%3E%3Cpath d='M0 86 C 200 40 320 128 520 86 C 720 44 840 126 1040 88 C 1240 50 1340 108 1440 84 L1440 140 L0 140 Z' fill='%2304141f' fill-opacity='0.55'/%3E%3C/svg%3E") repeat-x bottom / 1200px 100%;
  animation: wave-slide 26s linear infinite reverse;
}

@keyframes wave-slide {
  from { background-position-x: 0; }
  to   { background-position-x: -1440px; }
}

/* ---------- Überschriften / Kicker ---------- */

.section-kicker {
  color: #7dd3fc;
  text-shadow: 0 0 22px rgba(56, 189, 248, 0.45);
}

.zitat p {
  background: linear-gradient(100deg, #ffffff 10%, #7dd3fc 50%, #ffffff 90%);
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 9s linear infinite;
}

@keyframes shimmer {
  to { background-position: 220% center; }
}

/* ---------- Karten / Glas ---------- */

.card,
.erfolge-liste li,
.sponsor-item {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.11);
  backdrop-filter: blur(14px);
  box-shadow: 0 20px 50px rgba(0, 8, 16, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.09);
}

.wettkaempfe-liste li { border-top-color: rgba(255, 255, 255, 0.09); }

.wk-datum {
  color: #7dd3fc;
  text-shadow: 0 0 16px rgba(56, 189, 248, 0.5);
}

.overview-images img {
  box-shadow: 0 18px 44px rgba(0, 8, 16, 0.5);
  transition: transform 0.6s var(--ease-out), box-shadow 0.6s var(--ease-out);
}

.overview-images img:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 26px 60px rgba(0, 10, 20, 0.6);
}

.split-media img {
  box-shadow: 0 30px 70px rgba(0, 8, 16, 0.55);
}

/* ---------- Resultate ---------- */

.table-wrap {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(12px);
}

.resultate-tabelle thead th {
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  color: #8fc8e4;
}

.resultate-tabelle tbody tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: background 0.3s var(--ease-out);
}

.resultate-tabelle tbody tr:last-child { border-bottom: none; }
.resultate-tabelle tbody tr:hover { background: rgba(56, 189, 248, 0.09); }

.resultate-tabelle td:first-child { color: #ffffff; }

.resultate-tabelle td:nth-child(2) {
  font-weight: 700;
  color: #7dd3fc;
  text-shadow: 0 0 18px rgba(56, 189, 248, 0.45);
}

.erfolge-liste li {
  position: relative;
  overflow: hidden;
  transition: transform 0.4s var(--ease-out), border-color 0.4s var(--ease-out);
}

.erfolge-liste li:hover {
  transform: translateY(-4px);
  border-color: rgba(56, 189, 248, 0.45);
}

.erfolg-titel { color: #ffffff; }

/* ---------- Sponsoren ---------- */

/* Sponsorlogos sind meist dunkel – helle Platte dahinter hält sie lesbar */
.sponsor-logo {
  background: #ffffff;
  border-radius: var(--radius);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}

.sponsor-item {
  position: relative;
  overflow: hidden;
}

/* Glanzstreifen beim Hover */
.sponsor-item::after {
  content: "";
  position: absolute;
  top: -120%;
  left: -60%;
  width: 60%;
  height: 340%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.18), transparent);
  transform: rotate(18deg);
  transition: left 0.75s var(--ease-out);
  pointer-events: none;
}

.sponsor-item:hover::after { left: 130%; }

.sponsor-item:hover {
  transform: translateY(-7px);
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow: 0 30px 70px rgba(0, 10, 20, 0.55), 0 0 40px rgba(56, 189, 248, 0.16);
}

.sponsor-name { color: #ffffff; }

.sponsor-cta {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(14, 116, 144, 0.5), rgba(8, 47, 73, 0.75));
  border: 1px solid rgba(56, 189, 248, 0.3);
  backdrop-filter: blur(14px);
  box-shadow: 0 30px 80px rgba(0, 10, 20, 0.5);
}

.sponsor-cta::before {
  content: "";
  position: absolute;
  inset: -50%;
  background: conic-gradient(from 0deg, transparent 0deg, rgba(56, 189, 248, 0.14) 60deg, transparent 140deg);
  animation: cta-sweep 12s linear infinite;
  pointer-events: none;
}

@keyframes cta-sweep {
  to { transform: rotate(360deg); }
}

.sponsor-cta > * { position: relative; z-index: 1; }

.btn {
  background: linear-gradient(120deg, #38bdf8, #0ea5b7);
  color: #03131d;
  box-shadow: 0 12px 34px rgba(56, 189, 248, 0.35);
}

.btn:hover {
  box-shadow: 0 18px 46px rgba(56, 189, 248, 0.5);
}

/* ---------- Galerie ---------- */

.galerie-grid figure {
  box-shadow: 0 18px 44px rgba(0, 8, 16, 0.45);
}

.galerie-grid figure::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(3, 16, 25, 0.65), transparent 55%);
  opacity: 0;
  transition: opacity 0.45s var(--ease-out);
  pointer-events: none;
}

.galerie-grid figure:hover::after { opacity: 1; }
.galerie-grid figure:hover img { transform: scale(1.07); }

.galerie-link a {
  color: #7dd3fc;
  text-shadow: 0 0 20px rgba(56, 189, 248, 0.4);
}

/* ---------- Kontakt ---------- */

.kontakt-liste dd a { color: #ffffff; }
.kontakt-liste dd a:hover { color: #7dd3fc; }

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

.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  color: var(--color-muted);
  background: rgba(2, 10, 17, 0.6);
}

/* ---------- Lightbox (Galerie) ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(2, 10, 17, 0.9);
  backdrop-filter: blur(12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s var(--ease-out);
}

.lightbox.open { opacity: 1; pointer-events: auto; }

.lightbox img {
  max-width: min(92vw, 1000px);
  max-height: 86vh;
  border-radius: var(--radius-lg);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.7);
  transform: scale(0.94);
  transition: transform 0.35s var(--ease-out);
}

.lightbox.open img { transform: scale(1); }

.lightbox-close {
  position: absolute;
  top: 22px;
  right: 26px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {
  .hero-logo,
  .hero-tagline,
  .hero-scroll,
  .hero-wave,
  .hero::after,
  .zitat p,
  .sponsor-cta::before,
  .bubble,
  .hero-scroll-arrow {
    animation: none !important;
  }
}

/* ---------- Ergänzungen: Bahnen-Motive & Anzeigetafel ---------- */

:root {
  --rope-main: rgba(120, 190, 225, 0.55);
  --rope-accent: rgba(230, 120, 105, 0.75);
}

.section-kicker::before { color: #7dd3fc; opacity: 0.5; }

.badge--pb {
  background: linear-gradient(120deg, #38bdf8, #0ea5b7);
  color: #03131d;
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.45);
}

.badge--sb {
  background: rgba(255, 255, 255, 0.10);
  color: #9fd4ec;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.zeit { color: #ffffff; }

.depth-rail {
  color: #cfe3f1;
  --rail-chip-bg: rgba(6, 28, 44, 0.92);
  --rail-chip-text: #dceaf5;
}

/* Lichtschleier, der langsam über die Seite zieht */
body::after {
  content: "";
  position: fixed;
  inset: -30% -10%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.35;
  /* Radiale Verläufe sind von sich aus weich – ein zusätzlicher
     filter: blur() über den ganzen Bildschirm wäre nur teuer. */
  background:
    radial-gradient(38% 22% at 25% 30%, rgba(125, 211, 252, 0.16), transparent 70%),
    radial-gradient(30% 18% at 70% 60%, rgba(56, 189, 248, 0.13), transparent 70%);
  animation: licht-driften 26s ease-in-out infinite alternate;
}

@keyframes licht-driften {
  from { transform: translate3d(-3%, -2%, 0) scale(1); }
  to   { transform: translate3d(4%, 3%, 0) scale(1.12); }
}

@media (prefers-reduced-motion: reduce) {
  body::after { animation: none; }
}

.hero-logo--dark { display: none; }
.hero-logo--light { display: block; }
