/* ============================================================
   styles.css – Registrierkassa für Vereine
   Breakpoints:
     Telefon  : < 600 px
     Tablet   : 600 px – 1023 px
     Desktop  : >= 1024 px
   ============================================================ */

/* ── Reset & Custom Properties ─────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --clr-primary:      #1a56db;
  --clr-primary-dark: #1040b0;
  --clr-accent:       #f59e0b;
  --clr-success:      #16a34a;
  --clr-error:        #dc2626;
  --clr-bg:           #f8fafc;
  --clr-surface:      #ffffff;
  --clr-text:         #1e293b;
  --clr-muted:        #64748b;
  --clr-border:       #e2e8f0;
  --clr-hero-bg:      #0f172a;
  --clr-hero-text:    #f1f5f9;
  --clr-lite-bg:      #1a56db;
  --clr-free-bg:      #0f766e;
  --clr-pro-bg:       #7c3aed;

  --radius:     0.5rem;
  --radius-lg:  1rem;
  --shadow-sm:  0 1px 3px rgba(0,0,0,.08);
  --shadow-md:  0 4px 16px rgba(0,0,0,.12);
  --shadow-lg:  0 8px 32px rgba(0,0,0,.16);

  --header-h:   64px;
  --canvas-w:   280px;
  --transition: 0.25s ease;

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-sans);
  color: var(--clr-text);
  background: var(--clr-bg);
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: var(--clr-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

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

ul { list-style: none; }

/* ── Container ──────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 1.25rem;
}

/* ── Sections ───────────────────────────────────────────────── */
.section { padding-block: 5rem; }

.section-title {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 0.5rem;
}

.section-sub {
  text-align: center;
  color: var(--clr-muted);
  margin-bottom: 3rem;
  font-size: 1.05rem;
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background var(--transition), color var(--transition),
              border-color var(--transition), box-shadow var(--transition);
  border: 2px solid transparent;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--clr-primary);
  color: #fff;
  border-color: var(--clr-primary);
}
.btn-primary:hover {
  background: var(--clr-primary-dark);
  border-color: var(--clr-primary-dark);
  text-decoration: none;
}

.btn-outline {
  background: transparent;
  color: var(--clr-primary);
  border-color: var(--clr-primary);
}
.btn-outline:hover {
  background: var(--clr-primary);
  color: #fff;
  text-decoration: none;
}

.btn-large { padding: 0.85rem 2rem; font-size: 1.05rem; }

/* ── Spinner inside button ──────────────────────────────────── */
.btn-spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.btn.loading .btn-spinner { display: inline-block; }
.btn.loading .btn-text    { opacity: 0.7; }
.btn.loading               { pointer-events: none; }

@keyframes spin { to { transform: rotate(360deg); } }

/* ══════════════════════════════════════════════════════════════
   HEADER
══════════════════════════════════════════════════════════════ */
#site-header {
  position: sticky;
  top: 0;
  z-index: 900;
  height: var(--header-h);
  background: var(--clr-surface);
  border-bottom: 1px solid var(--clr-border);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--clr-text);
  text-decoration: none;
}
.logo:hover { text-decoration: none; }
.logo-icon { font-size: 1.5rem; }
.logo-text strong { color: var(--clr-primary); }

/* Desktop Nav */
#desktop-nav ul {
  display: flex;
  gap: 0.25rem;
}
#desktop-nav a {
  display: block;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius);
  font-weight: 500;
  color: var(--clr-text);
  transition: background var(--transition), color var(--transition);
}
#desktop-nav a:hover,
#desktop-nav a.active {
  background: var(--clr-primary);
  color: #fff;
  text-decoration: none;
}

/* Hamburger */
#hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
#hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--clr-text);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
#hamburger.open span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
#hamburger.open span:nth-child(2) { opacity: 0; }
#hamburger.open span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* ══════════════════════════════════════════════════════════════
   CANVAS-MENÜ
══════════════════════════════════════════════════════════════ */
#nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 1000;
  backdrop-filter: blur(2px);
}
#nav-overlay.visible { display: block; }

#canvas-menu {
  position: fixed;
  top: 0;
  right: 0;
  width: var(--canvas-w);
  height: 100%;
  background: var(--clr-surface);
  z-index: 1100;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(.4,0,.2,1);
  box-shadow: var(--shadow-lg);
  padding: 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
#canvas-menu.open {
  transform: translateX(0);
}

#close-menu {
  align-self: flex-end;
  background: none;
  border: none;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  color: var(--clr-muted);
  padding: 0;
  transition: color var(--transition);
}
#close-menu:hover { color: var(--clr-text); }

#canvas-menu ul {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
#canvas-menu a {
  display: block;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--clr-text);
  transition: background var(--transition), color var(--transition);
}
#canvas-menu a:hover {
  background: var(--clr-primary);
  color: #fff;
  text-decoration: none;
}

/* ══════════════════════════════════════════════════════════════
   HERO
══════════════════════════════════════════════════════════════ */
.hero-section {
  background: linear-gradient(135deg, var(--clr-hero-bg) 0%, #1e3a5f 100%);
  color: var(--clr-hero-text);
  padding-block: 5rem 3rem;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 3rem;
}

.hero-text h1 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: #fff;
}

.hero-sub {
  font-size: 1.1rem;
  color: #94a3b8;
  margin-bottom: 2rem;
  line-height: 1.7;
}

.hero-text .btn { margin-right: 0.75rem; margin-bottom: 0.5rem; }

/* Receipt visual */
.hero-visual { display: flex; justify-content: center; }

.receipt-card {
  background: #fff;
  color: #1e293b;
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem 1rem;
  width: 290px;
  box-shadow: var(--shadow-lg);
  font-family: 'Courier New', monospace;
  font-size: 0.78rem;
}

/* Shop header */
.receipt-shop { text-align: center; margin-bottom: 0.6rem; }
.receipt-shop-name { font-weight: 700; font-size: 0.9rem; letter-spacing: 0.04em; }
.receipt-shop-addr { font-size: 0.72rem; color: #64748b; margin-top: 0.1rem; }

/* Title */
.receipt-header {
  text-align: center;
  font-weight: 700;
  letter-spacing: 0.18em;
  font-size: 0.82rem;
  margin-bottom: 0.6rem;
}

/* Meta grid */
.receipt-meta-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 0.75rem;
  row-gap: 0.15rem;
  font-size: 0.72rem;
  color: #475569;
  margin-bottom: 0.5rem;
}
.receipt-meta-grid span:nth-child(odd)  { color: #94a3b8; }
.receipt-meta-grid span:nth-child(even) { text-align: right; font-weight: 600; color: #1e293b; }

/* Divider */
.receipt-rule {
  border: none;
  border-top: 1px dashed #cbd5e1;
  margin-block: 0.55rem;
}

/* Line items */
.receipt-row {
  display: flex;
  justify-content: space-between;
  padding-block: 0.2rem;
}

/* Sub-totals (Netto / MwSt) */
.receipt-subtotal-row {
  display: flex;
  justify-content: space-between;
  padding-block: 0.15rem;
  font-size: 0.72rem;
  color: #64748b;
}

/* Grand total */
.receipt-total {
  display: flex;
  justify-content: space-between;
  padding-block: 0.3rem;
  font-weight: 700;
  font-size: 0.88rem;
  color: #0f172a;
}

/* Payment rows */
.receipt-pay-row {
  display: flex;
  justify-content: space-between;
  padding-block: 0.18rem;
  font-size: 0.72rem;
  color: #475569;
}
.receipt-change { font-weight: 600; color: #1e293b; }

/* QR area */
.receipt-qr-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.25rem;
}
.receipt-qr-label {
  font-size: 0.66rem;
  color: #94a3b8;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.receipt-qr-svg {
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  display: block;
}
.receipt-sig {
  font-size: 0.65rem;
  color: #94a3b8;
  letter-spacing: 0.04em;
  text-align: center;
  word-break: break-all;
}

/* Footer */
.receipt-footer {
  text-align: center;
  margin-top: 0.75rem;
  font-size: 0.72rem;
  color: var(--clr-success);
  font-weight: 600;
  letter-spacing: 0.03em;
}

/* Badge bar */
.hero-badge-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,.1);
}
.badge {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  color: #cbd5e1;
  padding: 0.4rem 1rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 500;
}

/* ══════════════════════════════════════════════════════════════
   LEISTUNGEN / PREISE
══════════════════════════════════════════════════════════════ */
.leistungen-section { background: var(--clr-bg); }

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.pricing-card {
  background: var(--clr-surface);
  border: 2px solid var(--clr-border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem 2.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: box-shadow var(--transition), transform var(--transition);
  position: relative;
}
.pricing-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.card-badge {
  display: inline-block;
  padding: 0.2rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--clr-border);
  color: var(--clr-muted);
  width: fit-content;
}
.badge-popular {
  background: var(--clr-accent);
  color: #fff;
}

.pricing-card h3 {
  font-size: 1.4rem;
  font-weight: 700;
}

.price {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
}
.price-amount {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--clr-primary);
}
.price-period { color: var(--clr-muted); font-size: 0.9rem; }

.price-desc { color: var(--clr-muted); font-size: 0.9rem; line-height: 1.5; }

.feature-list { display: flex; flex-direction: column; gap: 0.4rem; }
.feature-list li { font-size: 0.9rem; color: var(--clr-text); }
.feature-list li.disabled { color: var(--clr-muted); }

/* Highlighted card (Lite) */
.card-lite {
  border-color: var(--clr-primary);
  box-shadow: var(--shadow-md);
}
.card-lite .price-amount { color: var(--clr-primary); }

.pricing-note {
  text-align: center;
  color: var(--clr-muted);
  font-size: 0.85rem;
  margin-top: 2rem;
  line-height: 1.6;
}

/* ══════════════════════════════════════════════════════════════
   ANFRAGEFORMULAR
══════════════════════════════════════════════════════════════ */
.anfrage-section {
  background: linear-gradient(180deg, #f0f7ff 0%, var(--clr-bg) 100%);
}

.form-wrapper {
  max-width: 720px;
  margin-inline: auto;
  background: var(--clr-surface);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2.25rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--clr-border);
}

/* Form message */
#form-message {
  display: none;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  font-weight: 500;
  margin-bottom: 1.5rem;
}
#form-message.success {
  display: block;
  background: #dcfce7;
  color: var(--clr-success);
  border: 1px solid #86efac;
}
#form-message.error {
  display: block;
  background: #fee2e2;
  color: var(--clr-error);
  border: 1px solid #fca5a5;
}

.form-row { margin-bottom: 1.25rem; }
.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 0;
}

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

label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--clr-text);
}
.required { color: var(--clr-error); }
.optional  { color: var(--clr-muted); font-weight: 400; font-size: 0.8rem; }

input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
  width: 100%;
  padding: 0.65rem 0.875rem;
  border: 1.5px solid var(--clr-border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-family: var(--font-sans);
  color: var(--clr-text);
  background: var(--clr-bg);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--clr-primary);
  box-shadow: 0 0 0 3px rgba(26,86,219,.15);
}
input.invalid, select.invalid, textarea.invalid {
  border-color: var(--clr-error);
}
textarea { resize: vertical; min-height: 120px; }

.field-error {
  font-size: 0.8rem;
  color: var(--clr-error);
  min-height: 1em;
}

.char-counter {
  font-size: 0.78rem;
  color: var(--clr-muted);
  text-align: right;
}

/* Checkbox */
.form-privacy { margin-top: 0.25rem; }

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  cursor: pointer;
  font-weight: 400;
  font-size: 0.88rem;
  color: var(--clr-muted);
}
.checkbox-label input[type="checkbox"] {
  width: 1.1rem;
  height: 1.1rem;
  flex-shrink: 0;
  accent-color: var(--clr-primary);
  margin-top: 0.15rem;
}

.form-submit { display: flex; justify-content: flex-start; margin-top: 1.5rem; }

/* reCAPTCHA wrapper */
.g-recaptcha { margin-top: 0.25rem; }

/* ══════════════════════════════════════════════════════════════
   IMPRESSUM
══════════════════════════════════════════════════════════════ */
.impressum-section { background: var(--clr-surface); }

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

.impressum-block h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--clr-primary);
}
.impressum-block p {
  font-size: 0.9rem;
  color: var(--clr-muted);
  line-height: 1.7;
  margin-bottom: 0.75rem;
}

/* ══════════════════════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════════════════════ */
#site-footer {
  background: var(--clr-hero-bg);
  color: #94a3b8;
  padding-block: 1.75rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.footer-copy { font-size: 0.85rem; }

.footer-nav {
  display: flex;
  gap: 1.25rem;
}
.footer-nav a {
  font-size: 0.85rem;
  color: #94a3b8;
  transition: color var(--transition);
}
.footer-nav a:hover { color: #fff; text-decoration: none; }

/* ══════════════════════════════════════════════════════════════
   BREAKPOINT: TABLET  (600 px – 1023 px)
══════════════════════════════════════════════════════════════ */
@media (min-width: 600px) and (max-width: 1023px) {

  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-visual { display: none; }
  .hero-text .btn { margin-right: 0.5rem; }

  .pricing-grid {
    grid-template-columns: 1fr 1fr;
  }
  .card-pro { grid-column: span 2; max-width: 400px; margin-inline: auto; }

  .impressum-grid {
    grid-template-columns: 1fr 1fr;
  }
  .impressum-grid > :last-child { grid-column: span 2; }

  .form-row-2 {
    grid-template-columns: 1fr 1fr;
  }
}

/* ══════════════════════════════════════════════════════════════
   BREAKPOINT: TELEFON  (< 600 px)
══════════════════════════════════════════════════════════════ */
@media (max-width: 599px) {

  :root { --header-h: 56px; }

  .section { padding-block: 3.5rem; }

  /* Header */
  #desktop-nav { display: none; }
  #hamburger   { display: flex; }

  /* Hero */
  .hero-section { padding-block: 3.5rem 2rem; }
  .hero-content { grid-template-columns: 1fr; }
  .hero-visual  { display: none; }
  .hero-text h1 { font-size: 1.7rem; }
  .hero-text .btn { display: block; width: 100%; text-align: center; margin-right: 0; margin-bottom: 0.75rem; }
  .hero-badge-bar { gap: 0.5rem; }
  .badge { font-size: 0.78rem; padding: 0.3rem 0.75rem; }

  /* Pricing */
  .pricing-grid { grid-template-columns: 1fr; }

  /* Form */
  .form-wrapper { padding: 1.5rem 1.1rem; }
  .form-row-2   { grid-template-columns: 1fr; }
  .form-submit .btn { width: 100%; justify-content: center; }

  /* Impressum */
  .impressum-grid { grid-template-columns: 1fr; }

  /* Footer */
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-nav   { justify-content: center; }
}
