/* =========================================================================
   Veronika Molden – Praxis für Humanistische Psychotherapie
   Loaded after uaplus.css — these rules are unlayered and therefore always
   win over the reset's `uaplus-reset-styles` layer.
   ========================================================================= */

/* ---------- Fonts (self-hosted, from Google Fonts) ----------------------- */

@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: "Cormorant Garamond";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("../fonts/cormorant-garamond-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: "Cormorant Garamond";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("../fonts/cormorant-garamond-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-purple: #554596;
  --c-green: #6d8b6d;
  /* Darker than the ornament green: reaches 3.5:1 on lavender (large text). */
  --c-green-text: #5a7a5a;
  --c-lavender: #ddd9ea;
  --c-white: #fff;
  --c-ink: #1b1719;
  /* Footer text on white: 7.3:1. */
  --c-muted: #4f4a5c;

  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-heading: "Cormorant Garamond", Garamond, Georgia, serif;

  /* Fluid from 23.4375rem (375px) to 90rem (1440px). Ratios from the PDF:
     intro 1.34 × body, card title 2.22 × body, name 1.9 → 2.22 × body. */
  --step-0: clamp(0.9375rem, 0.8935rem + 0.1878vw, 1.0625rem); /* body   15 → 17 */
  --step-1: clamp(1.0625rem, 0.9306rem + 0.5634vw, 1.4375rem); /* intro  17 → 23 */
  --step-2: clamp(1.75rem, 1.5625rem + 0.883vw, 2.375rem); /* name   28 → 38 */
  /* Card title: 2.22 × body, but on phones below ~400px never wider than
     the card (the one-line heading is 8.6em wide). */
  --step-3: min(var(--step-0) * 2.22, 10vw - 0.28rem); /* title  28 → 38 */

  /* Tracking of all Inter text in the PDF (measured: 20/1000 em). */
  --tracking: 0.02em;

  --gutter: clamp(1.25rem, 0.2rem + 4.5vw, 4rem);
  --wrap-max: 36rem;
  --card-pad: clamp(1.25rem, 0.8rem + 1.9vw, 2.5rem);
  --photo: clamp(10.5rem, 8.92rem + 6.76vw, 15rem);
  /* How far the round photo sticks out of the card, as a share of --photo. */
  --photo-over-top: 0.66;
  --photo-over-side: 0.06;
  /* Desktop only: how far the card reaches back over the ornament. */
  --card-pull: 0rem;

  /* Where the intro text starts on the ornament (percent of the intro's
     width). The header name uses the same offset, so both share one edge. */
  --intro-top: 18.5%;
  --intro-indent: 0%;
  /* Share of the .wrap width the intro column takes: 1 stacked, 0.5 side by side. */
  --intro-share: 1;
}

@media (min-width: 64rem) {
  :root {
    --wrap-max: 68rem;
    --intro-top: 35%;
    --intro-indent: 9%;
    --intro-share: 0.5;
    --card-pull: clamp(2rem, 5vw, 4.5rem);
  }
}

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

body {
  min-block-size: 100vh;
  min-block-size: 100svh;
  display: flex;
  flex-direction: column;
  margin: 0;
  background-color: var(--c-purple);
  color: var(--c-white);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.45;
  letter-spacing: var(--tracking);
  /* The PDF uses Inter's text cut (opsz 14) at every size. With the default
     "auto", larger text would switch to the tighter display shapes. */
  font-optical-sizing: none;
  font-feature-settings: "calt" 1;
}

p,
ul,
address {
  margin: 0;
}

address {
  font-style: normal;
}

a {
  color: inherit;
  text-decoration: none;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover,
a:focus-visible {
  text-decoration: underline;
}

:focus-visible {
  outline: 2px solid currentColor;
  border-radius: 2px;
}

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

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

/* One container for header and content, so their edges always line up. */
.wrap {
  inline-size: 100%;
  max-inline-size: calc(var(--wrap-max) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Vertical rhythm between siblings; tune per block with --flow. */
.flow > * + * {
  margin-block-start: var(--flow, 1em);
}

.heading {
  margin: 0;
  font-family: var(--font-heading);
  font-size: var(--step-3);
  /* 700 matches the stroke-thickened Light of the PDF (ink coverage 12.5 %
     vs 12.8 %); 600 is visibly lighter. */
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0;
  hyphens: auto;
  overflow-wrap: break-word;
}

.caps {
  /* The PDF uses 0.83 ×; set smaller on screen, where capitals read larger. */
  font-size: 0.75em;
  text-transform: uppercase;
  /* Wider tracking than the base, so the line runs a little past the one
     above it, as in the PDF. */
  letter-spacing: 0.05em;
}

/* Line breaks taken from the print layout — only where the line still fits.
   Measured against the nearest container, not the viewport. */
.br-wide {
  display: none;
}

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

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

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

.site-name {
  color: var(--c-purple);
  font-size: var(--step-2);
  /* Trim the font's built-in leading to cap height and baseline, so the
     name sits optically centred in the white band. */
  text-box: trim-both cap alphabetic;
  padding-inline-start: calc(var(--intro-indent) * var(--intro-share));
}

.site-name a:hover {
  text-decoration: none;
}

/* ---------- Page body (shared by all pages) ----------------------------- */

/* flex: 1 pushes the footer to the bottom on short pages. */
.page {
  flex: 1;
  padding-block: clamp(1rem, 0.5rem + 2vw, 2.25rem) clamp(2.5rem, 1.5rem + 4vw, 4rem);
}

/* Lavender card: the welcome box on the start page, the text on the others. */
.card {
  --flow: 1.25em;
  padding: var(--card-pad);
  background-color: var(--c-lavender);
  color: var(--c-ink);
  line-height: 1.4;
}

.card__title {
  color: var(--c-green-text);
}

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

.card a {
  overflow-wrap: anywhere;
}

/* ---------- Hero: ornament + intro, welcome card ------------------------ */

.hero {
  display: grid;
  align-items: start;
}

@media (min-width: 64rem) {
  .hero {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* The ornament is decoration only, so it is a background: the box keeps its
   proportions and grows if the text ever needs more room. */
.intro {
  /* Line and paragraph spacing measured in the PDF (baseline to baseline:
     1.33 in the lead, 1.2 elsewhere, 3.0 and 2.4 between the blocks). */
  --flow: 1.2em;
  display: flex;
  flex-direction: column;
  aspect-ratio: 1278 / 1450;
  padding: var(--intro-top) 0 4% var(--intro-indent);
  background: url("../img/ornament.png") no-repeat 0 0 / 100% auto;
  font-size: var(--step-1);
  line-height: 1.2;
}

.intro__lead {
  line-height: 1.33;
}

.intro__lead + * {
  --flow: 1.72em;
}

.intro__logo {
  margin-block-start: auto;
  padding-block-start: 1.5em;
  inline-size: clamp(12rem, 9rem + 7vw, 17rem);
}

/* The logo file is grey; turn it white on the purple ground. */
.intro__logo img {
  display: block;
  inline-size: 100%;
  block-size: auto;
  filter: brightness(0) invert(1);
}

.welcome {
  position: relative;
  display: flow-root;
  container-type: inline-size;
  margin-block-start: calc(var(--photo) * var(--photo-over-top) + 1.5rem);
  margin-inline-start: calc(-1 * var(--card-pull));
}

@media (min-width: 64rem) {
  .welcome {
    margin-block-start: calc(var(--photo) * var(--photo-over-top) + 1rem);
  }
}

/* Floated with negative margins so it pokes out of the card's top-right
   corner while the text still wraps around the part inside the card. */
.welcome__photo {
  float: right;
  inline-size: var(--photo);
  margin-block: calc(-1 * (var(--card-pad) + var(--photo) * var(--photo-over-top))) 0.5rem;
  margin-inline: 0.75rem calc(-1 * (var(--card-pad) + var(--photo) * var(--photo-over-side)));
  shape-outside: circle(50%);
  shape-margin: 0.75rem;
}

.welcome__photo img {
  display: block;
  inline-size: 100%;
  block-size: auto;
  aspect-ratio: 1;
  border-radius: 50%;
  object-fit: cover;
}

/* The heading stays on one line: beside the photo if it fits, below it
   otherwise. A flow-root box never slides under a float, and fit-content
   makes it only as wide as its text, so it drops down when that won't fit. */
.welcome__heading {
  display: flow-root;
  inline-size: fit-content;
  white-space: nowrap;
}

.welcome > .welcome__heading + * {
  --flow: 0.6em;
}

.welcome__contact {
  padding: 0;
  list-style: none;
  margin-block-start: 0.35em;
  font-size: 1.22em;
  line-height: 1.35;
}

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

.prose {
  max-inline-size: 46rem;
  margin-inline: auto;
  text-wrap: pretty;
}

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

.prose h2 + * {
  --flow: 0.5em;
}

.prose dl,
.prose dd {
  margin: 0;
}

.prose dt {
  font-weight: 600;
}

.prose dd + dt {
  margin-block-start: 0.9em;
}

.prose dd + dd {
  margin-block-start: 0.5em;
}

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

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

.prose__meta {
  margin-block-start: 2.25em;
  font-size: 0.9em;
}

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

/* White band like the header, links centred. */
.site-footer {
  background-color: var(--c-white);
  color: var(--c-muted);
  font-size: var(--step-0);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 2rem;
  padding-block: clamp(1.25rem, 1rem + 1vw, 1.75rem);
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 2rem;
  padding: 0;
  list-style: none;
}

/* Underlined so the links stand out from the equally muted text beside them. */
.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,
.site-footer [aria-current="page"] {
  color: var(--c-ink);
  text-decoration-color: currentColor;
}

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

@media (forced-colors: active) {
  .card {
    border: 1px solid CanvasText;
  }

  .intro__logo img {
    filter: none;
    forced-color-adjust: none;
    background-color: #fff;
  }
}

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

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

  .intro {
    aspect-ratio: auto;
    background: none;
  }

  .intro__logo img {
    filter: none;
  }

  .site-footer {
    display: none;
  }
}
