/* ==========================================================================
   Author: Artiom Garbuz
   Betreuungsbüro VS – Stylesheet
   Schrift: Figtree (lokal unter /fonts, keine Verbindung zu Google).
   Markenfarben aus dem Logo: Coral #f5866b, Grau #a0a2a6.
   ========================================================================== */

@font-face {
  font-family: "Figtree";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/figtree.woff2") format("woff2");
}

:root {
  --brand: #f5866b;
  --brand-ink: #b04a2a; /* Coral für Text/Links auf Weiß */
  --brand-tint: #fdf0eb;
  --ink: #1d2025;
  --body: #474c55;
  --muted: #6c717a;
  --line: #e7e4e0;
  --paper: #f7f5f2;
  --wrap: 1600px;
  --gutter: clamp(32px, 4vw, 64px); /* Seitenrand, wächst mit dem Bildschirm */
  --radius: 6px;
  --radius-img: 12px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --header-h: 132px; /* 4px Linie + 128px Leiste, s. .header */
  --font: "Figtree", "Helvetica Neue", Arial, sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  padding-top: var(--header-h);
  font: 400 17px/1.7 var(--font);
  color: var(--body);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3 {
  margin: 0 0 0.5em;
  color: var(--ink);
  font-weight: 650;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
h1 {
  font-size: clamp(2.2rem, 4.4vw, 3.5rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}
h2 {
  font-size: clamp(1.6rem, 2.8vw, 2.25rem);
}
h3 {
  font-size: 1.2rem;
  letter-spacing: -0.01em;
}
p {
  margin: 0 0 1.1em;
}

a {
  color: var(--brand-ink);
  text-underline-offset: 0.2em;
}
a:hover {
  color: var(--ink);
}
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}

.wrap {
  max-width: var(--wrap);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.skip-link {
  position: absolute;
  left: -9999px;
}
.skip-link:focus {
  left: 12px;
  top: 12px;
  z-index: 10;
  background: var(--ink);
  color: #fff;
  padding: 8px 14px;
}

.lead {
  font-size: 1.2rem;
  line-height: 1.6;
  color: var(--muted);
  max-width: 34em;
}
.label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 4px;
}

/* ---------- Kopfbereich ----------
   Fest positioniert, der Platz wird über body { padding-top } reserviert. Dadurch verschiebt das
   Verkleinern beim Scrollen den Seiteninhalt nicht (sonst springt die Scrollposition und die
   Leiste flackert zwischen groß und klein). */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  border-top: 4px solid var(--brand);
  background: rgba(255, 255, 255, 0.88);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  backdrop-filter: saturate(1.6) blur(14px);
  box-shadow: 0 1px 0 var(--line);
  transition: box-shadow 0.3s ease;
}
.header.is-scrolled {
  box-shadow:
    0 1px 0 var(--line),
    0 10px 30px -12px rgba(29, 32, 37, 0.18);
}
.header .wrap {
  display: flex;
  align-items: center;
  gap: 40px;
  height: 128px;
  transition: height 0.3s ease;
}
.header.is-scrolled .wrap {
  height: 84px;
}
.logo {
  margin-right: auto;
}
.logo img {
  width: 116px;
  transition: width 0.3s ease;
}
.header.is-scrolled .logo img {
  width: 80px;
}

.nav {
  display: flex;
  gap: 32px;
}
.nav a {
  position: relative;
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
  padding: 6px 0;
  white-space: nowrap;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--brand);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.nav a:hover::after,
.nav a[aria-current="page"]::after {
  transform: scaleX(1);
  transform-origin: left;
}

.header-phone {
  padding-left: 32px;
  border-left: 1px solid var(--line);
  line-height: 1.3;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
}
.header-phone .label {
  margin: 0;
  font-weight: 500;
  letter-spacing: 0;
}
.header-phone:hover {
  color: var(--brand-ink);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 13px 22px;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: var(--ink);
  color: #fff;
  font: 600 1rem/1.2 var(--font);
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color 0.25s,
    border-color 0.25s,
    color 0.25s,
    transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1),
    box-shadow 0.25s;
}
.btn:hover {
  background: var(--brand-ink);
  border-color: var(--brand-ink);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 10px 20px -10px rgba(176, 74, 42, 0.55);
}
.btn:active {
  transform: translateY(0);
  box-shadow: none;
}
.btn-outline {
  background: transparent;
  color: var(--ink);
  border-color: #c9c5c0;
}
.btn-outline:hover {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
  box-shadow: none;
}

.arrow-link {
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  padding-bottom: 2px;
  background:
    linear-gradient(var(--ink), var(--ink)) 0 100% / 0 1px no-repeat,
    linear-gradient(var(--line), var(--line)) 0 100% / 100% 1px no-repeat;
  transition: background-size 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.arrow-link::after {
  content: "→";
  display: inline-block;
  margin-left: 0.35em;
  color: var(--brand-ink);
  transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.arrow-link:hover {
  color: var(--ink);
  background-size:
    100% 1px,
    100% 1px;
}
.arrow-link:hover::after {
  transform: translateX(4px);
}

/* ---------- Startseite: Einstieg ---------- */
/* Das Foto läuft rechts bis an den Bildschirmrand, der Text bleibt im Raster. */
.hero {
  padding: 64px 0 104px;
  overflow: clip;
}
.hero-grid {
  display: grid;
  /* Spaltenbreiten ergeben zusammen die Inhaltsbreite von .wrap (1600 − 2 × 64 = 1472px) */
  grid-template-columns:
    minmax(var(--gutter), 1fr) minmax(0, 620px) 80px minmax(0, 772px)
    minmax(var(--gutter), 1fr);
  align-items: center;
}
.hero-text {
  grid-column: 2;
}
.hero h1 {
  margin-bottom: 0.35em;
}
.tagline {
  font-size: 1.35rem;
  line-height: 1.45;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 0.8em;
  max-width: 24em;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 28px;
  margin-top: 32px;
}

.hero-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin: 44px 0 0;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 0.95rem;
  line-height: 1.55;
}
.hero-facts dt {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 4px;
}
.hero-facts dd {
  margin: 0;
  color: var(--ink);
}

.hero-figure {
  grid-column: 4 / 6;
  margin: 0;
  position: relative;
}
.hero-photo {
  overflow: hidden;
  border-radius: 14px 0 0 14px;
}
.hero-photo img {
  width: 100%;
  aspect-ratio: 4 / 3;
  max-height: 640px;
  object-fit: cover;
  object-position: 50% 30%;
}
.hero-figure figcaption {
  margin-top: 12px;
  font-size: 0.85rem;
  color: var(--muted);
}

/* ---------- Abschnitte ---------- */
.section {
  padding: 104px 0;
}
.section-paper {
  background: var(--paper);
}

.split {
  display: grid;
  grid-template-columns: 4fr 8fr;
  gap: 72px;
}
.split-head {
  position: sticky;
  top: 120px;
  align-self: start;
}
.split-head p {
  color: var(--muted);
}

.prose {
  max-width: 42em;
}
.prose .intro {
  font-size: 1.3rem;
  line-height: 1.55;
  color: var(--ink);
  font-weight: 500;
}
.prose h3 {
  margin-top: 2.2em;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 32px;
}
.section-head h2,
.section-head p {
  margin: 0;
}
.section-head p {
  color: var(--muted);
}

.gallery {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: repeat(2, clamp(220px, 19vw, 340px));
  gap: 16px;
}
.gallery figure {
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius-img);
}
.gallery figure:first-child {
  grid-row: span 2;
}
.gallery figure:nth-child(2) {
  grid-column: span 2;
}
.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.gallery figure:hover img {
  transform: scale(1.04);
}

/* Kontaktband am Seitenende */
.callout {
  background: var(--brand);
  color: var(--ink);
  padding: 80px 0;
}
.callout-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: end;
}
.callout h2 {
  margin-bottom: 0.35em;
}
.callout p {
  margin: 0;
  max-width: 34em;
  color: #3b2b25;
}
.callout-phone {
  text-align: right;
}
.callout-phone a {
  display: inline-block;
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--ink);
  text-decoration: none;
  padding-bottom: 4px;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 3px
    no-repeat;
  transition:
    color 0.3s ease,
    background-size 0.45s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.callout-phone a:hover {
  color: #fff;
  background-size: 40% 3px;
}
.callout-phone span {
  display: block;
  margin-top: 10px;
  color: #3b2b25;
}

/* ---------- Unterseiten ---------- */
.page-intro {
  padding-top: 72px;
  padding-bottom: 56px;
}
.page-intro h1 {
  font-size: clamp(2rem, 3.8vw, 3rem);
}
.page-intro p {
  margin-bottom: 0;
}

/* Team */
.team {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 520px));
  gap: 48px 40px;
  padding-bottom: 104px;
}
.person-photo {
  overflow: hidden;
  border-radius: var(--radius-img);
  background: var(--paper);
}
.person-photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  transition: transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.person:hover .person-photo img {
  transform: scale(1.035);
}
.person h2 {
  font-size: 1.4rem;
  margin: 22px 0 2px;
}
.role {
  color: var(--brand-ink);
  font-weight: 500;
  margin-bottom: 16px;
}
.facts {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
  font-size: 0.95rem;
}
.facts li {
  display: grid;
  grid-template-columns: 8.4em 1fr;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.facts .when {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* Kontakt */
.contact {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 64px;
  padding-bottom: 104px;
}
.contact-list {
  border-top: 1px solid var(--line);
}
.contact-item {
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.contact-item p {
  margin: 0;
}
.contact-item .big {
  font-size: 1.75rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}
.contact-item .big:hover {
  color: var(--brand-ink);
}
.hours {
  border-collapse: collapse;
}
.hours td {
  padding: 0 24px 0 0;
}
.note {
  margin-top: 24px;
  padding: 16px 20px;
  background: var(--brand-tint);
  border-left: 4px solid var(--brand);
  color: var(--ink);
}

.map {
  position: relative;
  min-height: 520px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-img);
  overflow: hidden;
}
.map iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.map-consent {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 48px;
}
.map-consent h2 {
  font-size: 1.5rem;
}
.map-consent p {
  max-width: 30em;
  color: var(--muted);
  font-size: 0.95rem;
}
.map-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

/* Fehlerseite (404) */
.notfound {
  padding-top: 112px;
  padding-bottom: 136px;
}
.notfound .code {
  color: var(--brand-ink);
  font-weight: 600;
  margin-bottom: 0.6em;
}

/* Rechtstexte */
.legal {
  max-width: 824px;
  padding-top: 72px;
  padding-bottom: 104px;
}
.legal h1 {
  font-size: clamp(2rem, 3.8vw, 3rem);
}
.legal h2 {
  font-size: 1.3rem;
  margin-top: 2.2em;
}
.legal address {
  font-style: normal;
  margin-bottom: 1.1em;
}
.legal ul {
  padding-left: 1.2em;
}
.legal li {
  margin-bottom: 0.35em;
}
.todo {
  background: #fff0b3;
  padding: 0 4px;
}

/* ---------- Fußbereich ---------- */
.footer {
  background: var(--ink);
  color: #b4b8bf;
  font-size: 0.95rem;
  line-height: 1.6;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  padding-top: 64px;
  padding-bottom: 48px;
}
.footer h2 {
  font-size: 0.95rem;
  letter-spacing: 0;
  color: #fff;
  margin-bottom: 0.7em;
}
.footer p {
  margin: 0;
}
.footer a {
  color: #e6e8eb;
  text-decoration: none;
}
.footer a:hover {
  color: var(--brand);
}
.footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.footer-bottom .wrap {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 20px;
  padding-bottom: 20px;
  font-size: 0.85rem;
  color: #8b9098;
}

/* ---------- Große Bildschirme ---------- */
@media (min-width: 1680px) {
  body {
    font-size: 18px;
  }
}

/* ---------- Tablet ---------- */
@media (max-width: 960px) {
  .header-phone {
    display: none;
  }
  .hero {
    padding: 48px 0 88px;
  }
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .hero-text {
    grid-column: 1;
    padding: 0 var(--gutter);
  }
  .hero-figure {
    grid-column: 1;
    padding-left: var(--gutter);
  }
  .hero-photo img {
    aspect-ratio: 3 / 2;
  }
  .split,
  .contact {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .split-head {
    position: static;
  }
  .split {
    gap: 16px;
  }
  .team {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ---------- Smartphone ---------- */
@media (max-width: 600px) {
  :root {
    --header-h: 92px;
  }
  body {
    font-size: 16px;
  }
  .wrap {
    padding-left: 20px;
    padding-right: 20px;
  }
  .header .wrap {
    gap: 16px;
    height: 88px;
  }
  .header.is-scrolled .wrap {
    height: 64px;
  }
  .logo img {
    width: 80px;
  }
  .header.is-scrolled .logo img {
    width: 60px;
  }
  .nav {
    gap: 16px;
  }
  .nav a {
    font-size: 0.95rem;
  }
  .hero {
    padding: 36px 0 64px;
  }
  .hero-grid {
    gap: 36px;
  }
  .hero-text {
    padding: 0 20px;
  }
  .tagline {
    font-size: 1.2rem;
  }
  .hero-facts {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 36px;
  }
  .hero-figure {
    padding-left: 20px;
  }
  .section {
    padding: 72px 0;
  }
  .prose .intro {
    font-size: 1.15rem;
  }
  .section-head {
    display: block;
  }
  .section-head p {
    margin-top: 6px;
  }
  .gallery {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
    gap: 10px;
  }
  .gallery figure:first-child,
  .gallery figure:nth-child(2) {
    grid-row: auto;
    grid-column: 1 / -1;
  }
  .gallery img {
    height: auto;
    aspect-ratio: 4 / 3;
  }
  .callout {
    padding: 56px 0;
  }
  .callout-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .callout-phone {
    text-align: left;
  }
  .page-intro {
    padding-top: 44px;
    padding-bottom: 36px;
  }
  .team {
    grid-template-columns: 1fr;
    gap: 48px;
    padding-bottom: 72px;
  }
  .contact {
    padding-bottom: 72px;
  }
  .map {
    min-height: 440px;
  }
  .map-consent {
    padding: 28px 24px;
  }
  .legal {
    padding-top: 44px;
    padding-bottom: 72px;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 48px;
    padding-bottom: 36px;
  }
  .footer-bottom .wrap {
    flex-direction: column;
    gap: 4px;
  }
}

/* ---------- Bewegung ----------
   Nur wenn der Besucher keine reduzierte Bewegung eingestellt hat. */
@view-transition {
  navigation: auto;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }

  ::view-transition-old(root) {
    animation: page-out 0.25s ease both;
  }
  ::view-transition-new(root) {
    animation: page-in 0.45s var(--ease) both;
  }

  /* Einstieg: Text steigt nacheinander auf, das Foto wird von rechts aufgedeckt. */
  .hero-text > *,
  .page-intro > * {
    animation: rise 0.9s var(--ease) both;
  }
  .hero-text > :nth-child(2),
  .page-intro > :nth-child(2) {
    animation-delay: 0.08s;
  }
  .hero-text > :nth-child(3) {
    animation-delay: 0.16s;
  }
  .hero-text > :nth-child(4) {
    animation-delay: 0.24s;
  }
  .hero-text > :nth-child(5) {
    animation-delay: 0.32s;
  }
  .hero-figure {
    animation: unveil 1.2s cubic-bezier(0.7, 0, 0.2, 1) 0.1s both;
  }
  .hero-photo img {
    animation: settle 1.8s var(--ease) 0.1s both;
  }

  /* Elemente unterhalb des sichtbaren Bereichs blenden beim Scrollen ein (js/main.js). */
  .reveal {
    opacity: 0;
    transform: translateY(32px);
    transition:
      opacity 0.9s ease,
      transform 0.9s var(--ease);
    transition-delay: var(--delay, 0s);
  }
  .reveal.is-visible {
    opacity: 1;
    transform: none;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
}
@keyframes unveil {
  from {
    clip-path: inset(0 0 0 100%);
  }
  to {
    clip-path: inset(0 0 0 0);
  }
}
@keyframes settle {
  from {
    transform: scale(1.12);
  }
}
@keyframes page-out {
  to {
    opacity: 0;
  }
}
@keyframes page-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}
