/* =========================================================================
   Psychotherapie Richtergasse
   Loaded after uaplus.css — these rules are unlayered and therefore always
   win over the reset's `uaplus-reset-styles` layer.
   ========================================================================= */

/* ---------- Fonts: Inter (variable, self-hosted) ------------------------- */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-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;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Inter";
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-italic-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;
}

@font-face {
  font-family: "Inter";
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-italic-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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

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

:root {
  color-scheme: light;

  --c-mauve: #cbb3bc;
  --c-white: #fff;
  --c-red: #a81c26;
  --c-red-dark: #8b141d;
  --c-ink: #1b1719;
  /* Dark enough for WCAG AA (4.7:1) on the mauve background. */
  --c-muted: #4f444a;

  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Fluid from 22.5rem (360px) to 90rem (1440px) */
  --step-0: clamp(1rem, 0.94rem + 0.27vw, 1.0625rem); /* body 16 → 17 */
  --step--1: clamp(0.875rem, 0.83rem + 0.19vw, 0.9375rem); /* caption   */
  --step-2: clamp(1.125rem, 0.72rem + 1.72vw, 1.625rem); /* headline    */

  --gutter: clamp(1.25rem, 0.2rem + 5.2vw, 6rem);
  --col-gap: clamp(1.5rem, 0.2rem + 4vw, 4rem);
  --page-max: 95rem;
  --card-inset: clamp(0.875rem, -0.1rem + 4.3vw, 2.75rem);
  --radius: clamp(1rem, 0.6rem + 1.8vw, 1.75rem);
}

/* ---------- Base --------------------------------------------------------- */

/* Sticky Footer: auf kurzen Seiten (404) sitzt das weiße Band unten,
   nicht mitten auf dem Schirm. */
body {
  min-block-size: 100vh;
  min-block-size: 100svh;
  display: flex;
  flex-direction: column;
  margin: 0;
  background-color: var(--c-mauve);
  color: var(--c-ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.45;
  /* Inter's contextual alternates give a properly shaped "→", ":" spacing. */
  font-feature-settings: "calt" 1;
}

/* The design sets contact details without underlines; the underline comes
   back on hover and focus so the link affordance is never lost. */
a {
  color: inherit;
  text-decoration: none;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: color 150ms ease;
}

a:hover,
a:focus-visible {
  color: var(--c-red-dark);
  text-decoration: underline;
}

:focus-visible {
  outline: 2px solid var(--c-red-dark);
  border-radius: 2px;
}

/* ---------- Utilities ---------------------------------------------------- */

/* Line breaks taken from the print layout — only where the line still fits. */
.br-wide {
  display: none;
}

@media (min-width: 32rem) {
  .br-wide {
    display: inline;
  }
}

.visually-hidden:not(:focus):not(:active) {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- Header ------------------------------------------------------- */

.site-header {
  background-color: var(--c-white);
  padding-block: clamp(1.5rem, 0.9rem + 2.7vw, 2.875rem);
}

.site-header__inner {
  max-inline-size: var(--page-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
  text-align: center;
}

/* Ab dem Zweispalter steht das Logo mittig über dem Foto, nicht über der
   ganzen Seite — dasselbe Raster wie .layout. */
@media (min-width: 60rem) {
  .site-header__inner {
    display: grid;
    grid-template-columns: minmax(0, 60fr) minmax(0, 40fr);
    gap: var(--col-gap);
  }
}

.site-header__logo {
  margin: 0;
}

.site-header__logo img {
  display: inline-block;
  inline-size: clamp(12rem, 38vw, 23rem);
  block-size: auto;
}

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

.layout {
  flex: 1;
  display: grid;
  gap: clamp(2rem, 1.2rem + 3.4vw, 3.5rem) var(--col-gap);
  padding-block: 0 clamp(2.5rem, 1.5rem + 4.4vw, 4.5rem);
  padding-inline: var(--gutter);
  max-inline-size: var(--page-max);
  margin-inline: auto;
}

@media (min-width: 60rem) {
  .layout {
    grid-template-columns: minmax(0, 60fr) minmax(0, 40fr);
    align-items: start;
  }

  /* The photo sits flush under the header, the text column starts lower. */
  .team {
    padding-block-start: 1.25rem;
  }
}

/* ---------- Intro: photo + welcome card ---------------------------------- */

.intro {
  display: flow-root;
}

.intro__photo {
  margin: 0;
}

.intro__photo img {
  display: block;
  inline-size: 100%;
  block-size: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: 50% 22%;
}

/* Photo bleeds to the screen edges while the text stays inside the gutter. */
@media (max-width: 59.999rem) {
  .intro__photo {
    margin-inline: calc(var(--gutter) * -1);
  }
}

@media (min-width: 45rem) {
  .intro__photo img {
    aspect-ratio: 1818 / 1228;
    object-position: 50% 50%;
  }
}

.welcome {
  position: relative;
  margin-block-start: clamp(-4.5rem, -4.41rem + 1.77vw, -2.75rem);
  margin-inline: var(--card-inset);
  padding: clamp(1.75rem, 1.1rem + 2.9vw, 3rem) clamp(1.25rem, 0.5rem + 3.3vw, 2.5rem);
  background-color: var(--c-white);
  border-radius: var(--radius);
  text-align: center;
  text-wrap: balance;
}

.welcome__heading {
  margin: 0;
  color: var(--c-red);
  font-size: var(--step-2);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.005em;
}

.welcome__lead {
  margin-block: clamp(1.25rem, 0.9rem + 1.5vw, 1.875rem) 0;
  line-height: 1.4;
}

.welcome__lead strong {
  font-weight: 700;
}

.welcome__transit {
  margin-block: 1.4em 0;
  line-height: 1.4;
}

/* ---------- Team --------------------------------------------------------- */

.team__caption {
  margin: 0 0 0.35em;
  color: var(--c-muted);
  font-size: var(--step--1);
}

.team__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: clamp(1.75rem, 1.2rem + 2.4vw, 2.5rem);
}

/* On mid-size screens the four entries read better side by side — and
   centred, matching the welcome card above them. */
@media (min-width: 45rem) and (max-width: 59.999rem) {
  .team {
    text-align: center;
  }

  .team__list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: clamp(2rem, 4vw, 3.5rem);
  }

  /* Centred, the hanging indent would push the text off-axis. The arrow
     becomes a plain prefix so arrow and text centre as one unit. */
  .person__contact li {
    padding-inline-start: 0;
  }

  .person__contact li::before {
    inline-size: auto;
    margin-inline: 0 0.4em;
  }
}

.person__name {
  margin: 0 0 0.55em;
  font-size: var(--step-0);
  font-weight: 700;
  line-height: 1.3;
}

.person__name sup {
  font-size: 0.62em;
  vertical-align: 0.5em;
  line-height: 0;
}

.person__role {
  margin: 0;
  line-height: 1.35;
  /* Bewusst kein text-wrap: pretty/balance. Beides wertet "personzentriert"
     als Waise und zieht "PSYCHOTHERAPIE:" in die nächste Zeile — und zwar je
     nach Länge von "Psychotherapeut(in)" bei den vier Einträgen verschieden.
     Der normale Umbruch trennt bei allen gleich nach "PSYCHOTHERAPIE:". */
}

.person__method {
  text-transform: uppercase;
}

/* line-height 1.5 hält die beiden Kontaktlinks 24 CSS-Pixel Mitte-zu-Mitte
   auseinander — Abstandsausnahme von WCAG 2.2 SC 2.5.8. Nicht enger setzen. */
.person__contact {
  margin: 0.9em 0 0;
  padding: 0;
  list-style: none;
  line-height: 1.5;
}

.person__contact li {
  padding-inline-start: 1.5em;
}

.person__contact li::before {
  content: "\2192";
  display: inline-block;
  inline-size: 1.5em;
  margin-inline-start: -1.5em;
  color: var(--c-ink);
}

.person__contact a {
  overflow-wrap: anywhere;
}

/* ---------- Print -------------------------------------------------------- */

@media print {
  body {
    background: none;
    color: #000;
  }

  .welcome {
    border: 1px solid #999;
  }

  .person__contact a {
    text-decoration: none;
  }
}

/* ---------- Text pages (Impressum, Datenschutz) -------------------------- */

.layout--text {
  display: block;
  padding-block-start: clamp(1.75rem, 1rem + 3.2vw, 3.25rem);
}

.prose {
  max-inline-size: 46rem;
  margin-inline: auto;
  padding: clamp(1.5rem, 0.9rem + 2.7vw, 3rem) clamp(1.25rem, 0.6rem + 2.9vw, 3rem);
  background-color: var(--c-white);
  border-radius: var(--radius);
  text-wrap: pretty;
}

.prose > * + * {
  margin-block-start: 1em;
}

.prose h1 {
  margin: 0;
  color: var(--c-red);
  font-size: var(--step-2);
  font-weight: 400;
  line-height: 1.25;
}

.prose h2 {
  margin-block-start: 2.5em;
  font-size: var(--step-0);
  font-weight: 700;
  line-height: 1.3;
}

.prose h2 + * {
  margin-block-start: 0.6em;
}

.prose ul {
  margin-block: 1em 0;
  padding-inline-start: 1.2em;
}

.prose li + li {
  margin-block-start: 0.35em;
}

.prose dl {
  margin: 0;
}

.prose dt {
  margin-block-start: 1em;
  font-weight: 700;
}

.prose dt:first-child {
  margin-block-start: 0;
}

.prose dd {
  margin: 0;
}

.prose a[href^="tel:"] {
  white-space: nowrap;
}

.prose a {
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
}

.prose a:hover,
.prose a:focus-visible {
  text-decoration-color: currentColor;
}

.prose__meta {
  margin-block-start: 2.5em;
  color: var(--c-muted);
  font-size: var(--step--1);
}

/* Marks data only the practice can supply. Must be empty before going live. */
.todo {
  padding: 0.1em 0.4em;
  border-radius: 0.25em;
  background-color: #f7e6c2;
  box-shadow: inset 0 0 0 1px #cdab5e;
  font-style: normal;
}

/* ---------- Footer ------------------------------------------------------- */

/* Weißes Band wie der Header: randlos, Inhalt im Seitenraster. */
.site-footer {
  background-color: var(--c-white);
  color: var(--c-muted);
  font-size: var(--step--1);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  max-inline-size: var(--page-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
  padding-block: clamp(1.25rem, 0.9rem + 1.6vw, 2rem);
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer p {
  margin: 0;
}

.site-footer [aria-current="page"] {
  color: var(--c-ink);
}

/* Footer links carry an underline so they are not distinguishable by
   position alone — everything around them shares the same muted colour. */
.site-footer a {
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, currentColor 40%, transparent);
}

.site-footer a:hover,
.site-footer a:focus-visible {
  text-decoration-color: currentColor;
}

/* ---------- Forced colors (Windows-Kontrastmodus) ------------------------ */

@media (forced-colors: active) {
  /* Weiße Flächen verlieren im Kontrastmodus ihre Kontur. */
  .welcome,
  .prose {
    border: 1px solid CanvasText;
  }

  /* Das Logo ist ein Bild und wird nicht umgefärbt — es braucht eine helle
     Unterlage, sonst steht Grau auf Schwarz. */
  .site-header__logo img {
    forced-color-adjust: none;
    background-color: #fff;
  }

  .todo {
    outline: 1px dashed CanvasText;
  }
}

/* ---------- Reduzierte Bewegung ------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}

/* Kurze Textseiten (404) stehen zentriert statt als Fließtextblock. */
.prose--center {
  max-inline-size: 34rem;
  text-align: center;
  text-wrap: balance;
}
