/* ===========================================================================
   Lerntherapie & Heilpädagogik Carmen Scheer - REFRESH
   The redesign candidate, built from design/*.dc.html. Parallel to
   site.css, which stays the faithful rebuild of the Drupal theme.

   Identity is unchanged: Chewy, Hind, raspberry, deep blue, the watercolour
   background. What changes is structure, contrast and type scale.
   =========================================================================== */

/* --------------------------------------------------------------- webfonts */

@font-face {
  font-family: 'Chewy';
  src: url('../fonts/chewy.woff2') format('woff2'),
       url('../fonts/chewy.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Hind';
  src: url('../fonts/hind.woff2') format('woff2'),
       url('../fonts/hind.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ----------------------------------------------------------------- tokens */

:root {
  --font-display: 'Chewy', cursive;
  --font-body: 'Hind', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --color-text: #30313d;
  --color-muted: #5a5b68;
  --color-heading: #a74571;        /* raspberry */
  --color-blue: #003775;
  --color-nav: #003675;

  /* The three contrast corrections from the Tokens artboard, measured
     against white: 3.55 -> 4.52, 2.21 -> 3.03, 3.18 -> 4.53. */
  --color-link: #3e7bae;
  --color-link-hover: #2f6086;
  --color-quote: #cf8248;
  --color-quote-author: #c15708;

  --color-card: #fff;
  --color-rule: #e3e8ef;
  --color-field: #c9d2de;
  --color-tint: #fbfcfd;
  --color-on-blue: #dbe4ef;
  --color-on-blue-dim: #9fb6d2;

  --width-page: 1200px;
  --pad-page: 24px;
  --radius: 16px;
  --radius-sm: 12px;
  --radius-pill: 999px;

  --shadow-card: 0 3px 16px rgba(0, 0, 0, .12);
  --shadow-lift: 0 12px 34px rgba(0, 0, 0, .18);

  --header-h: 88px;
}

/* ------------------------------------------------------------------ reset */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  /* Anchors must clear the sticky header and the sticky section nav. */
  scroll-padding-top: calc(var(--header-h) + 60px);
}

/* Smooth scrolling is switched on by the script only once the page has
   loaded. Left on globally, arriving at /therapiebereiche#dyskalkulie from
   the homepage means landing at the top and watching the page slide for a
   second; the jump should be instant, the later in-page clicks smooth. */
html.js-smooth { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html.js-smooth { scroll-behavior: auto; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--color-text);
  background-color: #fff;
  background-image: url('../img/bg.jpg');
  background-position: center top;
  background-repeat: no-repeat;
  background-size: cover;
  background-attachment: fixed;
}

img { max-width: 100%; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--color-heading);
  text-wrap: balance;
}

h1 { font-size: clamp(34px, 4.4vw, 52px); line-height: 1.15; margin: 0 0 .3em; }
h2 { font-size: clamp(28px, 3.2vw, 40px); line-height: 1.2;  margin: 0 0 .35em; }
h3 { font-size: clamp(22px, 2.2vw, 27px); line-height: 1.25; margin: 0 0 .4em; }

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

a { color: var(--color-link); text-decoration: none; }
a:hover { color: var(--color-link-hover); text-decoration: underline; }

ul { margin: 0 0 1em; padding-left: 1.3em; }
li { margin-bottom: .45em; }

strong { font-weight: 600; }

:focus-visible {
  outline: 3px solid var(--color-heading);
  outline-offset: 2px;
  border-radius: 3px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  z-index: 100;
  padding: 12px 20px;
  background: var(--color-blue);
  color: #fff;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; top: 0; }

/* ----------------------------------------------------------------- header */

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  border-bottom: 2px solid var(--color-blue);
}

.header__inner {
  max-width: var(--width-page);
  margin: 0 auto;
  padding: 12px var(--pad-page);
  display: flex;
  align-items: center;
  gap: 22px;
}

.header__logo { display: block; flex-shrink: 0; }
.header__logo img { display: block; width: 168px; height: auto; }

.nav { margin-left: auto; }

.nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav li { margin: 0; }

.nav a {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--color-nav);
  text-decoration: none;
  white-space: nowrap;
}

.nav a:hover { color: var(--color-heading); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--color-heading); }

.header__call {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  background: var(--color-heading);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
}
.header__call:hover { background: #8e3a60; color: #fff; text-decoration: none; }

.header__menu {
  display: none;
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--color-blue);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--color-blue);
  cursor: pointer;
}

/* -------------------------------------------------------- in-page section nav */

.section-nav {
  background: rgba(255, 255, 255, .94);
  border-bottom: 1px solid #dbe1ea;
}

.section-nav ul {
  max-width: var(--width-page);
  margin: 0 auto;
  padding: 0 var(--pad-page);
  list-style: none;
  display: flex;
  gap: 8px;
  overflow-x: auto;
}

.section-nav li { margin: 0; }

.section-nav a {
  display: block;
  padding: 13px 16px;
  font-size: 16px;
  font-weight: 600;
  color: #4a4b57;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
}

.section-nav a:hover { color: var(--color-heading); text-decoration: none; }
.section-nav a.is-active { color: var(--color-heading); border-bottom-color: var(--color-heading); }

/* ----------------------------------------------------------------- layout */

.wrap {
  max-width: var(--width-page);
  margin: 0 auto;
  padding: 0 var(--pad-page);
}

.band { padding: 56px 0; }
.band--tight { padding: 36px 0; }
.band--tint { background: rgba(255, 255, 255, .82); }

.lead {
  font-size: 19px;
  line-height: 1.65;
  max-width: 38em;
}

.centered { text-align: center; }
.centered .lead { margin-left: auto; margin-right: auto; }

.muted { color: var(--color-muted); }
.small { font-size: 15px; line-height: 1.55; }

.measure { max-width: 46em; }

.grid-2, .grid-3, .grid-4 { display: grid; gap: 28px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.grid-2--wide  { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
.grid-2--aside { grid-template-columns: minmax(0, 1fr) 400px; }
.grid-2--aside-start { grid-template-columns: 400px minmax(0, 1fr); }

.stack { display: flex; flex-direction: column; gap: 16px; }
.stack--tight { gap: 10px; }
.stack--loose { gap: 24px; }

.row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

/* ------------------------------------------------------------------ cards */

.card {
  background: var(--color-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: clamp(24px, 3.5vw, 40px);
}

.card--flush { padding: 0; overflow: hidden; }
.card--flush .card__body { padding: clamp(24px, 3.5vw, 40px); }

.card__image { display: block; width: 100%; height: 260px; object-fit: cover; }

.panel {
  background: var(--color-tint);
  border: 1.5px solid var(--color-rule);
  border-radius: var(--radius-sm);
  padding: 28px;
}

.note {
  padding: 16px 18px;
  background: rgba(0, 55, 117, .06);
  border-radius: 10px;
}

.note--flag {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.note--flag svg { flex-shrink: 0; margin-top: 3px; }

/* Anything only Carmen can supply is marked, never invented. */
.todo {
  color: var(--color-muted);
  font-style: normal;
}

/* ---------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 13px 26px;
  border: 2px solid transparent;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { text-decoration: none; }

.btn--primary { background: var(--color-heading); color: #fff; }
.btn--primary:hover { background: #8e3a60; color: #fff; }

.btn--ghost { border-color: var(--color-blue); color: var(--color-blue); background: transparent; }
.btn--ghost:hover { background: var(--color-blue); color: #fff; }

.btn--on-blue { background: #fff; color: var(--color-blue); }
.btn--on-blue:hover { background: var(--color-on-blue); color: var(--color-blue); }

.btn--outline-blue { border-color: rgba(255, 255, 255, .55); color: #fff; }
.btn--outline-blue:hover { background: rgba(255, 255, 255, .14); color: #fff; }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  background: rgba(167, 69, 113, .1);
  color: var(--color-heading);
  font-size: 14px;
  font-weight: 600;
}

.tag--blue { background: rgba(0, 55, 117, .07); color: var(--color-blue); font-weight: 400; font-size: 15px; }

/* -------------------------------------------------------------------- hero */

.hero {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 48px;
  align-items: center;
}

.hero__figure {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lift);
}
.hero__figure img { display: block; width: 100%; height: auto; }

/* ------------------------------------------------------------------ quote */

.quote { text-align: center; }

.quote p {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: clamp(22px, 2.6vw, 32px);
  line-height: 1.35;
  color: var(--color-quote);
}

.quote cite {
  font-style: normal;
  font-size: 16px;
  color: var(--color-quote-author);
}

/* ------------------------------------------------------------------ steps */

.step__num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: var(--radius-pill);
  background: var(--color-blue);
  color: #fff;
  font-family: var(--font-display);
  font-size: 22px;
}

.step__num--soft { background: rgba(167, 69, 113, .12); color: var(--color-heading); }

/* The vertical rail on Ablauf: number, connector line, content. */
.rail { display: flex; flex-direction: column; }

.rail__item { display: flex; gap: 26px; align-items: stretch; }
.rail__item:last-child { align-items: flex-start; }

.rail__marker { display: flex; flex-direction: column; align-items: center; flex-shrink: 0; }
.rail__line { width: 2px; flex-grow: 1; background: #dbe1ea; margin-top: 8px; }
.rail__item:last-child .rail__line { display: none; }
.rail__body { padding-bottom: 34px; }
.rail__item:last-child .rail__body { padding-bottom: 0; }

/* Proportional bar for the make-up of one therapy hour. */
.timebar { display: flex; height: 44px; border-radius: 10px; overflow: hidden; }
.timebar span { display: block; }
.timebar__prep { background: var(--color-on-blue-dim); }
.timebar__core { background: var(--color-heading); }

.timekey { display: flex; }
.timekey > div { text-align: center; }

/* ------------------------------------------------------------------- list */

.ticks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 13px; }

.ticks li {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
}
.ticks svg { flex-shrink: 0; margin-top: 3px; }

.signs { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.signs:last-child { margin-bottom: 0; }

.signs li {
  display: flex;
  gap: 10px;
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
}
.signs li::before { content: '•'; color: var(--color-heading); flex-shrink: 0; }

.signs__label {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-heading);
}

/* -------------------------------------------------------------------- cta */

.cta {
  background: var(--color-blue);
  border-radius: var(--radius);
  padding: clamp(28px, 4vw, 48px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px;
  align-items: center;
}

.cta h2 { color: #fff; margin-bottom: .3em; }
.cta p { color: var(--color-on-blue); }

.cta__actions { display: flex; flex-direction: column; gap: 12px; }

.on-blue { background: var(--color-blue); border-radius: var(--radius); padding: 32px; color: #fff; }
.on-blue h2, .on-blue h3 { color: #fff; }
.on-blue p { color: var(--color-on-blue); }

.contact-line { display: flex; align-items: flex-start; gap: 13px; }
.contact-line svg { flex-shrink: 0; margin-top: 3px; }
.contact-line__label {
  margin: 0;
  font-size: 13px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--color-on-blue-dim);
}
.contact-line__value { margin: 2px 0 0; font-size: 17px; line-height: 1.5; color: #fff; }
/* Anfahrt: nine saved OpenStreetMap tiles, the address at the exact centre. */
.static-map-wrap { margin: 0; }
.static-map {
  position: relative;
  height: 300px;
  border-radius: 12px;
  overflow: hidden;
  background: #eef0f2;
}
.static-map__tiles { position: absolute; left: 50%; top: 50%; width: 768px; display: flex; flex-wrap: wrap; }
.static-map__tiles img { display: block; width: 256px; height: 256px; }
.static-map__pin {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -100%);
  color: var(--color-heading);
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .4));
}
.static-map__route { margin-top: 16px; gap: 8px; }
.static-map__caption { margin: 12px 0 0; font-size: 13px; color: var(--color-muted); }
.static-map__caption a { color: inherit; }

.contact-line__note { margin: 4px 0 0; font-size: 15px; line-height: 1.45; color: var(--color-on-blue-dim); }
.contact-line__value a { color: #fff; text-decoration: underline; }
.contact-line__value--big { font-size: 20px; font-weight: 600; }

/* ------------------------------------------------------------------- form */

.field { display: flex; flex-direction: column; gap: 7px; }

/* The spam trap: off-screen rather than display:none, which some bots skip. */
.field--trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.form-status { margin: 0 0 22px; font-weight: 600; }
.form-status--ok { color: #1f6b3a; background: rgba(31, 107, 58, .09); }
.form-status--error { color: #9b1c1c; background: rgba(155, 28, 28, .08); }

.field label { font-size: 15px; font-weight: 600; color: var(--color-blue); }

.field input,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--color-field);
  border-radius: 10px;
  background: var(--color-tint);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  color: var(--color-text);
}

.field input { min-height: 48px; }
.field textarea { min-height: 132px; resize: vertical; }

.field input::placeholder,
.field textarea::placeholder { color: #9aa3b0; }

.choices { position: relative; display: flex; flex-wrap: wrap; gap: 10px; }

.choices label {
  padding: 10px 18px;
  border: 1.5px solid var(--color-field);
  border-radius: var(--radius-pill);
  font-size: 15px;
  font-weight: 400;
  color: #4a4b57;
  cursor: pointer;
}

/* Hidden from sight but not from the keyboard or the accessibility tree.
   Clipped rather than merely transparent - a transparent input keeps its
   intrinsic width and pushes the page into a horizontal scrollbar. */
.choices input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.choices input:checked + label,
.choices label:hover {
  border-color: var(--color-heading);
  background: rgba(167, 69, 113, .09);
  color: var(--color-heading);
  font-weight: 600;
}

.choices input:focus-visible + label { outline: 3px solid var(--color-heading); outline-offset: 2px; }

.consent { display: flex; align-items: flex-start; gap: 11px; }
.consent input { width: 21px; height: 21px; flex-shrink: 0; margin: 2px 0 0; }
.consent p { margin: 0; font-size: 14px; line-height: 1.55; color: var(--color-muted); }

/* ---------------------------------------------------------------- credits */

.credit {
  display: flex;
  gap: 18px;
  align-items: center;
  padding: 18px;
  border: 1.5px solid var(--color-rule);
  border-radius: var(--radius-sm);
}
.credit img { width: 84px; height: auto; flex-shrink: 0; }
.credit p { margin: 0; font-size: 16px; line-height: 1.55; }

.portrait {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.portrait img { display: block; width: 100%; height: auto; }

/* ----------------------------------------------------------------- footer */

.footer {
  background: var(--color-blue);
  padding: 44px 0 36px;
  margin-top: 24px;
}

.footer__inner {
  max-width: var(--width-page);
  margin: 0 auto;
  padding: 0 var(--pad-page);
  text-align: center;
}

.footer__name {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: 22px;
  color: #fff;
}

.footer__address {
  margin: 0 0 16px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--color-on-blue);
}
.footer__address a { color: var(--color-on-blue); text-decoration: underline; }
.footer__address a:hover { color: #fff; }

.footer__nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  gap: 22px;
  justify-content: center;
}
.footer__nav li { margin: 0; }
.footer__nav a { font-size: 15px; color: #fff; text-decoration: underline; }

/* --------------------------------------------------------------- back to top */

.toplink {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 40;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: var(--radius-pill);
  background: var(--color-heading);
  color: #fff;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s;
  box-shadow: var(--shadow-card);
}
.toplink.is-visible { opacity: .85; visibility: visible; }
.toplink:hover, .toplink:focus-visible { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .toplink { transition: none; }
}

/* --------------------------------------- prose, for the carried-over legal pages */

.prose h1 { margin-bottom: .5em; }
.prose h2 { font-size: clamp(24px, 2.6vw, 30px); margin-top: 1.4em; }
.prose h3 { font-size: clamp(19px, 2vw, 22px); margin-top: 1.3em; color: var(--color-blue); }
.prose h4 { font-size: 18px; margin: 1.3em 0 .4em; color: var(--color-blue); }
.prose ul { padding-left: 1.3em; }
.prose > *:first-child { margin-top: 0; }

/* The reused pages still carry the old .card markup; neutralise its decoration. */
.prose .card { background: none; box-shadow: none; padding: 0; border-radius: 0; }
.prose .card__drawing { display: none; }

/* ------------------------------------------------------------ breakpoints */

@media (max-width: 1120px) {
  .nav ul { gap: 16px; }
  .nav a { font-size: 18px; }
  .header__inner { gap: 16px; }
}

@media (max-width: 1023px) {
  :root { --header-h: 72px; }

  .header__menu { display: flex; }
  .header__call { margin-left: auto; padding: 0; width: 46px; height: 46px; justify-content: center; }
  .header__call-label { display: none; }

  .nav {
    display: none;
    order: 3;
    width: 100%;
    margin: 0;
    padding: 8px 0 4px;
    border-top: 1px solid var(--color-rule);
  }
  .nav[data-open="true"] { display: block; }

  .nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .nav a { display: block; padding: 13px 4px; font-size: 22px; }

  .header__inner { flex-wrap: wrap; }
}

@media (max-width: 900px) {
  .hero,
  .grid-2, .grid-3, .grid-4,
  .grid-2--wide, .grid-2--aside, .grid-2--aside-start,
  .cta { grid-template-columns: minmax(0, 1fr); }

  .hero { gap: 28px; }
  .grid-2, .grid-3, .grid-4 { gap: 20px; }
  .cta { gap: 24px; }

  /* On a phone the picture belongs under the words, not above them. */
  .hero__figure { order: 2; }

  .band { padding: 40px 0; }
  .card__image { height: 180px; }
  .portrait { max-width: 400px; }
}

@media (max-width: 620px) {
  body { font-size: 16px; }

  :root { --pad-page: 16px; }

  .btn { width: 100%; min-height: 54px; font-size: 16px; }
  .row .btn { width: 100%; }

  .rail__item { gap: 16px; }
  .step__num { width: 38px; height: 38px; font-size: 19px; }

  .timekey { font-size: 13px; }

  .credit { flex-direction: column; align-items: flex-start; gap: 12px; }

  .footer__nav ul { flex-direction: column; gap: 10px; }
}

/* ------------------------------------------------------------------ print */

@media print {
  .header, .section-nav, .toplink, .skip-link { display: none; }
  body { background: none; font-size: 12pt; }
  .card, .panel { box-shadow: none; border: 1px solid #ccc; }
  .cta, .on-blue { background: none; color: #000; border: 1px solid #ccc; }
  .cta h2, .cta p, .on-blue h2, .on-blue h3, .on-blue p { color: #000; }
}
