@font-face { font-family: "Instrument Serif"; src: url("fonts/InstrumentSerif-Regular.ttf") format("truetype"); font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("fonts/InstrumentSerif-Italic.ttf") format("truetype"); font-style: italic; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("fonts/InstrumentSans.ttf") format("truetype"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Jost"; src: url("fonts/Jost.ttf") format("truetype"); font-weight: 100 900; font-display: swap; }

:root {
  --bg: #F2F1ED;      /* same as the logo background */
  --tile: #E8E5DA;
  --tile-hover: #E0DCCD;
  --ink: #463E36;      /* warm brown-grey, lighter than before */
  --brown: #857262;
  --leaf: #6A6F5C;     /* olive of the logo leaf: button and footer */
  --leaf-dark: #5A5F4D;
  --title: #565B48;    /* leaf green, one step darker, for all titles */
  --brown-dark: #74625A;
  --olive: #6B705C;
  --taupe: #9B8879;
  --gutter: max(16px, env(safe-area-inset-left), env(safe-area-inset-right));
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Instrument Sans", system-ui, sans-serif;
  font-size: 18px;
  line-height: 1.6;
}

/* Spacing scale: 8 · 16 · 24 · 32 · 48 · 64 · 96 · 128 */

/* Header: small logo centred on top, four tiles below. The logo leads home. */
.kopf { padding: max(32px, env(safe-area-inset-top)) var(--gutter) 0; max-width: 1200px; margin: 0 auto; }
.mini { display: block; width: 44px; margin: 0 auto; }
.mini img { display: block; width: 44px; height: auto; }
/* "Zur Startseite" label under the small logo, in the site's own style */
.mini { position: relative; }
.mini::after {
  content: attr(data-hinweis); position: absolute; left: calc(100% + 12px); top: 50%; transform: translate(-4px, -50%);
  white-space: nowrap; padding: 6px 12px; border-radius: 10px;
  background: var(--leaf); color: #fff; font-family: "Instrument Sans", system-ui, sans-serif; font-size: 13px; line-height: 1.2;
  opacity: 0; pointer-events: none; transition: opacity .15s ease, transform .15s ease; z-index: 2;
}
.mini:hover::after, .mini:focus-visible::after { opacity: 1; transform: translate(0, -50%); }
@media (hover: none) { .mini::after { display: none; } }
@media (prefers-reduced-motion: reduce) { .mini::after { transition: none; } }

nav.kacheln ul { list-style: none; margin: 24px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
nav.kacheln a {
  display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: 92px; padding: 8px 12px; border-radius: 20px;
  background: var(--tile); color: var(--ink); text-decoration: none;
  font-family: "Instrument Serif", Georgia, serif; font-style: italic;
  font-size: clamp(20px, 2.1vw, 28px); line-height: 1.1;
}
nav.kacheln a:hover { background: var(--tile-hover); }
nav.kacheln a[aria-current="page"] { font-style: normal; }

/* Compact menu: a small round button appears top right once the tiles are out of view (menu.js) */
.menuknopf { position: fixed; top: calc(20px + env(safe-area-inset-top, 0px)); right: calc(var(--gutter) + 4px); z-index: 15;
  width: 52px; height: 52px; border-radius: 50%; border: 1px solid rgba(70, 62, 54, .12); background: #D9D3C3; color: var(--ink); cursor: pointer;
  display: grid; place-items: center; box-shadow: 0 4px 14px rgba(70, 62, 54, .15);
  opacity: 0; transform: scale(.85); pointer-events: none; transition: opacity .25s ease, transform .25s ease; }
.menuknopf:hover { background: #D0C9B7; }
.menuknopf span, .menuknopf span::before, .menuknopf span::after { display: block; width: 20px; height: 1.5px; background: currentColor; border-radius: 2px; position: relative; transition: transform .25s ease, background .2s; }
.menuknopf span::before, .menuknopf span::after { content: ""; position: absolute; left: 0; }
.menuknopf span::before { top: -6px; }
.menuknopf span::after { top: 6px; }
.menuknopf[aria-expanded="true"] span { background: transparent; }
.menuknopf[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.menuknopf[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }
body.gescrollt .menuknopf { opacity: 1; transform: none; pointer-events: auto; }
.menu { position: fixed; top: calc(82px + env(safe-area-inset-top, 0px)); right: calc(var(--gutter) + 4px); z-index: 15;
  background: var(--bg); border-radius: 20px; padding: 10px; box-shadow: 0 10px 30px rgba(70, 62, 54, .18); display: grid; gap: 8px; min-width: 240px;
  opacity: 0; transform: translateY(-6px); pointer-events: none; visibility: hidden; transition: opacity .2s ease, transform .2s ease, visibility 0s .2s; }
.menu.offen { opacity: 1; transform: none; pointer-events: auto; visibility: visible; transition: opacity .2s ease, transform .2s ease; }
.menu a { display: block; padding: 12px 18px; border-radius: 14px; background: var(--tile); color: var(--ink); text-decoration: none;
  font-family: "Instrument Serif", Georgia, serif; font-style: italic; font-size: 22px; line-height: 1.2; }
.menu a:hover { background: var(--tile-hover); }
.menu a[aria-current="page"] { font-style: normal; }
button:focus-visible { outline: 2px solid var(--olive); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .menuknopf, .menu, .menuknopf span, .menuknopf span::before, .menuknopf span::after { transition: none; } }

/* Home */
main { max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter) 128px; }
.logo { margin: 144px auto 0; max-width: 600px; text-align: center; }
.logo img { display: block; width: 100%; height: auto; }
.logo .tagline {
  margin: 4px 0 0; color: var(--olive);
  font-family: "Jost", sans-serif; font-weight: 300; letter-spacing: .03em;
  font-size: clamp(17px, 2.3vw, 28px); line-height: 1.3;
}
.einstieg { text-align: center; margin-top: 160px; }
.einstieg h1 {
  font-family: "Instrument Serif", Georgia, serif; font-weight: 400;
  font-size: clamp(56px, 8vw, 96px); line-height: 1; margin: 0;
  letter-spacing: .01em;
}
.einstieg .unterzeile {
  font-family: "Instrument Serif", Georgia, serif; font-style: normal;
  font-size: clamp(26px, 3.4vw, 42px); line-height: 1.25; margin: 20px 0 0;
}

/* Text block: about 65 characters per line */
.text { max-width: 640px; margin: 64px auto 0; }
.text p { margin: 0 0 24px; }
.text h2 { margin: 72px 0 20px; color: var(--title); }   /* all titles in leaf green, like the page title */
.text h2:first-child { margin-top: 0; }
.seitentitel h1 { color: var(--title); }
.seitentitel { margin: 128px auto 0; max-width: 640px; text-align: left; }   /* page title lines up with the text column */
.seitentitel + .text { margin-top: 96px; }
.text .liste { margin-bottom: 24px; }
.text .abstand { margin-top: 72px; }
.text .eng { margin-bottom: 4px; }
.text .kursiv { font-style: italic; }
.profil p:not(.leitsatz):not(.name) { text-align: justify; hyphens: none; -webkit-hyphens: none; text-wrap: pretty; }   /* About: all running text in Blocksatz */
.kompakt h2 { margin: 40px 0 10px; }   /* tighter spacing for short legal pages */
.kompakt h2:first-child { margin-top: 0; }

/* Legal pages (Impressum, Datenschutz): deliberately quieter than the content pages */
.rechtlich { padding-bottom: 48px; }   /* less empty space above the footer */
.rechtlich .seitentitel { margin-top: 260px; }
.rechtlich .seitentitel h1 { font-size: clamp(30px, 3.4vw, 40px); color: var(--ink); }
.rechtlich .seitentitel + .text { margin-top: 40px; }
.rechtlich .text { font-size: 15px; line-height: 1.6; }
.rechtlich .text h2 { font-size: 18px; color: var(--ink); margin: 28px 0 6px; }
.rechtlich .text h2:first-child { margin-top: 0; }
.rechtlich .text p { margin-bottom: 8px; }
.text .mailzeile { margin-top: 16px; font-size: 16px; }
.text a:not(.knopf) { color: var(--ink); text-underline-offset: 3px; }   /* two lines that belong together */
.text .notiz { margin-top: 40px; font-style: italic; }   /* short note right under a list */
.knopf {
  display: inline-block; margin-top: 24px; padding: 14px 32px; border-radius: 999px;
  background: var(--leaf); color: #fff; text-decoration: none; font-size: 17px;
}
.knopf:hover { background: var(--leaf-dark); }

/* Footer: thin olive bar (leaf colour) */
.fuss { background: var(--leaf); color: #fff; font-size: 14px; }
.fuss-innen {
  max-width: 1200px; margin: 0 auto;
  padding: 18px var(--gutter) max(18px, env(safe-area-inset-bottom));
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 32px;
}
.fuss ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 28px; }
.fuss a { color: #fff; text-decoration: none; }
.fuss a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Inner pages: title block, then content in one calm column */
.seitenkopf { text-align: center; max-width: 760px; margin: 144px auto 0; }
.seitenkopf h1 {
  font-family: "Instrument Serif", Georgia, serif; font-weight: 400;
  font-size: clamp(40px, 6vw, 72px); line-height: 1.05; margin: 0;
}
.seitenkopf p { margin: 24px auto 0; max-width: 640px; }

h2 {
  font-family: "Instrument Serif", Georgia, serif; font-weight: 400;
  font-size: clamp(30px, 3.4vw, 40px); line-height: 1.15; margin: 0 0 24px;
}

.spalten { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; max-width: 960px; margin: 96px auto 0; }
.karte { background: var(--tile); border-radius: 20px; padding: 40px 40px 32px; }
/* Lists: the small logo as bullet */
.liste { list-style: none; margin: 0; padding: 0; }
.liste li { position: relative; padding: 6px 0; }   /* text lines up with the titles; bullet hangs to the left */
.liste li::before {
  content: ""; position: absolute; left: -30px; top: .62em;
  width: 16px; height: 17px; background: url("img/logo-punkt.png") center / contain no-repeat;
}

.hinweis { max-width: 640px; margin: 96px auto 0; padding-left: 24px; border-left: 2px solid var(--brown); color: var(--ink); }
.hinweis p { margin: 0 0 16px; }
.hinweis p:last-child { margin-bottom: 0; }

.anfrage { text-align: center; max-width: 640px; margin: 128px auto 0; }
.anfrage p { margin: 0 0 16px; }

/* About: fold-out sections (closed at first; click the title to open) */
.klapp { border-top: 1px solid rgba(133, 114, 98, .28); }
.klapp:last-of-type { border-bottom: 1px solid rgba(133, 114, 98, .28); }
.leitsatz ~ p + .klapp, .profil > p + .klapp { margin-top: 72px; }
.klapp summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 0; }
.klapp summary::-webkit-details-marker { display: none; }
.klapp summary h2 { margin: 0 !important; }
.klapp summary::after { content: ""; flex: none; width: 12px; height: 12px; margin-right: 6px;
  border-right: 1.5px solid var(--title); border-bottom: 1.5px solid var(--title); transform: translateY(-3px) rotate(45deg); transition: transform .2s ease; }
.klapp[open] summary::after { transform: translateY(3px) rotate(-135deg); }
.klapp summary:hover h2 { color: var(--leaf-dark); }
.klapp summary:focus-visible { outline: 2px solid var(--olive); outline-offset: 4px; border-radius: 6px; }
.klapp-inhalt { padding: 4px 0 28px; }
.klapp-inhalt > h3:first-child { margin-top: 4px; }
.knopf.nach-klapp { margin-top: 48px; }
.text .schluss { margin-top: 48px; }
.bild.im-text { margin: 56px 0 0; }   /* photo inside the text column */
.text .schluss.nach-foto { margin-top: 32px; }
.text h3.ohne-punkt::before { display: none; }   /* subtitle without the logo bullet */
.text h3.ohne-punkt { padding-left: 0; }
.text .name + .klapp { margin-top: 72px; }
@media (prefers-reduced-motion: reduce) { .klapp summary::after { transition: none; } }

/* About */
.bild { margin: 96px auto 0; max-width: 640px; }   /* same width as the text column */
.bild img { display: block; width: 100%; height: auto; border-radius: 20px; }
.zeichnung { max-width: 640px; }
.leitsatz { font-family: "Instrument Serif", Georgia, serif; font-size: clamp(24px, 3.4vw, 40px); text-wrap: balance; line-height: 1.3; margin: 56px 0 48px !important; text-align: center;
  width: min(900px, calc(100vw - 32px)); position: relative; left: 50%; transform: translateX(-50%); }   /* may run wider than the text column so it stays on two lines */
.text h3 { font-family: "Instrument Serif", Georgia, serif; font-style: italic; font-weight: 400; font-size: clamp(22px, 2.4vw, 26px); line-height: 1.25; margin: 40px 0 12px; }
.bild + .profil { margin-top: 48px; }
.bild + .nach-bild { margin-top: 64px; }   /* name sits halfway between photo and job titles */
.text h2.name { text-align: center; font-size: clamp(28px, 4vw, 46px); }
.text h2.name .vorname { display: block; margin-bottom: 48px; }
.text h2.name { width: min(900px, calc(100vw - 32px)); position: relative; left: 50%; transform: translateX(-50%); }   /* wider than the text column so each job title fits on one line */   /* name sits a little apart, above the job titles */
.text h2.name .beruf { display: block; }
.alles-blocksatz em { padding-right: .12em; }   /* italic leans right: a little extra room before the next word */
.blocksatz, .alles-blocksatz p { text-align: justify; hyphens: none; -webkit-hyphens: none; text-wrap: pretty; }   /* Blocksatz on computers, no word-splitting */
.text h2 + h3 { margin-top: 30px; }   /* same gap under a title as before a list */
.text h3 { position: relative; color: var(--title); }
.text h3::before {   /* small logo in front of each sub-title, like the list bullets */
  content: ""; position: absolute; left: -30px; top: .3em;
  width: 16px; height: 17px; background: url("img/logo-punkt.png") center / contain no-repeat;
}
.zitat { max-width: 640px; margin: 64px auto 0; text-align: center; }
.zitat blockquote { margin: 0; }
.zitat blockquote p { font-family: "Instrument Serif", Georgia, serif; font-style: italic; font-size: clamp(24px, 3vw, 32px); line-height: 1.3; color: var(--leaf); margin: 0; }
.zitat figcaption { margin-top: 16px; font-size: 15px; color: var(--ink); }

a:focus-visible { outline: 2px solid var(--olive); outline-offset: 3px; }
.fuss a:focus-visible { outline-color: #fff; }

@media (max-width: 760px) {
  body { font-size: 17px; }
  .kopf { padding-top: max(24px, env(safe-area-inset-top)); }
  nav.kacheln ul { grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; }
  nav.kacheln a { min-height: 60px; border-radius: 16px; }
  .logo { margin-top: 80px; }
  .einstieg { margin-top: 96px; }
  .text { margin-top: 48px; }
  main { padding-bottom: 96px; }
  .seitenkopf { margin-top: 80px; }
  .spalten { grid-template-columns: 1fr; margin-top: 64px; gap: 16px; }
  .karte { padding: 28px 24px 20px; border-radius: 16px; }
  .hinweis { margin-top: 64px; padding-left: 16px; }
  .anfrage { margin-top: 96px; }
  .rechtlich .seitentitel { margin-top: 120px; }
  .fuss-innen { flex-direction: column; align-items: flex-start; }
  .liste li { padding-left: 26px; }
  .bild { margin-top: 64px; }
  .bild img { border-radius: 16px; }
  .liste li::before { left: 0; }
  .text h3 { padding-left: 26px; }
  .text h3::before { left: 0; }
}


/* About page only: footer with the SFG ADHS logo in the middle (Vivi, 20 Oct 2026) */
.fuss-sfg .fuss-innen { display: grid; grid-template-columns: 1fr auto 1fr; padding-top: 26px; padding-bottom: max(26px, env(safe-area-inset-bottom)); }
.fuss-sfg .fuss-links { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.fuss-sfg ul { justify-self: end; }
.sfg { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.sfg small { font-size: 12px; letter-spacing: .04em; }
.sfg span { display: block; background: var(--bg); border-radius: 12px; padding: 10px 16px; }
.sfg img { display: block; width: 210px; height: auto; }
.fuss a.sfg:hover { text-decoration: none; }
.fuss a.sfg:hover span { background: #fff; }
@media (max-width: 760px) {
  .fuss-sfg .fuss-innen { grid-template-columns: 1fr; justify-items: start; gap: 14px; }
  .sfg { order: -1; align-items: flex-start; margin-bottom: 6px; }
  .fuss-sfg ul { justify-self: start; }
}

/* Phone footer (Vivi, 20 Oct 2026): e-mail on top, centred; ©, Impressum, Datenschutz below, centred.
   About page: SFG logo first, then e-mail, then the other three. */
@media (max-width: 760px) {
  .fuss .fuss-innen { display: flex; flex-direction: row; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px 28px; text-align: center; }
  .fuss ul, .fuss .fuss-links { display: contents; }
  .fuss:not(.fuss-sfg) li:first-child, .fuss .fuss-links > a { order: -1; flex-basis: 100%; }
  .fuss-sfg .sfg { order: -2; flex-basis: 100%; align-items: center; margin-bottom: 4px; }
}

/* Phones only: long words may split at their marked split points (&shy;), against big gaps in Blocksatz (Vivi, 20 Oct 2026).
   Computers: no splitting (hyphens: none above). */
/* All running text on every page in Blocksatz, computer and phone (Vivi, 20 Oct 2026). One-line paragraphs stay as they are.
   Long words may split only at their marked points (&shy;, tools/trennstellen.py), so no line gets big gaps. */
.text p, .text li, .blocksatz, .alles-blocksatz p, .profil p:not(.leitsatz):not(.name) { text-align: justify; hyphens: manual; -webkit-hyphens: manual; text-wrap: wrap; }   /* list entries too (Vivi, 20 Oct); one-line entries stay as they are */

/* Phones: text set a hair tighter (invisible), so a few more letters fit per line and Blocksatz gaps shrink (Vivi, 20 Oct 2026). */
@media (max-width: 760px) {
  .text p { letter-spacing: -0.015em; }
  .text li { letter-spacing: -0.025em; }   /* lists a hair tighter still, so «Vorwiegend hyperaktiv-impulsives Erscheinungs-» fits (Vivi) */
}
