/* Schnupper-Pass Heidelberg – mobile first, Systemschriften, keine externen Quellen */
/* Farben nach dem Flyer: Weiß, Schwarz, Dunkelrot, Global-Shapers-Blau */
:root {
  --bg: #ffffff;
  --bg-alt: #f6f3f0;
  --surface: #ffffff;
  --text: #121212;
  --muted: #5a5a5a;
  --line: #d9d4d0;
  --primary: #C61826;
  --primary-dark: #A3121E;
  --on-primary: #ffffff;
  --accent: #1f5fae;
  --ink: #1b1b1b;
  --sport: #e3ecf8;
  --sport-text: #1f5fae;
  --kultur: #fbe4e6;
  --kultur-text: #C61826;
  --ok: #efefef;
  --ok-text: #2b2b2b;
  --example: #fdebc8;
  --example-text: #7a4a00;
  --radius: 10px;
  --gutter: 16px;
  --focus: 3px solid #1f5fae;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: "Avenir Next", Avenir, "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
}
img { max-width: 100%; display: block; }
a { color: var(--primary); text-underline-offset: 0.15em; }
a:hover { color: var(--primary-dark); }
:focus-visible { outline: var(--focus); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5em; letter-spacing: -0.015em; font-weight: 650; }
h1 { font-size: clamp(1.9rem, 6vw, 2.8rem); }
h2 { font-size: clamp(1.4rem, 4.5vw, 1.9rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.wrap { width: 100%; max-width: 64rem; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }

.skip-link {
  position: absolute; left: var(--gutter); top: -100px;
  background: var(--primary); color: var(--on-primary); padding: 0.5em 1em; border-radius: var(--radius); z-index: 10;
}
.skip-link:focus { top: 8px; }

/* Header */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: 0.6rem; padding-bottom: 0.6rem; }
.brand { display: flex; align-items: center; gap: 0.6rem; color: var(--text); text-decoration: none; font-weight: 700; }
.brand img { width: 50px; height: 32px; flex: none; }
.lang-switch {
  flex: none; border: 1px solid var(--line); border-radius: 999px; padding: 0.3em 0.9em;
  text-decoration: none; font-weight: 600; min-height: 44px; display: inline-flex; align-items: center;
}
.site-nav { display: flex; gap: 0.25rem 1.1rem; overflow-x: auto; padding-bottom: 0.6rem; scrollbar-width: none; }
.site-nav a { white-space: nowrap; text-decoration: none; font-weight: 600; padding: 0.35em 0; min-height: 44px; display: inline-flex; align-items: center; }

/* Hero */
.hero { padding: 2.2rem 0 2.4rem; background: linear-gradient(180deg, var(--bg-alt), var(--bg)); }
.kicker { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.85rem; font-weight: 700; color: var(--primary); margin-bottom: 0.4rem; }
.lead { font-size: 1.15rem; max-width: 40rem; }
.validity { font-size: 1.1rem; padding: 0.7em 1em; border-left: 5px solid var(--primary); background: var(--surface); border-radius: 0 var(--radius) var(--radius) 0; display: inline-block; }

.button {
  display: inline-block; background: var(--primary); color: var(--on-primary); text-decoration: none;
  font-weight: 700; padding: 0.8em 1.4em; border-radius: 999px; min-height: 44px; border: 0; font: inherit; cursor: pointer;
}
.button:hover { background: var(--primary-dark); color: var(--on-primary); }
.link-button { background: none; border: 0; padding: 0.4em 0; color: var(--primary); font: inherit; text-decoration: underline; cursor: pointer; min-height: 44px; }

/* Sections */
.section { padding: 2.4rem 0; }
.section-alt { background: var(--bg-alt); }
.steps { list-style: none; padding: 0; margin: 0; counter-reset: step; display: grid; gap: 1rem; }
.steps li { position: relative; padding-left: 3.2rem; counter-increment: step; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  width: 2.4rem; height: 2.4rem; border-radius: 50%; background: var(--primary); color: var(--on-primary);
  display: grid; place-items: center; font-weight: 700;
}
.steps li p:last-child { margin-bottom: 0; }
.steps-plain li::before { background: var(--surface); color: var(--text); border: 2px solid var(--primary); }
@media (min-width: 720px) { .steps:not(.steps-plain) { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; } }

.notice { background: var(--example); color: var(--example-text); border-radius: var(--radius); padding: 0.8em 1em; }

/* Karten */
.cards { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; }
.card[hidden] { display: none; }
.card h3 { margin-bottom: 0.4rem; }
.badges { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.6rem; }
.badge { font-size: 0.8rem; font-weight: 600; padding: 0.15em 0.6em; border-radius: 999px; background: var(--ok); color: var(--ok-text); }
.badge-sport { background: var(--sport); color: var(--sport-text); }
.badge-kultur { background: var(--kultur); color: var(--kultur-text); }
.badge-sozial { background: #ede7f6; color: #5b3f85; }
.badge-freizeit { background: #f7ecd9; color: #8a5612; }
.badge-example { background: var(--example); color: var(--example-text); }
.sparte { font-weight: 600; margin-bottom: 0.6rem; }
.card dl { margin: 0; display: grid; gap: 0.15rem 0.6rem; }
.card dt { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin-top: 0.5rem; }
.card dd { margin: 0; overflow-wrap: anywhere; }
.empty { padding: 1rem; background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); }

/* FAQ */
.faq { border-top: 1px solid var(--line); }
.faq:last-of-type { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 600; padding: 0.9em 0; }
.faq p { margin: 0 0 1em; }

/* Text-Seiten */
.prose { max-width: 44rem; }
.prose section { margin-bottom: 2rem; }
.todo { background: var(--example); color: var(--example-text); padding: 0.6em 0.9em; border-radius: var(--radius); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 1.6rem 0 2.2rem; font-size: 0.95rem; }
.site-footer p { margin-bottom: 0.4em; }

/* ---------- Wabenraster ---------- */
body.hex-page { background: var(--bg); }
/* Das Muster liegt auf der ganzen Seitenbreite und ist so verschoben, dass es exakt unter dem zentrierten Raster liegt */
.board {
  --hex-w: min(176px, calc((100vw - 40px) * 2 / var(--hex-n)));
  --hex-h: calc(var(--hex-w) * 1.1547);
  --board-top: calc(var(--hex-w) * .14 + 14px);
  padding: env(safe-area-inset-top, 0px) 0 env(safe-area-inset-bottom, 0px); min-height: 100vh; min-height: 100dvh; display: flex; justify-content: center;
  background-size: var(--hex-w) auto; background-repeat: repeat;
  background-position: calc(50% + var(--hex-w) * (0.5 - var(--hex-n) / 4)) calc(env(safe-area-inset-top, 0px) + var(--board-top));
}
:root { --hex-w: 140px; --accent: #C61826; --line-soft: #ddd8d2; }

/* Hintergrundmuster: leere Waben, exakt in der Geometrie des Rasters (Kachel = 1 Wabe breit, 1,5 Waben hoch) */
.honeycomb {
  position: relative; display: grid; grid-auto-rows: calc(var(--hex-h) / 4); grid-auto-flow: dense;
  width: calc(var(--hex-w) * var(--hex-n) / 2); min-height: calc(100vh - 36px);
  padding-top: var(--board-top); padding-bottom: calc(var(--hex-h) * 1.5);
}

/* Eine Wabe */
.hex {
  position: relative; display: block; text-decoration: none; color: var(--text); z-index: 1;
  transform: translateY(0) scale(1); transition: transform .45s cubic-bezier(.22, 1, .36, 1), color .35s ease, opacity .4s ease;
  -webkit-tap-highlight-color: transparent; outline: none;
}
.hex-shape { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; display: block; }
.hex-shape polygon { transform-box: fill-box; transform-origin: center; }
.hex-fill { fill: #fff; stroke: #cfc9c2; stroke-width: 1.2; transform: scale(.94); transition: fill .35s ease, stroke .35s ease; }
.hex-shadow { fill: #1b1b1b; opacity: 0; transform: translateY(4px) scale(.9); filter: blur(7px); transition: opacity .45s ease, transform .45s cubic-bezier(.22, 1, .36, 1); }
.hex-glow { fill: var(--accent); opacity: 0; transform: scale(.94); filter: blur(10px); transition: opacity .45s ease; }
.hex-glow { mix-blend-mode: multiply; }
.hex-light {
  fill: none; stroke: var(--accent); stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; transform: scale(.94);
  stroke-dasharray: 346.4; stroke-dashoffset: 346.4; opacity: 0;
  transition: stroke-dashoffset .75s cubic-bezier(.2, .7, .2, 1), opacity .25s ease;
}
.hex-body {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 76%; text-align: center;
  display: flex; flex-direction: column; align-items: center; pointer-events: none;
}
/* Fester Platz für Icon oder Ziffer, damit Titel in allen Waben auf gleicher Höhe sitzen */
.hex-glyph { display: flex; align-items: center; justify-content: center; height: calc(var(--hex-w) * .22); margin-bottom: calc(var(--hex-w) * .035); }
.hex-icon { width: calc(var(--hex-w) * .19); height: calc(var(--hex-w) * .19); color: var(--accent); transition: transform .45s cubic-bezier(.22, 1, .36, 1), color .3s ease; }
.hex-logo { width: calc(var(--hex-w) * .36); height: calc(var(--hex-w) * .23); display: block; }
.hex-start { --logo-a: #fff; --logo-b: #C61826; }
.hex-big { font-size: calc(var(--hex-w) * .24); line-height: 1; font-weight: 600; letter-spacing: -.02em; color: var(--accent); transition: transform .45s cubic-bezier(.22, 1, .36, 1); }
.hex-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: calc(var(--hex-w) * .095); line-height: 1.2; font-weight: 600; letter-spacing: -.005em; hyphens: auto; -webkit-hyphens: auto; overflow-wrap: break-word; }
.hex-sub { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: calc(var(--hex-w) * .066); line-height: 1.3; color: var(--muted); font-weight: 400; margin-top: calc(var(--hex-w) * .025); overflow-wrap: break-word; }

/* Vereinsfelder: Titel immer zwei Zeilen (beim Build ausgewogen getrennt), eine Zeile Untertitel, feste Höhen */
.hex-club .hex-glyph { margin-bottom: calc(var(--hex-w) * .03); }
.hex-club .hex-title {
  display: flex; align-items: center; justify-content: center; width: 100%;
  height: calc(var(--hex-w) * .08 * 1.25 * 2); font-size: calc(var(--hex-w) * .08); line-height: 1.25;
}
.hex-club .hex-sub {
  display: block; width: 100%; height: calc(var(--hex-w) * .066 * 1.3); margin-top: calc(var(--hex-w) * .02);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Anheben und Leuchten */
.hex.lit, .hex:focus-visible { z-index: 3; transform: translateY(calc(var(--hex-w) * -.07)) scale(1.045); }
.hex.lit .hex-fill, .hex:focus-visible .hex-fill { fill: #fffdfb; stroke: var(--accent); }
.hex.lit .hex-shadow, .hex:focus-visible .hex-shadow { opacity: .22; transform: translateY(calc(var(--hex-w) * .1)) scale(.98); }
.hex.lit .hex-glow, .hex:focus-visible .hex-glow { opacity: .09; }
.hex.lit .hex-light, .hex:focus-visible .hex-light { stroke-dashoffset: 0; opacity: 1; filter: drop-shadow(0 0 2px var(--accent)) drop-shadow(0 0 8px color-mix(in srgb, var(--accent) 55%, transparent)); }
.hex.lit .hex-icon, .hex:focus-visible .hex-icon, .hex.lit .hex-big, .hex:focus-visible .hex-big { transform: translateY(-3px) scale(1.08); }
@media (hover: hover) {
  .hex:hover { z-index: 3; transform: translateY(calc(var(--hex-w) * -.07)) scale(1.045); }
  .hex:hover .hex-fill { fill: #fffdfb; stroke: var(--accent); }
  .hex:hover .hex-shadow { opacity: .22; transform: translateY(calc(var(--hex-w) * .1)) scale(.98); }
  .hex:hover .hex-glow { opacity: .09; }
  .hex:hover .hex-light { stroke-dashoffset: 0; opacity: 1; filter: drop-shadow(0 0 2px var(--accent)) drop-shadow(0 0 8px color-mix(in srgb, var(--accent) 55%, transparent)); }
  .hex:hover .hex-icon, .hex:hover .hex-big { transform: translateY(-3px) scale(1.08); }
}
.hex:active { transform: translateY(calc(var(--hex-w) * -.03)) scale(1.02); transition-duration: .15s; }

/* Varianten */
.hex-start { --accent: #ffffff; color: #fff; }
.hex-start .hex-fill { fill: #C61826; stroke: #A3121E; }
.hex-start .hex-sub { color: rgba(255, 255, 255, .8); }
.hex-start .hex-icon { color: #fff; }
.hex-start.lit .hex-fill, .hex-start:hover .hex-fill, .hex-start:focus-visible .hex-fill { fill: #D42633; stroke: #fff; }
.hex-start .hex-glow { fill: #C61826; }
.hex-sport { --accent: #1f5fae; }
.hex-kultur { --accent: #C61826; }
.hex-sozial { --accent: #6a4c93; }
.hex-freizeit { --accent: #b8741a; }
.hex-station { --accent: #1b1b1b; }
.hex-station .hex-icon, .hex-station .hex-big { color: #1b1b1b; }
.hex-legal .hex-fill, .hex-admin .hex-fill { fill: #f6f3f0; }
.hex-admin { --accent: #8a8580; color: #5a5a5a; }
.hex-admin .hex-icon { color: #8a8580; }
.hex-admin.lit, .hex-admin:hover, .hex-admin:focus-visible { --accent: #1b1b1b; color: #1b1b1b; }
.hex-admin.lit .hex-icon, .hex-admin:hover .hex-icon, .hex-admin:focus-visible .hex-icon { color: #1b1b1b; }
.hex.gefiltert { opacity: .28; }
.hex-shape, .hex-body { transition: filter .4s ease; }
.hex.gefiltert .hex-shape, .hex.gefiltert .hex-body { filter: grayscale(1); }
/* Gestempelte Vereine: grün gefüllt, weiße Schrift, Untertitel „Gestempelt“ wird per JS gesetzt */
.hex.entdeckt { --accent: #ffffff; color: #fff; }
.hex.entdeckt .hex-fill { fill: #2e7d4f; stroke: #256a42; }
.hex.entdeckt .hex-icon { color: #fff; }
.hex.entdeckt .hex-sub { color: rgba(255, 255, 255, .85); }
.hex.entdeckt .hex-glow { fill: #2e7d4f; }
.hex.entdeckt.lit .hex-fill, .hex.entdeckt:hover .hex-fill, .hex.entdeckt:focus-visible .hex-fill { fill: #35904f; stroke: #fff; }
.hex.gefiltert.entdeckt { opacity: .4; }
@media (prefers-reduced-motion: reduce) {
  .hex, .hex-shape polygon, .hex-icon, .hex-big { transition-duration: .01s; }
}

/* Filter- und Sprach-Waben */
button.hex { background: none; border: 0; padding: 0; margin: 0; font: inherit; cursor: pointer; width: 100%; height: 100%; text-align: center; }
.hex-filter { --accent: #1b1b1b; }
.hex-filter .hex-fill { fill: #f6f3f0; stroke: #cfc9c2; }
.hex-filter .hex-sub { color: #8a8580; transition: color .35s ease; }
.hex-filter .hex-title { hyphens: none; -webkit-hyphens: none; overflow-wrap: normal; font-size: calc(var(--hex-w) * .08); -webkit-line-clamp: 1; }
.hex-filter .hex-sub { letter-spacing: .06em; text-transform: uppercase; font-size: calc(var(--hex-w) * .06); }
/* Aktiver Filter: alles außer den passenden Vereinen und dem aktiven Filter tritt zurück */
.honeycomb.filtering .hex:not(.hex-club):not([aria-pressed="true"]) { opacity: .28; }
.honeycomb.filtering .hex:not(.hex-club):not([aria-pressed="true"]) .hex-shape, .honeycomb.filtering .hex:not(.hex-club):not([aria-pressed="true"]) .hex-body { filter: grayscale(1); }
@media (hover: hover) { .honeycomb.filtering .hex:hover { opacity: 1; } .honeycomb.filtering .hex:hover .hex-shape, .honeycomb.filtering .hex:hover .hex-body { filter: none; } }
.hex-filter[aria-pressed="true"] .hex-fill { fill: #1b1b1b; stroke: #1b1b1b; }
.hex-filter[aria-pressed="true"] { color: #fff; }
.hex-filter[aria-pressed="true"] .hex-sub { color: rgba(255, 255, 255, .75); }
.hex-filter[aria-pressed="true"] .hex-glow { fill: #1b1b1b; }
.hex-lang { --accent: #1b1b1b; }
.hex-lang .hex-title { font-size: calc(var(--hex-w) * .17); letter-spacing: .02em; line-height: 1; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icon-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* Panels und Sheet: ruhig und klar */
.panel { display: none; }
.panels .panel[hidden] { display: none; }
.sheet { border: 1px solid var(--line-soft); border-bottom: 0; border-radius: 20px 20px 0 0; padding: 0; width: 100%; max-width: 100%; margin: auto 0 0; background: var(--surface); color: var(--text); max-height: 88vh; box-shadow: 0 -10px 40px rgba(20, 10, 10, .18); }
.sheet::backdrop { background: rgba(27, 27, 27, .45); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.sheet-inner { padding: 1.6rem 1.5rem 2rem; max-height: calc(88vh - 2px); overflow: auto; scrollbar-width: thin; }
.sheet-head { position: sticky; top: 0; display: flex; justify-content: flex-end; margin: -.8rem -.5rem .2rem 0; z-index: 1; }
.sheet-close { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line-soft); background: #fff; cursor: pointer; position: relative; transition: background .2s ease; }
.sheet-close:hover { background: var(--bg-alt); }
.sheet-close::before, .sheet-close::after { content: ""; position: absolute; left: 50%; top: 50%; width: 16px; height: 2px; background: var(--ink); border-radius: 2px; }
.sheet-close::before { transform: translate(-50%, -50%) rotate(45deg); }
.sheet-close::after { transform: translate(-50%, -50%) rotate(-45deg); }
.sheet-body .panel { display: block; }
.sheet-body h2, .sheet-body > .card > h3 { color: var(--primary); font-size: 1.5rem; margin: 0 0 .8rem; }
.sheet-body .panel section { margin: 1.4rem 0 0; }
.sheet-body .panel section h2 { font-size: 1.1rem; }
.sheet-body h3, .prose h3 { font-size: 1rem; margin: 1.2rem 0 .3rem; }
.sheet-body .panel section p, .prose section p { font-size: .95rem; line-height: 1.55; }
.sheet-body .card { border: 0; padding: 0; list-style: none; margin: 0; background: none; }
.sheet-body .cards .card { border: 1px solid var(--line-soft); border-radius: 14px; padding: .9rem 1rem; }
.sheet-body .cards .card h3 { color: var(--primary); }
.sheet-body .kicker { margin-top: 0; }
.sheet-body .faq { border: 1px solid var(--line-soft); border-radius: 12px; margin-bottom: .6rem; overflow: hidden; }
.sheet-body .faq:last-of-type { border-bottom: 1px solid var(--line-soft); }
.sheet-body .faq summary { display: flex; align-items: center; gap: .7em; padding: .85em 1em; list-style: none; cursor: pointer; font-weight: 600; }
.sheet-body .faq summary::-webkit-details-marker { display: none; }
.sheet-body .faq summary::before { content: ""; flex: none; width: .5em; height: .5em; border-right: 2px solid var(--primary); border-bottom: 2px solid var(--primary); transform: rotate(-45deg); transition: transform .25s ease; margin-top: -.1em; }
.sheet-body .faq[open] summary::before { transform: rotate(45deg); margin-top: -.25em; }
.sheet-body .faq summary:focus { outline: none; }
.sheet-body .faq summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 12px; }
.sheet-body .faq[open] summary { border-bottom: 1px solid var(--line-soft); }
.sheet-body .faq p { margin: 0; padding: .8em 1em 1em 2.2em; color: var(--text); }
.sheet-body dt { color: var(--primary); }
/* Panel „Dein Pass“: Stempelliste und Umfrage */
.stamps { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: .4rem; }
.stamps li { display: flex; align-items: baseline; gap: .6rem; padding: .55em .8em; border: 1px solid var(--line-soft); border-radius: 10px; }
.stamps li::before { content: "✓"; color: #2e7d4f; font-weight: 700; flex: none; }
.stamps li strong { flex: 1; font-weight: 600; }
.stamps li span { font-size: .9rem; white-space: nowrap; }
.survey { margin-top: 1.2rem; padding-top: .6rem; border-top: 1px solid var(--line-soft); }
.survey fieldset { border: 0; padding: 0; margin: 0 0 .9rem; min-width: 0; }
.survey legend { font-weight: 600; margin-bottom: .3rem; padding: 0; }
.choice { display: flex; align-items: center; gap: .55rem; padding: .3em 0; cursor: pointer; }
.choice input { width: 1.15rem; height: 1.15rem; margin: 0; accent-color: var(--primary); }
.survey-note { color: #2e7d4f; font-weight: 600; }
.small { font-size: .9rem; }
@media (min-width: 640px) {
  .sheet { max-width: 34rem; margin: auto; border-radius: 20px; border-bottom: 1px solid var(--line-soft); box-shadow: 0 30px 80px rgba(20, 10, 10, .3); }
}
