/* Catch'n Serve Ball Tenerife. Farben aus dem ICBSF-Logo (Magenta, Meerblau, Sonne) und Elenas Entwurf (Nachtblau). */

@font-face { font-family: "Unbounded"; src: url("fonts/unbounded-latin-wght-normal.woff2") format("woff2"); font-weight: 200 900; font-display: swap;
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2212; }
@font-face { font-family: "Unbounded"; src: url("fonts/unbounded-cyrillic-wght-normal.woff2") format("woff2"); font-weight: 200 900; font-display: swap;
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: "Manrope"; src: url("fonts/manrope-latin-wght-normal.woff2") format("woff2"); font-weight: 200 800; font-display: swap;
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2212; }
@font-face { font-family: "Manrope"; src: url("fonts/manrope-cyrillic-wght-normal.woff2") format("woff2"); font-weight: 200 800; font-display: swap;
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }

:root {
  --noche: #1c0f7a;      /* Nachtblau, Grundfläche */
  --noche-2: #2a17a6;
  --buganvilla: #c2207a; /* Magenta der Hand im Logo */
  --mar: #00a9dc;        /* Meerblau */
  --sol: #ffd21f;        /* Sonne, der Ball */
  --tinta: #170b4d;      /* Textfarbe */
  --papel: #ffffff;
  --bruma: #f3f1fb;      /* helle Fläche */
  --linea: #d9d4ee;
  --display: "Unbounded", "Arial Black", system-ui, sans-serif;
  --text: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 72rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--text); font-size: 1.0625rem; line-height: 1.6; color: var(--tinta); background: var(--papel); }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-family: var(--display); line-height: 1.12; margin: 0; text-wrap: balance; }
h2 { font-size: clamp(1.55rem, 1.1rem + 2vw, 2.5rem); font-weight: 600; letter-spacing: -0.01em; margin-bottom: 1rem; }
h3 { font-size: 1.05rem; font-weight: 600; }
p { margin: 0 0 1rem; max-width: 62ch; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--sol); outline-offset: 3px; border-radius: 4px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }

/* Intro (assets/intro.js): liegt über der Seite, solange <html class="intro-on"> gesetzt ist */
.intro { display: none; }
.intro-on .intro, .intro-out .intro { display: block; position: fixed; inset: 0; z-index: 1000; background: #02030a; transition: opacity 0.6s ease; }
.intro-on body { overflow: hidden; }
.intro canvas { display: block; width: 100%; height: 100%; }
.intro-place, .intro-alt { position: absolute; bottom: clamp(1rem, 3vw, 2rem); margin: 0; max-width: none; color: #fff; text-shadow: 0 1px 12px rgba(0, 0, 0, 0.8); }
.intro-place { left: clamp(1rem, 3vw, 2rem); font-family: var(--display); font-weight: 700; font-size: clamp(1.1rem, 0.8rem + 1.6vw, 2rem); }
.intro-alt { right: clamp(1rem, 3vw, 2rem); font-weight: 700; font-variant-numeric: tabular-nums; font-size: clamp(0.95rem, 0.8rem + 0.6vw, 1.25rem); }
.intro-skip { position: absolute; top: clamp(1rem, 3vw, 2rem); right: clamp(1rem, 3vw, 2rem); min-height: 2.75rem; padding: 0.5rem 1.1rem; border: 2px solid rgba(255, 255, 255, 0.7); border-radius: 999px; background: rgba(0, 0, 0, 0.35); color: #fff; font: 700 0.95rem var(--text); cursor: pointer; }
.intro-skip:hover { background: rgba(255, 255, 255, 0.18); }

/* Oberster Hinweisstreifen: schlicht, weiß, führt zum Abschnitt über den Verein */
/* both top bars stay in place while scrolling; jump links stop below them */
.masthead { position: sticky; top: 0; z-index: 50; }
html { scroll-padding-top: var(--masthead-h, 7.5rem); }
.official-bar { display: block; padding: 0.45rem 1.25rem; background: #fff; color: var(--noche); font-size: 0.85rem; font-weight: 700; text-align: center; text-decoration: none; border-bottom: 1px solid var(--linea); }
.official-bar:hover { text-decoration: underline; text-underline-offset: 0.25em; }

/* Kopf: Magenta-Leiste, Logo im weißen Kasten, der etwas nach unten übersteht */
.top { position: relative; z-index: 5; display: flex; align-items: center; gap: 1.5rem; padding: 0.55rem max(1.25rem, calc((100% - var(--wrap)) / 2)); background: var(--buganvilla); color: #fff; }
.brand { display: flex; align-items: center; gap: 0.7rem; margin: -0.55rem auto -1.4rem 0; padding: 0.7rem 1.1rem 0.7rem 0.8rem; background: #fff; color: #111; text-decoration: none; box-shadow: 0 4px 14px rgba(23, 11, 77, 0.22); }
.brand img { width: 52px; height: 52px; border-radius: 50%; }
.brand-name { font-family: var(--display); font-weight: 700; font-size: 0.95rem; line-height: 1.15; color: #111; }
.brand-name span { display: block; color: var(--buganvilla); text-transform: uppercase; font-weight: 800; }
.main-nav { display: flex; gap: 1.5rem; font-weight: 700; font-size: 0.95rem; }
.main-nav a { text-decoration: none; padding: 0.4rem 0; border-bottom: 2px solid transparent; }
.main-nav a:hover { border-bottom-color: #fff; }
.lang { display: flex; gap: 0.25rem; padding: 0.25rem; background: rgba(255, 255, 255, 0.16); border-radius: 999px; }
.lang a { min-width: 2.75rem; padding: 0.45rem 0.6rem; border-radius: 999px; text-align: center; text-decoration: none; font-weight: 700; font-size: 0.9rem; }
.lang a:hover { background: rgba(255, 255, 255, 0.22); }
.lang a[aria-current] { background: #fff; color: var(--buganvilla); }

/* Hero: das Netz trägt den Slogan, der Ball fliegt einmal darüber */
.hero { background: var(--noche); color: #fff; overflow: hidden; }
.hero-text { padding: clamp(2.5rem, 5vw, 3.75rem) 0 clamp(5.5rem, 9vw, 7rem); }
.hero h1 { font-size: clamp(2rem, 0.9rem + 4.8vw, 4.5rem); font-weight: 800; letter-spacing: -0.03em; max-width: 14ch; }
.hero-lead { font-size: clamp(1.1rem, 1rem + 0.6vw, 1.4rem); max-width: 34ch; margin: 1.5rem 0 2rem; color: #e9e4ff; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem; margin: 0; max-width: none; }

.hero { position: relative; }
.court { position: relative; }
.tape { background: #fff; color: var(--noche); font-family: var(--display); font-weight: 700; font-size: clamp(0.95rem, 0.7rem + 1vw, 1.35rem); white-space: nowrap; overflow: hidden; }
.tape-track { display: flex; width: max-content; padding: 0.7rem 0; animation: tape-run 60s linear infinite; }
.tape-track span { flex: none; padding: 0 1.5rem; }
.tape-track span:nth-child(even) { color: var(--buganvilla); }
.tape.dip { animation: tape-dip 0.4s ease-out; }
@keyframes tape-run { to { transform: translateX(-50%); } }
@keyframes tape-dip { 30% { transform: translateY(6px); } 60% { transform: translateY(-2px); } }
.mesh { height: clamp(70px, 9vw, 120px);
  background-image: linear-gradient(rgba(255, 255, 255, 0.5) 2px, transparent 2px), linear-gradient(90deg, rgba(255, 255, 255, 0.5) 2px, transparent 2px);
  background-size: 34px 34px;
  -webkit-mask-image: linear-gradient(#000 30%, transparent); mask-image: linear-gradient(#000 30%, transparent); }

/* Der Ball. Ohne JavaScript liegt er still über dem Netz, mit JavaScript übernimmt ball.js. */
.ball-x { position: absolute; left: 0; bottom: 100%; width: 100%; height: 0; transform: translateX(72%); pointer-events: none; }
.ball-y { width: max-content; transform: translateY(calc(-100% - 1rem)); }
.ball { width: clamp(3.4rem, 6vw, 5.2rem); aspect-ratio: 1; border-radius: 50%;
  background: conic-gradient(from 20deg, var(--sol) 0 60deg, #fff 60deg 120deg, var(--buganvilla) 120deg 180deg, #fff 180deg 240deg, var(--mar) 240deg 300deg, #fff 300deg 360deg);
  box-shadow: inset -0.5rem -0.6rem 0 rgba(23, 11, 77, 0.14); }
.has-play .ball { position: absolute; left: 0; top: 0; z-index: 2; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; will-change: transform; }
.has-play .ball.is-held { cursor: grabbing; }
.ball-score { display: none; }
/* Der Hinweis "Spiel mit dem Ball" sitzt direkt über dem Ball; ball.js setzt die Stelle, sobald er liegt */
.has-play .ball-score { display: block; position: absolute; left: 0; top: 0; margin: 0; max-width: none; white-space: nowrap; font-weight: 700; font-size: 0.95rem; color: #fff; pointer-events: none; opacity: 0; transition: opacity 0.4s; }
.has-play .ball-score.is-placed { opacity: 1; }
.has-play .ball-score::after { content: " ↓"; color: var(--sol); }
.has-play .ball-score.is-counting::after { content: ""; }
.has-play .ball-score.is-counting { color: var(--sol); font-family: var(--display); font-size: 1.1rem; }

.h1-word { display: inline-block; white-space: nowrap; }
.h1-letter { display: inline-block; will-change: transform; }

/* Mini-Spiel: ohne JavaScript unsichtbar */
.play { display: none; background: var(--noche); color: #fff; padding: clamp(3.5rem, 7vw, 6rem) 0; }
.play.is-ready { display: block; }
.play .section-lead { color: #e9e4ff; margin-bottom: 1.75rem; }
.game { position: relative; border-radius: 1.5rem; overflow: hidden; border: 3px solid rgba(255, 255, 255, 0.9); }
.game-canvas { display: block; width: 100%; aspect-ratio: 16 / 8; max-height: 32rem; touch-action: pan-y; cursor: pointer; }
.game-canvas:focus-visible { outline-offset: -6px; }
.game-overlay { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(28, 15, 122, 0.45); }
.game-overlay[hidden] { display: none; }
.game-start { min-width: 11rem; font-size: 1.2rem; min-height: 3.75rem; box-shadow: 0 0 0 0.5rem rgba(255, 210, 31, 0.25); }
.game-msg { min-height: 1.7em; margin: 1rem 0 0; font-weight: 700; color: var(--sol); }

/* Sprachwechsel als weicher Übergang; Bilder, Punkte und Ziffern kommen beim Scrollen ins Bild (nur wo der Browser es kann) */
@view-transition { navigation: auto; }
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .photo img { animation: photo-in linear both; animation-timeline: view(); animation-range: entry 0% cover 38%; }
    .photo:nth-child(2) img { animation-range: entry 8% cover 44%; }
    .photo:nth-child(3) img { animation-range: entry 16% cover 50%; }
    .dots i.on { animation: dot-in linear both; animation-timeline: view(); animation-range: entry 40% cover 45%; }
    .steps li::before { animation: step-in linear both; animation-timeline: view(); animation-range: entry 10% cover 35%; }
    .team-logo { animation: logo-turn linear both; animation-timeline: view(); animation-range: entry 0% exit 100%; }
  }
}
@keyframes photo-in { from { scale: 1.35; clip-path: inset(18% 12% round 1.25rem); opacity: 0.4; } to { scale: 1; clip-path: inset(0 round 0); opacity: 1; } }
@keyframes dot-in { from { scale: 0; } to { scale: 1; } }
@keyframes step-in { from { translate: 0 1.5rem; opacity: 0; } to { translate: 0 0; opacity: 1; } }
@keyframes logo-turn { from { rotate: -40deg; } to { rotate: 40deg; } }

/* Knöpfe und Links */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 3.25rem; padding: 0.8rem 1.6rem; border: 0; border-radius: 999px; font: 700 1.05rem var(--text); text-decoration: none; cursor: pointer; transition: transform 0.15s; }
.btn:hover { transform: translateY(-2px); }
.btn-sun { background: var(--sol); color: var(--tinta); }
.btn-magenta { background: var(--buganvilla); color: #fff; }
.text-link { font-weight: 700; text-underline-offset: 0.3em; }
.text-link.on-dark { color: #fff; }

/* Abschnitte */
.block { padding: clamp(3.5rem, 7vw, 6.5rem) 0; }
.tinted { background: var(--bruma); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.big { font-size: clamp(1.2rem, 1rem + 0.9vw, 1.6rem); line-height: 1.45; max-width: 30ch; }
.section-lead { font-size: 1.15rem; margin-bottom: 2.5rem; }

.points, .facts, .contact-list, .slots, .steps { list-style: none; margin: 0; padding: 0; }
.points li, .facts li { padding: 1.1rem 0; border-top: 2px solid var(--linea); }
.points li:last-child, .facts li:last-child { border-bottom: 2px solid var(--linea); }
.points strong { color: var(--buganvilla); }

.photos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-top: clamp(2.5rem, 5vw, 4rem); }
.photo { margin: 0; aspect-ratio: 4 / 5; border-radius: 1.25rem; overflow: hidden; background: var(--bruma); }
.photo img { width: 100%; height: 100%; object-fit: cover; }
/* Platzhalter, bis neue Vereinsfotos da sind */
.photo-soon { display: grid; place-items: end start; padding: 1rem 1.1rem; border: 2px dashed #b9b0e3;
  background: url("img/ball.svg") center 42% / 34% no-repeat, linear-gradient(160deg, #f3f1fb, #e6e1f7); }
.photo-soon span { font-size: 0.9rem; font-weight: 700; color: #5b4f96; }

/* Training: nur Tage und Orte, ohne Uhrzeiten */
.slots { max-width: 52rem; }
.slots li { display: grid; grid-template-columns: minmax(8rem, 14rem) minmax(0, 1fr); gap: 1.25rem; align-items: baseline; padding: 1.25rem 0; border-top: 2px solid var(--tinta); }
.slots li:last-child { border-bottom: 2px solid var(--tinta); }
.slot-day { font-family: var(--display); font-weight: 700; font-size: clamp(1.15rem, 0.9rem + 1.2vw, 1.8rem); color: var(--buganvilla); overflow-wrap: anywhere; }
.slot-place { font-weight: 600; font-size: 1.1rem; }
.train-actions { margin-top: 2rem; }
.play-after { margin: 1.5rem 0 0; font-size: 1.15rem; color: #e9e4ff; max-width: 60ch; }

/* Verein: offizieller Status, Ziele, Werte */
.club h2 { max-width: 26ch; margin-bottom: 2rem; }
.club-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.club h3 { font-size: 1.15rem; margin: 2rem 0 0.75rem; color: var(--buganvilla); }
.club-cols > div > h3:first-child { margin-top: 0; }
.club .big { max-width: none; }
.meet { margin-top: 2rem; padding: 1.5rem; background: #fff; border-radius: 1.25rem; }
.meet h3 { margin-top: 0; color: var(--tinta); }

/* Sponsoren */
.sponsors { list-style: none; margin: 0 0 1.5rem; padding: 0; display: grid; gap: 1rem; }
.sponsor { display: flex; flex-direction: column; gap: 0.25rem; padding: 1.25rem 1.5rem; border: 2px solid var(--linea); border-radius: 1.25rem; text-decoration: none; transition: border-color 0.15s; }
.sponsor:hover { border-color: var(--buganvilla); }
.sponsor-name { font-family: var(--display); font-weight: 800; font-size: 1.6rem; color: var(--tinta); }
.sponsor-logo { display: block; width: 15rem; max-width: 100%; height: auto; margin-bottom: 0.5rem; }
.sponsor-role { font-size: 0.95rem; color: #5b4f96; }
.sponsor-ask { margin-bottom: 1.25rem; }

/* Schritte: echte Reihenfolge, deshalb nummeriert */
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.5rem, 3vw, 3rem); margin: 2rem 0 2.5rem; }
.steps li { counter-increment: step; padding-top: 1.25rem; border-top: 2px solid var(--tinta); }
.steps li::before { content: counter(step); display: block; font-family: var(--display); font-weight: 800; font-size: 2.6rem; line-height: 1; color: var(--mar); margin-bottom: 0.75rem; }
.steps h3 { margin-bottom: 0.5rem; }
.steps p { margin: 0; }
.join-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin: 0; max-width: none; }
.placeholder-note { font-size: 0.9rem; font-weight: 600; color: #5b4f96; }
.placeholder-note.on-dark { color: var(--sol); }

/* Mitgliedsantrag */
.fee { font-weight: 800; }
.form { display: grid; gap: 1rem; padding: clamp(1.25rem, 3vw, 2rem); background: #fff; border-radius: 1.25rem; }
.form label { display: grid; gap: 0.35rem; font-weight: 700; font-size: 0.95rem; }
.form input:not([type="checkbox"]), .form select { width: 100%; min-height: 3rem; padding: 0.6rem 0.8rem; font: 500 1rem var(--text); color: var(--tinta); background: #fff; border: 2px solid var(--linea); border-radius: 0.6rem; }
.form input:focus-visible, .form select:focus-visible { outline: 3px solid var(--mar); outline-offset: 0; border-color: var(--mar); }
.form .check { grid-template-columns: auto 1fr; gap: 0.75rem; align-items: start; font-weight: 500; }
.form .check input { width: 1.4rem; height: 1.4rem; margin: 0.15rem 0 0; accent-color: var(--buganvilla); }
.form .btn { justify-self: start; }
.form-msg { margin: 0; font-weight: 700; color: var(--buganvilla); min-height: 1.5em; }

/* Wettkampf-Team */
.team { background: var(--buganvilla); color: #fff; padding: clamp(3rem, 6vw, 5rem) 0; }
.team-inner { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: center; }
.team-logo { width: clamp(7rem, 16vw, 12rem); aspect-ratio: 1; display: grid; place-items: center; border: 3px dashed rgba(255, 255, 255, 0.7); border-radius: 50%; font-family: var(--display); font-weight: 700; }
.team p { font-size: 1.15rem; }
.team p:last-child { margin: 0; font-size: 0.9rem; }

/* Verein */
.fact-logo { display: flex; align-items: center; gap: 1rem; }
.fact-logo img { width: 64px; height: 64px; flex: none; }

/* Fuß */
.foot { background: var(--noche); color: #fff; padding: clamp(3rem, 6vw, 5rem) 0 2rem; }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); }
.contact-list li { display: grid; grid-template-columns: 7rem 1fr; gap: 1rem; padding: 0.9rem 0; border-top: 1px solid rgba(255, 255, 255, 0.25); font-weight: 700; overflow-wrap: anywhere; }
.contact-list span { font-weight: 500; color: #cfc8f5; }
.foot-end { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid rgba(255, 255, 255, 0.25); font-size: 0.9rem; color: #cfc8f5; }
.foot-end p { max-width: none; margin-bottom: 0.4rem; }
.foot-end a { margin-right: 1.25rem; }

/* Schmale Bildschirme */
@media (max-width: 60rem) {
  .top { flex-wrap: wrap; row-gap: 0.75rem; }
  .brand { margin-bottom: 0; }
  .main-nav { order: 3; width: 100%; gap: 1.25rem; overflow-x: auto; white-space: nowrap; font-size: 0.9rem; scrollbar-width: none; }
  .main-nav::-webkit-scrollbar { display: none; }
}
@media (max-width: 30rem) {
  .top { gap: 0.75rem; }
  .brand { gap: 0.5rem; padding: 0.5rem 0.7rem 0.5rem 0.55rem; }
  .brand img { width: 38px !important; height: 38px !important; }
  .brand-name { font-size: 0.72rem !important; }
  .lang a { min-width: 2.2rem !important; padding: 0.4rem 0.3rem !important; font-size: 0.8rem; }
}
@media (max-width: 46rem) {
  .game-canvas { aspect-ratio: 4 / 3; }
  .split, .club-cols, .foot-grid, .steps { grid-template-columns: minmax(0, 1fr); }
  .photos { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .photos .photo:first-child { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
  .slots li { grid-template-columns: minmax(0, 1fr); gap: 0.25rem; }
  .brand-name { font-size: 0.8rem; }
  .brand img { width: 44px; height: 44px; }
  .lang a { min-width: 2.5rem; padding: 0.45rem 0.4rem; }
  .form .btn, .join-actions .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tape-track, .tape.dip { animation: none; }
  .btn { transition: none; }
}
