/* ==========================================================================
   Ernst Jaser · Psychotherapie Mannheim
   Warm & ruhig — Erdtöne, Serif-Headlines, Open Sans 300 für Text
   ========================================================================== */

/* ---------- Fonts ---------- */
@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("../fonts/open-sans-300.woff2") format("woff2");
}
@font-face {
  font-family: "Open Sans";
  font-style: italic;
  font-weight: 300;
  font-display: swap;
  src: url("../fonts/open-sans-300-italic.woff2") format("woff2");
}

/* ---------- Design tokens ---------- */
:root {
  --bg: #f7f3ee;
  --bg-soft: #efe8dd;
  --surface: #fbfaf6;
  --text: #2c2a26;
  --text-muted: #6b6560;
  --accent: #8b6f47;
  --accent-dark: #6b5535;
  --line: #e0d7c8;

  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
  --sans: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  --measure: 68ch;
  --wide: 1180px;
  --narrow: 720px;

  --step-1: clamp(0.95rem, 0.92rem + 0.15vw, 1.05rem);
  --step-0: clamp(1.05rem, 1rem + 0.2vw, 1.15rem);
  --step-h3: clamp(1.2rem, 1.1rem + 0.5vw, 1.5rem);
  --step-h2: clamp(1.6rem, 1.3rem + 1.2vw, 2.25rem);
  --step-h1: clamp(2.2rem, 1.7rem + 2.4vw, 3.5rem);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body, h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; }
ul, ol { padding: 0; }
img, picture, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; }

/* ---------- Base ---------- */
body {
  font-family: var(--sans);
  font-weight: 300;
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.2;
  color: var(--text);
  letter-spacing: -0.01em;
}
h1 { font-size: var(--step-h1); }
h2 { font-size: var(--step-h2); margin-top: 3rem; margin-bottom: 1rem; }
h3 { font-size: var(--step-h3); margin-top: 2rem; margin-bottom: 0.75rem; }

p { margin-block: 0.9em; max-width: var(--measure); }
p + p { margin-top: 1em; }

a {
  color: var(--accent-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--line);
  transition: text-decoration-color 0.2s, color 0.2s;
}
a:hover { color: var(--accent); text-decoration-color: var(--accent); }

strong { font-weight: 600; }

ul, ol {
  padding-left: 1.3em;
  max-width: var(--measure);
}
li { margin-bottom: 0.4em; }

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 4rem 0;
}

/* ---------- Layout primitives ---------- */
.container {
  width: 100%;
  max-width: var(--wide);
  margin-inline: auto;
  padding-inline: 1.5rem;
}
.container--narrow { max-width: var(--narrow); }

.section { padding-block: clamp(3.5rem, 6vw, 6rem); }
.section--tight { padding-block: clamp(2rem, 3vw, 3rem); }

/* ---------- Site header ---------- */
.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(180%) blur(6px);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1rem 1.5rem;
  max-width: var(--wide);
  margin-inline: auto;
}
.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
  color: var(--text);
}
.site-logo img { height: 44px; width: auto; }
.site-logo__text {
  font-family: var(--serif);
  font-size: 1.1rem;
  line-height: 1.1;
  letter-spacing: 0.01em;
}
.site-logo__text small {
  display: block;
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 300;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 2px;
}

/* Nav */
.site-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 1.5rem;
  margin: 0;
  padding: 0;
  max-width: none;
}
.site-nav a {
  text-decoration: none;
  color: var(--text);
  font-size: 0.95rem;
  padding-bottom: 4px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, color 0.2s;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--accent-dark);
  border-bottom-color: var(--accent);
}

/* Mobile toggle */
.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.45rem 0.7rem;
  cursor: pointer;
  color: var(--text);
}
.nav-toggle:hover { border-color: var(--accent); }

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; align-items: center; gap: 0.4rem; }
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    display: none;
    padding: 1rem 1.5rem 1.5rem;
  }
  .site-nav[data-open="true"] { display: block; }
  .site-nav ul { flex-direction: column; gap: 0.75rem; }
  .site-nav a { display: block; padding: 0.4rem 0; }
}

/* ---------- Hero ---------- */
.hero {
  padding-block: clamp(4rem, 8vw, 7rem);
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 100%);
}
.hero__inner {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  max-width: var(--wide);
  margin-inline: auto;
  padding-inline: 1.5rem;
}
.hero__kicker {
  font-family: var(--sans);
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin-bottom: 1.25rem;
}
.hero__title {
  font-size: var(--step-h1);
  margin-bottom: 1.5rem;
}
.hero__lede {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 40ch;
}
.hero__image {
  aspect-ratio: 1 / 1;
  background: var(--surface);
  border-radius: 4px;
  overflow: hidden;
}
.hero__image img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 780px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__image { max-width: 420px; margin-inline: auto; }
}

/* Page-hero for sub-pages (no image) */
.page-hero {
  padding-block: clamp(3rem, 5vw, 5rem) clamp(1.5rem, 2vw, 2rem);
  border-bottom: 1px solid var(--line);
}
.page-hero__kicker {
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin-bottom: 1rem;
}
.page-hero__lede {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: var(--measure);
  margin-top: 1.5rem;
}

/* ---------- Prose content (body) ---------- */
.prose { max-width: var(--narrow); margin-inline: auto; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose ul, .prose ol { max-width: none; }

.callout {
  background: var(--surface);
  border-left: 3px solid var(--accent);
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: var(--text);
}
.callout p { margin: 0.5em 0; }
.callout p:first-child { margin-top: 0; }
.callout p:last-child { margin-bottom: 0; }

/* ---------- Service grid (Startseite) ---------- */
.services {
  background: var(--surface);
  border-block: 1px solid var(--line);
}
.services__title {
  text-align: center;
  margin-bottom: 0.5rem;
  margin-top: 0;
}
.services__sub {
  text-align: center;
  color: var(--text-muted);
  max-width: 50ch;
  margin: 0 auto 3rem;
}
.services__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  max-width: var(--wide);
  margin-inline: auto;
  padding-inline: 1.5rem;
}
.service-card {
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border: 1px solid var(--line);
  text-decoration: none;
  color: var(--text);
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
  overflow: hidden;
}
.service-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px -18px rgba(44, 42, 38, 0.35);
  border-color: var(--accent);
}
.service-card__image {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-soft);
}
.service-card__image img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}
.service-card:hover .service-card__image img { transform: scale(1.03); }
.service-card__body {
  padding: 1.25rem 1.5rem 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.service-card__title {
  font-family: var(--serif);
  font-size: 1.35rem;
  margin: 0 0 0.4rem;
}
.service-card__desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0;
  flex: 1;
}
.service-card__more {
  margin-top: 1rem;
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent-dark);
}

/* ---------- Contact block (reused on index + kontakt) ---------- */
.contact-block {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  max-width: var(--wide);
  margin-inline: auto;
  padding: 0 1.5rem;
}
.contact-block__item h3 {
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 0.6rem;
}
.contact-block__item p { margin: 0; font-size: 1.05rem; }
.contact-block__item a { color: var(--text); }

/* ---------- Footer ---------- */
.site-footer {
  background: #2c2a26;
  color: #d8d2c7;
  padding: 4rem 0 2rem;
  margin-top: 5rem;
}
.site-footer a { color: #efe8dd; }
.site-footer a:hover { color: #ffffff; }
.site-footer__inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 2.5rem;
  max-width: var(--wide);
  margin-inline: auto;
  padding-inline: 1.5rem;
}
.site-footer h4 {
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #ffffff;
  margin: 0 0 1rem;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 0.5rem; }
.site-footer__brand p {
  color: #b8b0a3;
  font-size: 0.95rem;
  max-width: 32ch;
}
.site-footer__bottom {
  max-width: var(--wide);
  margin: 3rem auto 0;
  padding: 1.5rem 1.5rem 0;
  border-top: 1px solid #4a453e;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
  color: #b8b0a3;
}
@media (max-width: 780px) {
  .site-footer__inner { grid-template-columns: 1fr; }
}

/* ---------- Tables (Impressum/Datenschutz) ---------- */
.prose table {
  border-collapse: collapse;
  margin: 1.5rem 0;
  width: 100%;
  max-width: 560px;
}
.prose th, .prose td {
  padding: 0.6rem 0.8rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.prose th {
  font-weight: 600;
  width: 40%;
  color: var(--text-muted);
  font-family: var(--sans);
  font-size: 0.9rem;
}

/* ---------- Utilities ---------- */
.visually-hidden {
  position: absolute !important;
  clip: rect(1px, 1px, 1px, 1px);
  width: 1px; height: 1px;
  overflow: hidden;
  white-space: nowrap;
}
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--text);
  color: var(--bg);
  padding: 0.75rem 1rem;
  z-index: 100;
}
.skip-link:focus { left: 1rem; top: 1rem; }

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

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

/* Print */
@media print {
  .site-header, .site-footer, .nav-toggle { display: none; }
  body { background: #fff; color: #000; }
  a { color: #000; text-decoration: underline; }
  .section, .page-hero { padding-block: 1rem; }
}
