/* =========================================================
   Frances Ewert — Psychologische Beratung (in Ausbildung)
   Stylesheet: Design-Tokens, Layout, Komponenten
   ========================================================= */

/* ---------- Lokale Fonts (variable) ---------- */
@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces/fraunces-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Work Sans";
  src: url("../fonts/work-sans/work-sans-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- Design Tokens ---------- */
:root {
  /* Farben — warme Naturtöne */
  --color-bg: #faf7f1;
  --color-bg-alt: #f1ead9;
  --color-surface: #ffffff;
  --color-sage: #8a9a82;
  --color-sage-dark: #5f7159;
  --color-sage-tint: #eaefe4;
  --color-clay: #c08552;
  --color-clay-dark: #a06a3d;
  --color-text: #3a352e;
  --color-text-muted: #6b6459;
  --color-border: #e6ddc9;
  --color-focus: #5f7159;

  /* Typografie */
  --font-heading: "Fraunces", "Iowan Old Style", "Georgia", serif;
  --font-body: "Work Sans", "Segoe UI", system-ui, -apple-system, sans-serif;

  /* Abstände */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.75rem;
  --space-lg: 2rem;
  --space-xl: 2.6rem;
  --space-2xl: 4rem;

  /* Sonstiges */
  --radius: 6px;
  --radius-lg: 18px;
  --max-width: 1180px;
  --shadow-soft: 0 20px 60px -30px rgba(58, 53, 46, 0.25);
  --transition: 220ms ease;
}

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

html {
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  font-weight: 500;
  line-height: 1.2;
  margin: 0 0 var(--space-sm);
  color: var(--color-text);
}

h1 {
  font-size: clamp(2.2rem, 4vw + 1rem, 3.4rem);
  font-weight: 450;
  letter-spacing: -0.01em;
}

h2 {
  font-size: clamp(1.7rem, 2.4vw + 1rem, 2.4rem);
}

h3 {
  font-size: 1.3rem;
}

p {
  margin: 0 0 var(--space-sm);
  color: var(--color-text);
}

.lead {
  font-size: 1.2rem;
  color: var(--color-text-muted);
}

ul {
  padding-left: 1.2em;
}

/* ---------- Utility ---------- */
.container {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--space-md);
}

.section {
  padding-block: var(--space-2xl);
}

.section--alt {
  background: var(--color-bg-alt);
}

.section--tight {
  padding-block: var(--space-xl);
}

.section--compact {
  padding-block: 3.25rem;
}

.section--compact .section-intro {
  margin-bottom: 1.6rem;
}

.section--compact-plus {
  padding-block: 2.85rem;
}

.section--tight-plus {
  padding-block: 2.3rem;
}

.section--lead-in {
  padding-top: 2.5rem;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-sage-dark);
  font-weight: 600;
  margin-bottom: var(--space-xs);
}

.text-center {
  text-align: center;
}

.section-intro {
  max-width: 640px;
  margin-bottom: var(--space-lg);
}

.section-intro.text-center {
  margin-inline: auto;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  background: var(--color-sage-dark);
  color: #fff;
  padding: 0.8em 1.4em;
  z-index: 1000;
  border-radius: var(--radius);
}

.skip-link:focus {
  left: var(--space-sm);
  top: var(--space-sm);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.85em 1.7em;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform var(--transition), background var(--transition), color var(--transition), border-color var(--transition);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--color-sage-dark);
  color: #fff;
}

.btn-primary:hover {
  background: #4c5c47;
}

.btn-secondary {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-border);
}

.btn-secondary:hover {
  border-color: var(--color-sage-dark);
  background: var(--color-sage-tint);
}

.btn-ghost {
  background: transparent;
  color: var(--color-sage-dark);
  padding-inline: 0.2em;
}

.btn-ghost::after {
  content: "→";
  margin-left: 0.4em;
  transition: transform var(--transition);
  display: inline-block;
}

.btn-ghost:hover::after {
  transform: translateX(4px);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 3px;
}

/* ---------- Header / Navigation ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 247, 241, 0.97);
  border-bottom: 1px solid var(--color-border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: var(--space-sm);
}

.brand {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.6em;
  text-decoration: none;
  line-height: 1.1;
}

.brand-mark {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  object-fit: contain;
  display: block;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  color: var(--color-text);
}

.brand-tag {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-top: 0.15em;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 0.5em 0.65em;
  cursor: pointer;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  display: block;
  width: 20px;
  height: 2px;
  background: var(--color-text);
  position: relative;
  transition: transform var(--transition);
}

.nav-toggle span::before {
  position: absolute;
  top: -6px;
}

.nav-toggle span::after {
  position: absolute;
  top: 6px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.nav-list {
  list-style: none;
  display: flex;
  gap: var(--space-md);
  margin: 0;
  padding: 0;
}

.nav-list a {
  text-decoration: none;
  font-size: 0.96rem;
  font-weight: 500;
  color: var(--color-text-muted);
  padding-block: 0.3em;
  border-bottom: 2px solid transparent;
  transition: color var(--transition), border-color var(--transition);
}

.nav-list a:hover,
.nav-list a[aria-current="page"] {
  color: var(--color-text);
  border-color: var(--color-sage);
}

@media (min-width: 1150px) {
  .brand-name,
  .brand-tag {
    white-space: nowrap;
  }

  .main-nav {
    gap: 1.1rem;
  }

  .nav-list {
    gap: 0.95rem;
  }

  .nav-list a {
    white-space: nowrap;
  }

  .main-nav .btn-primary {
    padding: 0.55em 1.15em;
    font-size: 0.88rem;
    white-space: nowrap;
    flex-shrink: 0;
  }
}

/* ---------- Hero (Split) ---------- */
.hero {
  width: 100%;
}

.hero-grid {
  display: flex;
  flex-direction: column;
}

.hero-media-figure {
  display: contents;
}

.hero-media-panel {
  position: relative;
  width: 100%;
  height: 320px;
  overflow: hidden;
  order: -1;
}

.hero-media-caption {
  order: -1;
}

.hero-media-caption-video {
  display: none;
}

.hero-media-figure.hero-video-active .hero-media-caption-video {
  display: inline;
}

.hero-media-figure.hero-video-active .hero-media-caption-static {
  display: none;
}

.hero-media-panel img,
.hero-media-panel video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-copy-panel {
  background: var(--color-bg);
  display: flex;
  align-items: center;
  padding: var(--space-lg) var(--space-md);
}

.hero-content {
  max-width: 40em;
}

.hero-content h1 {
  margin-bottom: var(--space-xs);
}

.hero-content .lead {
  font-size: 1.08rem;
  line-height: 1.55;
  margin-bottom: var(--space-xs);
}

.hero-actions {
  display: flex;
  gap: var(--space-xs);
  flex-wrap: wrap;
  margin-top: var(--space-xs);
}

.hero-note {
  margin-top: var(--space-xs);
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--color-text-muted);
  border-left: 2px solid var(--color-sage);
  padding-left: var(--space-sm);
  max-width: 30em;
}

@media (min-width: 1200px) {
  .hero-grid {
    display: grid;
    grid-template-columns: 40% 60%;
    grid-template-rows: 1fr auto;
    align-items: stretch;
    min-height: 530px;
  }

  .hero-content h1 {
    font-size: 3.3rem;
  }

  .hero-actions .btn {
    padding-inline: 1.3em;
  }

  .hero-media-panel {
    height: auto;
    min-height: 0;
    order: 0;
  }

  .hero-media-caption {
    order: 0;
    grid-column: 2;
  }

  .hero-media-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    width: 64px;
    background: linear-gradient(to right, rgba(250, 247, 241, 0.9) 0%, rgba(250, 247, 241, 0) 100%);
    z-index: 1;
    pointer-events: none;
  }

  .hero-copy-panel {
    padding-block: 0.75rem 0.25rem;
    padding-inline-start: clamp(var(--space-md), calc((100vw - var(--max-width)) / 2 + var(--space-md)), 2.5rem);
    padding-inline-end: var(--space-xs);
  }
}

/* ---------- Placeholder-Bilder ---------- */
.placeholder-image {
  position: relative;
  width: 100%;
  border-radius: var(--radius-lg);
  background: linear-gradient(155deg, var(--color-sage-tint) 0%, var(--color-bg-alt) 55%, #e3ceb1 100%);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  box-shadow: var(--shadow-soft);
}

.placeholder-image.is-wide {
  aspect-ratio: 16 / 10;
}

.placeholder-image.is-square {
  aspect-ratio: 1 / 1;
}

.placeholder-image::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 25% 20%, rgba(255, 255, 255, 0.5), transparent 45%),
    radial-gradient(circle at 80% 85%, rgba(95, 113, 89, 0.25), transparent 50%);
}

.placeholder-image svg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 34%;
  opacity: 0.55;
  color: var(--color-sage-dark);
}

.placeholder-image .placeholder-label {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 0.75em 1em;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-sage-dark);
  background: rgba(255, 255, 255, 0.72);
  border-top: 1px solid rgba(95, 113, 89, 0.2);
}

/* ---------- Echte Bilder (media-frame) ---------- */
.media-frame {
  position: relative;
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  aspect-ratio: 4 / 5;
  background: var(--color-bg-alt);
}

.media-frame.is-wide {
  aspect-ratio: 16 / 10;
}

.media-frame.is-square {
  aspect-ratio: 1 / 1;
}

.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ---------- KI-Bildkennzeichnung ---------- */
.media-figure {
  margin: 0;
}

.ai-image-caption {
  display: block;
  margin: 5px 0 2px;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 9px;
  line-height: 1.3;
  letter-spacing: 0;
  color: var(--color-text-muted);
  opacity: 0.62;
  text-align: left;
  text-transform: none;
}

@media (max-width: 900px) {
  .ai-image-caption {
    font-size: 8px;
  }
}

/* ---------- Cards / Grids ---------- */
.grid {
  display: grid;
  gap: var(--space-md);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
}

.grid-3--roomy .card {
  padding: 2rem;
}

.card h3 {
  margin-bottom: 0.5em;
}

.card--muted {
  background: var(--color-bg-alt);
  border-color: var(--color-border);
}

.card--muted h3 {
  color: var(--color-text-muted);
}

.card-icon {
  width: 42px;
  height: 42px;
  color: var(--color-sage-dark);
  margin-bottom: var(--space-sm);
}

.pill-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6em;
}

.pill-list li {
  position: relative;
  padding-left: 1.6em;
  color: var(--color-text);
}

.pill-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-sage);
}

/* ---------- Two-column content sections ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: center;
}

.split--top {
  align-items: start;
}

.split.reverse .split-media {
  order: 2;
}

/* ---------- Steps (Ablauf) ---------- */
.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: var(--space-md);
}

.step {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: var(--space-md);
  padding-block: var(--space-md);
  border-top: 1px solid var(--color-border);
}

.step:first-child {
  border-top: none;
}

.step-number {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  color: var(--color-sage-dark);
}

/* ---------- Notice / Disclaimer boxes ---------- */
.notice {
  background: var(--color-sage-tint);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-md) var(--space-lg);
}

.notice h3 {
  margin-bottom: 0.4em;
}

.notice p:last-child {
  margin-bottom: 0;
}

.notice--draft {
  background: #fbf1e4;
  border-color: #ecd8b6;
}

.notice--quiet {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
}

.notice--quiet p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.notice--quiet p:first-of-type {
  color: var(--color-text);
}

.notice--quiet p:last-of-type {
  margin-top: var(--space-sm);
  font-size: 0.85rem;
  color: var(--color-text-muted);
  opacity: 0.85;
}

.notice--plain {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
}

.disclaimer {
  max-width: 640px;
  margin-inline: auto;
  text-align: center;
  padding-block: var(--space-xs);
}

.disclaimer p {
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--color-text-muted);
  margin-bottom: 0;
}

.notice--draft .eyebrow {
  color: var(--color-clay-dark);
}

/* ---------- Ratgeber ---------- */
.article-header {
  max-width: 760px;
  margin-inline: auto;
  text-align: center;
}

.article-meta {
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.article-body {
  max-width: 720px;
  margin-inline: auto;
}

.article-body h2 {
  margin-top: var(--space-xl);
}

.article-body .pill-list {
  margin-block: var(--space-sm);
}

.article-card .eyebrow {
  margin-bottom: 0.3em;
}

.article-card p {
  color: var(--color-text-muted);
}

/* ---------- FAQ ---------- */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  max-width: 780px;
  margin-inline: auto;
}

.faq-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 0.2em var(--space-md);
}

.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding-block: 1em;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-sm);
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--color-sage-dark);
  flex-shrink: 0;
  width: 1em;
  text-align: center;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-item p {
  padding-bottom: 1.1em;
  color: var(--color-text-muted);
}

/* ---------- Forms ---------- */
.form-field {
  margin-bottom: var(--space-md);
}

.form-field label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.4em;
  font-size: 0.95rem;
}

.form-field .hint {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-top: 0.3em;
}

input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.75em 0.9em;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  color: var(--color-text);
}

textarea {
  resize: vertical;
  min-height: 140px;
}

.checkbox-field {
  display: flex;
  align-items: flex-start;
  gap: 0.6em;
}

.checkbox-field input {
  margin-top: 0.35em;
}

.checkbox-field label {
  font-weight: 400;
  font-size: 0.92rem;
  color: var(--color-text-muted);
}

/* ---------- Contact info list ---------- */
.contact-info {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.contact-info dt {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
}

.contact-info dd {
  margin: 0.15em 0 0;
  font-size: 1.05rem;
}

.contact-info .hint {
  display: block;
  margin-top: 0.3em;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--color-sage-dark);
  color: #fdfbf6;
  border-radius: var(--radius-lg);
  padding: var(--space-md) var(--space-lg);
  text-align: center;
}

.cta-band--compact {
  padding-block: 1.5rem;
}

.cta-band--tight {
  padding-block: 1.35rem;
}

.cta-band h2,
.cta-band p {
  color: #fdfbf6;
}

.cta-band .btn-secondary {
  color: #fdfbf6;
  border-color: rgba(255, 255, 255, 0.4);
}

.cta-band .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: #fff;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-bg-alt);
  border-top: 1px solid var(--color-border);
  padding-block: var(--space-xl) var(--space-lg);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.footer-grid h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin-bottom: var(--space-sm);
}

.footer-nav {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6em;
}

.footer-nav a {
  text-decoration: none;
  color: var(--color-text);
}

.footer-nav a:hover {
  color: var(--color-sage-dark);
}

.footer-bottom {
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-md);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-sm);
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

/* ---------- Page header (interior pages) ---------- */
.page-header {
  padding-block: var(--space-xl) var(--space-lg);
  text-align: center;
}

.page-header--compact {
  padding-block: 1.6rem 1.15rem;
}

.page-header--slim {
  padding-block: 2.2rem 0.8rem;
}

.page-header--tight {
  padding-block: 1.35rem 0.95rem;
}

.page-header .section-intro {
  margin-inline: auto;
}

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 1;
  transform: none;
}

.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 700ms ease, transform 700ms ease;
}

.js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .split,
  .split.reverse .split-media {
    grid-template-columns: 1fr;
    order: initial;
  }

  .split-media {
    order: -1;
  }

  .grid-3 {
    grid-template-columns: 1fr 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 900px) {
  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
  }

  .step {
    grid-template-columns: 44px 1fr;
  }
}

@media (max-width: 1149px) {
  .main-nav {
    position: fixed;
    inset: 0;
    top: 64px;
    background: var(--color-bg);
    flex-direction: column;
    align-items: stretch;
    padding: var(--space-lg) var(--space-md);
    transform: translateX(100%);
    transition: transform var(--transition);
    gap: var(--space-lg);
  }

  .main-nav.is-open {
    transform: translateX(0);
  }

  .nav-list {
    flex-direction: column;
    gap: var(--space-md);
  }

  .nav-list a {
    font-size: 1.1rem;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

@media (min-width: 600px) and (max-width: 1149px) {
  .main-nav .btn-primary {
    align-self: flex-start;
    width: auto;
    min-width: 240px;
  }
}
