:root{--accent:#2f5b3a;--accent2:#6a7b4a;--off:#f6f7f2;--text:#111;}
*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  /* Verhindert horizontales Scrollen durch Schatten/Transforms oder zu breite Elemente */
  overflow-x: hidden;
}

/* Medien/Assets: niemals breiter als Container */
img, video, canvas {
  max-width: 100%;
  height: auto;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  color: #111111;
  background: #f6f7f2;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Navigation */

.nav-apple {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(18px);
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-left {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.nav-logo-img {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  object-fit: cover;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
}

.nav-brand {
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
}

.nav-links {
  display: inline-flex;
  gap: 18px;
  font-size: 0.86rem;
}

.nav-link {
  opacity: 0.7;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}

.nav-link:hover {
  opacity: 1;
}

.nav-link.active {
  opacity: 1;
  border-bottom-color: #111111;
}

/* Hero mit Video */

.hero-apple {
  position: relative;
  overflow: hidden;
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.hero-video-wrapper {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}

.hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-video-gradient {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top, rgba(255,255,255,0.08), rgba(0,0,0,0.55));
  mix-blend-mode: multiply;
}

/* Hero-Content */

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: 80px 20px 100px;
  text-align: center;
}

.hero-kicker {
  font-size: 0.9rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 12px;
  color: rgba(255,255,255,0.85);
}

.hero-title-big {
  font-size: clamp(2.8rem, 4vw, 3.6rem);
  letter-spacing: -0.05em;
  line-height: 1.05;
  margin: 0 0 18px 0;
}

.hero-subtitle {
  margin: 0 auto 24px;
  max-width: 640px;
  font-size: 1rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.9);
}

.hero-cta-row {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 16px;
}

.hero-tagline {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.85);
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn-primary {
  background: #ffffff;
  color: #111111;
  box-shadow: 0 12px 34px rgba(0,0,0,0.35);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 40px rgba(0,0,0,0.4);
}

.btn-secondary {
  background: rgba(255,255,255,0.16);
  color: #ffffff;
  border-color: rgba(255,255,255,0.7);
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.24);
}

.btn-ghost {
  background: transparent;
  color: #ffffff;
  border-color: rgba(255,255,255,0.7);
}

.btn-ghost:hover {
  background: rgba(0,0,0,0.2);
}

/* Main / Sections */

.main-apple {
  flex: 1;
  background: #ffffff;
}

.section {
  padding: 70px 20px;
}

.section-wide {
  max-width: 1200px;
  margin: 0 auto;
}

.section-muted {
  background: #f5f5f7;
}

.section-muted .section-header {
  max-width: 800px;
  margin: 0 auto 30px;
}

.section-narrow {
  max-width: 960px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 36px;
}

.section-title {
  font-size: 2rem;
  letter-spacing: -0.03em;
  margin: 0 0 10px 0;
}

.section-lead {
  max-width: 680px;
  margin: 0 auto;
  font-size: 0.98rem;
  line-height: 1.7;
  color: #4b5563;
}

.section-footnote {
  max-width: 700px;
  margin: 30px auto 0;
  font-size: 0.88rem;
  color: #4b5563;
  text-align: center;
}

/* Grids */

.grid {
  display: grid;
  gap: 24px;
  /* Auch in Vollbreiten-Sektionen bleibt das Raster lesbar und zentriert */
  max-width: 1200px;
  margin: 0 auto;
}

/* Grid-Kinder dürfen schrumpfen, sonst entsteht Overflow (min-width:auto) */
.grid > * {
  min-width: 0;
}

/* Lange Wörter/URLs sollen nie Layout sprengen */
.card-text,
.chip-card p,
.section-lead,
.calc-panel-text,
.log-meta,
.log-hint {
  overflow-wrap: anywhere;
  hyphens: auto;
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.grid-5 {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* Cards */

.card {
  border-radius: 26px;
  padding: 22px 22px 20px;
  border: 1px solid rgba(15,23,42,0.06);
  background: #ffffff;
}

.card-plain {
  box-shadow: 0 10px 30px rgba(15,23,42,0.08);
}

.card-soft {
  box-shadow: 0 8px 24px rgba(15,23,42,0.06);
}

.card-title {
  font-size: 1.1rem;
  margin: 0 0 8px 0;
}

.card-text {
  font-size: 0.94rem;
  line-height: 1.7;
  color: #4b5563;
}

.card-link {
  display: inline-flex;
  margin-top: 10px;
  font-size: 0.9rem;
  color: var(--accent);
}

/* Chip Cards */

.chip-card {
  border-radius: 22px;
  padding: 18px 18px 16px;
  border: 1px solid rgba(148,163,184,0.5);
  background: linear-gradient(to bottom, #ffffff, #f9fafb);
  font-size: 0.9rem;
}

.chip-card h3 {
  font-size: 0.96rem;
  margin: 0 0 6px 0;
}

.chip-card p {
  margin: 0;
  color: #4b5563;
  line-height: 1.6;
}

/* Sub-Hero-Bereiche für Unterseiten */

.sub-hero {
  padding: 60px 20px 70px;
}

.sub-hero-inner {
  max-width: 960px;
  margin: 0 auto;
  text-align: left;
}

.sub-hero-title {
  font-size: 2.2rem;
  letter-spacing: -0.04em;
  margin: 0 0 12px 0;
}

.sub-hero-subtitle {
  font-size: 1rem;
  line-height: 1.8;
  max-width: 680px;
  margin: 0;
}

.sub-hero-blue {
  background: radial-gradient(circle at top, #e0f2fe 0, #eff6ff 45%, #e5e7eb 100%);
  color: #0f172a;
}

.sub-hero-dark {
  background: radial-gradient(circle at top, #020617 0, #020617 40%, #111827 100%);
  color: #e5e7eb;
}

.sub-hero-light {
  background: #f9fafb;
  color: #111827;
}

/* Footer */

.footer-apple {
  border-top: 1px solid rgba(0,0,0,0.06);
  background: #f5f5f7;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 20px 30px;
  font-size: 0.78rem;
  color: #4b5563;
}

.footer-line {
  margin: 4px 0;
}

.footer-link {
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

/* Responsiv */

@media (max-width: 768px) {
  .nav-inner {
    padding-inline: 14px;
  }

  .nav-links {
    display: none; /* mobil: Brand oben, Menü optional später */
  }

  .hero-content {
    padding: 70px 16px 80px;
  }

  .section {
    padding: 54px 16px;
  }

  .sub-hero {
    padding: 40px 16px 50px;
  }

  .sub-hero-title {
    font-size: 1.8rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn {
    transition: none;
  }
}


/* Rechner / Zuordnungs-Tool auf der Startseite */

.calc-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 24px;
  align-items: stretch;
}

.calc-panel {
  border-radius: 24px;
  border: 1px solid rgba(148,163,184,0.5);
  background: linear-gradient(to bottom, #ffffff, #f9fafb);
  padding: 20px 20px 22px;
  box-shadow: 0 18px 45px rgba(15,23,42,0.12);
}

.calc-panel-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 10px;
}

.calc-panel-text {
  font-size: 0.95rem;
  color: #4b5563;
  margin: 0 0 12px;
}

.calc-form-row {
  margin-bottom: 10px;
  text-align: left;
}

.calc-label {
  display: block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #6b7280;
  margin-bottom: 4px;
}

.calc-select,
.calc-textarea {
  width: 100%;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  padding: 10px 14px;
  font-size: 0.95rem;
  outline: none;
  background: #f9fafb;
}

.calc-textarea {
  border-radius: 16px;
  resize: vertical;
  min-height: 72px;
}

.calc-select:focus,
.calc-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(37,99,235,0.5);
  background: #ffffff;
}

.result-box {
  border-radius: 18px;
  border: 1px solid rgba(148,163,184,0.7);
  background: linear-gradient(to bottom, #f9fafb, #ffffff);
  padding: 14px 16px;
}

.result-item {
  padding: 8px 0;
  border-top: 1px solid rgba(209,213,219,0.6);
}

.result-item:first-child {
  border-top: none;
  padding-top: 0;
}

.small {
  font-size: 0.84rem;
}

.muted {
  color: #6b7280;
}

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


/* Farbigere Hervorhebung für Gemeinde-Vorteile */

.section-muted {
  background: radial-gradient(circle at top, #e0f2fe 0, #f9fafb 45%, #e5e7eb 100%);
}

.section-muted .card-plain,
.section-muted .card-soft {
  background: linear-gradient(to bottom, #ffffff, #eff6ff);
  border-radius: 22px;
  border: 1px solid rgba(148,163,184,0.7);
}

.section-muted .card-title {
  color: #0f172a;
}

.section-muted .card-text {
  color: #374151;
}



.form-rows-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.form-rows-inline label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.form-rows-inline input[type="checkbox"] {
  width: 14px;
  height: 14px;
}



/* Hero extra line & main CTA */

.hero-main-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 8px 0 10px;
  gap: 4px;
}

.btn-hero-main {
  padding-inline: 26px;
  font-size: 0.95rem;
  box-shadow: 0 14px 40px rgba(15,23,42,0.45);
}

.hero-main-cta-sub {
  font-size: 0.8rem;
  opacity: 0.9;
}

.hero-extra {
  margin-top: 4px;
  font-size: 0.85rem;
  opacity: 0.85;
}

/* Nav hover enhancements */

.nav-link {
  transition: background-color 0.18s ease-out, color 0.18s ease-out, transform 0.16s ease-out;
}

.nav-link:hover {
  background: rgba(15,23,42,0.06);
  transform: translateY(-1px);
}

/* Card & section hover */

.section {
  transition: background-color 0.25s ease-out, box-shadow 0.25s ease-out, transform 0.22s ease-out;
}

/* Hover-Effekte nur auf Geräten mit echter Maus (verhindert "Hover-Stuck" auf Touch) */
@media (hover: hover) {
  .section:hover {
    box-shadow: 0 22px 70px rgba(15,23,42,0.12);
    transform: translateY(-2px);
  }
}

.card,
.card-soft,
.card-plain {
  border-radius: 14px;
}

/* Hero video iframe */

.hero-video {
  border: none;
}


/* Scroll-triggered micro-animations */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Mobile: keine horizontale Slider-Logik; alles sauber untereinander */
@media (max-width: 768px) {
  .grid-2,
  .grid-3,
  .grid-5 {
    grid-template-columns: 1fr;
  }
}


/* Ensure headings inside hellen Boxen klar lesbar sind */
.card-title,
.calc-panel-title,
.chip-card h3 {
  color: #020617;
}


/* Farb-Varianten für zentrale Buttons */
.btn-green {
  background-color: #16a34a;
  border-color: #15803d;
  color: #ffffff;
}
.btn-green:hover {
  background-color: #15803d;
  border-color: #166534;
  color: #ffffff;
}
.btn-brown {
  background-color: #92400e;
  border-color: #78350f;
  color: #ffffff;
}
.btn-brown:hover {
  background-color: #78350f;
  border-color: #713f12;
  color: #ffffff;
}


/* Feste Steuerleiste für Audio & Nach-oben-Button */
#audio-control {
  position: fixed;
  bottom: 16px;
  right: 16px;
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 6px 10px;
  background: rgba(15,23,42,0.96);
  border-radius: 999px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.55);
  z-index: 60;
}

#audio-control button {
  border: 1px solid rgba(248,250,252,0.6);
  background: transparent;
  color: #f9fafb;
  font-size: 0.8rem;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}

#audio-control button:hover:not(:disabled) {
  background: rgba(248,250,252,0.14);
}

#audio-control button:disabled {
  opacity: 0.6;
  cursor: default;
}

/* Bild-/Symbolbild-Block (Musteransicht) */
.figure {
  /* Optisch gleiche Flucht wie Textspalte (.section-lead max-width: 680px) */
  max-width: 680px;
  width: 100%;
  margin: 0 auto;
}

.figure img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 24px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 10px 30px rgba(15,23,42,0.08);
}

.figure-caption {
  margin-top: 10px;
  font-size: 0.86rem;
  color: #4b5563;
  text-align: center;
  line-height: 1.5;
}



/* Logbuch: Vorschau-Tabelle (lokal im Browser) */
.log-meta {
  margin-top: 10px;
  font-size: 0.86rem;
  color: #4b5563;
  line-height: 1.5;
}

.log-preview {
  margin-top: 12px;
  max-height: 260px;
  overflow: auto;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  background: #ffffff;
}

.log-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.log-table th,
.log-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  text-align: left;
  vertical-align: top;
}

.log-table th {
  position: sticky;
  top: 0;
  background: #f8fafc;
  font-weight: 600;
  z-index: 1;
}

.log-table tr:last-child td {
  border-bottom: 0;
}

.log-hint {
  margin-top: 10px;
  font-size: 0.82rem;
  color: #4b5563;
}

/* Inhaltsverzeichnis (Rechtliches) */
.toc {
  max-width: 900px;
  margin: 0 auto;
}

.toc a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}



/* HeimArt-Pflege tweaks */
.nav-logo{font-weight:700;color:var(--accent);} 
.btn-hero-main{background:var(--accent);}
.btn-hero-main:hover{filter:brightness(0.95);} 
.hero-apple{background-position:center; background-size:cover;}
.hero-video-gradient{background:linear-gradient(180deg, rgba(246,247,242,0.00) 0%, rgba(246,247,242,0.65) 55%, rgba(246,247,242,0.95) 100%);} 
.muted{opacity:0.8;}
.list{margin:0; padding-left:18px;}
.footer{margin-top:auto; padding:24px 16px; background:#eef0e6; border-top:1px solid rgba(0,0,0,0.06);} 
.footer-inner{max-width:1100px; margin:0 auto; display:flex; justify-content:space-between; gap:16px; flex-wrap:wrap;}
.card-soft img{border-radius:18px 18px 0 0; display:block; width:100%;}
.card-soft{overflow:hidden;}


/* -------------------------------------------------
   HeimArt-Pflege: Brand, Buttons, Micro-Interactions
-------------------------------------------------- */

html{scroll-behavior:smooth;}

a{color:var(--accent); text-decoration:none;}
a:hover{text-decoration:underline; text-underline-offset:3px;}

.nav-logo{
  display:flex;
  align-items:center;
  gap:12px;
}

.brand-logo{
  width:46px;
  height:auto;
  border-radius:10px;
  border:1px solid rgba(15,23,42,0.08);
  box-shadow:0 8px 20px rgba(15,23,42,0.08);
  background:rgba(255,255,255,0.6);
}

.brand-name{
  font-weight:800;
  letter-spacing:0.02em;
}

.music-toggle{
  border:1px solid rgba(15,23,42,0.10);
  background:rgba(255,255,255,0.75);
  color:#0f172a;
  border-radius:999px;
  padding:10px 14px;
  font-size:0.9rem;
  cursor:pointer;
  transition:transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.music-toggle:hover{
  transform:translateY(-1px);
  box-shadow:0 10px 26px rgba(15,23,42,0.12);
  background:rgba(255,255,255,0.9);
}

.hero-badges{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin:18px 0 0 0;
}

.badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 12px;
  border-radius:999px;
  border:1px solid rgba(47,91,58,0.18);
  background:rgba(246,247,242,0.82);
  color:#1f2937;
  font-size:0.88rem;
  backdrop-filter: blur(6px);
}

.grid-4{
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.card-soft{
  border-radius:22px;
  background:#ffffff;
  border:1px solid rgba(15,23,42,0.06);
  transition:transform .18s ease, box-shadow .18s ease;
}

.card-soft:hover{
  transform:translateY(-3px);
  box-shadow:0 18px 50px rgba(15,23,42,0.12);
}

.card-img{
  width:100%;
  height:auto;
  aspect-ratio: 16 / 10;
  object-fit:cover;
  display:block;
}

@media (max-width: 640px){
  .card-img{height:200px;}
  .brand-name{display:none;}
}

.btn-card{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  margin-top:14px;
  border-radius:999px;
  padding:12px 16px;
  border:1px solid rgba(47,91,58,0.32);
  background:rgba(246,247,242,0.9);
  color:var(--accent);
  font-weight:700;
  text-decoration:none;
  transition:transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.btn-card:hover{
  transform:translateY(-1px);
  box-shadow:0 14px 34px rgba(15,23,42,0.10);
  background:#ffffff;
  text-decoration:none;
}

.btn-small{
  padding:10px 14px;
  font-size:0.92rem;
}

.addon{
  max-width:1200px;
  margin:26px auto 0;
  border-radius:26px;
  padding:18px 18px;
  border:1px solid rgba(15,23,42,0.06);
  background:linear-gradient(180deg, #ffffff 0%, rgba(246,247,242,0.92) 100%);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
}

.addon-title{
  font-weight:800;
  font-size:1.05rem;
  margin-bottom:6px;
}

.addon-text{
  color:#4b5563;
  line-height:1.6;
}

.addon-right{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:10px;
  min-width:170px;
}

.addon-price{
  font-weight:900;
  font-size:1.2rem;
}

@media (max-width: 760px){
  .addon{flex-direction:column; align-items:flex-start;}
  .addon-right{align-items:flex-start;}
}

.footer-links{
  display:flex;
  gap:14px;
  flex-wrap:wrap;
}

/* Scroll reveal */
.reveal{
  opacity:0;
  transform:translateY(10px);
  transition: opacity .55s ease, transform .55s ease;
  will-change:opacity, transform;
}

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

/* Remove any remaining blue link variants */
.card-link, .toc a { color: var(--accent); }
