/* =========================================================
   Kündigungsschutz-Service – modernes Design
   ========================================================= */

@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/assets/fonts/plus-jakarta-sans-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* Farben */
  --bg: #faf8f5;
  --surface: #ffffff;
  --sand: #efeae2;
  --sand-strong: #bdb3a4;          /* Markenfarbe (Beige) */
  --ink: #1a1f2e;
  --muted: #5a6072;
  --line: #e4ded4;
  --navy: #1f2a44;                 /* Akzentfarbe */
  --navy-2: #2e3d63;
  --gold: #b08d57;
  --ok: #2f7d5b;
  --warn: #b7791f;
  --danger: #b42318;

  /* Schrift */
  --font-sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: var(--font-sans);

  /* Form */
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 1px 2px rgba(26, 31, 46, 0.06), 0 2px 8px rgba(26, 31, 46, 0.04);
  --shadow-md: 0 4px 12px rgba(26, 31, 46, 0.06), 0 12px 32px rgba(26, 31, 46, 0.08);
  --shadow-lg: 0 10px 30px rgba(26, 31, 46, 0.10), 0 30px 60px rgba(26, 31, 46, 0.10);

  --header-h: 64px;                /* Höhe beim Scrollen (kompakt) */
  --header-top-h: 116px;           /* Höhe ganz oben auf der Seite */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Basis ---------- */

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

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

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 {
  margin: 0 0 0.5em;
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.035em;
  color: var(--navy);
  text-wrap: balance;
}

h1 { font-size: clamp(2.1rem, 1.5rem + 2.4vw, 3.4rem); }
h2 { font-size: clamp(1.75rem, 1.35rem + 1.7vw, 2.75rem); }

p {
  margin: 0 0 1em;
  text-wrap: pretty;
}

a {
  color: var(--navy);
  text-underline-offset: 3px;
}

ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

figure {
  margin: 0;
}

.container {
  width: min(1360px, 100%);   /* breiter = weniger Rand links und rechts */
  margin-inline: auto;
  padding-inline: clamp(1rem, 3vw, 2rem);
}

.section {
  padding-block: clamp(4rem, 3rem + 5vw, 7.5rem);
}

.section-head {
  max-width: 720px;
  margin-bottom: clamp(2rem, 1.5rem + 2vw, 3.5rem);
}

.eyebrow,
.support-copy > .eyebrow,
.form-intro > .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.9rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
}

.i {
  width: 1.15em;
  height: 1.15em;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sprite {
  position: absolute;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--navy);
  color: #fff;
  border-radius: var(--radius-sm);
}

.skip-link:focus {
  top: 1rem;
}

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

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

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.8rem 1.4rem;
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  border: 1.5px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease),
    background-color 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: var(--navy);
  color: #fff;
  box-shadow: 0 6px 18px rgba(31, 42, 68, 0.25);
}

.btn-primary:hover {
  background: var(--navy-2);
  box-shadow: 0 10px 26px rgba(31, 42, 68, 0.32);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.7);
  color: var(--navy);
  border-color: var(--line);
}

.btn-ghost:hover {
  border-color: var(--navy);
  background: #fff;
}

.btn-light {
  background: #fff;
  color: var(--navy);
}

.btn-sm {
  padding: 0.6rem 1.1rem;
  font-size: 0.92rem;
}

.btn-lg {
  padding: 1rem 1.7rem;
  font-size: 1.05rem;
}

.i-arrow {
  transition: transform 0.25s var(--ease);
}

.btn:hover .i-arrow {
  transform: translateX(4px);
}

/* Lichtreflex über den Hauptbutton */
.btn-shine::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.35) 50%, transparent 70%);
  transform: translateX(-120%);
  animation: shine 4.5s var(--ease) 1.5s infinite;
}

@keyframes shine {
  0%, 60% { transform: translateX(-120%); }
  100% { transform: translateX(120%); }
}

/* ---------- Kopfzeile ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  transition: background-color 0.3s, box-shadow 0.3s, backdrop-filter 0.3s;
}

.site-header.is-scrolled {
  background: rgba(250, 248, 245, 0.78);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  box-shadow: 0 1px 0 var(--line), 0 8px 24px rgba(26, 31, 46, 0.06);
}

/* Ganz oben ist die Kopfzeile höher und schrumpft beim Scrollen.
   Im Seitenfluss bleibt sie immer kompakt (--header-h) – nur der Inhalt
   ragt oben optisch darüber hinaus, deshalb springt beim Scrollen nichts. */
.header-inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  height: var(--header-top-h);
  transition: height 0.35s var(--ease);
}

.site-header.is-scrolled .header-inner {
  height: var(--header-h);
}

.brand,
.main-nav a,
.header-phone {
  transition: transform 0.35s var(--ease), font-size 0.35s var(--ease);
}

.brand {
  transform-origin: left center;
}

/* Ganz oben: Logo größer, Menü und Telefonnummer etwas größer */
.site-header:not(.is-scrolled) .brand {
  transform: scale(1.3);
}

.site-header:not(.is-scrolled) .main-nav a,
.site-header:not(.is-scrolled) .nav-dropdown-toggle,
.site-header:not(.is-scrolled) .header-phone {
  font-size: 1.08rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--navy);
  text-decoration: none;
  white-space: nowrap;
}

.brand img {
  width: auto;
  height: 34px;
}

.main-nav {
  margin-left: auto;
}

.main-nav ul {
  display: flex;
  gap: 0.25rem;
}

.main-nav a {
  position: relative;
  display: block;
  padding: 0.5rem 0.8rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0.8rem;
  right: 0.8rem;
  bottom: 0.25rem;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}

.main-nav a:hover::after {
  transform: scaleX(1);
}

/* Untermenü „Tools“ */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.5rem 0.8rem;
  font: inherit;
  font-weight: 500;
  color: var(--ink);
  background: none;
  border: 0;
  cursor: pointer;
  transition: font-size 0.35s var(--ease);
}

.nav-dropdown-toggle .i {
  width: 1em;
  height: 1em;
  transition: transform 0.25s var(--ease);
}

.nav-submenu {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 10;
  min-width: 220px;
  padding: 0.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), visibility 0.2s;
}

.main-nav .nav-submenu {
  display: block;
}

.nav-submenu a {
  padding: 0.65rem 0.85rem;
  font-size: 0.98rem;
  border-radius: var(--radius-sm);
}

.site-header:not(.is-scrolled) .nav-submenu a {
  font-size: 0.98rem;
}

.nav-submenu a::after {
  display: none;
}

.nav-submenu a:hover,
.nav-submenu a[aria-current="page"] {
  color: var(--navy);
  background: var(--bg);
}

@media (hover: hover) and (min-width: 1081px) {
  .nav-dropdown:hover .nav-submenu {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .nav-dropdown:hover .nav-dropdown-toggle .i {
    transform: rotate(180deg);
  }
}

.nav-dropdown.is-open .nav-submenu,
.nav-dropdown:focus-within .nav-submenu {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.nav-dropdown.is-open .nav-dropdown-toggle .i {
  transform: rotate(180deg);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header-phone {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  color: var(--navy);
  text-decoration: none;
  white-space: nowrap;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  margin-left: auto;
  padding: 0 10px;
  background: transparent;
  border: 0;
  cursor: pointer;
  flex-shrink: 0; /* nie vom Namen zusammengedrückt werden */
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.2s;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

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

.hero {
  position: relative;
  margin-top: calc(var(--header-h) * -1);
  padding-top: calc(var(--header-h) + clamp(4rem, 2.5rem + 6vw, 8rem));
  padding-bottom: clamp(5rem, 3.5rem + 6vw, 9rem);
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, #f6f2ec 0%, var(--bg) 100%);
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.55;
  animation: float 18s ease-in-out infinite alternate;
}

.blob-1 {
  width: 520px;
  height: 520px;
  top: -160px;
  right: -120px;
  background: #d9cfbf;
}

.blob-2 {
  width: 420px;
  height: 420px;
  bottom: -180px;
  left: -120px;
  background: #cdd6ea;
  animation-duration: 22s;
}

.blob-3 {
  width: 300px;
  height: 300px;
  top: 30%;
  left: 45%;
  background: #eadfcd;
  opacity: 0.45;
  animation-duration: 26s;
}

@keyframes float {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, -30px) scale(1.08); }
  100% { transform: translate(-30px, 20px) scale(0.95); }
}

.hero-grain {
  position: absolute;
  inset: 0;
  opacity: 0.35;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.12 0 0 0 0 0.16 0 0 0 0 0.27 0 0 0 0.08 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  pointer-events: none;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(2rem, 1rem + 4vw, 5rem);
  align-items: center;
}

.pulse-dot {
  position: relative;
  width: 8px;
  height: 8px;
  background: var(--ok);
  border-radius: 50%;
}

.pulse-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--ok);
  animation: pulse 2s ease-out infinite;
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(3); opacity: 0; }
}

.h1-accent {
  color: var(--navy-2);
  background: linear-gradient(transparent 72%, rgba(189, 179, 164, 0.6) 72%);
  background-repeat: no-repeat;
  background-size: 0% 100%;
  animation: highlight 1.2s var(--ease) 0.9s forwards;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

@keyframes highlight {
  to { background-size: 100% 100%; }
}

.hero-lead {
  max-width: 34em;
  font-size: clamp(1.05rem, 1rem + 0.35vw, 1.25rem);
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin: 2rem 0 0;
}

/* ---------- Fristenrechner ---------- */

.frist-card {
  position: relative;
  padding: clamp(1.5rem, 1rem + 2vw, 2.25rem);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.frist-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(176, 141, 87, 0.5), rgba(31, 42, 68, 0.25) 50%, rgba(176, 141, 87, 0.4));
  filter: blur(18px);
  opacity: 0.45;
}

.card-kicker {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.6rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
}

.frist-card h2,
.frist-card h3 {
  font-size: clamp(1.45rem, 1.2rem + 0.9vw, 1.9rem);
}

/* Hero-Überschrift passt sich der Textspalte an, damit „professionelle Hilfe.“
   auch neben dem Bild (Tablet) in eine Zeile passt */
@supports (font-size: 1cqi) {
  .hero-copy {
    container-type: inline-size;
  }

  .hero-copy h1 {
    font-size: min(clamp(2.1rem, 1.5rem + 2.4vw, 3.4rem), 10.4cqi);
  }
}

/* Tablet: auch Einleitungstext und Buttons neben dem Bild mitverkleinern,
   damit die Spalte im Verhältnis zur Überschrift stimmig bleibt */
@supports (font-size: 1cqi) {
  /* Tablet und große Handys (500–1080px) */
  @media (min-width: 500px) and (max-width: 1080px) {
    .hero-lead {
      font-size: clamp(0.9rem, 4.3cqi, 1.25rem);
    }
  }

  @media (min-width: 681px) and (max-width: 1080px) {
    /* beide Buttons in einer Zeile, nichts bricht um */
    .hero-actions {
      flex-wrap: nowrap;
      gap: 0.6rem;
      margin-top: 1.5rem;
    }

    .hero-actions .btn-lg {
      flex: none;
      padding: 0.85em 1.2em;
      font-size: clamp(0.85rem, 4cqi, 1.05rem);
      white-space: nowrap;
    }
  }
}

/* Handy und Tablet (bis 1080px): linksbündig untereinander, Bild in normaler Größe */
@media (max-width: 1080px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(2rem, 1.5rem + 2vw, 3rem);
  }

  .hero-copy {
    width: 100%;          /* nötig, weil sich die Überschrift an der Breite dieses Blocks ausrichtet */
  }

  .hero-media {
    width: 100%;
    max-width: 560px;
  }
}

/* Tablet (681–1080px): Überschrift über die volle Breite,
   darunter links Text und Knöpfe, rechts das Bild in mittlerer Größe */
@media (min-width: 681px) and (max-width: 1080px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    grid-template-rows: auto auto auto 1fr;
    grid-template-areas:
      "title   title"
      "lead    media"
      "actions media"
      ".       media";
    column-gap: clamp(1.75rem, 1rem + 2.5vw, 3rem);
    row-gap: 0;
    align-items: start;
  }

  .hero-copy {
    display: contents;
  }

  .hero-copy h1 {
    grid-area: title;
    margin-bottom: clamp(1.25rem, 1rem + 1vw, 1.75rem);
    font-size: clamp(2.4rem, 1.5rem + 3vw, 3.3rem);
  }

  .hero-lead {
    grid-area: lead;
    margin: 0;
    font-size: clamp(1.05rem, 0.95rem + 0.4vw, 1.2rem);
  }

  .hero-actions {
    grid-area: actions;
    flex-direction: column;
    align-items: stretch;
    margin-top: 1.5rem;
  }

  .hero-actions .btn-lg {
    width: 100%;
    padding: 0.9em 1.3em;
    font-size: 1rem;
  }

  .hero-media {
    grid-area: media;
    max-width: none;
  }

  .hero-media img {
    aspect-ratio: 4 / 3;
    object-position: 55% 60%;
  }
}

/* Tablet und große Handys (500–1080px): Hero nicht künstlich auf Bildschirmhöhe strecken */
@media (min-width: 500px) and (max-width: 1080px) {
  .hero {
    min-height: auto;
    padding-top: calc(var(--header-h) + clamp(2rem, 1rem + 2.5vw, 3rem));
    padding-bottom: clamp(2.5rem, 1.5rem + 2.5vw, 3.5rem);
  }
}


/* Foto rechts im Hero (wie in der Originalversion) */
.hero-media {
  position: relative;
  margin: 0;
}

.hero-media::before {
  content: "";
  position: absolute;
  inset: 1.25rem -1.25rem -1.25rem 1.25rem;
  z-index: -1;
  border: 2px solid var(--sand-strong);
  border-radius: var(--radius-lg);
}

.hero-media img {
  width: 100%;
  height: auto;
  aspect-ratio: 1328 / 1184;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

/* Eigener Abschnitt Fristenrechner: Rechner links, Erklärtext rechts */
.frist-section .section-head {
  max-width: 920px;
}

.frist-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 1rem + 4vw, 4.5rem);
  align-items: start;
}

.frist-layout .frist-card {
  position: sticky;
  top: calc(var(--header-h) + 1.5rem);
}

.frist-info {
  color: var(--muted);
}

.frist-info h3 {
  margin: 1.75rem 0 0.5rem;
  font-size: clamp(1.1rem, 1rem + 0.4vw, 1.3rem);
  letter-spacing: -0.02em;
}

.frist-info strong {
  color: var(--navy);
}

.frist-info .btn {
  margin-top: 1rem;
}

@media (max-width: 1080px) {
  .frist-layout {
    grid-template-columns: 1fr;
  }

  .frist-layout .frist-card {
    position: relative;
    top: auto;
  }
}

@media (max-width: 680px) {
  .hero-media::before {
    inset: 0.75rem -0.75rem -0.75rem 0.75rem;
  }
}


.frist-intro {
  color: var(--muted);
  font-size: 0.97rem;
}

.field-label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink);
}

.optional {
  font-weight: 400;
  color: var(--muted);
}

.input {
  display: block;
  width: 100%;
  padding: 0.85rem 1rem;
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 4px rgba(31, 42, 68, 0.12);
}

textarea.input {
  resize: vertical;
  min-height: 140px;
}

.frist-ergebnis {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-top: 1.25rem;
  padding: 1rem;
  background: var(--bg);
  border-radius: var(--radius);
  animation: pop-in 0.5s var(--ease);
}

.frist-ergebnis[hidden] {
  display: none;
}

@keyframes pop-in {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.frist-ring {
  --ring-color: var(--ok);
  position: relative;
  width: 104px;
  height: 104px;
  flex-shrink: 0;
}

.frist-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.ring-track,
.ring-value {
  fill: none;
  stroke-width: 10;
}

.ring-track {
  stroke: var(--line);
}

.ring-value {
  stroke: var(--ring-color);
  stroke-linecap: round;
  stroke-dasharray: 326.73;
  stroke-dashoffset: 326.73;
  transition: stroke-dashoffset 1s var(--ease), stroke 0.3s;
}

.ring-label {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.05;
}

.ring-label strong {
  font-family: var(--font-display);
  font-size: 1.9rem;
  color: var(--navy);
}

.ring-label span {
  font-size: 0.78rem;
  color: var(--muted);
}

.frist-label {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.frist-datum {
  margin: 0.1rem 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--navy);
}

.frist-status {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ring-color, var(--ok));
}

.frist-ergebnis.is-warn { --ring-color: var(--warn); }
.frist-ergebnis.is-danger { --ring-color: var(--danger); }
.frist-ergebnis.is-ok { --ring-color: var(--ok); }

.frist-ergebnis .frist-ring { --ring-color: inherit; }

/* Abfindungsrechner */
.abf-dauer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.abf-dauer .input-suffix {
  max-width: none;
}

.abf-dauer .input-suffix .input {
  padding-right: 5rem;
}

/* keine Pfeiltasten im Zahlenfeld – sie überlagern sonst „Jahre“/„Monate“ */
.abf-dauer input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.abf-dauer input[type="number"]::-webkit-inner-spin-button,
.abf-dauer input[type="number"]::-webkit-outer-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.abf-ergebnis {
  margin-top: 1.5rem;
  padding: 1.1rem 1.25rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.abf-betrag {
  margin: 0.15rem 0 0.25rem;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 1.25rem + 1vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--navy);
  text-wrap: balance;
}

.abf-rechnung {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.frist-hinweis {
  margin: 1rem 0 0;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--muted);
}

/* ---------- Fakten ---------- */

.facts {
  background: var(--navy);
  color: #fff;
}

.facts-inner {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.fact {
  container-type: inline-size;
  padding: clamp(1.75rem, 1rem + 2vw, 2.75rem) clamp(0.75rem, 0.25rem + 1.2vw, 1.5rem);
  text-align: center;
}

.fact + .fact {
  border-left: 1px solid rgba(255, 255, 255, 0.12);
}

.fact-number {
  margin: 0;
  font-family: var(--font-display);
  /* passt sich der Spaltenbreite an, damit auch „Deutschlandweit“ in eine Zeile passt */
  font-size: clamp(1.4rem, 1rem + 1.4vw, 2.4rem);
  font-size: min(clamp(1.4rem, 1rem + 1.4vw, 2.4rem), 10.5cqi);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: #e9dcc5;
}

.fact-text {
  margin: 0.4rem 0 0;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.75);
}

/* ---------- Intro ---------- */

.intro-inner {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(2rem, 1rem + 4vw, 5rem);
  align-items: start;
}

.intro-text {
  max-width: 62ch;
  font-size: clamp(1.05rem, 1rem + 0.2vw, 1.15rem);
  color: var(--muted);
}

/* ---------- Ablauf ---------- */

.ablauf {
  background: var(--sand);
  /* weniger Rand oben und unten als bei den übrigen Abschnitten */
  padding-block: clamp(2.5rem, 2rem + 2.5vw, 4rem);
  /* Sprung über das Menü: Abschnitt beginnt genau an der Linie unter der Kopfzeile.
     html hat bereits scroll-padding-top (Kopfzeile + 16px), daher hier die 16px abziehen. */
  scroll-margin-top: -16px;
}

/* Überschrift in einer Zeile, umbrechen nur wenn der Platz nicht reicht */
.ablauf .section-head {
  max-width: none;
}

.steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  counter-reset: step;
}

/* Verbindungslinie, die sich beim Scrollen zeichnet */
.steps::before {
  content: "";
  position: absolute;
  top: 2.75rem;
  left: 12.5%;
  right: 12.5%;
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--sand-strong) 0 8px, transparent 8px 14px);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.6s var(--ease) 0.3s;
}

.steps.is-visible::before {
  transform: scaleX(1);
}

.step-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1.5rem 1.75rem;
  text-align: center;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.step-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

.step-nr {
  position: absolute;
  top: -1.1rem;
  left: 50%;
  display: grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  font-family: var(--font-display);
  font-weight: 600;
  color: #fff;
  background: var(--navy);
  border: 3px solid var(--sand);
  border-radius: 50%;
  transform: translateX(-50%);
}

.step-card img {
  width: auto;
  height: 64px;
  margin: 0.75rem 0 1.25rem;
}

.step-card p {
  margin: 0;
  font-weight: 600;
  line-height: 1.4;
  color: var(--navy);
}

/* Variante: versetzte Schritte mit Pfeilen (Aufbau wie in der Originalversion) */

.steps.steps-zigzag {
  --zz-gap: 2.75rem;                           /* Abstand zwischen den Karten */
  --zz-offset: 1.25rem;                        /* Lücke zwischen Karte und Pfeil */
  --zz-arrow: clamp(4rem, 2rem + 8vw, 9rem);   /* Länge des waagerechten Pfeils */
  --zz-line: 2px;
  --zz-color: var(--navy-2);

  display: block;
  max-width: none;        /* volle Breite wie die Überschrift, weniger Rand links und rechts */
  margin-inline: auto;
  padding-left: 0;
}

.steps.steps-zigzag::before {
  display: none;
}

.steps-zigzag .step-card {
  flex-direction: row;
  gap: 1rem;
  width: 55%;
  min-height: 5.5rem;
  margin-bottom: var(--zz-gap);
  padding: 1.25rem 1.5rem 1.25rem 2.25rem;
  text-align: left;
}

.steps-zigzag .step-card:last-child {
  margin-bottom: 0;
}

/* jede zweite Karte rechts, etwas schmaler */
.steps-zigzag .step-card:nth-child(even) {
  width: 50%;
  margin-left: auto;
  margin-right: 3%;
}

/* Pfeile sollen beim Hover nicht mitwandern */
.steps-zigzag .step-card:hover {
  transform: none;
}

.steps-zigzag .step-nr {
  top: 50%;
  left: -1.1rem;
  transform: translateY(-50%);
}

.steps-zigzag .step-card p {
  font-size: clamp(1rem, 0.9rem + 0.4vw, 1.2rem);
}

/* Icon außerhalb der Karte, hinter dem Pfeil */
.steps-zigzag .step-card img {
  position: absolute;
  top: 50%;
  height: 64px;
  margin: 0;
  transform: translateY(-50%);
}

.steps-zigzag .step-card:nth-child(odd) img {
  left: calc(100% + var(--zz-offset) + var(--zz-arrow) + 1.5rem);
}

.steps-zigzag .step-card:nth-child(even) img {
  right: calc(100% + var(--zz-offset) + var(--zz-arrow) + 1.5rem);
}

/* letzte Karte hat keinen Pfeil – Icon direkt daneben */
.steps-zigzag .step-card:last-child img {
  right: calc(100% + 1.5rem);
}

/* Pfeil: Linie mit abgerundeter Ecke */
.steps-zigzag .step-card:not(:last-child)::before {
  content: "";
  position: absolute;
  top: 50%;
  width: var(--zz-arrow);
  height: calc(50% + var(--zz-gap) - 0.75rem);
  border-top: var(--zz-line) solid var(--zz-color);
  border-right: var(--zz-line) solid var(--zz-color);
  border-radius: 0 14px 0 0;
}

/* Pfeilspitze */
.steps-zigzag .step-card:not(:last-child)::after {
  content: "";
  position: absolute;
  top: calc(100% + var(--zz-gap) - 0.75rem);
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 9px solid var(--zz-color);
}

.steps-zigzag .step-card:nth-child(odd):not(:last-child)::before {
  left: calc(100% + var(--zz-offset));
}

.steps-zigzag .step-card:nth-child(odd):not(:last-child)::after {
  left: calc(100% + var(--zz-offset) + var(--zz-arrow) - 6px - var(--zz-line) / 2);
}

.steps-zigzag .step-card:nth-child(even):not(:last-child)::before {
  right: calc(100% + var(--zz-offset));
  border-right: none;
  border-left: var(--zz-line) solid var(--zz-color);
  border-radius: 14px 0 0 0;
}

.steps-zigzag .step-card:nth-child(even):not(:last-child)::after {
  right: calc(100% + var(--zz-offset) + var(--zz-arrow) - 6px - var(--zz-line) / 2);
}

/* Handy: Karten untereinander, Icon in der Karte, gerader Pfeil nach unten */
@media (max-width: 680px) {
  .steps.steps-zigzag {
    --zz-gap: 2.25rem;
    padding-left: 0.5rem;
  }

  .steps-zigzag .step-card,
  .steps-zigzag .step-card:nth-child(even) {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    padding: 1.25rem 1.25rem 1.25rem 1.75rem;
  }

  .steps-zigzag .step-nr {
    left: -0.85rem;
  }

  .steps-zigzag .step-card img,
  .steps-zigzag .step-card:nth-child(odd) img,
  .steps-zigzag .step-card:nth-child(even) img,
  .steps-zigzag .step-card:last-child img {
    position: static;
    order: 1;
    flex-shrink: 0;
    height: 44px;
    margin-left: auto;
    transform: none;
  }

  .steps-zigzag .step-card:nth-child(odd):not(:last-child)::before,
  .steps-zigzag .step-card:nth-child(even):not(:last-child)::before {
    top: 100%;
    left: calc(50% - var(--zz-line) / 2);
    right: auto;
    width: 0;
    height: calc(var(--zz-gap) - 0.5rem);
    border: none;
    border-left: var(--zz-line) solid var(--zz-color);
    border-radius: 0;
  }

  .steps-zigzag .step-card:nth-child(odd):not(:last-child)::after,
  .steps-zigzag .step-card:nth-child(even):not(:last-child)::after {
    top: calc(100% + var(--zz-gap) - 0.25rem - 9px);
    left: calc(50% - 6px);
    right: auto;
  }
}

/* Scroll-Animation der Variante B (einmalig): Karte für Karte,
   danach zeichnet sich der Pfeil zur nächsten Karte */
@media (prefers-reduced-motion: no-preference) {
  .ablauf {
    overflow-x: clip; /* hereingleitende Karten erzeugen keinen Querscroll */
  }

  .steps.steps-zigzag {
    --zz-step: 0.6s;        /* Abstand zwischen den Schritten */
    --zz-draw-start: 0.3s;  /* Pfeil startet nach der Karte */
    --zz-draw: 0.4s;        /* Dauer des Pfeil-Zeichnens */
    --zz-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  }

  .steps-zigzag .step-card:nth-child(1) { --i: 0; }
  .steps-zigzag .step-card:nth-child(2) { --i: 1; }
  .steps-zigzag .step-card:nth-child(3) { --i: 2; }
  .steps-zigzag .step-card:nth-child(4) { --i: 3; }

  /* Karte gleitet von ihrer Seite herein */
  .js .steps-zigzag .step-card {
    --t: calc(var(--i) * var(--zz-step));
    opacity: 0;
    translate: -56px 0;
    transition:
      opacity 0.4s var(--ease) var(--t),
      translate 0.5s var(--ease) var(--t),
      box-shadow 0.35s var(--ease);
  }

  .js .steps-zigzag .step-card:nth-child(even) {
    translate: 56px 0;
  }

  /* :nth-child(n) erhöht die Spezifität, damit der Endzustand auch die
     Startpositionen der Handy-Regeln (weiter unten) sicher überschreibt */
  .js .steps-zigzag.is-visible .step-card:nth-child(n) {
    opacity: 1;
    translate: 0 0;
  }

  /* Nummer springt auf und pulsiert einmal */
  .js .steps-zigzag .step-nr {
    scale: 0;
    transition: scale 0.35s var(--zz-bounce) calc(var(--t) + 0.15s);
  }

  .js .steps-zigzag.is-visible .step-nr {
    scale: 1;
    animation: zz-pulse 0.6s ease-out calc(var(--t) + 0.3s);
  }

  /* Icon wippt herein */
  .js .steps-zigzag .step-card img {
    opacity: 0;
    scale: 0.4;
    rotate: -14deg;
    transition:
      opacity 0.3s ease calc(var(--t) + 0.2s),
      scale 0.4s var(--zz-bounce) calc(var(--t) + 0.2s),
      rotate 0.4s var(--zz-bounce) calc(var(--t) + 0.2s);
  }

  .js .steps-zigzag.is-visible .step-card img {
    opacity: 1;
    scale: 1;
    rotate: 0deg;
  }

  /* Pfeil zeichnet sich: erst waagerecht, dann nach unten */
  .js .steps-zigzag .step-card:nth-child(odd)::before {
    clip-path: inset(0 100% calc(100% - 4px) 0);
  }

  .js .steps-zigzag .step-card:nth-child(even)::before {
    clip-path: inset(0 0 calc(100% - 4px) 100%);
  }

  .js .steps-zigzag.is-visible .step-card:nth-child(odd)::before {
    animation: zz-draw-right var(--zz-draw) cubic-bezier(0.45, 0, 0.25, 1) calc(var(--t) + var(--zz-draw-start)) forwards;
  }

  .js .steps-zigzag.is-visible .step-card:nth-child(even)::before {
    animation: zz-draw-left var(--zz-draw) cubic-bezier(0.45, 0, 0.25, 1) calc(var(--t) + var(--zz-draw-start)) forwards;
  }

  /* Pfeilspitze erscheint am Ende der Linie */
  .js .steps-zigzag .step-card::after {
    opacity: 0;
    translate: 0 -8px;
    transition:
      opacity 0.25s ease calc(var(--t) + var(--zz-draw-start) + var(--zz-draw) - 0.05s),
      translate 0.25s var(--zz-bounce) calc(var(--t) + var(--zz-draw-start) + var(--zz-draw) - 0.05s);
  }

  .js .steps-zigzag.is-visible .step-card::after {
    opacity: 1;
    translate: 0 0;
  }
}

/* Handy: Karten kommen von unten, Pfeil zeichnet sich senkrecht */
@media (prefers-reduced-motion: no-preference) and (max-width: 680px) {
  .steps.steps-zigzag {
    --zz-step: 0.45s;
    --zz-draw-start: 0.25s;
    --zz-draw: 0.25s;
  }

  .js .steps-zigzag .step-card,
  .js .steps-zigzag .step-card:nth-child(even) {
    translate: 0 28px;
  }

  .js .steps-zigzag .step-card:nth-child(odd)::before,
  .js .steps-zigzag .step-card:nth-child(even)::before {
    clip-path: inset(0 0 100% 0);
  }

  .js .steps-zigzag.is-visible .step-card:nth-child(odd)::before,
  .js .steps-zigzag.is-visible .step-card:nth-child(even)::before {
    animation-name: zz-draw-down;
  }
}

@keyframes zz-draw-right {
  0%   { clip-path: inset(0 100% calc(100% - 4px) 0); }
  50%  { clip-path: inset(0 0 calc(100% - 4px) 0); }
  100% { clip-path: inset(0 0 0 0); }
}

@keyframes zz-draw-left {
  0%   { clip-path: inset(0 0 calc(100% - 4px) 100%); }
  50%  { clip-path: inset(0 0 calc(100% - 4px) 0); }
  100% { clip-path: inset(0 0 0 0); }
}

@keyframes zz-draw-down {
  0%   { clip-path: inset(0 0 100% 0); }
  100% { clip-path: inset(0 0 0 0); }
}

@keyframes zz-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(46, 61, 99, 0.45); }
  100% { box-shadow: 0 0 0 14px rgba(46, 61, 99, 0); }
}

/* ---------- Unterstützung ---------- */

.support-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 1rem + 4vw, 5rem);
  align-items: center;
}

.support-media {
  position: relative;
}

.support-media::before {
  content: "";
  position: absolute;
  inset: 1.25rem -1.25rem -1.25rem 1.25rem;
  z-index: -1;
  border: 2px solid var(--sand-strong);
  border-radius: var(--radius-lg);
}

.support-media img {
  width: 100%;
  aspect-ratio: 723 / 407;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.support-copy > p {
  color: var(--muted);
}

.check-list {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.check-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
}

.check-list .i {
  width: 1.7rem;
  height: 1.7rem;
  padding: 0.35rem;
  color: var(--ok);
  background: rgba(47, 125, 91, 0.1);
  border-radius: 50%;
}

/* ---------- Hinweis ---------- */

.alert-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: clamp(1.25rem, 1rem + 1vw, 1.75rem) clamp(1.25rem, 1rem + 2vw, 2.25rem);
  color: #fff;
  background: linear-gradient(120deg, var(--navy) 0%, var(--navy-2) 100%);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.alert-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.85);
}

.alert-card p strong {
  font-weight: 800;
  color: #fff;
}

.alert-card .alert-title {
  margin-bottom: 0.2rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: #fff;
}

.alert-icon {
  display: grid;
  place-items: center;
  width: 3.75rem;
  height: 3.75rem;
  flex-shrink: 0;
  color: #e9dcc5;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
}

.alert-icon .i {
  width: 2.1rem;
  height: 2.1rem;
}

.alert-card .btn {
  margin-left: auto;
}

/* ---------- Formular ---------- */

.form-inner {
  display: grid;
  gap: clamp(0.75rem, 0.5rem + 0.75vw, 1.25rem);
}

.form-intro h2 {
  margin-bottom: 0;
}

.form-intro > p {
  color: var(--muted);
}

.mini-list {
  display: grid;
  gap: 0.6rem;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}

.mini-list li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.mini-list .i {
  color: var(--gold);
}

.form-alt a {
  font-weight: 700;
}

.form-card {
  padding: clamp(1.5rem, 1rem + 2vw, 2.5rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.progress {
  margin-bottom: 1.75rem;
  height: 6px;
  overflow: hidden;
  background: var(--sand);
  border-radius: 999px;
}

.progress-bar {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--navy));
  border-radius: inherit;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.5s var(--ease);
}

/* Alle Schritte liegen übereinander: Das Formular ist so hoch wie der größte Schritt
   und behält beim Weiterklicken seine Größe. Kontaktdaten und Zusammenfassung dürfen größer werden. */
.form-steps {
  display: grid;
}

.form-step {
  grid-area: 1 / 1;
  visibility: hidden;
}

.form-step.is-active {
  visibility: visible;
  animation: step-in 0.45s var(--ease);
}

.form-step-free:not(.is-active) {
  display: none;
}

.form-step.is-back {
  animation-name: step-in-back;
}

@keyframes step-in {
  from { opacity: 0; transform: translateX(24px); }
  to { opacity: 1; transform: none; }
}

@keyframes step-in-back {
  from { opacity: 0; transform: translateX(-24px); }
  to { opacity: 1; transform: none; }
}

fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

legend,
.step-title {
  margin-bottom: 1.1rem;
  padding: 0;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.55rem);
  font-weight: 600;
  line-height: 1.25;
  color: var(--navy);
}

label.step-title {
  display: block;
}

.choices {
  display: grid;
  gap: 0.75rem;
}

.choices-grid {
  grid-template-columns: 1fr 1fr;
}

.choice {
  position: relative;
  cursor: pointer;
}

.choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice span {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  height: 100%;
  padding: 1rem 1.15rem;
  font-weight: 500;
  background: var(--bg);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.2s, background-color 0.2s, transform 0.2s var(--ease), box-shadow 0.2s;
}

.choice span::before {
  content: "";
  width: 1.2rem;
  height: 1.2rem;
  flex-shrink: 0;
  border: 2px solid var(--sand-strong);
  border-radius: 50%;
  transition: border 0.2s, background-color 0.2s, box-shadow 0.2s;
}

.choice:hover span {
  border-color: var(--sand-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.choice input:checked + span {
  background: #fff;
  border-color: var(--navy);
  box-shadow: 0 0 0 4px rgba(31, 42, 68, 0.08);
}

.choice input:checked + span::before {
  border: 6px solid var(--navy);
}

.choice input:focus-visible + span {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

.field + .field {
  margin-top: 1rem;
}

.choices-inline {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.choices-inline .choice span {
  padding-block: 0.8rem;
}

.date-field {
  position: relative;
}

.input-date {
  min-height: 3.6rem;
  padding: 0.9rem 4rem 0.9rem 1.15rem;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--navy);
  background: var(--bg);
  border-radius: var(--radius);
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}

.input-date::placeholder {
  font-weight: 500;
  color: var(--sand-strong);
}

.input-date:hover,
.input-date:focus {
  background: #fff;
}

.input-date:hover {
  border-color: var(--sand-strong);
}

.input-date:focus {
  border-color: var(--navy);
}

/* Kalender-Knopf rechts im Feld: darüber liegt unsichtbar das echte Datumsfeld */
.date-picker {
  position: absolute;
  top: 50%;
  right: 0.5rem;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  color: var(--navy);
  border-radius: var(--radius-sm);
  transform: translateY(-50%);
  transition: background-color 0.2s;
}

.date-picker:hover {
  background: var(--sand);
}

.date-picker .i {
  width: 1.35rem;
  height: 1.35rem;
  pointer-events: none;
}

.date-picker input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  font-size: 16px; /* verhindert Zoom auf dem iPhone */
  border: 0;
  opacity: 0;
  cursor: pointer;
}

.date-picker input::-webkit-calendar-picker-indicator {
  position: absolute;
  inset: 0;
  width: auto;
  height: auto;
  cursor: pointer;
}

.date-hint {
  min-height: 1.5em;
  margin: 0.6rem 0 0;
  font-size: 0.92rem;
  color: var(--muted);
}

.input-suffix {
  position: relative;
  max-width: 260px;
}

.input-suffix .input {
  padding-right: 2.5rem;
}

.input-suffix span {
  position: absolute;
  top: 50%;
  right: 1rem;
  font-weight: 600;
  color: var(--muted);
  transform: translateY(-50%);
  pointer-events: none;
}

.overview {
  margin: 0 0 1.25rem;
  padding: 1rem 1.25rem;
  background: var(--bg);
  border-radius: var(--radius);
}

.overview div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0;
  font-size: 0.95rem;
}

.overview div + div {
  border-top: 1px solid var(--line);
}

.overview dt {
  color: var(--muted);
}

.overview dd {
  margin: 0;
  font-weight: 600;
  text-align: right;
}

.consent-contact {
  margin-top: 1.25rem;
}

.consent {
  display: flex;
  gap: 0.75rem;
  font-size: 0.92rem;
  cursor: pointer;
}

.consent input {
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.2rem;
  flex-shrink: 0;
  accent-color: var(--navy);
}

.error-message {
  min-height: 1.4em;
  margin: 0.75rem 0 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--danger);
}

.form-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.75rem;
}

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

.faq {
  background: var(--sand);
}

.faq-inner {
  display: grid;
  gap: clamp(0.75rem, 0.5rem + 0.75vw, 1.25rem);
}

.faq-inner .section-head,
.faq-inner .section-head h2 {
  margin-bottom: 0;
}

.faq-list {
  display: grid;
  gap: 0.85rem;
}

.faq-item {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.3s;
}

.faq-item[open] {
  box-shadow: var(--shadow-md);
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.2rem 1.4rem;
  font-weight: 600;
  color: var(--navy);
  list-style: none;
  cursor: pointer;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary .i {
  width: 2rem;
  height: 2rem;
  padding: 0.4rem;
  background: var(--sand);
  border-radius: 50%;
  transition: transform 0.35s var(--ease), background-color 0.3s, color 0.3s;
}

.faq-item[open] summary .i {
  transform: rotate(180deg);
  color: #fff;
  background: var(--navy);
}

/* weiches Aufklappen (moderne Browser) */
.faq-item::details-content {
  block-size: 0;
  overflow: hidden;
  transition: block-size 0.45s var(--ease), content-visibility 0.45s allow-discrete;
}

.faq-item[open]::details-content {
  block-size: auto;
}

.faq-body {
  padding: 0 1.4rem 1.4rem;
  color: var(--muted);
  font-size: 0.98rem;
}

.faq-body p {
  margin: 0;
}

.faq-body b {
  color: var(--ink);
}

/* ---------- Kontakt ---------- */

.contact-card {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr);
  gap: clamp(2rem, 1rem + 4vw, 4rem);
  align-items: center;
  padding: clamp(1.75rem, 1rem + 3vw, 3.5rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.contact-sub {
  margin-top: -0.25rem;
  font-size: 1.1rem;
  color: var(--muted);
}

/* „Kündigungsschutz-Service.de“ immer in einer Zeile:
   Schrift passt sich der Spaltenbreite an (Container-Einheiten) */
@supports (font-size: 1cqi) {
  .contact-copy {
    container-type: inline-size;
  }

  .contact-copy h2 {
    white-space: nowrap;
    font-size: min(clamp(1.75rem, 1.35rem + 1.7vw, 2.75rem), 6.8cqi);
  }
}

.contact-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem 2rem;
  margin: 1.75rem 0 2rem;
}

.contact-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.contact-list .i {
  width: 2.3rem;
  height: 2.3rem;
  padding: 0.55rem;
  color: var(--navy);
  background: var(--sand);
  border-radius: 50%;
}

.contact-list a {
  font-weight: 600;
  text-decoration: none;
}

/* Adresse (kein Link) genauso kräftig wie Telefon, E-Mail und Website */
.contact-list span {
  font-weight: 600;
  color: var(--navy);
}

.contact-list a:hover {
  text-decoration: underline;
}

/* Beide Buttons immer gleich breit (so breit wie der längere) */
.contact-actions {
  display: inline-grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
}

/* Wenn es nebeneinander zu eng wird: untereinander, weiterhin gleich breit */
@media (max-width: 1080px) {
  .contact-actions {
    grid-template-columns: 1fr;
  }
}

.contact-photo {
  position: relative;
}

.contact-photo img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.contact-photo figcaption {
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  padding: 0.6rem 0.9rem;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  color: var(--navy);
  background: rgba(255, 255, 255, 0.85);
  border-radius: 999px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

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

.site-footer {
  padding-top: clamp(3rem, 2rem + 3vw, 4.5rem);
  color: rgba(255, 255, 255, 0.72);
  background: #151c2e;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 2.5rem;
}

.footer-logo {
  margin-bottom: 0.6rem;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 1.1rem + 0.6vw, 1.6rem);
  white-space: nowrap;
  line-height: 1.15;
  font-weight: 600;
  color: #fff;
}

.footer-brand p:not(.footer-logo) {
  max-width: 32ch;
  font-size: 0.95rem;
}

.footer-title {
  margin-bottom: 0.8rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #e9dcc5;
}

.site-footer ul {
  display: grid;
  gap: 0.45rem;
  font-size: 0.95rem;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
}

.site-footer a:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-bottom {
  padding-block: 1.25rem;
  font-size: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
  margin: 0;
}

/* Platz für das runde Cookie-Symbol unten links, solange der Text sonst darunter läge */
@media (max-width: 1300px) {
  .footer-bottom p {
    padding-left: 3.75rem;
  }
}

/* ---------- Rechtliche Seiten (Impressum, Datenschutz) ---------- */

.legal-page {
  padding-block: clamp(2.5rem, 2rem + 3vw, 4.5rem) clamp(4rem, 3rem + 5vw, 7rem);
  overflow-wrap: break-word;
}

.legal-page h2 {
  margin-top: 2em;
  font-size: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem);
  letter-spacing: -0.02em;
}

/* ---------- Fehlerseite (404) ---------- */

.error-page {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: calc(100vh - var(--header-h) - 12rem);
  justify-content: center;
  padding-block: clamp(3rem, 2rem + 5vw, 6rem);
}

.error-code {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: clamp(5rem, 3rem + 10vw, 9rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--sand-strong);
}

.error-page h1 {
  margin-bottom: 1.75rem;
}

/* Antwortseite des Kontaktformulars (api/send.php) */
.form-result-text {
  max-width: 60ch;
  margin: -0.75rem 0 1.75rem;
  font-size: clamp(1.05rem, 1rem + 0.2vw, 1.15rem);
  color: var(--muted);
}

.form-result-text ul {
  padding-left: 1.2rem;
  list-style: disc;
}

.form-result-text a {
  font-weight: 600;
}

/* ---------- Cookie-Banner ---------- */

.consent-banner {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 90;
  max-height: calc(100vh - 2rem);
  max-height: calc(100dvh - 2rem);
  overflow-y: auto;
  width: min(500px, calc(100% - 2rem));
  padding: clamp(1.1rem, 0.9rem + 1vw, 1.6rem) clamp(1.1rem, 0.9rem + 1.2vw, 1.9rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translate(-50%, calc(-50% + 16px));
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease), width 0.4s var(--ease);
}

.consent-banner.is-visible {
  opacity: 1;
  transform: translate(-50%, -50%);
}

.consent-inner {
  display: grid;
  gap: 1.1rem;
}

.consent-banner.is-expanded {
  width: min(780px, calc(100% - 2rem));
}

.consent-title {
  margin-bottom: 0.3rem;
  font-weight: 700;
  color: var(--navy);
}

.consent-text {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--muted);
}

.consent-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.3rem 1.5rem;
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
}

.consent-settings {
  display: grid;
  gap: 0.75rem;
}

.consent-settings[hidden] {
  display: none;
}

.consent-category {
  padding: 0.9rem 1.1rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.consent-details {
  margin-top: 0.6rem;
}

.consent-details summary {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
  list-style: none;
}

.consent-details summary::-webkit-details-marker {
  display: none;
}

.consent-details summary::after {
  content: "";
  width: 0.45em;
  height: 0.45em;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.25s var(--ease);
}

.consent-details[open] summary::after {
  transform: translateY(1px) rotate(-135deg);
}

.consent-table {
  display: grid;
  grid-template-columns: 10.5rem minmax(0, 1fr);
  gap: 0.35rem 1rem;
  margin: 0.75rem 0 0;
  padding: 0.85rem 1rem;
  font-size: 0.85rem;
  line-height: 1.5;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow-wrap: anywhere;
}

.consent-table dt {
  font-weight: 600;
  color: var(--navy);
}

.consent-table dd {
  margin: 0;
  color: var(--muted);
}

.consent-switch {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
}

.consent-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.consent-switch-ui {
  position: relative;
  flex-shrink: 0;
  width: 42px;
  height: 24px;
  background: var(--sand-strong);
  border-radius: 999px;
  transition: background-color 0.25s var(--ease);
}

.consent-switch-ui::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(26, 31, 46, 0.25);
  transition: transform 0.25s var(--ease);
}

.consent-switch input:checked + .consent-switch-ui {
  background: var(--navy);
}

.consent-switch input:checked + .consent-switch-ui::after {
  transform: translateX(18px);
}

.consent-switch input:focus-visible + .consent-switch-ui {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.consent-switch input:disabled + .consent-switch-ui {
  opacity: 0.55;
}

.consent-switch input:disabled ~ .consent-category-name {
  cursor: default;
}

.consent-category-name {
  font-weight: 600;
  color: var(--navy);
}

.consent-category-name small {
  margin-left: 0.4rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted);
}

.consent-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.consent-actions .btn {
  width: 100%;
  padding-block: 0.7rem;
  font-size: 0.95rem;
}

.consent-banner.is-expanded .consent-actions {
  width: min(100%, 380px);
  margin-inline: auto;
}

.consent-actions .btn[hidden] {
  display: none;
}

.consent-fab {
  position: fixed;
  left: clamp(0.75rem, 2vw, 1.25rem);
  bottom: clamp(0.75rem, 2vw, 1.25rem);
  z-index: 80;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  color: var(--navy);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 50%;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), bottom 0.4s var(--ease);
}

.consent-fab[hidden] {
  display: none;
}

.consent-fab:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.consent-fab:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.consent-fab svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.footer-consent {
  padding: 0;
  font: inherit;
  text-align: left; /* Buttons sind sonst zentriert – wie die Links darüber ausrichten */
  color: rgba(255, 255, 255, 0.85);
  background: none;
  border: 0;
  cursor: pointer;
}

.footer-consent:hover {
  color: #fff;
  text-decoration: underline;
}

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

  .consent-table dd {
    margin-bottom: 0.4rem;
  }
}

/* ---------- Scroll-Effekte ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  transition-delay: calc(var(--d, 0) * 0.1s);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- Tablet ---------- */

@media (max-width: 1080px) {
  .main-nav,
  .header-phone {
    display: none;
  }

  .header-actions {
    margin-left: auto;
  }

  .nav-toggle {
    display: flex;
    margin-left: 0;
  }

  .main-nav.is-open {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    display: block;
    padding: 0.75rem clamp(1rem, 4vw, 2rem) 1.25rem;
    background: rgba(250, 248, 245, 0.97);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 12px 24px rgba(26, 31, 46, 0.08);
    animation: pop-in 0.3s var(--ease);
  }

  .main-nav.is-open ul {
    flex-direction: column;
  }

  .main-nav.is-open a {
    padding: 0.85rem 0;
    font-size: 1.1rem;
    border-bottom: 1px solid var(--line);
  }

  .main-nav.is-open a::after {
    display: none;
  }

  .main-nav.is-open .nav-dropdown-toggle {
    justify-content: space-between;
    width: 100%;
    padding: 0.85rem 0;
    font-size: 1.1rem;
    border-bottom: 1px solid var(--line);
  }

  .main-nav.is-open .nav-dropdown-toggle .i {
    display: none;
  }

  /* Im Handy-Menü stehen die Tools immer offen und eingerückt darunter */
  .main-nav.is-open .nav-submenu {
    position: static;
    min-width: 0;
    padding: 0 0 0 1rem;
    background: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .main-nav.is-open .nav-submenu a {
    font-size: 1rem;
    border-radius: 0;
  }

  .main-nav.is-open .nav-submenu a:hover {
    background: none;
  }

  .intro-inner {
    grid-template-columns: 1fr;
  }

  .frist-card {
    max-width: 560px;
  }

  .steps {
    grid-template-columns: 1fr 1fr;
    row-gap: 2.5rem;
  }

  .steps::before {
    display: none;
  }
}

/* ---------- Tablet ---------- */

/* Titel ab Tablet: „Holen Sie sich schnell“ / „professionelle Hilfe.“
   (auf dem Handy bricht er automatisch um) */
.br-wide {
  display: none;
}

@media (min-width: 681px) {
  .br-wide {
    display: inline;
  }

  .keep-together {
    white-space: nowrap;
  }
}

@media (min-width: 681px) and (max-width: 1080px) {

  /* Überschrift und Text untereinander: kleinerer Abstand */
  .intro-inner {
    gap: 0.5rem;
  }

  /* Fristenrechner über die volle Breite: links Text, rechts Eingabe */
  .frist-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 2rem;
    align-items: center;
    max-width: none;
  }

  .frist-intro {
    margin-bottom: 0;
  }

  /* Kontakt: Angaben untereinander, damit nichts ins Foto läuft */
  .contact-list {
    grid-template-columns: 1fr;
  }

  /* Footer: Name oben über die volle Breite, darunter 2 Spalten */
  .footer-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  /* Ablauf A: kompakte Karten, Icon links, Text rechts */
  .steps:not(.steps-zigzag) .step-card {
    flex-direction: row;
    gap: 1.25rem;
    padding: 1.75rem 1.5rem 1.5rem;
    text-align: left;
  }

  .steps:not(.steps-zigzag) .step-nr {
    left: 1.5rem;
    transform: none;
  }

  .steps:not(.steps-zigzag) .step-card img {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    margin: 0;
    object-fit: contain;
  }
}

/* Menü unter der hohen Kopfzeile öffnen, solange noch nicht gescrollt wurde */
@media (max-width: 1080px) {
  .site-header:not(.is-scrolled) .main-nav.is-open {
    top: var(--header-top-h);
  }
}

/* ---------- Handy ---------- */

@media (max-width: 680px) {
  :root {
    --header-h: 60px;
    --header-top-h: 84px;
    --mobile-media-w: 320px;      /* Breite von Anwaltsfoto und Knöpfen auf dem Handy */
  }

  .site-header:not(.is-scrolled) .brand {
    transform: scale(1.12);
  }

  .header-actions {
    display: none;
  }

  .nav-toggle {
    margin-left: auto;
  }

  .brand {
    font-size: 1.05rem;
  }

  .brand img {
    height: 28px;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .facts-inner {
    grid-template-columns: 1fr;
  }

  .fact + .fact {
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
  }

  .steps {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding-left: 0.5rem;
  }

  .step-card {
    flex-direction: row;
    gap: 1rem;
    padding: 1.25rem 1.25rem 1.25rem 1.75rem;
    text-align: left;
  }

  .step-nr {
    top: 50%;
    left: -0.85rem;
    transform: translateY(-50%);
  }

  .step-card img {
    height: 44px;
    margin: 0;
  }

  .support-inner,
  .contact-card {
    grid-template-columns: 1fr;
  }

  .support-media::before {
    inset: 0.75rem -0.75rem -0.75rem 0.75rem;
  }

  /* Symbol und Überschrift nebeneinander, Text und Button darunter */
  .alert-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.9rem;
    align-items: center;
  }

  .alert-copy {
    display: contents;
  }

  .alert-card .alert-title {
    margin: 0;
  }

  .alert-copy p:not(.alert-title),
  .alert-card .btn {
    grid-column: 1 / -1;
  }

  /* Knöpfe so breit wie das Anwaltsfoto im Kontaktbereich */
  .alert-card .btn {
    justify-self: start;
    width: 100%;
    max-width: var(--mobile-media-w);
    margin-left: 0;
  }

  .contact-actions {
    display: grid;
    width: 100%;
    max-width: var(--mobile-media-w);
  }

  .choices-grid,
  .contact-list {
    grid-template-columns: 1fr;
  }

  .contact-photo {
    max-width: var(--mobile-media-w);
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

/* ---------- Sehr schmale Handys (z. B. iPhone SE, 320px) ---------- */

@media (max-width: 380px) {
  .header-inner {
    gap: 0.75rem;
  }

  .brand {
    min-width: 0;
    gap: 0.5rem;
    font-size: 0.95rem;
  }

  .brand img {
    height: 26px;
  }

  .brand span {
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* ---------- Weniger Bewegung gewünscht ---------- */

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

  .js .reveal {
    opacity: 1;
    transform: none;
  }

  .h1-accent {
    background-size: 100% 100%;
  }
}
