/* Segelclub Alsterufer e. V. – Farben des Vereinsstanders: Grün, Schwarz, Weiß */
:root {
  --bg: #ffffff;
  --fg: #000000;
  --muted: #4b4b4b;
  --band: #eef2ea;
  --hair: #c9cfc4;
  --green: #2f7a23;
  --green-hi: #5d9e39;
  --water: #cfdfec;
  --water-deep: #a9c6de;
  --red: #d1261c;
  --cond: "Avenir Next Condensed", "Bahnschrift", "Roboto Condensed", "sans-serif-condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
  --wrap: 66rem;
  --bar: 4rem;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --fg: #ffffff;
    --muted: #b9b9b9;
    --band: #121512;
    --hair: #3a3f37;
    --green-hi: #7ac74f;
    --water: #1c3850;
    --water-deep: #2a5475;
    --red: #ff5a4d;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 5rem; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 1.0625rem/1.55 var(--sans); padding-bottom: var(--bar); }
img, svg { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-line: underline; text-decoration-thickness: 2px; text-decoration-color: var(--green-hi); text-underline-offset: 0.2em; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 3px solid var(--green-hi); outline-offset: 3px; }
.skip { position: absolute; left: -999rem; top: 0; background: var(--bg); padding: 0.75rem 1rem; z-index: 20; }
.skip:focus { left: 0.5rem; top: 0.5rem; }

h1, h2 { font-family: var(--cond); font-stretch: condensed; font-weight: 800; text-transform: uppercase; line-height: 0.95; margin: 0; letter-spacing: 0; text-wrap: balance; }
h1 { font-size: clamp(3rem, 14vw, 6.5rem); }
h2 { font-size: clamp(2.1rem, 8vw, 3.4rem); }
h3 { font-size: 1.2rem; font-weight: 700; line-height: 1.2; margin: 0; }
p, ul, ol, dl, table, figure { margin: 0; }
p + p, p + ul, ul + p, p + ol, ol + p { margin-top: 0.9rem; }
.lead { font-size: clamp(1.15rem, 3.6vw, 1.4rem); line-height: 1.4; max-width: 32em; }
small, .small { font-size: 0.9rem; color: var(--muted); }
.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }

/* Kopf */
.top { position: sticky; top: 0; z-index: 10; background: var(--bg); border-bottom: 3px solid var(--fg); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 3.5rem; }
.brand { display: flex; align-items: center; gap: 0.55rem; text-decoration: none; font-family: var(--cond); font-stretch: condensed; font-weight: 800; font-size: 1.45rem; text-transform: uppercase; line-height: 1; }
.brand svg { width: 2rem; height: 2rem; flex: none; }
.brand span span { display: none; }
.topnav { display: none; }
.member { font-size: 0.95rem; font-weight: 600; white-space: nowrap; }

/* Untere Navigation (mobil) */
.tabs { position: fixed; inset: auto 0 0 0; z-index: 10; height: var(--bar); background: #000; display: grid; grid-template-columns: repeat(5, 1fr); }
.tabs a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.15rem; font-size: 0.72rem; font-weight: 600; text-decoration: none; color: #c4c4c4; border-top: 4px solid transparent; min-width: 0; }
.tabs svg { width: 1.45rem; height: 1.45rem; }
.tabs a[aria-current="page"] { color: #fff; border-top-color: #7ac74f; }
.tabs :focus-visible { outline-offset: -4px; }

/* Bänder über die volle Breite, Inhalt auf Satzbreite */
main > * { padding-inline: max(1.25rem, calc((100% - var(--wrap)) / 2)); padding-block: clamp(2.75rem, 8vw, 5rem); }
main > section:nth-of-type(even) { background: var(--band); }

.hero { background: var(--green); color: #fff; display: grid; gap: 2rem; }
.hero .lead { margin-top: 1.2rem; }
.hero :focus-visible { outline-color: #fff; }
.hero a { text-decoration-color: #fff; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.6rem; }
.btn { display: inline-flex; align-items: center; min-height: 3rem; padding: 0.6rem 1.3rem; font-weight: 700; text-decoration: none; border: 2px solid var(--fg); color: var(--fg); background: transparent; }
.btn.primary { background: var(--fg); color: var(--bg); }
.btn:hover { background: var(--green); border-color: var(--green); color: #fff; }
.hero .btn { border-color: #fff; color: #fff; }
.hero .btn.primary { background: #fff; color: #000; }
.hero .btn:hover { background: #000; border-color: #000; color: #fff; }

.head { display: grid; gap: 0.8rem; margin-bottom: 1.8rem; max-width: 40em; }
.prose { max-width: 40em; }
.prose h3 { margin-top: 2rem; margin-bottom: 0.5rem; }
.prose ul, .prose ol { padding-left: 1.2rem; }
.prose li + li { margin-top: 0.4rem; }
.prose li::marker { color: var(--green-hi); }
.cols { display: grid; gap: 2.5rem; }

/* Faktenzeilen */
.facts { display: grid; border-top: 3px solid var(--fg); }
.facts div { display: grid; grid-template-columns: minmax(8rem, 42%) 1fr; gap: 1rem; padding: 0.7rem 0; border-bottom: 1px solid var(--hair); }
.facts dt { color: var(--muted); hyphens: auto; overflow-wrap: anywhere; }
.facts dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.scroll + .facts { margin-top: 1.5rem; }
.facts + .prose, .scroll + .prose { margin-top: 1rem; }

/* Einstiege der Startseite: eine echte Abfolge, deshalb nummeriert */
.ways { counter-reset: w; border-bottom: 3px solid var(--fg); }
.ways a { counter-increment: w; display: grid; grid-template-columns: 2.6rem 1fr 4.5rem; gap: 1rem; align-items: center; padding: 1.4rem 0; border-top: 3px solid var(--fg); text-decoration: none; }
.ways a::before { content: counter(w); font-family: var(--cond); font-stretch: condensed; font-weight: 800; font-size: 3.4rem; line-height: 1; color: var(--green-hi); }
.ways svg { order: 3; width: 4.5rem; height: 4.5rem; }
.ways h3 { font-family: var(--cond); font-stretch: condensed; font-weight: 800; text-transform: uppercase; font-size: 1.7rem; line-height: 1; }
.ways a:hover h3 { text-decoration: underline; text-decoration-color: var(--green-hi); text-decoration-thickness: 3px; text-underline-offset: 0.15em; }
.ways p { margin-top: 0.4rem; font-size: 0.98rem; }

/* Boote */
.boat { display: grid; gap: 1.25rem; padding-block: 2rem; border-top: 3px solid var(--fg); }
.boat svg { width: 8.5rem; height: 8.5rem; }
.boat .prose h3 { margin-top: 0; font-family: var(--cond); font-stretch: condensed; font-weight: 800; text-transform: uppercase; font-size: 1.7rem; line-height: 1; }
.boat .facts { margin-top: 1.1rem; }
.boat + .note { margin-top: 1rem; }

/* Regeln und Schritte */
.steps { list-style: none; padding: 0; counter-reset: s; display: grid; border-top: 3px solid var(--fg); max-width: 44em; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 2.4rem 1fr; gap: 0.9rem; padding: 0.95rem 0; border-bottom: 1px solid var(--hair); }
.steps li::before { content: counter(s); width: 2rem; height: 2rem; background: var(--fg); color: var(--bg); font-family: var(--cond); font-stretch: condensed; font-weight: 800; font-size: 1.2rem; display: grid; place-items: center; }
.steps strong { display: block; }

/* Hinweis */
.note { background: var(--fg); color: var(--bg); padding: 1.1rem 1.25rem; max-width: 44em; }

/* Tabelle */
.scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; border-top: 3px solid var(--fg); }
caption { text-align: left; padding: 0 0 0.7rem; font-size: 0.9rem; color: var(--muted); }
th, td { padding: 0.65rem 0.6rem; text-align: right; border-bottom: 1px solid var(--hair); white-space: nowrap; }
th:first-child, td:first-child { text-align: left; padding-left: 0; }
th:last-child, td:last-child { padding-right: 0; }
thead th { font-size: 0.85rem; color: var(--muted); font-weight: 600; vertical-align: bottom; white-space: normal; }
tbody th { font-weight: 700; hyphens: auto; overflow-wrap: anywhere; }
tbody th small { display: block; font-weight: 400; }
@media (max-width: 30rem) {
  th, td { padding: 0.5rem 0.35rem; font-size: 0.85rem; }
  thead th { font-size: 0.75rem; }
}

/* Aufklapper */
details { border-bottom: 1px solid var(--hair); max-width: 44em; }
details:first-of-type { border-top: 3px solid var(--fg); }
summary { cursor: pointer; padding: 0.9rem 2rem 0.9rem 0; font-weight: 700; list-style: none; position: relative; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 0.2rem; top: 0.55rem; font-size: 1.6rem; font-weight: 400; color: var(--green-hi); }
details[open] summary::after { content: "–"; }
details > div { padding: 0 0 1.1rem; }

/* Karte und Zeichnungen */
.chart { background: var(--bg); color: var(--fg); padding: 0.75rem; max-width: 26rem; justify-self: center; width: 100%; }
.chart figcaption { font-size: 0.85rem; color: var(--muted); padding: 0.5rem 0.25rem 0; }
.chart > svg[viewBox="0 0 120 120"] { width: min(60%, 13rem); margin: 0.5rem auto; }
.c-deepest { fill: var(--water-deep); }
.c-mid { fill: none; stroke: var(--water); stroke-width: 64; stroke-linejoin: round; opacity: 0.6; }
.c-shallow { fill: none; stroke: var(--water); stroke-width: 26; stroke-linejoin: round; }
.c-shore { fill: none; stroke: var(--fg); stroke-width: 1.5; }
.c-label { font-family: var(--serif); font-style: italic; fill: var(--muted); font-size: 11px; }
.c-big { font-size: 15px; fill: var(--fg); letter-spacing: 0.04em; }
.c-buoy { fill: var(--red); stroke: var(--bg); stroke-width: 2; }
.c-num { font-family: var(--sans); font-size: 9px; font-weight: 800; fill: #fff; text-anchor: middle; }
.c-steg { fill: var(--fg); }
.c-course { fill: none; stroke: var(--fg); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1000; stroke-dashoffset: 1000; animation: course 5s 0.4s ease-in-out forwards; }
@keyframes course { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .c-course { animation: none; stroke-dashoffset: 0; } }
.d-line { fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.d-sail { fill: var(--bg); stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.d-hull { fill: currentColor; }
.d-yellow { fill: var(--green-hi); stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.d-wave { fill: none; stroke: var(--water-deep); stroke-width: 2; stroke-linecap: round; }

/* Eingebundenes Antragsformular */
.embed iframe { display: block; width: 100%; height: max(40rem, 85vh); border: 3px solid var(--fg); background: #fff; }
.embed + p { margin-top: 0.9rem; }

/* Fuß */
footer { background: #000; color: #fff; padding-block: 2.75rem; font-size: 0.95rem; }
footer .cols { gap: 1.75rem; }
footer h2 { font-size: 1.35rem; margin-bottom: 0.6rem; }
footer ul { list-style: none; padding: 0; display: grid; gap: 0.35rem; }
footer a { text-decoration-color: #7ac74f; }
footer .legal { margin-top: 2rem; color: #c4c4c4; }
.mail { overflow-wrap: anywhere; }

@media (min-width: 48rem) {
  body { padding-bottom: 0; font-size: 1.125rem; }
  .tabs { display: none; }
  .brand span span { display: inline; }
  .topnav { display: flex; gap: 1.6rem; }
  .topnav a { text-decoration: none; font-weight: 600; font-size: 1rem; padding-block: 0.3rem; border-bottom: 3px solid transparent; }
  .topnav a:hover, .topnav a[aria-current="page"] { border-bottom-color: var(--green-hi); }
  .hero { grid-template-columns: 1.25fr 0.75fr; align-items: center; gap: 3rem; }
  .cols { grid-template-columns: repeat(2, 1fr); gap: 3.5rem; }
  footer .cols { grid-template-columns: repeat(3, 1fr); }
  .ways a { grid-template-columns: 4.5rem 1fr 7rem; gap: 1.5rem; padding: 1.8rem 0; }
  .ways a::before { font-size: 5rem; }
  .ways svg { width: 7rem; height: 7rem; }
  .ways h3 { font-size: 2.3rem; }
  .ways p { font-size: 1.05rem; max-width: 36em; }
  .boat { grid-template-columns: 11rem 1fr; gap: 2.5rem; }
}
@media print {
  .top, .tabs, .actions { display: none; }
  body { padding: 0; }
  .hero { background: none; color: #000; }
}
