/* ============================================================
   Hafenblick Pflegezentrum – Design System
   Konzept: "Wasser & Licht" – hell, hanseatisch, vertrauensvoll
   Palette: Navy (Marke) + Hafenlicht-Amber (einziger Akzent)
   Radius-Regel: Buttons = Pill, Karten = 18px, Inputs = 10px
   ============================================================ */

@font-face {
  font-family: 'Outfit Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('../fonts/outfit-latin-wght-normal.woff2') format('woff2-variations');
}

:root {
  --navy-950: #081C30;
  --navy-900: #0B2440;
  --navy-800: #10304F;
  --navy-700: #16406A;
  --navy-600: #1D5185;
  --ink: #22384C;
  --ink-soft: #4E6478;
  --mist: #EAF2F7;
  --mist-deep: #DCEAF2;
  --paper: #F7FBFD;
  --white: #FFFFFF;
  --amber: #E89B2D;
  --amber-deep: #C97F16;
  --amber-soft: #FDF3E3;
  --line: #D8E4EC;
  --line-dark: rgba(255, 255, 255, 0.14);

  --font-sans: 'Outfit Variable', 'Segoe UI', system-ui, -apple-system, sans-serif;

  --radius-card: 18px;
  --radius-input: 10px;
  --radius-pill: 999px;

  --shadow-card: 0 10px 34px -12px rgba(11, 36, 64, 0.16);
  --shadow-lift: 0 18px 44px -14px rgba(11, 36, 64, 0.22);

  --container: 1200px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset & Basis ---------- */

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

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

a, button, input, select, textarea, summary { touch-action: manipulation; }

[id] { scroll-margin-top: 96px; }

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

h1, h2, h3, h4 {
  color: var(--navy-900);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.022em;
  margin: 0 0 0.6em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.4rem, 5.4vw, 4rem); font-weight: 650; }
h2 { font-size: clamp(1.85rem, 3.6vw, 2.7rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.45rem); }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.lede {
  font-size: clamp(1.08rem, 1.6vw, 1.22rem);
  color: var(--ink-soft);
  max-width: 62ch;
}

a { color: var(--navy-600); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--navy-900); }

:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--navy-900);
  color: #fff;
  padding: 0.7rem 1.2rem;
  z-index: 200;
  border-radius: 0 0 var(--radius-input) 0;
}
.skip-link:focus { left: 0; }

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

section { position: relative; }

.section-pad { padding-block: clamp(4rem, 9vw, 7.5rem); }

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber-deep);
  margin-bottom: 1rem;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.85rem 1.7rem;
  border-radius: var(--radius-pill);
  border: 1.5px solid transparent;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.18s var(--ease-out), box-shadow 0.18s var(--ease-out), background-color 0.18s, color 0.18s, border-color 0.18s;
}
.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--amber);
  color: var(--navy-950);
  box-shadow: 0 8px 24px -8px rgba(232, 155, 45, 0.55);
}
.btn-primary:hover {
  background: #F0A93F;
  color: var(--navy-950);
  transform: translateY(-1px);
  box-shadow: 0 12px 28px -8px rgba(232, 155, 45, 0.65);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.72);
  color: var(--navy-800);
  border-color: rgba(11, 36, 64, 0.25);
  backdrop-filter: blur(6px);
}
.btn-ghost:hover {
  border-color: var(--navy-800);
  color: var(--navy-900);
  transform: translateY(-1px);
}

.btn-dark {
  background: var(--navy-900);
  color: #fff;
}
.btn-dark:hover { background: var(--navy-700); color: #fff; transform: translateY(-1px); }

.btn .arrow { transition: transform 0.18s var(--ease-out); }
.btn:hover .arrow { transform: translateX(3px); }

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  transition: background-color 0.25s, box-shadow 0.25s, border-color 0.25s;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(247, 251, 253, 0.88);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 0.9rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--navy-900);
}
.brand svg { width: 42px; height: 42px; flex-shrink: 0; }
.brand-name {
  font-weight: 650;
  font-size: 1.08rem;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.brand-name small {
  display: block;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.9rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a:not(.btn) {
  text-decoration: none;
  color: var(--ink);
  font-weight: 500;
  font-size: 0.98rem;
}
.nav-links a:not(.btn):hover { color: var(--navy-900); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  color: var(--navy-900);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  align-items: center;
}
.hero {
  overflow: hidden;
  /* Statischer Fallback: Morgenlicht über dem Wasser */
  background: linear-gradient(178deg, #DFF0F8 0%, #C8E4F2 34%, #A9D2E8 62%, #8FC2DE 100%);
}

.hero > .container { width: 100%; }

#water-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

#hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.2s ease;
}
#hero-video.is-ready { opacity: 1; }

.hero::after {
  /* sanfter Lichtschleier, damit Text immer lesbar bleibt */
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(110% 90% at 18% 38%, rgba(247, 251, 253, 0.92) 0%, rgba(247, 251, 253, 0.55) 42%, rgba(247, 251, 253, 0) 72%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 2;
  padding-block: 8.5rem 6rem;
  max-width: 640px;
}

.hero h1 { margin-bottom: 1.1rem; }
.hero .lede { margin-bottom: 2.1rem; }

.hero-cta { display: flex; flex-wrap: wrap; gap: 0.9rem; }

/* ---------- Vertrauensleiste (Stats) ---------- */

.stats-band { background: var(--white); border-block: 1px solid var(--line); }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  padding-block: 2.6rem;
}

.stat { text-align: left; }
.stat b {
  display: block;
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  font-weight: 650;
  color: var(--navy-900);
  letter-spacing: -0.02em;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}
.stat span { color: var(--ink-soft); font-size: 0.95rem; }

/* ---------- Leistungen (Bento) ---------- */

.bento {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.1rem;
  margin-top: 2.8rem;
}

.tile {
  border-radius: var(--radius-card);
  overflow: hidden;
  position: relative;
  background: var(--white);
  border: 1px solid var(--line);
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
}
.tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }

.tile-img { grid-column: span 7; min-height: 380px; display: flex; align-items: flex-end; border: none; }
.tile-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.tile-img .tile-caption {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 1.6rem 1.7rem;
  background: linear-gradient(to top, rgba(8, 28, 48, 0.86) 0%, rgba(8, 28, 48, 0.44) 62%, rgba(8, 28, 48, 0) 100%);
  color: #fff;
}
.tile-img h3 { color: #fff; margin-bottom: 0.25rem; }
.tile-img p { color: rgba(255, 255, 255, 0.86); font-size: 0.96rem; max-width: 46ch; }

.tile-img-sm { grid-column: span 5; min-height: 380px; }

.tile-text { grid-column: span 4; padding: 1.7rem 1.6rem; }
.tile-text h3 { display: flex; align-items: center; gap: 0.6rem; }
.tile-text p { color: var(--ink-soft); font-size: 0.97rem; }

.tile-ico {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--amber-soft);
  color: var(--amber-deep);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.tile-ico svg { width: 22px; height: 22px; }

.bento-more { margin-top: 2rem; }

/* ---------- Ablauf (Schritte) ---------- */

.steps-section { background: var(--mist); }

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  margin-top: 3rem;
  counter-reset: step;
}

.step { position: relative; padding-top: 1.4rem; border-top: 2px solid var(--navy-900); }
.step::before {
  counter-increment: step;
  content: "0" counter(step);
  display: block;
  font-size: 0.95rem;
  font-weight: 650;
  color: var(--amber-deep);
  letter-spacing: 0.08em;
  margin-bottom: 0.7rem;
}
.step h3 { margin-bottom: 0.4rem; }
.step p { color: var(--ink-soft); font-size: 0.98rem; }

/* ---------- Über uns ---------- */

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.about-portrait {
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-lift);
  position: relative;
}
.about-portrait img { width: 100%; height: auto; }

.about-quote {
  margin: 1.6rem 0 0;
  padding-left: 1.2rem;
  border-left: 3px solid var(--amber);
  font-size: 1.12rem;
  color: var(--navy-800);
  font-style: italic;
  max-width: 46ch;
}
.about-quote footer {
  margin-top: 0.6rem;
  font-style: normal;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

.value-list {
  list-style: none;
  margin: 1.8rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}
.value-list li {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
  color: var(--ink);
}
.value-list svg { width: 22px; height: 22px; color: var(--amber-deep); flex-shrink: 0; margin-top: 3px; }

/* ---------- Karriere-Teaser ---------- */

.career-teaser { padding-block: clamp(3rem, 7vw, 5.5rem); }

.career-card {
  position: relative;
  border-radius: var(--radius-card);
  overflow: hidden;
  min-height: 440px;
  display: flex;
  align-items: flex-end;
  box-shadow: var(--shadow-lift);
}
.career-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.career-card-content {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: clamp(1.8rem, 4vw, 3rem);
  background: linear-gradient(to top, rgba(8, 28, 48, 0.9) 0%, rgba(8, 28, 48, 0.5) 55%, rgba(8, 28, 48, 0) 100%);
  color: #fff;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
}
.career-card h2 { color: #fff; margin-bottom: 0.4rem; }
.career-card p { color: rgba(255, 255, 255, 0.88); max-width: 52ch; }

/* ---------- FAQ ---------- */

.faq-grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.faq-item { border-bottom: 1px solid var(--line); }
.faq-item:first-child { border-top: 1px solid var(--line); }

.faq-q {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 1.08rem;
  font-weight: 600;
  color: var(--navy-900);
  text-align: left;
  padding: 1.25rem 0.2rem;
  cursor: pointer;
}
.faq-q svg { width: 20px; height: 20px; flex-shrink: 0; transition: transform 0.25s var(--ease-out); color: var(--amber-deep); }
.faq-item.open .faq-q svg { transform: rotate(45deg); }

.faq-a {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.35s var(--ease-out);
}
.faq-a p { color: var(--ink-soft); padding: 0 0.2rem 1.3rem; max-width: 65ch; }

/* ---------- Kontakt (dunkler Block) ---------- */

.contact-section {
  background:
    radial-gradient(90% 70% at 85% 0%, rgba(29, 81, 133, 0.5) 0%, rgba(29, 81, 133, 0) 60%),
    var(--navy-950);
  color: rgba(255, 255, 255, 0.85);
}
.contact-section h2, .contact-section h3 { color: #fff; }
.contact-section a { color: #fff; }
.contact-section .lede { color: rgba(255, 255, 255, 0.72); }

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}

.contact-channels { list-style: none; margin: 2.2rem 0 0; padding: 0; display: grid; gap: 1.4rem; }
.contact-channels li { display: flex; gap: 1rem; align-items: flex-start; }
.contact-channels svg { width: 24px; height: 24px; color: var(--amber); flex-shrink: 0; margin-top: 2px; }
.contact-channels b { display: block; color: #fff; font-weight: 600; }
.contact-channels span, .contact-channels a { color: rgba(255, 255, 255, 0.72); }
.contact-channels a { text-decoration: none; }
.contact-channels a:hover { color: var(--amber); }

.contact-form {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius-card);
  padding: clamp(1.5rem, 3.5vw, 2.4rem);
  display: grid;
  gap: 1.15rem;
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.15rem; }

.field { display: grid; gap: 0.4rem; }
.field label { font-size: 0.9rem; font-weight: 600; color: #fff; }
.field input, .field select, .field textarea {
  font-family: inherit;
  font-size: 1rem;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius-input);
  padding: 0.75rem 0.9rem;
  width: 100%;
  transition: border-color 0.2s, background-color 0.2s;
}
.field input::placeholder, .field textarea::placeholder { color: rgba(255, 255, 255, 0.38); }
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23E89B2D' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.9rem center; }
.field select option { color: var(--ink); background: #fff; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--amber);
  background: rgba(255, 255, 255, 0.12);
}
.field textarea { min-height: 120px; resize: vertical; }

.field .error-msg { display: none; font-size: 0.85rem; color: #FFB4A2; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: #FF8A70; }
.field.invalid .error-msg { display: block; }

.form-note { font-size: 0.85rem; color: rgba(255, 255, 255, 0.55); margin: 0; }

.form-status { font-size: 0.95rem; color: var(--amber); display: none; }
.form-status.show { display: block; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--navy-950);
  color: rgba(255, 255, 255, 0.6);
  border-top: 1px solid var(--line-dark);
  padding-block: 2.8rem;
}
.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
}
.footer-brand { display: flex; align-items: center; gap: 0.65rem; color: #fff; text-decoration: none; }
.footer-brand svg { width: 34px; height: 34px; }
.footer-brand b { font-weight: 600; }
.footer-links { display: flex; flex-wrap: wrap; gap: 1.6rem; list-style: none; margin: 0; padding: 0; }
.footer-links a { color: rgba(255, 255, 255, 0.6); text-decoration: none; font-size: 0.94rem; }
.footer-links a:hover { color: #fff; }
.footer-note { width: 100%; font-size: 0.85rem; color: rgba(255, 255, 255, 0.38); margin-top: 0.5rem; }

/* ---------- Scroll-Reveals (GSAP setzt .reveal) ---------- */

.reveal { opacity: 0; transform: translateY(28px); }
.no-js .reveal, .reduced-motion .reveal { opacity: 1; transform: none; }

/* ---------- Unterseiten ---------- */

.page-hero {
  padding-top: clamp(7rem, 14vw, 10rem);
  padding-bottom: clamp(2.5rem, 6vw, 4.5rem);
  background: linear-gradient(180deg, var(--mist-deep) 0%, var(--paper) 100%);
}
.page-hero .lede { margin-top: 0.4rem; }

.service-detail {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  padding-block: clamp(2.5rem, 5vw, 4rem);
}
.service-detail:nth-child(even) .service-media { order: 2; }
.service-detail + .service-detail { border-top: 1px solid var(--line); }
.service-media { border-radius: var(--radius-card); overflow: hidden; box-shadow: var(--shadow-card); }
.service-media img { width: 100%; height: 100%; object-fit: cover; }
.service-list { list-style: none; margin: 1.2rem 0 0; padding: 0; display: grid; gap: 0.6rem; }
.service-list li { display: flex; gap: 0.7rem; align-items: flex-start; color: var(--ink-soft); }
.service-list svg { width: 20px; height: 20px; color: var(--amber-deep); flex-shrink: 0; margin-top: 4px; }

.benefit-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.1rem;
  margin-top: 2.5rem;
}
.benefit {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 1.5rem 1.5rem;
}
.benefit h3 { display: flex; gap: 0.6rem; align-items: center; font-size: 1.12rem; }
.benefit p { color: var(--ink-soft); font-size: 0.96rem; margin: 0; }

.legal-content { max-width: 760px; padding-block: clamp(2rem, 5vw, 3.5rem); }
.legal-content h2 { font-size: 1.4rem; margin-top: 2.2rem; }
.legal-content p, .legal-content li { color: var(--ink-soft); }

.todo-hint {
  background: var(--amber-soft);
  border: 1px dashed var(--amber-deep);
  border-radius: var(--radius-input);
  padding: 0.9rem 1.1rem;
  font-size: 0.92rem;
  color: var(--ink);
}

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
  .tile-img { grid-column: span 12; min-height: 320px; }
  .tile-img-sm { grid-column: span 6; min-height: 300px; }
  .tile-text { grid-column: span 6; }
  .about-grid, .contact-grid, .faq-grid { grid-template-columns: 1fr; }
  .about-portrait { max-width: 460px; }
}

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed;
    inset: 0;
    flex-direction: column;
    justify-content: center;
    gap: 2rem;
    background: rgba(247, 251, 253, 0.98);
    backdrop-filter: blur(10px);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.35s var(--ease-out), opacity 0.3s;
    z-index: 90;
  }
  .nav-links.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav-links a:not(.btn) { font-size: 1.3rem; }

  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 1.8rem 1rem; }
  .steps { grid-template-columns: 1fr; }
  .tile-img-sm { grid-column: span 12; }
  .tile-text { grid-column: span 12; }
  .form-row { grid-template-columns: 1fr; }
  .benefit-grid { grid-template-columns: 1fr; }
  .service-detail { grid-template-columns: 1fr; }
  .service-detail:nth-child(even) .service-media { order: 0; }
  .career-card { min-height: 380px; }
  .hero-inner { padding-top: 7rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
