/* ==========================================================================
   PaiDei[n.a] — Vereins-Website
   Gemeinsames Stylesheet (index.html + statuten.html)

   Aufbau:
   1. Design-Tokens (Farben, Typo, Abstände)
   2. Reset & Basis
   3. Typografie
   4. Layout-Helfer (Container, Sections)
   5. Header
   6. Signature: gestapelte Quadrate (Logo-Motiv) + Animation
   7. Hero / "Im Aufbau"
   8. Mitglied-werden-Section (Formular)
   9. Buttons
   10. Statuten-Seite (TOC + Paragraphen)
   11. Footer
   12. Responsive
   13. Druck (Als PDF speichern)
   ========================================================================== */

/* 1. DESIGN-TOKENS ------------------------------------------------------- */
:root {
  /* Marke (direkt aus dem Logo abgeleitet) */
  --crimson:        #961829;
  --crimson-deep:   #7c1421;
  --ink:            #111110;
  --ink-soft:       #2a2825;

  /* Flächen */
  --paper:          white;   /* warmes, zurückhaltendes Off-White */
  --paper-card:     #ffffff;
  --paper-deep:     #ebe7e1;

  /* Linien & Text */
  --line:           #e2ddd6;
  --line-strong:    #d2ccc2;
  --muted:          #6b655d;

  /* Typografie */
  --font-display:  system-ui, sans-serif;   /* Headings, SemiBold 600 */
  --font-body:    system-ui, sans-serif;      /* Fließtext */

  /* Maße */
  --maxw:        1180px;
  --maxw-text:   720px;   /* angenehme Lesebreite für Statuten */
  --gutter:      clamp(20px, 5vw, 64px);
  --radius:      0px;     /* scharfe Ecken, wie die Logo-Quadrate */

  /* Rhythmus */
  --section-y:   clamp(64px, 11vw, 132px);
}

/* 2. RESET & BASIS ------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }

a { color: var(--crimson); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

::selection { background: var(--crimson); color: #fff; }

:focus-visible {
  outline: 2px solid var(--crimson);
  outline-offset: 3px;
}

/* 3. TYPOGRAFIE ---------------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;              /* Figtree SemiBold */
  line-height: 1.08;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0;
  text-wrap: balance;
}

h1 { font-size: clamp(2.4rem, 6.5vw, 4.6rem); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); letter-spacing: -0.01em; }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

strong { font-weight: 600; }

/* Eyebrow / Kennzeichnung über Headings */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--crimson);
  margin: 0 0 22px;
}

.lead {
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  line-height: 1.6;
  color: var(--ink-soft);
}

/* 4. LAYOUT-HELFER ------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section-y); }
.section--tight { padding-block: clamp(40px, 7vw, 72px); }
.section + .section { border-top: 1px solid var(--line); }

/* 5. HEADER -------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
}

.site-header__logo { height: 26px; width: auto; }

.site-header__nav {
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 36px);
  font-size: 0.92rem;
}

.site-header__nav a {
  color: var(--ink-soft);
  font-weight: 500;
}
.site-header__nav a:hover { color: var(--crimson); text-decoration: none; }

/* 6. SIGNATURE: gestapelte Quadrate (Logo-Motiv) ------------------------- */
.blocks {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
}
.blocks__sq {
  width: 14px;
  height: 14px;
  background: var(--crimson);
}

/* kleine Variante für Eyebrow/Inline */
.blocks--mini .blocks__sq { width: 8px; height: 8px; gap: 3px; }
.blocks--mini { gap: 3px; }

/* horizontale Variante (z.B. als Divider-Marker) */
.blocks--row { flex-direction: row; }

/* Hero-Animation: Bausteine "stapeln" sich nacheinander */
.blocks--build .blocks__sq {
  width: 22px;
  height: 22px;
  animation: stack 2.8s cubic-bezier(.2,.7,.3,1) infinite;
  opacity: 0;
}
.blocks--build .blocks__sq:nth-child(1) { animation-delay: 0s; }
.blocks--build .blocks__sq:nth-child(2) { animation-delay: 0.22s; }
.blocks--build .blocks__sq:nth-child(3) { animation-delay: 0.44s; }

@keyframes stack {
  0%   { opacity: 0; transform: translateY(-10px) scale(.7); }
  18%  { opacity: 1; transform: translateY(0)     scale(1);  }
  72%  { opacity: 1; transform: translateY(0)     scale(1);  }
  100% { opacity: 0; transform: translateY(0)     scale(1);  }
}

/* 7. HERO / "IM AUFBAU" -------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
}
.hero__inner {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(28px, 5vw, 56px);
  align-items: start;
  padding-block: clamp(72px, 13vw, 150px);
}
.hero__content { max-width: 760px; }
.hero h1 { margin-bottom: 24px; }
.hero .lead { max-width: 560px; }

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 36px;
}

/* dezenter Crimson-Schimmer im Hintergrund */
.hero::after {
  content: "";
  position: absolute;
  inset: auto -10% -40% auto;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, color-mix(in srgb, var(--crimson) 12%, transparent), transparent 68%);
  pointer-events: none;
  z-index: 0;
}
.hero__inner { position: relative; z-index: 1; }

/* 8. MITGLIED WERDEN ----------------------------------------------------- */
.join { background: var(--paper-deep); }
.join__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: start;
}
.join__intro h2 { margin-bottom: 18px; }

.form-card {
  background: var(--paper-card);
  border: 1px solid var(--line-strong);
  padding: clamp(24px, 4vw, 40px);
}

.field { margin-bottom: 20px; }
.field:last-of-type { margin-bottom: 28px; }

.field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  margin-bottom: 8px;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 13px 15px;
  transition: border-color .15s ease, background .15s ease;
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--crimson);
  background: #fff;
}
.field textarea { resize: vertical; min-height: 120px; }

.form-note {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 16px;
}

/* 9. BUTTONS ------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: 0.005em;
  padding: 14px 26px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease, transform .05s ease;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--crimson);
  color: #fff;
}
.btn--primary:hover { background: var(--crimson-deep); }

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn--ghost:hover { border-color: var(--ink); }

.btn--block { width: 100%; justify-content: center; }

/* 10. STATUTEN-SEITE ----------------------------------------------------- */
.statutes-head {
  background: var(--ink);
  color: var(--paper);
}
.statutes-head__inner {
  padding-block: clamp(48px, 9vw, 96px);
}
.statutes-head .eyebrow { color: #fff; }
.statutes-head h1 { color: var(--paper); }
.statutes-head .lead { color: color-mix(in srgb, var(--paper) 78%, transparent); margin-top: 20px; }
.statutes-head__actions { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 14px; }
.statutes-head .btn--ghost { color: var(--paper); border-color: color-mix(in srgb, #fff 35%, transparent); }
.statutes-head .btn--ghost:hover { border-color: #fff; }

.statutes-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: clamp(32px, 6vw, 72px);
  align-items: start;
}

/* Inhaltsverzeichnis (sticky) */
.toc {
  position: sticky;
  top: 100px;
  font-size: 0.92rem;
}
.toc__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.toc li { margin: 0; }
.toc a {
  display: flex;
  gap: 12px;
  padding: 7px 0;
  color: var(--ink-soft);
  font-weight: 500;
  border-bottom: 1px solid var(--line);
}
.toc a:hover { color: var(--crimson); text-decoration: none; }
.toc a::before {
  counter-increment: toc;
  content: "§ " counter(toc);
  flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
  color: var(--crimson);
  font-weight: 600;
}

/* Paragraphen */
.statute {
  max-width: var(--maxw-text);
  padding-block: clamp(28px, 4vw, 40px);
  scroll-margin-top: 100px;
}
.statute:first-child { padding-top: 0; }
.statute + .statute { border-top: 1px solid var(--line); }

.statute__num {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: var(--crimson);
  margin-bottom: 12px;
}
.statute h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); margin-bottom: 18px; }

/* nummerierte Absätze innerhalb eines Paragraphen, z.B. (1), (2) */
.statute ol.clauses {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: clause;
}
.statute ol.clauses > li {
  position: relative;
  padding-left: 38px;
  margin-bottom: 14px;
}
.statute ol.clauses > li::before {
  counter-increment: clause;
  content: "(" counter(clause) ")";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

/* 11. FOOTER ------------------------------------------------------------- */
.site-footer {
  background: var(--ink);
  color: color-mix(in srgb, var(--paper) 72%, transparent);
  font-size: 0.92rem;
}
.site-footer a { color: var(--paper); }
.site-footer a:hover { color: #fff; }

.site-footer__top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: clamp(28px, 5vw, 64px);
  padding-block: clamp(48px, 8vw, 80px);
}
.site-footer__brand .logo-mark { height: 24px; width: auto; margin-bottom: 18px; }
/* Logo im Footer hell darstellen (Original ist schwarz) */
.site-footer__brand .logo-mark { filter: invert(1) grayscale(1) brightness(2); }

.footer-col h4 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--paper) 55%, transparent);
  margin-bottom: 16px;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 9px; }

/* Impressum-Block */
.impressum address {
  font-style: normal;
  line-height: 1.7;
  color: color-mix(in srgb, var(--paper) 80%, transparent);
}

.site-footer__bottom {
  border-top: 1px solid color-mix(in srgb, #fff 12%, transparent);
  padding-block: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: color-mix(in srgb, var(--paper) 55%, transparent);
}

/* 12. RESPONSIVE --------------------------------------------------------- */
@media (max-width: 860px) {
  .hero__inner { grid-template-columns: 1fr; }
  .blocks--build { flex-direction: row; }   /* Bausteine horizontal auf Mobil */
  .join__grid { grid-template-columns: 1fr; }
  .statutes-layout { grid-template-columns: 1fr; }
  .toc { position: static; padding-bottom: 8px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
  .site-footer__top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .site-header__nav { gap: 16px; font-size: 0.85rem; }
  .site-footer__top { grid-template-columns: 1fr; }
}

/* Reduzierte Bewegung respektieren */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; }
  .blocks--build .blocks__sq { opacity: 1; }
  html { scroll-behavior: auto; }
}

/* 13. DRUCK / "Als PDF speichern" --------------------------------------- */
@media print {
  :root { --paper: #fff; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .site-header,
  .site-footer,
  .toc,
  .statutes-head__actions,
  .no-print { display: none !important; }
  .statutes-head { background: #fff; color: #000; }
  .statutes-head h1, .statutes-head .lead, .statutes-head .eyebrow { color: #000; }
  .statutes-layout { display: block; }
  .statute { max-width: none; page-break-inside: avoid; }
  .statute__num, .eyebrow { color: #000; }
  a { color: #000; text-decoration: none; }
}
