/* ===== Reset & Base ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
.is-hidden { display: none !important; }

:root {
  --blue-50: #eff6ff;
  --blue-100: #dbeafe;
  --blue-400: #60a5fa;
  --blue-500: #3b82f6;
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
  --green-100: #dcfce7;
  --green-600: #16a34a;
  --green-700: #15803d;
  --red-50: #fef2f2;
  --red-200: #fecaca;
  --red-600: #dc2626;
  --red-700: #b91c1c;
  --white: #ffffff;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  color: var(--gray-900);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
}

/* ===== Header ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--gray-100);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: var(--blue-600);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: 700;
  font-size: 0.875rem;
}

.logo-text {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gray-900);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links a {
  font-size: 0.875rem;
  color: var(--gray-600);
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--gray-900);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.2;
  padding: 0.55rem 1rem;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  text-decoration: none;
}

.btn:focus-visible {
  outline: 2px solid var(--blue-600);
  outline-offset: 2px;
}

.btn-ghost {
  background: transparent;
  color: var(--gray-700);
}

.btn-ghost:hover {
  color: var(--gray-900);
  background: var(--gray-100);
}

.btn-primary {
  background: var(--blue-600);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--blue-700);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.btn-primary:disabled {
  background: var(--blue-400);
  cursor: not-allowed;
  box-shadow: none;
}

.btn-secondary {
  background: var(--white);
  color: var(--gray-900);
  border-color: var(--gray-200);
}

.btn-secondary:hover {
  background: var(--gray-100);
  border-color: var(--gray-300);
}

.btn-lg {
  padding: 0.875rem 2rem;
  font-size: 1.125rem;
  font-weight: 600;
  border-radius: 12px;
}

.btn-full {
  width: 100%;
}

.btn-outline-light {
  background: rgba(255, 255, 255, 0.05);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.menu-toggle svg {
  width: 24px;
  height: 24px;
  color: var(--gray-700);
}

/* ===== Hero ===== */
.hero {
  position: relative;
  background: var(--slate-900);
  padding: 10rem 1.5rem 5rem;
  text-align: center;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -160px;
  right: -160px;
  width: 320px;
  height: 320px;
  background: rgba(37, 99, 235, 0.2);
  border-radius: 50%;
  filter: blur(80px);
}

.hero::after {
  content: "";
  position: absolute;
  bottom: -160px;
  left: -160px;
  width: 320px;
  height: 320px;
  background: rgba(59, 130, 246, 0.1);
  border-radius: 50%;
  filter: blur(80px);
}

.hero-content {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(37, 99, 235, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 9999px;
  padding: 0.375rem 1rem;
  margin-bottom: 2rem;
}

.hero-badge-dot {
  width: 8px;
  height: 8px;
  background: var(--blue-400);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.hero-badge span:last-child {
  color: #93c5fd;
  font-size: 0.875rem;
  font-weight: 500;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.15;
  margin-bottom: 1.5rem;
}

.hero h1 .highlight {
  color: var(--blue-400);
}

.hero-subtitle {
  font-size: 1.25rem;
  color: #94a3b8;
  max-width: 640px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-note {
  margin-top: 1rem;
  font-size: 0.875rem;
  color: #64748b;
}

/* ===== How it works ===== */
.how-it-works {
  padding: 5rem 1.5rem;
  background: var(--gray-50);
}

.how-it-works-inner {
  max-width: 1000px;
  margin: 0 auto;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  position: relative;
}

.step {
  text-align: center;
}

.step-number {
  width: 48px;
  height: 48px;
  background: var(--blue-600);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 auto 1rem;
  position: relative;
  z-index: 1;
}

.step h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 0.5rem;
}

.step p {
  font-size: 0.875rem;
  color: var(--gray-500);
  line-height: 1.6;
  max-width: 280px;
  margin: 0 auto;
}

/* Connector line between steps */
.steps-grid::before {
  content: "";
  position: absolute;
  top: 24px;
  left: calc(100% / 6);
  right: calc(100% / 6);
  height: 2px;
  background: var(--gray-200);
}

/* ===== Features ===== */
.features {
  padding: 5rem 1.5rem;
  background: var(--white);
}

.features-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-header h2 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--gray-900);
}

.section-header p {
  margin-top: 1rem;
  font-size: 1.125rem;
  color: var(--gray-500);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.feature-card {
  padding: 1.5rem;
  background: var(--gray-50);
  border-radius: 16px;
  transition: all 0.3s;
}

.feature-card:hover {
  background: var(--white);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

.feature-icon {
  width: 48px;
  height: 48px;
  background: var(--blue-100);
  color: var(--blue-600);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  transition: all 0.3s;
}

.feature-card:hover .feature-icon {
  background: var(--blue-600);
  color: var(--white);
}

.feature-icon svg {
  width: 24px;
  height: 24px;
}

.feature-card h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 0.5rem;
}

.feature-card p {
  font-size: 0.875rem;
  color: var(--gray-500);
  line-height: 1.6;
}

/* ===== Why Billvox ===== */
.why-billvox {
  padding: 4rem 1.5rem;
  background: var(--white);
  border-top: 1px solid var(--gray-100);
}

.why-billvox-inner {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.why-billvox h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 2rem;
}

.usp-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 2.5rem;
  text-align: left;
  list-style: none;
}

.usp-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  font-size: 0.9375rem;
  color: var(--gray-700);
  line-height: 1.5;
}

.usp-list li svg {
  width: 20px;
  height: 20px;
  color: var(--blue-600);
  flex-shrink: 0;
  margin-top: 2px;
}

/* ===== Pricing ===== */
.pricing {
  padding: 5rem 1.5rem;
  background: var(--gray-50);
}

.pricing-inner {
  max-width: 1200px;
  margin: 0 auto;
}

/* Vier Karten (Free, Starter, Plus, Pro); bei mittlerer Breite zwei je Zeile */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}
@media (max-width: 1100px) and (min-width: 769px) {
  .pricing-grid { grid-template-columns: repeat(2, 1fr); max-width: 760px; margin-left: auto; margin-right: auto; }
}

.pricing-card {
  position: relative;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 16px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
}

.pricing-card.highlighted {
  border: 2px solid var(--blue-600);
  box-shadow: 0 8px 32px rgba(37, 99, 235, 0.1);
}

.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--blue-600);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
}

.pricing-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.pricing-header h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--gray-900);
}

.pricing-header .description {
  font-size: 0.875rem;
  color: var(--gray-500);
  margin-top: 0.25rem;
}

.pricing-price {
  margin-top: 1rem;
}

.pricing-price .amount {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--gray-900);
}

.pricing-price .period {
  color: var(--gray-500);
  margin-left: 0.25rem;
}

.pricing-features {
  list-style: none;
  margin-bottom: 2rem;
  flex: 1;
}

/* Block statt Flex: Text und <strong> bleiben ein Fließtext (Flex machte daraus eigene Spalten);
   das Häkchen sitzt absolut links */
.pricing-features li {
  display: block;
  position: relative;
  padding-left: 2rem;
  font-size: 0.875rem;
  color: var(--gray-600);
  padding-top: 0.375rem;
  padding-bottom: 0.375rem;
}

.pricing-features li svg {
  position: absolute;
  left: 0;
  top: calc(0.375rem + 1px);
  width: 20px;
  height: 20px;
  color: var(--blue-600);
}
/* "Auf Anfrage" ist Text, kein Preis – kleiner, damit er in die schmale Karte passt */
.pricing-price .amount-text { font-size: 1.75rem; line-height: 1.2; }

/* ===== Footer ===== */
.footer {
  background: var(--slate-900);
  border-top: 1px solid var(--slate-800);
  padding: 3rem 1.5rem;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-logo .logo-icon {
  width: 28px;
  height: 28px;
  font-size: 0.75rem;
}

.footer-logo .logo-text {
  font-size: 1.125rem;
  color: var(--white);
}

.footer-copy {
  font-size: 0.875rem;
  color: #64748b;
}

/* ===== Auth Pages ===== */
.auth-page {
  min-height: 100vh;
  background: var(--gray-50);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 3rem 1rem;
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.auth-logo .logo-icon {
  width: 40px;
  height: 40px;
  font-size: 1rem;
}

.auth-logo .logo-text {
  font-size: 1.5rem;
}

.auth-card {
  background: var(--white);
  padding: 2rem 1.5rem;
  border-radius: 12px;
  border: 1px solid var(--gray-100);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  width: 100%;
  max-width: 420px;
}

.auth-card h1 {
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 1.5rem;
}

.auth-card .subtitle {
  font-size: 0.875rem;
  color: var(--gray-500);
  text-align: center;
  margin-top: -1rem;
  margin-bottom: 1.5rem;
}

/* Forms */
.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-700);
  margin-bottom: 0.25rem;
}

.form-group label .optional {
  font-weight: 400;
  color: var(--gray-400);
}

.form-group input {
  width: 100%;
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--gray-300);
  border-radius: 8px;
  font-size: 0.875rem;
  font-family: inherit;
  outline: none;
  transition: all 0.2s;
}

.form-group input:focus {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.form-hint {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--gray-500);
}

.alert {
  padding: 0.75rem;
  border-radius: 8px;
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.alert-error {
  background: var(--red-50);
  border: 1px solid var(--red-200);
  color: var(--red-700);
}

.alert-success {
  background: var(--green-100);
  border: 1px solid #bbf7d0;
  color: var(--green-700);
}

.alert a {
  display: block;
  margin-top: 0.5rem;
  color: var(--blue-600);
  font-weight: 500;
}

.alert a:hover {
  color: var(--blue-700);
}

.auth-footer {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.875rem;
  color: var(--gray-500);
}

.auth-footer a {
  color: var(--blue-600);
  font-weight: 500;
}

.auth-footer a:hover {
  color: var(--blue-700);
}

/* Success state - visibility controlled via is-hidden class in JS */
.success-state {
  text-align: center;
}

.success-icon,
.error-icon,
.spinner-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

.success-icon {
  background: var(--green-100);
  color: var(--green-600);
}

.error-icon {
  background: var(--red-50);
  color: var(--red-600);
}

.spinner-icon {
  border: 4px solid var(--blue-100);
  border-top-color: var(--blue-600);
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.success-state h2,
.confirm-result h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.success-state p,
.confirm-result p {
  color: var(--gray-600);
  margin-bottom: 1.5rem;
  font-size: 0.9375rem;
}

.confirm-result {
  text-align: center;
}

.link-subtle {
  display: block;
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: var(--gray-500);
}

.link-subtle:hover {
  color: var(--gray-700);
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .steps-grid::before {
    display: none;
  }
}

@media (max-width: 768px) {
  .nav-links,
  .header-actions {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1.0625rem;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .steps-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .usp-list {
    grid-template-columns: 1fr;
  }

  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
  }

  .footer-inner {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 7rem 1rem 3rem;
  }

  .hero h1 {
    font-size: 1.75rem;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
  }
}

/* ===== Legal Pages ===== */
.legal-content {
  max-width: 720px;
  text-align: left;
}

.legal-content h2 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 1.5rem 0 0.5rem;
  color: var(--gray-800);
}

.legal-content h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 1.25rem 0 0.375rem;
  color: var(--gray-700);
}

.legal-content p,
.legal-content li {
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--gray-600);
}

.legal-content ul {
  padding-left: 1.25rem;
  margin: 0.5rem 0;
}

.legal-content a {
  color: var(--blue-600);
  text-decoration: none;
}

.legal-content a:hover {
  text-decoration: underline;
}

/* ===== Footer & Legal Links ===== */
.footer-links {
  display: flex;
  gap: 1.5rem;
  margin-top: 0.5rem;
}

.footer-links a {
  color: var(--gray-400);
  font-size: 0.875rem;
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--white);
}

.legal-links {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 0.8125rem;
}

.legal-links a {
  color: var(--gray-400);
  text-decoration: none;
  margin: 0 0.5rem;
}

.legal-links a:hover {
  color: var(--blue-600);
}

/* ===== Cookie Banner ===== */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--slate-800);
  color: var(--white);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  z-index: 100;
  font-size: 0.875rem;
}

.cookie-banner p {
  margin: 0;
}

.cookie-banner a {
  color: var(--blue-400);
}

.cookie-banner .btn {
  padding: 0.375rem 1rem;
  font-size: 0.8125rem;
  white-space: nowrap;
}

/* Startseite: kurze Liste weiterer Funktionen unter dem Rechnungsbüro */
.feature-extras { max-width: 900px; margin: 40px auto 0; padding: 24px 28px; background: #fff; border: 1px solid var(--gray-200, #e5e7eb); border-radius: 12px; }
.feature-extras h3 { margin: 0 0 12px; font-size: 1.05rem; }
.feature-extras ul { margin: 0; padding-left: 20px; display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 8px 28px; }
.feature-extras li { font-size: 0.9rem; line-height: 1.5; color: var(--gray-600, #4b5563); }
@media (max-width: 600px) { .feature-extras { padding: 18px 16px; } .feature-extras ul { grid-template-columns: 1fr; } }

/* Preiskarte "Pro – auf Anfrage" */
.pricing-anfrage { margin: 0 0 1.5rem; font-size: 0.9rem; line-height: 1.6; color: var(--gray-600, #4b5563); flex: 1; }

/* ===== Gemeinsamer Seitenrahmen (tools/seitenrahmen.mjs) ===== */
/* Unterseiten: Kopfleiste im Seitenfluss, bleibt beim Scrollen oben (Startseite: feststehend über dem Hero) */
.header.header-mitlaufend { position: sticky; top: 0; }
/* Rechtsseiten und 404 im Rahmen: Karte oben statt bildschirmhoch zentriert */
.auth-page.rechtsseite { min-height: 60vh; justify-content: flex-start; }
/* Handy-Menü (js/seitenrahmen.js schaltet .menu-offen) */
@media (max-width: 768px) {
  .header.menu-offen .header-inner { flex-wrap: wrap; height: auto; min-height: 64px; }
  .header.menu-offen .nav-links,
  .header.menu-offen .header-actions { display: flex; flex-direction: column; align-items: flex-start; width: 100%; gap: 0.75rem; padding: 0.75rem 0; order: 3; }
  .header.menu-offen .menu-toggle { order: 2; }
}
/* Fuß des Seitenrahmens: Logo, Themen, Rechtliches und Copyright untereinander (kein seitliches Überlaufen) */
.footer-inner.footer-gestapelt { flex-direction: column; gap: 1.25rem; text-align: center; }
.footer-gestapelt .footer-links { flex-wrap: wrap; justify-content: center; gap: 0.5rem 1.25rem; margin-top: 0; }
