/* ============================================================
   Anbauvereinigung Frankfurt am Main e. V. — Einseitige Website
   Reines Schwarz/Weiß, kein Logo, kein Bild. Editorial-Stil mit
   Scroll-Leiste (§-Markierungen), da der Inhalt sich tatsächlich
   an Vereins- und Gesetzesparagrafen orientiert — die Nummerierung
   ist inhaltlich begründet, nicht dekorativ.

   Schriften: ausschließlich Open-Source-Schriften (SIL Open Font
   License), lokal als Dateien im Ordner /fonts eingebettet. Es
   werden keine Schriften von Google Fonts oder einem anderen
   externen Dienst nachgeladen — beim Seitenaufruf entsteht dadurch
   keine Verbindung zu Drittanbietern.
   - IBM Plex Serif  (Überschriften)   — IBM, OFL 1.1
   - Work Sans       (Fließtext)       — Wei Huang, OFL 1.1
   - IBM Plex Mono   (Labels/Nummern)  — IBM, OFL 1.1
   ============================================================ */

@font-face {
  font-family: "IBM Plex Serif";
  src: url("fonts/ibmplexserif-regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Serif";
  src: url("fonts/ibmplexserif-bold.woff") format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Work Sans";
  src: url("fonts/worksans-regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Work Sans";
  src: url("fonts/worksans-bold.woff") format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/ibmplexmono-regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/ibmplexmono-bold.woff") format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --black: #f5f5f5;
  --white: #0a0a0a;
  --gray: #a8a8a8;
  --gray-soft: #707070;
  --line: #f5f5f5;
  --line-soft: #2e2e2e;
  --serif: "IBM Plex Serif", "Georgia", serif;
  --sans: "Work Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", Menlo, monospace;
  --max: 46rem;
  --rail: 3.25rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--white);
  color: var(--black);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

a { color: inherit; }
:focus-visible { outline: 2px solid var(--black); outline-offset: 3px; }

.skip-link { position: absolute; left: -999px; top: auto; }
.skip-link:focus {
  left: 1rem; top: 1rem; background: var(--white);
  padding: 0.5rem 0.75rem; z-index: 50; border: 1px solid var(--black);
}

/* ---------- Scroll progress ---------- */

.progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  background: var(--black);
  z-index: 60;
  transition: width 0.08s linear;
}

/* ---------- Header (sticky) ---------- */

header.site-head {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(10,10,10,0.88);
  backdrop-filter: saturate(140%) blur(6px);
  border-bottom: 1px solid var(--line-soft);
}

.head-inner {
  max-width: 64rem;
  margin: 0 auto;
  padding: 1.15rem 1.5rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.wordmark {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.05rem;
  margin: 0;
  white-space: nowrap;
}
.wordmark .dot { color: var(--gray-soft); }

nav.site-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem;
  margin: 0;
  padding: 0;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
nav.site-nav a {
  text-decoration: none;
  padding-bottom: 3px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}
nav.site-nav a:hover,
nav.site-nav a.active { border-bottom-color: var(--black); }
nav.site-nav a.muted { color: var(--gray); }

/* ---------- Layout / rail ---------- */

.page {
  max-width: 64rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
}

.rail {
  position: sticky;
  top: 4.5rem;
  align-self: start;
  height: calc(100vh - 6rem);
  padding-top: 0.5rem;
  display: none;
}

.rail ol {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
  position: relative;
}
.rail ol::before {
  content: "";
  position: absolute;
  left: 5px; top: 6px; bottom: 6px;
  width: 1px;
  background: var(--line-soft);
}
.rail li a {
  display: flex; align-items: center; gap: 0.6rem;
  text-decoration: none;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--gray-soft);
  transition: color 0.25s var(--ease);
}
.rail li a::before {
  content: "";
  width: 11px; height: 11px;
  border-radius: 50%;
  border: 1px solid var(--gray-soft);
  background: var(--white);
  flex: none;
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.rail li a.active { color: var(--black); }
.rail li a.active::before {
  background: var(--black);
  border-color: var(--black);
  transform: scale(1.15);
}

.content { min-width: 0; padding: 0 1.5rem; }

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

.hero { padding: 6.5rem 0 5rem; border-bottom: 1px solid var(--line-soft); }
.hero .eyebrow {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gray);
  margin: 0 0 1.25rem;
}
.hero h1 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0 0 1.5rem;
  max-width: 22ch;
}
/* ---------- Sections (reveal on scroll) ---------- */

section.block {
  padding: 5rem 0;
  border-bottom: 1px solid var(--line-soft);
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
section.block.in-view { opacity: 1; transform: translateY(0); }
section.block:last-of-type { border-bottom: none; }

.block-head {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 2rem;
}
.block-head .num { font-family: var(--mono); font-size: 0.85rem; color: var(--gray-soft); }
.block-head h2 { font-family: var(--serif); font-size: 1.6rem; font-weight: 700; margin: 0; }
.block-sub { max-width: 40rem; color: var(--gray); font-size: 0.96rem; margin: -1rem 0 2rem; }

.prose { max-width: var(--max); }
.prose p {
  margin: 0 0 1.1rem;
  overflow-wrap: break-word;
  hyphens: auto;
}
.prose h3 { font-family: var(--serif); font-size: 1.05rem; font-weight: 700; margin: 2rem 0 0.75rem; }
.prose ul { padding-left: 1.2rem; margin: 0 0 1.1rem; }
.prose li { margin-bottom: 0.4rem; }

/* Aside / Hinweis, editorial Randnotiz-Stil */

.aside {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.25rem;
  border-top: 1px solid var(--black);
  border-bottom: 1px solid var(--black);
  padding: 1.4rem 0;
  margin: 2.25rem 0 0.5rem;
}
.aside .tag {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  color: var(--gray);
  padding-right: 0.25rem;
}
.aside p { margin: 0; font-size: 0.95rem; }
.aside p + p { margin-top: 0.6rem; }

/* ---------- FAQ ---------- */

.faq-list { max-width: var(--max); }
.faq-item { border-top: 1px solid var(--line-soft); }
.faq-item:last-child { border-bottom: 1px solid var(--line-soft); }

.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 1.2rem 0;
  display: grid;
  grid-template-columns: 2.2rem 1fr auto;
  align-items: baseline;
  gap: 0.3rem 1rem;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.05rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .num {
  font-family: var(--mono);
  font-weight: 400;
  color: var(--gray-soft);
  font-size: 0.82rem;
}
.faq-item summary .plus {
  font-family: var(--mono);
  font-weight: 400;
  font-size: 1.1rem;
  transition: transform 0.3s var(--ease);
}
.faq-item[open] summary .plus { transform: rotate(45deg); }

.faq-item .answer {
  padding: 0 0 1.4rem 3.2rem;
  font-size: 0.97rem;
  color: #d4d4d4;
  max-width: 36rem;
  overflow-wrap: break-word;
  hyphens: auto;
}

/* ---------- Formular / iframe ---------- */

.form-card { border: 1px solid var(--black); }
.form-card .form-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--black);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--gray);
}
.form-card .form-head .dotstatus { display: inline-flex; align-items: center; gap: 0.4rem; }
.form-card .form-head .dotstatus::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--black);
}

iframe.antrag {
  width: 100%;
  min-height: 620px;
  border: 0;
  display: block;
  transition: height 0.25s var(--ease);
}
.form-fallback { padding: 1.5rem; font-size: 0.92rem; color: var(--gray); }

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

footer.site-foot { padding: 2.5rem 0 4rem; }
footer.site-foot ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin: 0 0 1rem;
  padding: 0;
  font-family: var(--mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
footer.site-foot a { text-decoration: none; border-bottom: 1px solid var(--line-soft); }
footer.site-foot a:hover { border-bottom-color: var(--black); }
footer.site-foot p { font-size: 0.8rem; color: var(--gray-soft); margin: 0; }

/* ---------- Legal pages (Impressum / Datenschutz) ---------- */

body.legal .legal-wrap { max-width: 42rem; margin: 0 auto; padding: 4rem 1.5rem 5rem; }
body.legal p { overflow-wrap: break-word; hyphens: auto; }
body.legal h1 { font-family: var(--serif); font-size: 1.8rem; margin: 0 0 0.5rem; }
body.legal .stand { color: var(--gray); font-size: 0.85rem; margin-bottom: 2.5rem; }
body.legal h2 {
  font-family: var(--serif);
  font-size: 1.15rem;
  margin: 2.25rem 0 0.75rem;
  border-bottom: 1px solid var(--line-soft);
  padding-bottom: 0.4rem;
}
body.legal ul { padding-left: 1.3rem; }
body.legal li { margin-bottom: 0.4rem; }
.platzhalter { background: #262626; padding: 0 0.25em; }
.back-link {
  display: inline-flex; align-items: center; gap: 0.4rem;
  margin-bottom: 2rem; font-family: var(--mono); font-size: 0.8rem;
  text-decoration: none; text-transform: uppercase; letter-spacing: 0.04em;
}
.hinweis {
  border: 1px solid var(--black);
  padding: 1.1rem 1.3rem;
  font-size: 0.92rem;
  margin: 2rem 0;
}
.hinweis strong { display: block; margin-bottom: 0.35rem; }

/* ---------- Altersverifikation ---------- */

body.age-locked { overflow: hidden; }

.age-gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.age-gate[hidden] { display: none; }

.age-gate-box {
  max-width: 26rem;
  width: 100%;
  border: 1px solid var(--black);
  padding: 2.25rem 2rem;
  text-align: center;
}

.age-gate-eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gray);
  margin: 0 0 1.1rem;
}

.age-gate-box h2 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.4rem;
  line-height: 1.25;
  margin: 0 0 0.85rem;
}

.age-gate-box p {
  font-size: 0.92rem;
  color: var(--gray);
  margin: 0 0 1.6rem;
}

.age-gate-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

.age-gate-actions button {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.75rem 1.4rem;
  cursor: pointer;
  border: 1px solid var(--black);
  background: transparent;
  color: var(--black);
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.age-gate-actions button:hover { background: var(--black); color: var(--white); }

.age-gate-actions .age-no {
  color: var(--gray-soft);
  border-color: var(--line-soft);
}
.age-gate-actions .age-no:hover {
  background: var(--line-soft);
  color: var(--black);
}

/* ---------- Responsive ---------- */

@media (min-width: 56rem) {
  .rail { display: block; }
  .page { grid-template-columns: var(--rail) 1fr; }
}

@media (max-width: 40rem) {
  body { font-size: 16px; }
  .hero { padding: 4.5rem 0 3rem; }
  section.block { padding: 3.25rem 0; }
  .content { padding: 0 1.25rem; }
  .head-inner { padding: 1rem 1.25rem; }
  nav.site-nav ul { gap: 0.9rem 1rem; }
  nav.site-nav a { padding: 0.2rem 0; display: inline-block; }
  .faq-item .answer { padding-left: 0; }
  .faq-item summary { grid-template-columns: 1.8rem 1fr auto; padding: 1.1rem 0; }

  /* Formular-Iframe: gestapelte Felder brauchen auf schmalen Screens etwas
     mehr Höhe, bis die dynamische Anpassung per postMessage greift */
  iframe.antrag { min-height: 760px; }

  body.legal .legal-wrap { padding: 3rem 1.25rem 4rem; }
  body.legal h1 { font-size: 1.5rem; }
  .back-link { margin-bottom: 1.5rem; }
}

@media (max-width: 26rem) {
  .hero .eyebrow { font-size: 0.72rem; }
  .hero h1 { font-size: clamp(1.8rem, 9vw, 2.4rem); }
  .wordmark { font-size: 0.92rem; }
  nav.site-nav ul { font-size: 0.7rem; gap: 0.75rem 0.85rem; }
  iframe.antrag { min-height: 840px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  section.block { opacity: 1 !important; transform: none !important; transition: none !important; }
  .faq-item summary .plus { transition: none; }
}
