/* ============================================================
   MitWerk – gemeinsames Stylesheet
   Nur Typografie: EB Garamond, Schwarz auf Weiß, feine Linien.
   Keine Boxen, keine Schatten, keine Farben, keine Icons.
   ============================================================ */

:root {
  --ink: #111111;
  --paper: #ffffff;
  /* Feine Linien: Schwarz in voller und reduzierter Stärke */
  --hairline: 1px solid var(--ink);
  --hairline-soft: 1px solid rgba(17, 17, 17, 0.25);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: "EB Garamond", Garamond, Georgia, serif;
}

a { color: var(--ink); }

::selection { background: var(--ink); color: var(--paper); }

/* ============================================================
   Startseite – eine Bildschirmhöhe, alles skaliert mit vh/vw
   ============================================================ */

body.home { height: 100%; overflow: hidden; }
html:has(body.home) { height: 100%; }

.home-wrapper {
  height: 100vh;
  display: grid;
  grid-template-rows: 12vh 1fr 8vh;
}

.home-header {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 0 6vw;
}

.home-header nav {
  display: flex;
  gap: 2.8vw;
  font-size: clamp(1rem, 2.2vh, 1.4rem);
}

.home-header a {
  text-decoration: none;
}

.home-header a:hover,
.home-header a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.25em;
}

.home-main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-left: 12vw;
}

.home-main h1 {
  font-size: clamp(4rem, 22vh, 24vw);
  line-height: 0.9;
  font-weight: 700;
  letter-spacing: -0.06em;
  margin-bottom: 5vh;
}

.home-main .hero {
  font-size: clamp(1.4rem, 5vh, 6vw);
  line-height: 1.45;
  margin-bottom: 6vh;
}

.home-main .desc {
  font-size: clamp(1.1rem, 3.3vh, 4vw);
  line-height: 1.6;
}

.home-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-left: 12vw;
  padding-right: 6vw;
  font-size: clamp(0.9rem, 2vh, 1.2rem);
}

.home-footer a {
  text-decoration: none;
}

.home-footer a:hover,
.home-footer a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.25em;
}

/* Schmale Bildschirme: Scrollen erlauben, damit nichts abgeschnitten wird */
@media (max-width: 800px) {
  body.home { overflow: auto; }
  .home-wrapper { min-height: 100vh; height: auto; grid-template-rows: auto 1fr auto; }
  .home-header { padding: 4vh 6vw 0; }
  .home-header nav { flex-wrap: wrap; gap: 1.2em; }
  .home-main { padding: 6vh 8vw; }
  .home-footer { padding: 0 8vw 4vh; }
}

/* ============================================================
   Mitgliedsantrag – lange, ruhige Seite
   ============================================================ */

body.form {
  font-size: clamp(1.05rem, 1.6vw, 1.175rem);
  line-height: 1.55;
}

.form-page {
  width: min(92vw, 46em);
  margin: 6vh auto 14vh;
}

/* Kopf */
.form-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1em;
  border-bottom: var(--hairline);
  padding-bottom: 1.2em;
}

.form-header .wordmark {
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.95;
  text-decoration: none;
}

.form-header .doc-title {
  font-size: 0.95em;
  white-space: nowrap;
}

/* Überschriften */
h1.page-title {
  font-size: clamp(1.9rem, 5vw, 2.6rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 1.6em 0 0.4em;
}

section.block {
  margin-top: 4.5em;
}

section.block > h2 {
  font-size: 1.5em;
  font-weight: 500;
  letter-spacing: -0.01em;
  border-bottom: var(--hairline);
  padding-bottom: 0.35em;
  margin-bottom: 1.4em;
}

h3 {
  font-size: 1.15em;
  font-weight: 600;
  margin: 2em 0 0.6em;
}

p.note {
  margin: 0 0 1.2em;
}

p.fine {
  font-size: 0.9em;
  line-height: 1.5;
  margin: 0.4em 0 1em;
}

/* Felder: reine Linien, keine Kästen */
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.8em 2.2em;
}

.grid .full { grid-column: 1 / -1; }

label.field { display: block; }

label.field > span {
  display: block;
  font-size: 0.9em;
  margin-bottom: 0.1em;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="number"] {
  width: 100%;
  font: inherit;
  color: inherit;
  background: transparent;
  border: 0;
  border-bottom: var(--hairline);
  border-radius: 0;
  padding: 0.35em 0.1em 0.3em;
  outline: none;
}

textarea {
  width: 100%;
  font: inherit;
  color: inherit;
  background: transparent;
  border: 0;
  border-bottom: var(--hairline);
  border-radius: 0;
  padding: 0.35em 0.1em 0.3em;
  min-height: 5.5em;
  resize: vertical;
  outline: none;
}

input:focus-visible,
textarea:focus-visible {
  outline: none;
  border-bottom-width: 2px;
  padding-bottom: calc(0.3em - 1px);
}

/* Auswahl: native Kontrollen in Schwarz */
input[type="radio"],
input[type="checkbox"] {
  accent-color: var(--ink);
  width: 1em;
  height: 1em;
  margin: 0.3em 0 0;
  flex: none;
}

input[type="radio"]:focus-visible,
input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

fieldset { border: 0; }

legend {
  font-size: 1.15em;
  font-weight: 600;
  padding: 0;
  margin-bottom: 0.6em;
}

/* Optionslisten: nur Zeilen und feine Trennlinien */
.choice {
  display: flex;
  gap: 0.8em;
  align-items: flex-start;
  padding: 0.7em 0;
}

.choice + .choice { border-top: var(--hairline-soft); }

.choice-inline-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2em 2em;
}

.choice-inline {
  display: flex;
  gap: 0.55em;
  align-items: baseline;
  padding: 0.3em 0;
}

.interest-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.1em 2.2em;
}

/* Bedingte Abschnitte */
.conditional { display: none; }
.conditional.show { display: block; }

/* Personenblöcke der Familienmitgliedschaft */
.person {
  border-top: var(--hairline-soft);
  padding-top: 1.4em;
  margin-top: 1.8em;
}

.person h4 {
  font-size: 1.05em;
  font-weight: 600;
  margin-bottom: 1em;
}

/* Fotoeinwilligung je Person */
.media-person {
  border-top: var(--hairline-soft);
  padding: 1em 0 0.6em;
  margin-top: 1em;
}

.media-person legend {
  font-size: 1em;
  font-weight: 600;
  margin-bottom: 0.3em;
}

.media-options { display: grid; gap: 0.15em; }

.media-options label {
  display: flex;
  gap: 0.6em;
  align-items: flex-start;
  padding: 0.15em 0;
}

/* Beitragsübersicht */
.fees {
  margin-top: 2.5em;
  border-top: var(--hairline);
  padding-top: 1em;
  max-width: 28em;
}

.fees .row {
  display: flex;
  justify-content: space-between;
  gap: 1.5em;
  padding: 0.25em 0;
}

.fees .row.total {
  margin-top: 0.4em;
  padding-top: 0.6em;
  border-top: var(--hairline-soft);
  font-weight: 600;
}

/* Hinweis auf Fehler: reine Typografie */
.hint {
  display: block;
  font-size: 0.86em;
  min-height: 1.3em;
  margin-top: 0.3em;
  font-style: italic;
}

input[aria-invalid="true"] { border-bottom-width: 2px; }

/* Absenden */
.submit-row {
  margin-top: 4em;
  border-top: var(--hairline);
  padding-top: 2em;
}

button.submit {
  font: inherit;
  font-size: 1.15em;
  color: var(--paper);
  background: var(--ink);
  border: var(--hairline);
  border-radius: 0;
  padding: 0.7em 2.2em;
  cursor: pointer;
}

button.submit:hover,
button.submit:focus-visible {
  color: var(--ink);
  background: var(--paper);
}

button.submit:disabled {
  opacity: 0.45;
  cursor: default;
}

p.status {
  min-height: 1.5em;
  margin-top: 1em;
  font-style: italic;
}

/* Dankesseite */
#thanks { padding: 10vh 0 4vh; }
#thanks p { margin-bottom: 0.7em; font-size: 1.15em; }

/* Fußzeile */
.form-footer {
  margin-top: 8em;
  border-top: var(--hairline);
  padding-top: 1.2em;
  font-size: 0.9em;
  display: flex;
  justify-content: space-between;
  gap: 1em;
  flex-wrap: wrap;
}

.form-footer a { text-underline-offset: 0.2em; }

/* Nur für Screenreader sichtbar */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Honeypot: für Menschen unsichtbar */
.hp {
  position: absolute;
  left: -9999px;
  top: auto;
}

/* Schmale Bildschirme */
@media (max-width: 640px) {
  .grid,
  .interest-grid { grid-template-columns: 1fr; }
  .form-header { flex-direction: column; gap: 0.4em; }
  .form-header .doc-title { white-space: normal; }
}
