/* =========================================================
   Lisa Knoll — globale Styles
   Design-Sprache angelehnt an docs/klinische_psychologin_webseite.jsx
   ========================================================= */

:root {
  /* Blau-Palette */
  --ink-strong:    #0f3f73;
  --ink-mid:       #22558a;
  --ink-soft:      #416b96;
  --ink-muted:     #789abd;
  --action:        #2f5f92;
  --action-hover:  #244f7d;
  --pill-soft:     #c8d9eb;
  --pill-soft-hover:#b8cfe6;
  --icon-tint:     #dceaf7;
  --panel-soft:    #e8f2fb;
  --input-border:  #d7e5f2;
  --input-focus:   #7fa7cf;
  --surface-tint:  #f7fbff;
  --surface:       #ffffff;

  /* Schatten */
  --shadow-card:   0 20px 60px rgba(15, 63, 115, 0.06);
  --shadow-form:   0 20px 60px rgba(15, 63, 115, 0.07);

  /* Typografie */
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Radien */
  --r-pill:  9999px;
  --r-card:  2.2rem;
  --r-input: 1rem;
  --r-panel: 3rem;

  /* Container */
  --max-hero:    1500px;
  --max-section: 1300px;

  /* Sektionsabstand */
  --section-py:    6rem;
  --section-py-sm: 4rem;
  --gutter:        2rem;
  --gutter-lg:     3rem;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; padding: 0; margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

/* Basis */
body {
  font-family: var(--font-sans);
  color: var(--ink-strong);
  background: var(--surface);
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: inherit;
  color: var(--ink-strong);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0;
}

h1 { font-size: clamp(2.5rem, 4.5vw + 1rem, 4.5rem); letter-spacing: -0.03em; line-height: 1.05; }
h2 { font-size: clamp(2rem, 2.4vw + 1rem, 3rem); }
h3 { font-size: clamp(1.5rem, 0.8vw + 1rem, 1.875rem); font-weight: 300; }

p { margin: 0 0 1em; color: var(--ink-soft); }

/* Fokus */
:focus-visible {
  outline: 3px solid var(--input-focus);
  outline-offset: 3px;
  border-radius: 4px;
}

/* =========================================================
   Buttons
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2.25rem;
  border-radius: var(--r-pill);
  font-size: 1.125rem;
  font-weight: 500;
  letter-spacing: 0;
  border: 1px solid transparent;
  transition: background-color .18s ease, color .18s ease, transform .12s ease;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { transform: translateY(-1px); }

.btn--primary {
  background: var(--action);
  color: #fff;
  box-shadow: 0 6px 18px rgba(15, 63, 115, 0.12);
}
.btn--primary:hover { background: var(--action-hover); }

.btn--accent {
  background: var(--pill-soft);
  color: var(--ink-strong);
}
.btn--accent:hover { background: var(--pill-soft-hover); }

.btn--pill-soft {
  padding: 0.75rem 1.75rem;
  font-size: 1rem;
  background: var(--pill-soft);
  color: var(--ink-strong);
}
.btn--pill-soft:hover { background: var(--pill-soft-hover); }

.btn--block { width: 100%; }

/* =========================================================
   Header
   ========================================================= */
.site-header {
  max-width: var(--max-hero);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.75rem 2rem;
  background: var(--surface);
  gap: 1.5rem;
}

.site-header__brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--ink-strong);
}
.site-header__brand img {
  width: 4.5rem;
  height: 4.5rem;
  object-fit: contain;
}
.site-header__brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.site-header__brand-text span {
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--ink-strong);
}

.site-nav__list {
  display: flex;
  align-items: center;
  gap: 2.75rem;
  font-size: 1.0625rem;
  font-weight: 500;
}
.site-nav__link {
  color: var(--ink-strong);
  transition: opacity .15s ease;
}
.site-nav__link:hover { opacity: 0.7; }
.site-nav__link[aria-current="page"] { font-weight: 600; }

/* Nav-Toggle (Mobile) */
.nav-toggle {
  display: none;
  background: transparent;
  border: 0;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
}
.nav-toggle__bar {
  display: block;
  width: 1.5rem;
  height: 2px;
  background: var(--ink-strong);
  margin: 5px auto;
  transition: transform .25s ease, opacity .25s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 900px) {
  .site-header { padding: 1.25rem 1.5rem; position: relative; }
  .site-header__brand img { width: 3rem; height: 3rem; }
  .site-header__brand-text span { font-size: 1rem; }
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--input-border);
    transform: translateY(-10px);
    opacity: 0;
    pointer-events: none;
    transition: transform .2s ease, opacity .2s ease;
    z-index: 50;
  }
  .site-nav[data-open="true"] {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .site-nav__list {
    flex-direction: column;
    gap: 0;
    padding: 1rem 1.5rem 1.5rem;
    align-items: stretch;
  }
  .site-nav__list li { padding: 0.75rem 0; border-bottom: 1px solid var(--surface-tint); }
  .site-nav__list li:last-child { border-bottom: 0; }
}

/* =========================================================
   Hero (Startseite: 2 Spalten Text + Illustration)
   ========================================================= */
.hero {
  max-width: var(--max-hero);
  margin: 0 auto;
  padding: 2.5rem 2rem 5rem;
}
.hero--split {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  align-items: center;
  gap: 2rem;
}
.hero__copy { z-index: 1; }
.hero__title {
  max-width: 42rem;
  margin: 0 0 2rem;
}
.hero__lead {
  max-width: 36rem;
  font-size: 1.25rem;
  line-height: 1.65;
  color: var(--ink-mid);
  margin: 0 0 2.25rem;
}
.hero__visual {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 32rem;
  overflow: hidden;
}
.hero__visual img {
  width: 100%;
  max-width: 52rem;
  object-fit: contain;
}

/* Kompakter Hero (Über mich, Kontakt, Legal) */
.hero--compact {
  max-width: var(--max-section);
  padding: 2rem 2rem 1rem;
  text-align: left;
}
.hero--compact .section__label { display: inline-block; margin-bottom: 1rem; }
.hero--compact .hero__title {
  font-size: clamp(2.25rem, 3vw + 1rem, 3.5rem);
}
.hero--compact .hero__lead {
  margin-top: 1.5rem;
}

@media (max-width: 900px) {
  .hero { padding: 1.5rem 1.5rem 3rem; }
  .hero--split { grid-template-columns: 1fr; gap: 1.5rem; }
  .hero__visual { min-height: auto; }
  .hero__visual img { max-width: 32rem; }
  .hero--compact { padding: 1rem 1.5rem 0.5rem; }
}

/* =========================================================
   Sektionen
   ========================================================= */
.section {
  padding: var(--section-py) 2rem;
}
.section--tinted { background: var(--surface-tint); }
.section__inner {
  max-width: var(--max-section);
  margin: 0 auto;
}
.section__heading {
  max-width: 44rem;
  margin: 0 auto 3.5rem;
  text-align: center;
}
.section__heading--start {
  margin-left: 0;
  margin-right: 0;
  text-align: left;
}
.section__label {
  display: block;
  font-size: 0.8125rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-muted);
  font-weight: 500;
  margin-bottom: 1rem;
}
.section__title {
  font-size: clamp(2rem, 2.2vw + 1rem, 2.75rem);
  margin: 0;
}

@media (max-width: 900px) {
  .section { padding: var(--section-py-sm) 1.5rem; }
  .section__heading { margin-bottom: 2.25rem; }
}

/* =========================================================
   Karten-Grid (Angebot)
   ========================================================= */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.card {
  background: var(--surface);
  border-radius: var(--r-card);
  padding: 2.25rem;
  box-shadow: var(--shadow-card);
}
.card__icon {
  width: 3rem;
  height: 3rem;
  border-radius: var(--r-pill);
  background: var(--icon-tint);
  margin-bottom: 1.75rem;
}
.card__title {
  margin: 0 0 1rem;
}
.card__body {
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink-soft);
  margin: 0;
}

@media (max-width: 1023px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 700px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .card { padding: 1.75rem; }
}

/* =========================================================
   Audience-Karten (Für wen, Startseite)
   ========================================================= */
.audience-card {
  background: var(--surface);
  border-radius: var(--r-card);
  padding: 2.5rem 2.25rem;
  box-shadow: var(--shadow-card);
}
.audience-card--tinted { background: var(--panel-soft); box-shadow: none; }
.audience-card__title {
  font-size: 1.875rem;
  margin: 0 0 1rem;
}
.audience-card__body {
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink-soft);
  margin: 0;
}

/* =========================================================
   Vita (Über mich, 2 Spalten)
   ========================================================= */
.vita {
  max-width: var(--max-section);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 3.5rem;
  align-items: center;
}
.vita__photo {
  background: var(--panel-soft);
  border-radius: var(--r-panel);
  padding: 1.75rem;
}
.vita__photo-inner {
  aspect-ratio: 4 / 5;
  border-radius: 2.4rem;
  overflow: hidden;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--ink-muted);
  font-size: 1.0625rem;
  padding: 1rem;
}
.vita__photo-inner img { width: 100%; height: 100%; object-fit: cover; }
.vita__text { display: flex; flex-direction: column; justify-content: center; }
.vita__text h1, .vita__text h2 { margin: 0 0 1.5rem; }
.vita__text p {
  font-size: 1.25rem;
  line-height: 1.7;
  color: var(--ink-soft);
  margin: 0 0 1.25rem;
}
.vita__text p:last-child { margin-bottom: 0; }

@media (max-width: 900px) {
  .vita { grid-template-columns: 1fr; gap: 2rem; }
  .vita__photo { padding: 1rem; }
  .vita__text p { font-size: 1.125rem; }
}

/* =========================================================
   Werdegang-Timeline (Über mich)
   ========================================================= */
.timeline {
  max-width: 56rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.timeline .card { padding: 1.75rem 2rem; }
.timeline .card__title { font-size: 1.375rem; margin-bottom: 0.5rem; }
.timeline .card__body { font-size: 1rem; }

/* =========================================================
   Haltung (zentrierter Fließtext)
   ========================================================= */
.prose-centered {
  max-width: 48rem;
  margin: 0 auto;
  text-align: center;
  font-size: 1.1875rem;
  line-height: 1.75;
  color: var(--ink-soft);
}
.prose-centered p { color: inherit; }

/* =========================================================
   CTA-Band
   ========================================================= */
.cta-band {
  background: var(--ink-strong);
  color: #fff;
  padding: 5rem 2rem;
  text-align: center;
}
.cta-band__inner {
  max-width: 44rem;
  margin: 0 auto;
}
.cta-band h2 {
  color: #fff;
  margin: 0 0 1rem;
  font-size: clamp(2rem, 2vw + 1rem, 2.5rem);
}
.cta-band p {
  color: rgba(255, 255, 255, 0.88);
  margin: 0 0 2rem;
  font-size: 1.125rem;
}

/* =========================================================
   Kontakt (2 Spalten)
   ========================================================= */
.contact {
  max-width: var(--max-section);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}
.contact__info > h2 { margin: 0 0 1.5rem; }
.contact__info > p {
  font-size: 1.1875rem;
  line-height: 1.75;
  color: var(--ink-soft);
  max-width: 32rem;
  margin: 0 0 2rem;
}
.contact__info dl { margin: 0; }
.contact__info dt {
  font-size: 0.8125rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 1.25rem 0 0.25rem;
  font-weight: 500;
}
.contact__info dt:first-child { margin-top: 0; }
.contact__info dd {
  margin: 0;
  font-size: 1.0625rem;
  color: var(--ink-strong);
}
.contact__info dd a { color: var(--ink-mid); }
.contact__info dd a:hover { color: var(--ink-strong); }

.contact__form-wrapper {
  background: var(--surface);
  border-radius: 2.5rem;
  padding: 2.25rem;
  box-shadow: var(--shadow-form);
}

@media (max-width: 900px) {
  .contact { grid-template-columns: 1fr; gap: 2rem; }
  .contact__form-wrapper { padding: 1.75rem; border-radius: 2rem; }
}

/* =========================================================
   Formular
   ========================================================= */
.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}
.form-field label {
  color: var(--ink-soft);
  font-size: 1rem;
  font-weight: 400;
}
.form-field input,
.form-field textarea {
  font-family: inherit;
  font-size: 1rem;
  padding: 0.875rem 1rem;
  border: 1px solid var(--input-border);
  border-radius: var(--r-input);
  background: var(--surface);
  color: var(--ink-strong);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.form-field input::placeholder,
.form-field textarea::placeholder { color: var(--ink-muted); }
.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--input-focus);
  box-shadow: 0 0 0 4px rgba(127, 167, 207, 0.18);
}
.form-field textarea { resize: vertical; min-height: 8rem; }

.form-field--checkbox {
  flex-direction: row;
  align-items: flex-start;
  gap: 0.625rem;
  font-size: 0.95rem;
}
.form-field--checkbox input {
  width: 1.125rem;
  height: 1.125rem;
  margin-top: 0.25rem;
}
.form-field--checkbox label a { color: var(--ink-mid); text-decoration: underline; }

.form-field__error {
  color: #b04a4a;
  font-size: 0.875rem;
  margin: 0;
  min-height: 1em;
}
.form-success {
  color: var(--ink-strong);
  margin-top: 1rem;
  font-size: 1rem;
}

.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

/* =========================================================
   Footer
   ========================================================= */
.site-footer {
  background: var(--ink-strong);
  color: #d4e2ee;
  padding: 2.25rem 2rem;
  text-align: center;
  font-size: 0.95rem;
}
.site-footer a {
  color: #fff;
  margin: 0 0.5rem;
}
.site-footer a:hover { text-decoration: underline; }

/* =========================================================
   Legal-Seiten
   ========================================================= */
.legal {
  max-width: 50rem;
  margin: 0 auto;
}
.legal h1 { margin: 0 0 2rem; }
.legal h2 {
  font-size: 1.5rem;
  margin: 2.5rem 0 1rem;
}
.legal p,
.legal li {
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--ink-soft);
}
.legal ul {
  list-style: disc;
  padding-left: 1.25rem;
  margin: 0 0 1em;
}
.legal a { color: var(--ink-mid); text-decoration: underline; }

/* =========================================================
   Animationen
   - Hero: Page-Load Fade-In + dezentes Floating
   - Karten / Sektionen: Reveal beim Scrollen via animation-timeline: view()
   - @supports-Fallback und prefers-reduced-motion respektieren
   ========================================================= */

@keyframes hero-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes hero-rise {
  from { transform: translateY(20px); }
  to   { transform: translateY(0); }
}
@keyframes hero-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}

.hero__copy > * {
  animation: hero-fade 900ms ease-out both,
             hero-rise 900ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.hero__copy > *:nth-child(1) { animation-delay: 120ms, 120ms; }
.hero__copy > *:nth-child(2) { animation-delay: 240ms, 240ms; }
.hero__copy > *:nth-child(3) { animation-delay: 360ms, 360ms; }

.hero__visual img {
  animation: hero-fade 1100ms ease-out 200ms both;
}

@supports (animation-timeline: view()) {
  @keyframes reveal {
    from { opacity: 0; transform: translateY(28px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  @keyframes reveal-scale {
    from { opacity: 0; transform: scale(0.97); }
    to   { opacity: 1; transform: scale(1); }
  }

  .section__heading,
  .grid-3 > .card,
  .grid-2 > .audience-card,
  .timeline > .card,
  .prose-centered,
  .contact__info,
  .contact__form-wrapper,
  .cta-band__inner {
    animation: reveal linear both;
    animation-timeline: view();
    animation-range: entry 5% cover 35%;
  }

  /* Stagger durch versetzte Ranges innerhalb des Grids */
  .grid-3 > .card:nth-child(2) { animation-range: entry 12% cover 40%; }
  .grid-3 > .card:nth-child(3) { animation-range: entry 18% cover 45%; }
  .grid-2 > .audience-card:nth-child(2) { animation-range: entry 12% cover 40%; }
  .timeline > .card:nth-child(2) { animation-range: entry 10% cover 38%; }
  .timeline > .card:nth-child(3) { animation-range: entry 16% cover 42%; }

  .vita__photo {
    animation: reveal-scale linear both;
    animation-timeline: view();
    animation-range: entry 0% cover 40%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero__copy > *,
  .hero__visual img,
  .section__heading,
  .grid-3 > .card,
  .grid-2 > .audience-card,
  .timeline > .card,
  .prose-centered,
  .contact__info,
  .contact__form-wrapper,
  .cta-band__inner,
  .vita__photo {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}
