/* ============================================================
   Notdienst-Wache – zentrales Stylesheet
   Palette: Navy #0e2a47 · Amber #f59e0b · Off-White #f8fafc
   Text: #1e293b · System-Schriften · Container max. 1100px
   ============================================================ */

:root {
  --navy: #0e2a47;
  --navy-dark: #0a1f36;
  --navy-bright: #16334f;
  --amber: #f59e0b;
  --amber-dark: #d97706;
  --amber-soft: #fef3c7;
  --amber-line: #f3d9a4;
  --bg: #f8fafc;
  --text: #1e293b;
  --muted: #475569;
  --line: #e2e8f0;
  --white: #ffffff;
  --shadow-rest: 0 1px 3px rgba(14, 42, 71, 0.06);
  --shadow-hover: 0 8px 24px rgba(14, 42, 71, 0.12);
  --shadow-pricing: 0 4px 16px rgba(14, 42, 71, 0.08);
  --shadow-featured: 0 12px 32px rgba(14, 42, 71, 0.16);
}

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

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

h1, h2, h3, h4 {
  color: var(--navy);
  line-height: 1.25;
  margin: 0 0 0.75rem;
  text-wrap: balance;
}

h1 { font-size: clamp(1.85rem, 4.5vw, 2.7rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); letter-spacing: -0.01em; }
h3 { font-size: 1.15rem; }

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

ul, ol { margin: 0 0 1rem; padding-left: 1.3rem; }
li { margin-bottom: 0.35rem; }

a { color: var(--navy); }
a:hover { text-decoration-thickness: 2px; }

img, svg { max-width: 100%; height: auto; }

strong { color: var(--navy); }

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

[id] {
  scroll-margin-top: 5.5rem;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ---------- Header & Navigation ---------- */

.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-header .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.logo {
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--navy);
  text-decoration: none;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 1.15rem;
}

.site-nav a {
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--navy);
}

.site-nav a:hover {
  text-decoration: underline;
}

.site-nav .btn {
  padding: 0.45rem 1rem;
  font-size: 0.9rem;
}

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

.btn {
  display: inline-block;
  padding: 0.7rem 1.4rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease,
    border-color 0.15s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.btn-primary {
  background: var(--amber);
  border-color: var(--amber);
  color: var(--navy);
}

.btn-primary:hover {
  background: var(--amber-dark);
  border-color: var(--amber-dark);
  color: var(--navy);
  box-shadow: 0 6px 16px rgba(217, 119, 6, 0.32);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  border-color: var(--navy);
  color: var(--navy);
}

.btn-ghost:hover {
  background: var(--navy);
  color: var(--white);
}

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

.hero {
  background:
    radial-gradient(56rem 30rem at 85% -20%, rgba(245, 158, 11, 0.14), transparent 65%),
    radial-gradient(44rem 26rem at 8% 115%, rgba(59, 99, 142, 0.4), transparent 70%),
    linear-gradient(165deg, var(--navy-bright) 0%, var(--navy) 45%, var(--navy-dark) 100%);
  color: #e2e8f0;
  padding: clamp(3.25rem, 8vw, 5.25rem) 0;
}

.hero h1,
.hero h2 {
  color: var(--white);
  max-width: 48rem;
}

.hero-sub {
  font-size: 1.15rem;
  line-height: 1.7;
  color: #cbd5e1;
  max-width: 44rem;
  margin-bottom: 1.75rem;
}

.hero .btn {
  margin: 0 0.75rem 0.5rem 0;
}

.hero .btn-ghost {
  border-color: rgba(255, 255, 255, 0.75);
  color: var(--white);
}

.hero .btn-ghost:hover {
  background: var(--white);
  color: var(--navy);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 2.5rem;
  align-items: center;
}

.hero-art {
  max-width: 340px;
  margin-left: auto;
}

.hero-art svg {
  display: block;
  width: 100%;
  height: auto;
}

/* ---------- Sektionen ---------- */

.section {
  padding: clamp(3rem, 6.5vw, 4.75rem) 0;
}

.section-title {
  margin-bottom: 1.5rem;
}

.section-title + p {
  max-width: 62ch;
  margin-bottom: 2rem;
}

/* ---------- Grid & Karten ---------- */

.grid {
  display: grid;
  gap: 1.5rem;
}

.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.6rem;
  box-shadow: var(--shadow-rest);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }

/* Icon-Chips auf Karten (Inline-SVG, stroke = currentColor) */
.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 12px;
  background: var(--amber-soft);
  color: var(--navy);
  margin-bottom: 0.85rem;
}

.card-icon svg {
  width: 1.4rem;
  height: 1.4rem;
}

/* Kennzahlen-Karten im Problemabschnitt der Startseite */
#problem .card h3 { font-size: 1.9rem; letter-spacing: -0.02em; }

/* Wechselnde Sektionshintergründe auf der Startseite */
#funktion, #preise, #sicherheit { background: var(--white); }

/* Live-Demo-Widget */
elevenlabs-convai { display: block; margin: 1.25rem 0 0.5rem; }

/* ---------- Preise ---------- */

.pricing-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 2rem 1.75rem;
  box-shadow: var(--shadow-pricing);
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.pricing-card.featured {
  border: 2px solid var(--navy);
  box-shadow: var(--shadow-featured);
}

.pricing-card.featured .badge {
  background: var(--navy);
  color: var(--white);
}

.pricing-card h3 {
  margin-top: 0;
  font-size: 1.3rem;
}

.pricing-price {
  font-size: 2.6rem;
  font-weight: 800;
  color: var(--navy);
  margin: 0.25rem 0 0.15rem;
  line-height: 1.1;
}

.pricing-price span {
  font-size: 1rem;
  font-weight: 600;
  color: var(--muted);
}

.pricing-setup {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--muted);
  margin: 0 0 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--line);
}

.pricing-card ul {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
}

.pricing-card ul li {
  position: relative;
  padding: 0.4rem 0 0.4rem 1.7rem;
  margin: 0;
  border-bottom: 1px solid var(--bg);
}

.pricing-card ul li:last-child {
  border-bottom: none;
}

.pricing-card ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62rem;
  width: 1rem;
  height: 1rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d97706' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
}

.pricing-guarantee {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  background: var(--amber-soft);
  color: var(--navy);
  font-size: 0.92rem;
  font-weight: 700;
  border-radius: 10px;
  padding: 0.6rem 0.8rem;
  margin: 0 0 1.25rem;
}

.pricing-guarantee svg {
  width: 1.2rem;
  height: 1.2rem;
  flex-shrink: 0;
  color: var(--amber-dark);
}

.pricing-card .btn {
  margin-top: auto;
}

/* Einrichtungs-Leistungen unter den Preiskarten */
.setup-card {
  margin-top: 1.5rem;
}

.setup-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.6rem 2rem;
}

.setup-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin: 0;
}

.setup-list svg {
  width: 1.15rem;
  height: 1.15rem;
  flex-shrink: 0;
  margin-top: 0.22rem;
  color: var(--amber-dark);
}

/* ---------- Badge ---------- */

.badge {
  display: inline-block;
  align-self: flex-start;
  background: var(--amber-soft);
  color: #92400e;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  margin-bottom: 0.6rem;
}

/* ---------- Schritte ---------- */

.steps {
  list-style: none;
  counter-reset: step;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(3, 1fr);
}

.step {
  counter-increment: step;
  position: relative;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.6rem;
  margin: 0;
  box-shadow: var(--shadow-rest);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.step::before {
  content: counter(step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  font-weight: 800;
  font-size: 1.05rem;
  margin-bottom: 0.75rem;
}

.step-icon {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 2.1rem;
  height: 2.1rem;
  color: var(--amber-dark);
  opacity: 0.9;
}

.step-icon svg {
  width: 100%;
  height: 100%;
}

.step h3 { margin-bottom: 0.5rem; }
.step p:last-child { margin-bottom: 0; }

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

.faq-item {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 0.75rem;
  overflow: hidden;
}

.faq-item summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--navy);
  padding: 1rem 2.9rem 1rem 1.25rem;
  list-style: none;
  position: relative;
  transition: background-color 0.15s ease;
}

.faq-item summary:hover {
  background: var(--bg);
}

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

.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.45rem;
  font-weight: 400;
  color: var(--amber-dark);
  line-height: 1;
}

.faq-item[open] summary::after {
  content: "\2013";
}

.faq-item p {
  padding: 0 1.25rem 1.1rem;
  margin: 0;
}

/* ---------- Hinweisbox ---------- */

.notice {
  background: var(--amber-soft);
  border: 1px solid var(--amber-line);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
}

.notice p:last-child {
  margin-bottom: 0;
}

/* ---------- Tabellen ---------- */

.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border: 1px solid var(--line);
  margin-bottom: 1.5rem;
}

.table th,
.table td {
  text-align: left;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.table th {
  background: var(--bg);
  color: var(--navy);
  font-size: 0.9rem;
}

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

/* ---------- Formulare ---------- */

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem 1.5rem;
}

.form-grid .field:has(textarea) { grid-column: 1 / -1; }

.form-grid p,
.form-grid button {
  grid-column: 1 / -1;
  margin: 0;
}

.form-grid button { justify-self: start; }

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.field label {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--navy);
}

.field input,
.field select,
.field textarea {
  font: inherit;
  color: var(--text);
  background: var(--white);
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  padding: 0.65rem 0.8rem;
  width: 100%;
  transition: border-color 0.15s ease;
}

.field input:hover,
.field select:hover,
.field textarea:hover {
  border-color: var(--muted);
}

.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: 3px solid rgba(245, 158, 11, 0.55);
  outline-offset: 0;
  border-color: var(--amber);
}

.field textarea {
  min-height: 7rem;
  resize: vertical;
}

/* ---------- Rechner ---------- */

.calc {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 2rem 1.75rem;
  box-shadow: var(--shadow-pricing);
}

.calc .form-grid {
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 1.25rem;
}

.calc-result {
  background: var(--amber-soft);
  border: 1px solid var(--amber);
  border-radius: 12px;
  padding: 1.1rem 1.3rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--navy);
  margin: 0 0 1rem;
}

.calc-result strong {
  display: block;
  font-size: 1.7rem;
  line-height: 1.2;
  margin: 0.15rem 0 0.4rem;
}

.calc-result span {
  display: block;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text);
}

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

.site-footer {
  background: var(--navy);
  color: #cbd5e1;
  padding: 2.25rem 0;
}

.site-footer p {
  margin: 0 0 0.6rem;
  font-size: 0.92rem;
}

.site-footer p:last-child {
  margin-bottom: 0;
}

.site-footer a {
  color: var(--white);
}

/* ---------- Hover-Elevation (nur Geräte mit Hover) ---------- */

@media (hover: hover) {
  .card:hover,
  .step:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
  }

  .pricing-card:hover {
    box-shadow: var(--shadow-featured);
    transform: translateY(-2px);
  }
}

/* ---------- Responsiv ---------- */

@media (max-width: 980px) {
  .grid-3,
  .steps,
  .calc .form-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 860px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .hero-art {
    display: none;
  }
}

@media (max-width: 700px) {
  .grid-3,
  .grid-2,
  .steps,
  .form-grid,
  .calc .form-grid {
    grid-template-columns: 1fr;
  }

  .site-header .container {
    justify-content: center;
    text-align: center;
  }

  .site-nav {
    justify-content: center;
  }

  .hero {
    padding: 3rem 0;
  }

  .section {
    padding: 2.75rem 0;
  }

  .hero .btn {
    display: block;
    margin-right: 0;
  }
}

/* ---------- Reduzierte Bewegung ---------- */

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

  .btn,
  .card,
  .step,
  .pricing-card,
  .faq-item summary,
  .field input,
  .field select,
  .field textarea {
    transition: none;
  }

  .btn-primary:hover,
  .card:hover,
  .step:hover,
  .pricing-card:hover {
    transform: none;
  }
}

/* ---------- Druck ---------- */

@media print {
  body {
    background: #fff;
    color: #000;
  }

  .site-header,
  .site-footer,
  .hero {
    background: #fff;
    color: #000;
  }

  .hero h1,
  .hero h2,
  .hero-sub {
    color: #000;
  }

  .site-nav,
  .btn,
  .hero-art {
    display: none;
  }

  .card,
  .pricing-card,
  .step,
  .faq-item,
  .calc {
    box-shadow: none;
    border-color: #999;
  }

  a {
    color: #000;
  }

  .site-footer a {
    color: #000;
  }
}
