/* =============================================================
   Ergotherapie Svenja Dörl & Heike Rummel — Homburg (Saar)
   Design system & styles
   ============================================================= */

/* ---------- Schriftarten (lokal gehostet · DSGVO-konform) ---------- */
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/inter-400.woff2") format("woff2");
}
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../fonts/inter-500.woff2") format("woff2");
}
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../fonts/inter-600.woff2") format("woff2");
}
@font-face {
  font-family: "Fraunces"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("../fonts/fraunces-variable.woff2") format("woff2");
}

/* ---------- Design Tokens ---------- */
:root {
  /* Brand */
  --blue:        #5c86a8;
  --blue-deep:   #2f4a61;
  --blue-ink:    #22394c;
  --blue-soft:   #dfe9ef;
  --blue-pale:   #f1f5f8;
  --sage:        #8ea985;
  --sand:        #f6efe1;

  --ink:      #24313d;
  --charcoal: #4c5c68;
  --gray:     #74838d;
  --gray-200: #e2e8ec;
  --paper:    #f5f2ea;
  --white:    #ffffff;

  --bg:        #fbf9f4;
  --bg-alt:    #f4efe4;
  --bg-ink:    #22394c;
  --surface:   #ffffff;
  --surface-2: #eef2f4;
  --text:      var(--ink);
  --text-soft: var(--charcoal);
  --border:    rgba(34,57,76,.12);

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body:    "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;

  --container: 1180px;
  --gutter: clamp(20px, 5vw, 64px);
  --section-y: clamp(64px, 9vw, 128px);
  --radius: 20px;
  --radius-sm: 12px;
  --radius-lg: 28px;

  --shadow-sm: 0 2px 10px rgba(34,57,76,.06);
  --shadow:    0 18px 46px -18px rgba(34,57,76,.24);
  --shadow-lg: 0 40px 80px -28px rgba(34,57,76,.32);
  --ring: 0 0 0 4px rgba(92,134,168,.28);

  --ease: cubic-bezier(.22,.61,.36,1);
  --ease-out: cubic-bezier(.16,1,.3,1);
}

/* ---------- Reset / base ---------- */
*,*::before,*::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; overscroll-behavior-x: none; color-scheme: light; }
@media (prefers-reduced-motion: reduce){ html{ scroll-behavior:auto; } }

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  font-size: clamp(15.5px, 1.05vw, 17px);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  overscroll-behavior-x: none;
  width: 100%;
  max-width: 100%;
}

img, svg, picture { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
ul { list-style: none; padding: 0; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 4px; }

h1,h2,h3,h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.12; letter-spacing: -.01em; color: var(--blue-ink); }

.skip-link {
  position: fixed; top: -60px; left: 12px; z-index: 999;
  background: var(--blue-ink); color: #fff; padding: .8em 1.2em; border-radius: var(--radius-sm);
  transition: top .2s var(--ease-out);
}
.skip-link:focus { top: 12px; }

/* ---------- Layout helpers ---------- */
.container { width: min(100% - 2*var(--gutter), var(--container)); margin-inline: auto; }
.section { padding-block: var(--section-y); position: relative; }
.section--alt { background: var(--bg-alt); }
.section--ink { background: var(--bg-ink); color: #eef2f4; }
.section--ink h2 { color: #fff; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .5em;
  font-family: var(--font-body); font-weight: 600; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--blue); margin-bottom: .9em;
}
.eyebrow--light { color: #a9c2d3; }

.section-head { max-width: 760px; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head h2 { font-size: clamp(1.7rem, 3vw, 2.5rem); margin-bottom: .5em; }
.section-lead { color: var(--text-soft); font-size: 1.08rem; max-width: 62ch; }
.section-lead--light { color: #c7d6e0; }
.section-quote { font-family: var(--font-display); font-style: italic; font-size: 1.15rem; color: var(--blue-ink); }
.section--ink .section-quote { color: #dbe6ec; }
.section-footnote { margin-top: 2.2em; color: var(--text-soft); max-width: 68ch; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  padding: .85em 1.5em; border-radius: 999px; font-weight: 600; font-size: .95rem;
  transition: transform .18s var(--ease-out), box-shadow .18s var(--ease-out), background-color .18s var(--ease-out), color .18s var(--ease-out);
  white-space: nowrap;
}
.btn--primary { background: var(--blue-ink); color: #fff; box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--blue-deep); transform: translateY(-2px); box-shadow: var(--shadow); }
.btn--outline { border: 1.5px solid var(--border); color: var(--blue-ink); background: #fff; }
.btn--outline:hover { border-color: var(--blue); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.btn--outline-light { border: 1.5px solid rgba(255,255,255,.35); color: #fff; margin-top: 1.6em; }
.btn--outline-light:hover { border-color: #fff; background: rgba(255,255,255,.08); }
.btn--ghost { color: var(--blue-ink); font-weight: 600; }
.btn--ghost:hover { color: var(--blue); }
.btn--lg { padding: 1em 1.9em; font-size: 1rem; }
.btn--block { width: 100%; }

/* ---------- Header ---------- */
.scroll-progress {
  position: fixed; top: 0; left: 0; width: 100%; height: 3px; z-index: 200;
  background: linear-gradient(90deg, var(--blue), var(--sage));
  transform-origin: left; transform: scaleX(0);
}

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(251,249,244,.86); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.site-header.is-stuck { border-color: var(--border); box-shadow: 0 6px 24px -18px rgba(34,57,76,.3); }
.site-header .container { width: min(100% - 2*var(--gutter), 1440px); }

.header-inner { display: flex; align-items: center; flex-wrap: nowrap; gap: 20px; padding-block: 14px; }

.brand { display: flex; align-items: center; gap: .7em; flex: none; white-space: nowrap; }
.brand-mark { flex: none; }
.brand-word { display: flex; flex-direction: column; line-height: 1.2; }
.brand-word strong { font-family: var(--font-display); font-weight: 600; font-size: 1.02rem; color: var(--blue-ink); white-space: nowrap; }
.brand-word em { font-style: normal; font-size: .74rem; color: var(--text-soft); letter-spacing: .01em; white-space: nowrap; }

.main-nav { margin-inline: auto; min-width: 0; flex-shrink: 1; overflow: hidden; }
.main-nav ul { display: flex; flex-wrap: wrap; justify-content: flex-end; row-gap: 2px; gap: clamp(8px, 1.4vw, 22px); }
.main-nav a { font-size: .92rem; font-weight: 500; color: var(--charcoal); padding: .4em 0; position: relative; white-space: nowrap; }
.main-nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
  background: var(--blue); transform: scaleX(0); transform-origin: left; transition: transform .2s var(--ease-out);
}
.main-nav a:hover { color: var(--blue-ink); }
.main-nav a:hover::after { transform: scaleX(1); }

.header-actions { display: flex; align-items: center; gap: 10px; flex: none; }
.header-tel { padding-inline: 1.1em; }

.burger {
  display: none; flex: none; width: 40px; height: 40px; border-radius: 10px;
  align-items: center; justify-content: center; flex-direction: column; gap: 5px;
}
.burger span { display: block; width: 22px; height: 2px; background: var(--blue-ink); border-radius: 2px; transition: transform .25s var(--ease), opacity .2s; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  display: none; position: fixed; inset: 0 0 auto 0; top: 0; padding-top: 78px;
  background: var(--bg); z-index: 90; height: 100dvh; overflow-y: auto;
  transform: translateY(-8px); opacity: 0; pointer-events: none; transition: opacity .22s var(--ease), transform .22s var(--ease);
}
.mobile-menu ul { display: flex; flex-direction: column; padding: 8px var(--gutter); }
.mobile-menu a { display: block; padding: 14px 0; font-size: 1.15rem; font-family: var(--font-display); font-weight: 600; border-bottom: 1px solid var(--border); color: var(--blue-ink); }
.mobile-menu .btn { width: calc(100% - 2 * var(--gutter)); margin: 20px auto 0; }

body.menu-open { overflow: hidden; }
body.menu-open .mobile-menu { display: block; transform: translateY(0); opacity: 1; pointer-events: auto; }
body.menu-open .burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.menu-open .burger span:nth-child(2) { opacity: 0; }
body.menu-open .burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; padding-block: clamp(56px, 9vw, 108px) clamp(90px, 11vw, 140px); overflow: hidden; background: linear-gradient(180deg, #fdfbf7 0%, var(--bg) 60%); }
.hero-decor { position: absolute; inset: auto 0 -2px 0; z-index: 0; line-height: 0; color: var(--bg-alt); }
.hero-wave { width: 100%; height: clamp(70px, 12vw, 160px); }
.hero-wave path { fill: currentColor; }

.hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; gap: clamp(24px, 5vw, 60px); }
.hero-copy h1 { font-size: clamp(2rem, 4.4vw, 3.4rem); margin-bottom: .5em; }
.hero-lead { color: var(--text-soft); font-size: 1.12rem; max-width: 52ch; margin-bottom: 1.9em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 2.6em; }

.hero-facts { display: flex; flex-wrap: wrap; gap: clamp(20px, 3vw, 40px); }
.hero-facts li { display: flex; flex-direction: column; }
.hero-facts strong { font-family: var(--font-display); font-size: 1.35rem; color: var(--blue-ink); }
.hero-facts span { font-size: .82rem; color: var(--text-soft); }

.hero-photo { position: relative; }
.hero-photo > img:first-child {
  width: 100%; aspect-ratio: 4/5; object-fit: cover; object-position: 78% 45%;
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
}
.hero-photo-mark {
  position: absolute; left: -22px; bottom: -22px; width: 84px; height: auto;
  background: #fff; border-radius: 50%; padding: 12px; box-shadow: var(--shadow);
}

/* ---------- Ergotherapie ---------- */
.ergo-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: clamp(28px, 4vw, 56px); align-items: start; }
.ergo-text p { margin-bottom: 1.2em; color: var(--text-soft); max-width: 66ch; }
.ergo-text p:first-child { color: var(--text); font-size: 1.08rem; }

.research-note {
  display: flex; gap: 14px; align-items: flex-start; margin-top: 2em;
  background: var(--blue-pale); border: 1px solid var(--blue-soft); border-radius: var(--radius);
  padding: 1.3em 1.5em; color: var(--blue-ink);
}
.research-note svg { flex: none; margin-top: 2px; color: var(--blue); }
.research-note p { margin: 0; color: var(--blue-ink); font-size: .96rem; }
.research-note a { text-decoration: underline; text-underline-offset: 2px; }

.ergo-quote {
  background: var(--blue-ink); color: #fff; border-radius: var(--radius-lg);
  padding: 2.2em 2em; align-self: stretch; display: flex; flex-direction: column; justify-content: center;
}
.ergo-quote .greek { font-family: var(--font-display); font-style: italic; font-size: 1.5rem; color: var(--sand); margin-bottom: .5em; }
.ergo-quote p:last-child { color: #dbe6ec; font-size: .98rem; }
.ergo-quote em { color: #fff; font-style: normal; font-weight: 600; }

/* ---------- Team ---------- */
.team-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(24px, 3vw, 40px); }
.team-card {
  display: grid; grid-template-columns: 160px 1fr; gap: 22px;
  background: var(--surface); border-radius: var(--radius-lg); padding: 22px;
  box-shadow: var(--shadow-sm); border: 1px solid var(--border);
}
.team-photo { width: 100%; aspect-ratio: 2/3; object-fit: cover; border-radius: var(--radius); }
.team-body h3 { font-size: 1.3rem; margin-bottom: .1em; }
.team-role { color: var(--blue); font-weight: 600; font-size: .88rem; margin-bottom: .8em; }
.team-body p { font-size: .9rem; color: var(--text-soft); margin-bottom: .8em; }
.team-body strong { color: var(--text); }

/* ---------- Arbeitsbereiche cards ---------- */
.cards-grid { display: grid; gap: clamp(18px, 2.4vw, 26px); }
.cards-grid--4 { grid-template-columns: repeat(4, 1fr); }
.icon-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.8em 1.6em; box-shadow: var(--shadow-sm); transition: transform .22s var(--ease-out), box-shadow .22s var(--ease-out);
}
.icon-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.icon-card-ic {
  display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px;
  border-radius: 14px; background: var(--blue-pale); color: var(--blue); margin-bottom: 1em;
}
.icon-card-ic svg { width: 28px; height: 28px; }
.icon-card h3 { font-size: 1.1rem; margin-bottom: .45em; }
.icon-card p { color: var(--text-soft); font-size: .93rem; }

/* ---------- Diagnose / Therapie (zweispaltig: Erwachsene / Kinder) ---------- */
.diagnose-grid, .therapie-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(24px, 4vw, 56px); }
.diagnose-col h3, .therapie-col h3 { font-size: 1.2rem; margin-bottom: .8em; }
.tag-list { display: flex; flex-wrap: wrap; gap: 10px; }
.tag-list li {
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
  padding: .55em 1.1em; font-size: .87rem; color: var(--text-soft);
}

/* ---------- Kooperation ---------- */
.kooperation-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(24px, 4vw, 56px); }
.kooperation-grid h3 { font-size: 1.15rem; margin-bottom: .9em; }
.check-list li { display: flex; align-items: flex-start; gap: .7em; padding: .55em 0; border-bottom: 1px solid var(--border); color: var(--text-soft); font-size: .95rem; }
.check-list li:last-child { border-bottom: none; }
.check-list li::before {
  content: ""; flex: none; margin-top: .5em; width: 8px; height: 8px; border-radius: 50%;
  background: var(--blue);
}

/* ---------- Glossar ---------- */
.glossary { display: grid; gap: 10px; }
.glossary-item {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 0 1.4em; transition: box-shadow .2s var(--ease);
}
.glossary-item[open] { box-shadow: var(--shadow-sm); }
.glossary-item summary {
  cursor: pointer; list-style: none; padding: 1.1em 0; font-family: var(--font-display); font-weight: 600;
  font-size: 1.05rem; color: var(--blue-ink); display: flex; align-items: center; justify-content: space-between; gap: 1em;
}
.glossary-item summary::-webkit-details-marker { display: none; }
.glossary-item summary::after {
  content: "+"; font-family: var(--font-body); font-weight: 400; font-size: 1.4rem; color: var(--blue);
  transition: transform .22s var(--ease-out); flex: none;
}
.glossary-item[open] summary::after { transform: rotate(45deg); }
.glossary-item p { padding-bottom: 1.2em; color: var(--text-soft); font-size: .94rem; max-width: 68ch; }

/* ---------- Kontakt ---------- */
.kontakt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 70px); align-items: start; }
.kontakt-list { display: grid; gap: 1.1em; margin: 1.8em 0; }
.kontakt-list li { display: flex; align-items: flex-start; gap: .9em; color: #dbe6ec; }
.kontakt-list svg { flex: none; margin-top: 3px; color: var(--sage); }
.kontakt-list a { text-decoration: underline; text-underline-offset: 2px; }
.kontakt-list a:hover { color: #fff; }

.kontakt-call {
  background: #fff; border-radius: var(--radius-lg); padding: clamp(32px, 4vw, 48px);
  box-shadow: var(--shadow-lg); color: var(--text); text-align: center;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .9em;
}
.kontakt-call svg { color: var(--blue); }
.kontakt-call h3 { font-size: 1.25rem; }
.kontakt-call p { color: var(--text-soft); max-width: 32ch; margin-bottom: .3em; }

/* ---------- Footer ---------- */
.site-footer { background: var(--blue-ink); color: #c7d6e0; padding-block: 46px; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 28px; }
.brand--footer .brand-word strong { color: #fff; }
.brand--footer .brand-word em { color: #a9c2d3; }
.footer-address { font-size: .9rem; }
.footer-address a { text-decoration: underline; text-underline-offset: 2px; }
.footer-legal { display: flex; gap: 20px; font-size: .9rem; }
.footer-legal a:hover { color: #fff; }
.footer-copy { width: 100%; font-size: .78rem; color: #8ba4b4; padding-top: 22px; margin-top: 6px; border-top: 1px solid rgba(255,255,255,.1); }
.footer-copy a { text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Scroll reveal ---------- */
[data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease-out), transform .6s var(--ease-out); }
[data-reveal].in { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) { [data-reveal] { opacity: 1; transform: none; transition: none; } }

/* ---------- Legal pages ---------- */
.legal-page { padding-block: clamp(48px, 7vw, 90px); }
.legal-page .container { max-width: 820px; }
.legal-page h1 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); margin-bottom: .3em; }
.legal-page .updated { color: var(--text-soft); font-size: .88rem; margin-bottom: 2.4em; }
.legal-page h2 { font-size: 1.25rem; margin-top: 2em; margin-bottom: .5em; }
.legal-page h3 { font-size: 1.05rem; margin-top: 1.3em; margin-bottom: .4em; color: var(--text); }
.legal-page p, .legal-page li { color: var(--text-soft); margin-bottom: 1em; max-width: 72ch; }
.legal-page ul { list-style: disc; padding-left: 1.4em; }
.legal-page a { text-decoration: underline; text-underline-offset: 2px; color: var(--blue-ink); }
.legal-page .back-link { display: inline-flex; align-items: center; gap: .4em; margin-bottom: 2em; color: var(--blue); font-weight: 600; font-size: .92rem; }

/* ---------- 404 ---------- */
.error-page { min-height: 70vh; display: flex; align-items: center; justify-content: center; text-align: center; padding: 40px var(--gutter); }
.error-page .eyebrow { justify-content: center; }
.error-page h1 { font-size: clamp(2.4rem, 6vw, 4rem); }
.error-page p { color: var(--text-soft); margin: 1em auto 2em; max-width: 46ch; }

/* =============================================================
   Responsive
   ============================================================= */
@media (max-width: 1080px) {
  .cards-grid--4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 1300px) {
  .main-nav { display: none; }
  .header-actions .btn--ghost { display: none; }
  .burger { display: inline-flex; }
}

@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-photo { order: -1; max-width: 340px; margin-inline: auto; }
  .ergo-grid { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: 1fr; }
  .kontakt-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .header-actions .btn--primary { padding: .7em 1.1em; font-size: .88rem; }
  .team-card { grid-template-columns: 120px 1fr; }
  .diagnose-grid, .therapie-grid { grid-template-columns: 1fr; }
  .kooperation-grid { grid-template-columns: 1fr; }
  .cards-grid--4 { grid-template-columns: 1fr; }
  .hero-facts { gap: 20px 28px; }
}

@media (max-width: 480px) {
  .header-actions .btn--primary { display: none; }
}

@media (max-width: 420px) {
  .brand-word em { display: none; }
}
