/* ==========================================================================
   ESRA Praxis – Website
   Claymorphism-Design-System auf Basis der in Dokumentation/04_Offene_Punkte.md
   festgelegten Farbwelt (Petrol / Koralle / Creme).
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Lexend:wght@400;500;600;700;800&display=swap');

:root {
  /* Light Mode */
  --petrol-primary: #14464b;
  --petrol-light: #3e8e88;
  --koralle: #ff6f51;
  --koralle-hover: #e85a3d;
  --cream: #f5f2ea;
  --surface: #fffdf8;
  --surface-raised: #ffffff;
  --text: #232323;
  --text-muted: #52605f;
  --border-soft: rgba(20, 70, 75, 0.12);

  --shadow-light: rgba(255, 255, 255, 0.75);
  --shadow-dark: rgba(20, 70, 75, 0.22);
  --shadow-dark-strong: rgba(15, 40, 43, 0.32);

  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --radius-pill: 999px;

  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --space-6: 4.5rem;
  --space-7: 6.5rem;

  --max-width: 1160px;
  --ease-clay: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 180ms;
  --duration-med: 280ms;

  color-scheme: light;
}

[data-theme='dark'] {
  --petrol-primary: #4fb8b0;
  --petrol-light: #7fd6cf;
  --koralle: #ff7a5c;
  --koralle-hover: #ff9276;
  --cream: #0b1e20;
  --surface: #123033;
  --surface-raised: #163b40;
  --text: #eaf2f1;
  --text-muted: #a9c4c1;
  --border-soft: rgba(234, 242, 241, 0.1);

  --shadow-light: rgba(255, 255, 255, 0.06);
  --shadow-dark: rgba(0, 0, 0, 0.45);
  --shadow-dark-strong: rgba(0, 0, 0, 0.6);

  color-scheme: dark;
}

/* --- Reset & Grundlagen ------------------------------------------------ */

[hidden] {
  display: none !important;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Lexend', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--cream);
  color: var(--text);
  font-size: 1rem;
  line-height: 1.65;
  transition: background-color var(--duration-med) ease, color var(--duration-med) ease;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

h1,
h2,
h3,
h4 {
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 var(--space-2);
}

h1 {
  font-size: clamp(2.1rem, 4vw + 1rem, 3.4rem);
  font-weight: 800;
}

h2 {
  font-size: clamp(1.6rem, 2.4vw + 1rem, 2.4rem);
}

h3 {
  font-size: 1.25rem;
}

p {
  margin: 0 0 var(--space-2);
  color: var(--text-muted);
  max-width: 62ch;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-3);
}

.section {
  padding: var(--space-6) 0;
}

.section-header {
  max-width: 640px;
  margin: 0 0 var(--space-4);
}

.eyebrow {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--koralle);
  margin-bottom: var(--space-1);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* --- Skip Link ---------------------------------------------------------- */

.skip-link {
  position: absolute;
  left: var(--space-2);
  top: -60px;
  background: var(--koralle);
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  z-index: 1000;
  transition: top var(--duration-fast) ease;
}

.skip-link:focus {
  top: var(--space-2);
}

/* --- Fokus-Zustand ------------------------------------------------------ */

a:focus-visible,
button:focus-visible,
.nav-link:focus-visible {
  outline: 3px solid var(--koralle);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* --- Header / Navigation ------------------------------------------------ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--cream) 88%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-soft);
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-2) var(--space-3);
  max-width: var(--max-width);
  margin: 0 auto;
  gap: var(--space-2);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--text);
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background-color: var(--petrol-primary);
  background-image: url("assets/brand/esra-app-icon.png");
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  box-shadow: 5px 5px 10px var(--shadow-dark), -5px -5px 10px var(--shadow-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  color: transparent;
  font-size: 0;
}

.brand-mark svg {
  width: 22px;
  height: 22px;
}

.brand-name small {
  display: block;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  display: inline-block;
  padding: 0.6rem 1.05rem;
  border-radius: var(--radius-pill);
  text-decoration: none;
  font-weight: 500;
  color: var(--text-muted);
  transition: background-color var(--duration-fast) ease, color var(--duration-fast) ease,
    box-shadow var(--duration-fast) ease;
}

.nav-link:hover {
  color: var(--text);
  background: var(--surface-raised);
  box-shadow: 4px 4px 8px var(--shadow-dark), -4px -4px 8px var(--shadow-light);
}

.nav-link[aria-current='page'] {
  color: var(--surface);
  background: var(--petrol-primary);
  box-shadow: 3px 3px 7px var(--shadow-dark);
}

/* Therapeuten-Login – visuell als Sonder-Link erkennbar */
.nav-link--praxis {
  color: var(--petrol-primary);
  border: 1.5px solid var(--petrol-primary);
  padding: calc(0.6rem - 1.5px) calc(1.05rem - 1.5px);
}

.nav-link--praxis:hover {
  color: var(--surface);
  background: var(--petrol-primary);
  box-shadow: 4px 4px 8px var(--shadow-dark), -4px -4px 8px var(--shadow-light);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.theme-toggle,
.menu-toggle {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  border: none;
  background: var(--surface-raised);
  box-shadow: 4px 4px 9px var(--shadow-dark), -4px -4px 9px var(--shadow-light);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--petrol-primary);
  transition: transform var(--duration-fast) var(--ease-clay), box-shadow var(--duration-fast) ease;
}

.theme-toggle:hover,
.menu-toggle:hover {
  transform: translateY(-2px);
}

.theme-toggle:active,
.menu-toggle:active {
  transform: scale(0.94);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
}

.theme-toggle .icon-sun {
  display: none;
}

[data-theme='dark'] .theme-toggle .icon-sun {
  display: block;
}

[data-theme='dark'] .theme-toggle .icon-moon {
  display: none;
}

.menu-toggle {
  display: none;
}

/* --- Buttons ------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.95rem 1.9rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform var(--duration-fast) var(--ease-clay), box-shadow var(--duration-fast) ease,
    background-color var(--duration-fast) ease;
}

.btn:active {
  transform: scale(0.96);
}

.btn-primary {
  background: var(--koralle);
  color: #fff;
  box-shadow: 6px 6px 14px var(--shadow-dark-strong), -4px -4px 10px var(--shadow-light);
}

.btn-primary:hover {
  background: var(--koralle-hover);
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--surface-raised);
  color: var(--petrol-primary);
  box-shadow: 5px 5px 12px var(--shadow-dark), -5px -5px 12px var(--shadow-light);
}

.btn-secondary:hover {
  transform: translateY(-2px);
}

.btn-block {
  width: 100%;
}

/* --- Clay-Karten ---------------------------------------------------------- */

.clay-card {
  background: var(--surface-raised);
  border-radius: var(--radius-xl);
  padding: var(--space-4);
  box-shadow: 10px 10px 22px var(--shadow-dark), -8px -8px 18px var(--shadow-light);
  transition: transform var(--duration-med) var(--ease-clay), box-shadow var(--duration-med) ease;
}

.clay-card:hover {
  transform: translateY(-4px);
  box-shadow: 14px 14px 28px var(--shadow-dark), -10px -10px 22px var(--shadow-light);
}

.clay-card .icon-badge {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--petrol-light) 18%, var(--surface));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-2);
  box-shadow: inset 3px 3px 7px var(--shadow-dark), inset -3px -3px 7px var(--shadow-light);
}

.clay-card .icon-badge svg {
  width: 26px;
  height: 26px;
  color: var(--petrol-primary);
}

.clay-card h3 {
  margin-bottom: 0.4rem;
}

.clay-card p {
  margin-bottom: 0;
}

/* --- Hero ------------------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: var(--space-7) 0 var(--space-6);
}

.hero-blob {
  position: absolute;
  z-index: 0;
  filter: blur(2px);
  opacity: 0.55;
  border-radius: 62% 38% 55% 45% / 48% 45% 55% 52%;
  animation: blob-float 16s ease-in-out infinite;
}

.hero-blob.blob-a {
  width: 420px;
  height: 420px;
  top: -140px;
  right: -120px;
  background: linear-gradient(160deg, var(--petrol-light), var(--petrol-primary));
}

.hero-blob.blob-b {
  width: 260px;
  height: 260px;
  bottom: -80px;
  left: -60px;
  background: linear-gradient(160deg, var(--koralle), var(--koralle-hover));
  opacity: 0.28;
  animation-delay: -6s;
}

@keyframes blob-float {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
    border-radius: 62% 38% 55% 45% / 48% 45% 55% 52%;
  }
  50% {
    transform: translate(-16px, 22px) scale(1.05);
    border-radius: 48% 52% 40% 60% / 55% 40% 60% 45%;
  }
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--space-5);
  align-items: center;
}

.hero-content h1 {
  margin-bottom: var(--space-2);
}

.hero-content p.lede {
  font-size: 1.15rem;
  max-width: 46ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-visual .clay-card {
  width: 100%;
  max-width: 340px;
  text-align: center;
}

/* --- Grid-Layouts -------------------------------------------------------- */

.grid {
  display: grid;
  gap: var(--space-3);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

/* --- Zitat / Callout ------------------------------------------------------ */

.callout {
  border-radius: var(--radius-xl);
  padding: var(--space-5);
  background: linear-gradient(145deg, var(--petrol-primary), var(--petrol-light));
  color: #fff;
  box-shadow: 12px 12px 26px var(--shadow-dark-strong);
  text-align: center;
}

.callout p {
  color: rgba(255, 255, 255, 0.88);
  max-width: 56ch;
  margin: 0 auto var(--space-3);
}

.callout .btn-primary {
  background: #fff;
  color: var(--petrol-primary);
}

.callout .btn-primary:hover {
  background: var(--cream);
}

/* --- Prozess-/Schritt-Liste ------------------------------------------------ */

.steps {
  counter-reset: step;
  display: grid;
  gap: var(--space-3);
}

.step {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
}

.step-number {
  counter-increment: step;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--surface-raised);
  box-shadow: 5px 5px 10px var(--shadow-dark), -5px -5px 10px var(--shadow-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--koralle);
}

.step-number::before {
  content: counter(step);
}

/* --- Kontaktkarten ------------------------------------------------------- */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  align-items: start;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-lg);
  text-decoration: none;
  background: var(--surface-raised);
  box-shadow: 6px 6px 14px var(--shadow-dark), -6px -6px 14px var(--shadow-light);
  color: var(--text);
  font-weight: 600;
  margin-bottom: var(--space-2);
  transition: transform var(--duration-fast) var(--ease-clay);
}

.contact-link:hover {
  transform: translateY(-2px);
}

.contact-link .icon-badge {
  margin: 0;
  flex-shrink: 0;
}

.contact-link span.sub {
  display: block;
  font-weight: 400;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.placeholder-note {
  border-radius: var(--radius-lg);
  border: 2px dashed var(--koralle);
  padding: var(--space-2) var(--space-3);
  background: color-mix(in srgb, var(--koralle) 8%, var(--surface));
  font-size: 0.92rem;
  color: var(--text);
}

/* --- Legal-Seiten (Impressum/Datenschutz) --------------------------------- */

.legal h2 {
  margin-top: var(--space-5);
}

.legal h2:first-of-type {
  margin-top: 0;
}

.legal ul {
  color: var(--text-muted);
}

/* --- Footer ---------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--border-soft);
  padding: var(--space-5) 0 var(--space-4);
  margin-top: var(--space-6);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.5rem;
}

.footer-links a {
  text-decoration: none;
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--koralle);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-2);
  font-size: 0.85rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-soft);
  padding-top: var(--space-3);
}

/* --- Responsive ---------------------------------------------------------- */

@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 860px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    order: -1;
  }

  .grid-3 {
    grid-template-columns: 1fr 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    inset: 72px var(--space-3) auto;
    flex-direction: column;
    align-items: stretch;
    background: var(--surface-raised);
    border-radius: var(--radius-lg);
    padding: var(--space-2);
    box-shadow: 10px 10px 24px var(--shadow-dark-strong);
    gap: 0.35rem;
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: transform var(--duration-med) var(--ease-clay), opacity var(--duration-med) ease;
  }

  .nav-links.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-link {
    text-align: center;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }

  h1 {
    text-align: left;
  }

  .hero {
    padding: var(--space-5) 0 var(--space-4);
  }
}

/* --- Reduced Motion -------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
