/* Draft of the new role-based site. Colors from EI_Brandboard_v1 */
@font-face {
  font-family: Figtree;
  font-weight: 400 900;
  font-display: swap;
  src: url(/assets/fonts/figtree-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: Figtree;
  font-weight: 400 900;
  font-display: swap;
  src: url(/assets/fonts/figtree-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
:root {
  --dunkelblau: #2a3845;
  --petrol: #39757a;
  --tuerkisgruen: #71aca8;
  --steingruen: #9bc3bd;
  --sand: #f7eee7;
  --white: #fff;
  --muted: #4a5865;
  --line: #e3d6cb;
  --font: "Creato Display", Figtree, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  /* Area colors, overridden per area */
  --area-bg: var(--dunkelblau);
  --area-fg: var(--sand);
  --area-accent: var(--steingruen);
}
.area-sorge { --area-bg: var(--dunkelblau); --area-fg: var(--sand); --area-accent: var(--steingruen); }
.area-eltern { --area-bg: var(--petrol); --area-fg: var(--white); --area-accent: var(--sand); }
.area-ueber-uns { --area-bg: var(--tuerkisgruen); --area-fg: var(--dunkelblau); --area-accent: var(--dunkelblau); }
.area-mitmachen { --area-bg: var(--steingruen); --area-fg: var(--dunkelblau); --area-accent: var(--petrol); }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--dunkelblau);
  background: var(--sand);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--petrol); }
a, a em, a i { font-style: normal; } /* links never italic */
h1, h2 { line-height: 1.12; margin: 0 0 .5em; }
h1 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); font-weight: 900; }
h2 { font-size: clamp(1.25rem, 2.2vw, 1.6rem); font-weight: 800; color: var(--petrol); margin-top: 1.5em; }
h3, h4 { line-height: 1.25; margin: 1.4em 0 .5em; }
figure { margin: 0 0 1rem; }
.wrap { max-width: 1140px; margin: 0 auto; padding: 0 1.25rem; }

.button {
  display: inline-block;
  padding: .6em 1.3em;
  border-radius: 999px;
  background: var(--petrol);
  color: var(--white);
  font-weight: 800;
  text-decoration: none;
}
.button:hover { background: var(--dunkelblau); }
.button.big { font-size: 1.25rem; padding: .8em 2em; } /* prominent call to action */
.center { text-align: center; }

/* Header with area switcher */
.top { background: var(--sand); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.25rem; padding-top: .6rem; padding-bottom: .6rem; }
.brand { padding: 2px 0; } /* row height of the Spenden button, so the logo never shifts */
.brand img { width: 140px; }
.areas { display: flex; flex-wrap: wrap; gap: .2rem; flex: 1 1 auto; }
.areas a {
  text-decoration: none; color: var(--dunkelblau); font-weight: 700; font-size: .95rem;
  padding: .4em .8em; border-radius: 999px;
}
.areas a:hover { background: #ece0d5; }
.areas a[aria-current] { background: var(--dunkelblau); color: var(--sand); }
.top .button { font-size: .95rem; }

/* Language switcher, small, next to the Spenden button */
.lang { display: inline-flex; font-size: .72rem; font-weight: 800; letter-spacing: .05em; }
.lang a, .roles-head nav .lang a { color: var(--dunkelblau); text-decoration: none; opacity: .5; padding: .6em .3em; } /* padding = tap area */
.lang a:hover, .lang a[aria-current] { opacity: 1; }

/* Area band */
.band { background: var(--area-bg); color: var(--area-fg); padding: 1.4rem 0 1.25rem; }
.band a { color: var(--area-fg); }
.band-kicker { margin: 0; font-size: .85rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; opacity: .85; }
.band-title { margin: .15em 0 .15em; font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 900; line-height: 1.05; }
.band-title a { text-decoration: none; }
.band-who { margin: 0; max-width: 60ch; }

/* Page layout: area nav + content */
.layout {
  display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 1rem 1.75rem; align-items: start;
  grid-template-areas: "nav content" "box content" ". content";
  padding-top: 1.5rem; padding-bottom: 3rem;
}
.layout > .area-nav { grid-area: nav; }
.layout > .side-box { grid-area: box; }
.layout.single { grid-template-columns: minmax(0, 1fr); grid-template-areas: "content"; max-width: 860px; }
.content { grid-area: content; min-width: 0; background: var(--white); border-radius: 20px; padding: clamp(1.1rem, 2.5vw, 2rem); }
@media (max-width: 860px) {
  .layout { grid-template-columns: minmax(0, 1fr); grid-template-areas: "nav" "content" "box"; padding-top: 1rem; }
}
.content > h1:first-child { margin-top: 0; }
.content img { border-radius: 8px; }
.content figure.small img { width: 200px; max-width: 100%; }
.content figure.small.wide img { width: 360px; } /* wide logos stay readable */
.content figure.medium img { width: 480px; max-width: 100%; }
.preview-link { position: relative; display: block; width: 360px; max-width: 100%; margin-bottom: 1rem; }
.preview-link img { display: block; width: 100%; }
.preview-link .button { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); white-space: nowrap; }
.preview-link:hover .button { background: var(--dunkelblau); }

.area-nav { background: var(--white); border-radius: 18px; padding: .8rem; font-size: .95rem; }
.area-nav details > summary { cursor: pointer; font-weight: 800; padding: .25rem .5rem; list-style: none; -webkit-user-select: none; user-select: none; }
.area-nav details > summary::-webkit-details-marker { display: none; }
.area-nav details > summary::after { content: " ▾"; }
.area-nav details[open] > summary::after { content: " ▴"; }
.area-nav p { margin: .8rem .5rem .2rem; font-size: .75rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.area-nav ul { list-style: none; margin: 0; padding: 0; }
/* Indent per level: area title, then groups and overview, then pages */
.area-nav p { margin-left: 1.5rem; }
.area-nav summary + ul { padding-left: 1rem; }
.area-nav p + ul { padding-left: 2rem; }
.area-nav li a {
  display: flex; gap: .6rem; align-items: baseline;
  text-decoration: none; color: var(--dunkelblau); padding: .35rem .55rem; border-radius: 10px; font-weight: 600; line-height: 1.3;
}
.area-nav li a:hover { background: #f1ebe5; }
.area-nav li a[aria-current] { background: var(--area-bg); color: var(--area-fg); }
.area-nav .num { font-weight: 900; min-width: 1.2em; }
.area-nav .ext::after { content: " ↗"; font-weight: 400; }

.side-box { border-radius: 18px; padding: 1rem 1.1rem; background: var(--dunkelblau); color: var(--sand); font-size: .95rem; }
.side-box a { color: var(--steingruen); font-weight: 800; }
.side-box h2 { color: inherit; font-size: 1.05rem; margin: 0 0 .4em; }
.side-box p { margin: .3em 0; }
.side-box.light { background: var(--white); color: var(--dunkelblau); }
.side-box.light a { color: var(--petrol); }

/* Placeholder for missing content */
.missing {
  border: 3px dashed #d08a3a; background: #fdf3e7; color: #6b3b06;
  border-radius: 14px; padding: .9rem 1.1rem; margin: 1.1rem 0;
}
.missing strong:first-child { display: block; font-size: 1.05rem; }

/* Cards on area overviews */
.group-title { margin: 1.6rem 0 .6rem; font-size: .85rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .8rem; }
.card {
  display: flex; flex-direction: column; gap: .3rem; text-decoration: none; color: var(--dunkelblau);
  background: var(--sand); border-radius: 16px; padding: 1rem; border: 2px solid transparent;
}
.card:hover { border-color: var(--area-bg); }
.card strong { font-size: 1.05rem; line-height: 1.25; }
.card span { font-size: .95rem; color: var(--muted); }
.card .num { font-size: 1.5rem; font-weight: 900; color: var(--petrol); line-height: 1; }
/* Tiles with an icon, not links */
.tiles { margin: 1.2rem 0 1.6rem; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.tile:hover { border-color: transparent; }
.tile-icon { width: 56px; height: 56px; border-radius: 50%; background: var(--petrol); color: var(--sand); display: flex; align-items: center; justify-content: center; margin-bottom: .5rem; }
.tile-icon svg { width: 30px; height: 30px; }
/* Table of contents under the page title */
.toc { background: var(--sand); border-radius: 16px; padding: .9rem 1.2rem; margin: 1rem 0 1.6rem; }
.toc ul { margin: 0; padding-left: 1.1rem; }
.toc > ul { padding-left: 1rem; }
.toc li { margin: .15rem 0; line-height: 1.35; }
.toc > ul > li > a { font-weight: 700; }
.toc ul ul { margin: .15rem 0 .4rem; font-size: .95rem; }
.content h2[id], .content h3[id] { scroll-margin-top: 1rem; }
/* Cards with a photo on top, all photos the same size */
.photo-cards .card { padding: .6rem .6rem .9rem; gap: .6rem; }
.photo-cards .card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: center 30%; border-radius: 10px; }
.photo-cards .card strong { padding: 0 .3rem; }
blockquote.lead { font-size: 1.15rem; line-height: 1.5; }

/* Prev / next and cross links */
.pager { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.pager a { font-weight: 800; text-decoration: none; }
.crosslink { margin-top: 1.25rem; background: var(--petrol); color: var(--white); border-radius: 16px; padding: .9rem 1.1rem; }
.crosslink a { color: var(--white); font-weight: 800; }

/* Migrated content blocks */
.cols { display: flex; flex-wrap: wrap; gap: 1.25rem; margin: 1.25rem 0; }
.col { flex: 1 1 140px; min-width: 0; }
.col > :first-child { margin-top: 0; }
.col img { max-height: 380px; width: auto; }
.cols:not(:has(> .col[style])) { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
.col:not([style]) figure img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.col p { margin: .4em 0; }
@media (max-width: 640px) {
  .col[style] { flex-basis: 100% !important; }
  .col[style] img { max-height: 260px; }
}
blockquote { margin: 1.25rem 0; padding-left: 1rem; border-left: 4px solid var(--steingruen); font-style: italic; }

/* Supporter tiles open their quote in a modal dialog */
.person { display: block; color: inherit; text-decoration: none; border-radius: 12px; }
.person figure { position: relative; margin-bottom: .4rem; }
.person figure::after { content: "\201E"; position: absolute; right: .3rem; bottom: .3rem; width: 1.5rem; height: 1.5rem; border-radius: 999px; background: var(--petrol); color: var(--white); font-size: 1.2rem; font-weight: 900; line-height: 1.1; text-align: center; }
.person img { transition: transform .2s, box-shadow .2s; }
.person:hover img, .person:focus-visible img { transform: translateY(-3px); box-shadow: 0 6px 16px rgb(42 56 69 / .25); }
.person:hover strong { color: var(--petrol); }
.cols:has(> .col > .person) { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 1rem .75rem; }
.person p { margin: 0; font-size: .8rem; line-height: 1.3; hyphens: auto; overflow-wrap: break-word; }
.person p + p { margin-top: .15rem; }
div.person figure::after { content: none; } /* no quote to open */
div.person:hover img { transform: none; box-shadow: none; }
div.person:hover strong { color: inherit; }
dialog.quote { width: min(760px, calc(100vw - 2rem)); max-height: calc(100dvh - 2rem); padding: 0; border: 0; border-radius: 20px; background: var(--white); color: var(--dunkelblau); box-shadow: 0 20px 60px rgb(42 56 69 / .35); }
dialog.quote::backdrop { background: rgb(42 56 69 / .6); }
.quote-body { padding: 2.5rem clamp(1.1rem, 3vw, 2rem) clamp(1.1rem, 3vw, 2rem); }
.quote-body .cols { margin: 0; align-items: flex-start; }
.dialog-close { position: sticky; z-index: 1; top: .6rem; display: block; margin: .6rem .6rem -3.1rem auto; width: 2.5rem; height: 2.5rem; border: 0; border-radius: 999px; background: var(--sand); color: var(--dunkelblau); font: inherit; font-size: 1.5rem; line-height: 1; cursor: pointer; }
.dialog-close:hover { background: var(--steingruen); }
/* Text editor: show all quotes inline so they can be edited */
.ei-on dialog.quote:not([open]) { display: block; position: static; width: auto; max-height: none; margin: 1rem 0; box-shadow: none; border: 1px dashed var(--line); }
.ei-on dialog.quote:not([open]) .dialog-close { display: none; }

/* Kompetenzzentrum diagram (inline SVG), colors from the brandboard */
.zg { max-width: 760px; margin: 1.5rem auto 2rem; }
.zg svg { display: block; width: 100%; height: auto; font-family: var(--font); }
.zg text { text-anchor: middle; fill: var(--dunkelblau); }
.zg-ln { fill: none; stroke: var(--tuerkisgruen); stroke-width: 2; }
.zg-dot { fill: var(--petrol); }
.zg-h { fill: var(--petrol); }
.zg .t-zg-h { fill: var(--white); font-weight: 900; }
.zg-ring { fill: none; stroke: var(--steingruen); stroke-width: 5; }
.zg-p { fill: var(--steingruen); }
.zg-k { fill: #dcebe8; stroke: var(--steingruen); stroke-width: 2; }
.zg .t-zg-p, .zg .t-zg-k { font-weight: 800; }
.zg-s { fill: var(--sand); stroke: var(--steingruen); stroke-width: 1.5; }
.zg figcaption { margin-top: .75rem; font-size: .85rem; color: var(--muted); text-align: center; }

/* Landing: role chooser. Fits one desktop screen: sizes follow viewport height, width is capped */
/* Same content box as .wrap on subpages, so logo and content edges do not jump */
:root { --roles-w: 1100px; }
.roles { padding: .6rem 1.25rem clamp(1.25rem, 3vh, 2.5rem); display: flex; flex-direction: column; gap: clamp(.3rem, 1.1vh, .9rem); }
.roles-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1.25rem; }
.roles-head nav { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1.1rem; font-weight: 700; font-size: .95rem; }
.roles-head nav a:not(.button) { color: var(--dunkelblau); text-decoration: none; }
.roles-head, .roles .roles-question, .role-grid, .hero7-inner { width: 100%; max-width: var(--roles-w); margin-left: auto; margin-right: auto; }

/* Heading block taken from proposal 7: kicker, big heading, lead, petrol line */
.hero7 {
  position: relative; overflow: hidden;
  margin: 0 -1.25rem;
  padding: clamp(1rem, 3vh, 3rem) 1.25rem clamp(3.25rem, 9vh, 6.5rem);
}
.hero7-inner { display: flex; flex-direction: column; gap: clamp(.4rem, 1.4vh, 1rem); }
.hero7-kicker { margin: 0; font-weight: 700; color: var(--petrol); letter-spacing: .06em; text-transform: uppercase; font-size: .85rem; }
.hero7 h1 { margin: 0; font-size: clamp(1.8rem, min(4.6vw, 4.6vh), 3.6rem); line-height: 1.02; font-weight: 900; max-width: 18ch; }
.hero7-lead { margin: 0; font-size: clamp(.95rem, 2vh, 1.15rem); max-width: 50ch; }
.hero7-ribbon { position: absolute; left: 0; bottom: 0; width: 100%; height: clamp(50px, 8vh, 96px); }
.hero7-ribbon path { fill: none; stroke: var(--petrol); stroke-width: 30; stroke-linecap: round; }

.roles .roles-question { margin-top: 0; margin-bottom: 0; color: var(--dunkelblau); font-size: clamp(.95rem, 1.8vh, 1.15rem); font-weight: 800; }

/* 4 in a row on wide screens, otherwise 2x2; never stacked */
.role-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
@media (min-width: 900px) { .role-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.role {
  --pad-y: clamp(.6rem, 1.6vh, 1.25rem); --pad-x: clamp(.75rem, 1.3vw, 1.25rem);
  background: var(--area-bg); color: var(--area-fg); border-radius: clamp(14px, 2.2vh, 22px); overflow: hidden;
  padding: var(--pad-y) var(--pad-x); display: flex; flex-direction: column; gap: clamp(.3rem, .9vh, .55rem);
}
/* Icon band on top of each tile, as in proposal 7 */
.role-icon {
  width: calc(100% + 2 * var(--pad-x)); height: clamp(56px, 9vh, 120px);
  margin: calc(-1 * var(--pad-y)) calc(-1 * var(--pad-x)) .25rem;
  display: flex; align-items: center; justify-content: center;
  background: var(--icon-bg); color: var(--icon-fg);
}
.role-icon svg { width: auto; height: 58%; }
.role.area-sorge { --icon-bg: var(--petrol); --icon-fg: var(--sand); }
.role.area-eltern { --icon-bg: var(--tuerkisgruen); --icon-fg: var(--dunkelblau); }
.role.area-ueber-uns { --icon-bg: var(--steingruen); --icon-fg: var(--dunkelblau); }
.role.area-mitmachen { --icon-bg: var(--sand); --icon-fg: var(--petrol); }
.role.area-mitmachen { background: var(--white); border: 3px solid var(--steingruen); }
.role h2 { margin: 0; color: inherit; font-size: clamp(1.05rem, min(1.8vw, 2.8vh), 1.55rem); font-weight: 900; line-height: 1.1; }
.role h2 a { color: inherit; text-decoration: none; }
/* Whole tile is clickable via the title link */
.role { position: relative; transition: transform .15s ease, box-shadow .15s ease; }
.role h2 a::after { content: ""; position: absolute; inset: 0; }
.role:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,.12); }
.role:focus-within { outline: 3px solid var(--petrol); outline-offset: 3px; }
.role h2 a:focus-visible { outline: none; }
.role .who { margin: 0; font-size: clamp(.82rem, 1.55vh, .95rem); line-height: 1.4; }
@media (max-width: 600px) { .role h2 { font-size: 1.05rem; } }

/* Landing: "Unser Ziel" below the tiles */
.goal { background: var(--white); padding: clamp(2rem, 4vw, 3rem) 1.25rem; font-size: .97rem; }
.goal-wrap { max-width: var(--roles-w); margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 1.4rem; text-align: center; }
.goal-head { display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: center; }
.goal-head > div { flex: 1 1 480px; display: flex; flex-direction: column; align-items: center; gap: .5rem; }
.goal-head p { margin: 0; max-width: 60ch; }
.goal-kicker { margin: 0 0 -.65rem; font-weight: 800; color: var(--petrol); }
.goal h2 { margin: 0; color: var(--dunkelblau); font-size: clamp(1.4rem, 2.4vw, 1.85rem); font-weight: 900; line-height: 1.1; }
.goal-button {
  text-decoration: none; color: var(--dunkelblau); font-weight: 800; font-size: .95rem;
  border: 2px solid var(--dunkelblau); padding: .55em 1.2em; border-radius: 999px;
}
.goal-button:hover { background: var(--dunkelblau); color: var(--sand); }
/* Same column width as the role tiles, centered */
.goal-stats { width: 100%; display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; }
.goal-stats > div { width: calc((100% - .75rem) / 2); }
@media (min-width: 900px) { .goal-stats > div { width: calc((100% - 2.25rem) / 4); } }
.goal-stats > div { background: var(--sand); border-radius: 16px; padding: 1rem 1.1rem; }
.goal-stats p { margin: .3rem 0 0; font-size: .95rem; }
.goal-stats .num { margin: 0; font-size: 1.65rem; font-weight: 900; color: var(--petrol); line-height: 1; }

/* Phones: Material compact layout, 16px side margin shared by headings and tiles */
@media (max-width: 599px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  .roles { padding-left: 16px; padding-right: 16px; }
  .hero7 { margin: 0 -16px; padding-left: 16px; padding-right: 16px; }
  .goal { padding-left: 16px; padding-right: 16px; }
  /* Language switcher top right, beside the logo */
  .top .wrap, .roles-head { position: relative; }
  .top .lang { position: absolute; top: calc(.6rem + 5px); right: 16px; }
  /* Start page: own slim strip above the row, so logo, Kontakt and Spenden stay aligned */
  .roles-head { padding-top: 1.1rem; }
  .roles-head .lang { position: absolute; top: -.5rem; right: 0; }
  .roles-head nav .lang a { padding: .3em .3em; }
}
/* Very narrow: nav wraps below the logo anyway, so the switcher goes beside the logo */
@media (max-width: 370px) {
  .roles-head { padding-top: 0; }
  .roles-head .lang { top: 8px; }
}

/* Footer */
.bottom { padding: 1.25rem 0; background: var(--dunkelblau); color: var(--sand); font-size: .9rem; }
.bottom a { color: var(--steingruen); }
.bottom .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; align-items: flex-start; padding-bottom: 1.25rem; }
.logos { display: flex; flex-wrap: wrap; gap: .6rem; margin: .6rem 0 1rem; }
.logos img { height: 48px; width: auto; padding: .3rem; background: var(--white); border-radius: 4px; }
.logos img[src*="lobby4kids"] { padding: .75rem .5rem; }
.bottom nav { display: flex; gap: 1rem; }
