/* ============================================================
   ALARMSCHUTZ24 – Global Stylesheet
   Sections: Tokens → Reset → Typography → Layout →
             Header → Footer → Buttons → Cards →
             Tabs → Forms → Utilities → Responsive
   ============================================================ */

/* ── 1. Design Tokens ───────────────────────────────────────── */
:root {
  /* Colour palette */
  --clr-bg:         #0d0f14;
  --clr-surface:    #13161d;
  --clr-surface-2:  #1a1e28;
  --clr-border:     rgba(255,255,255,.08);
  --clr-text:       #e8eaf0;
  --clr-text-muted: #8a8fa8;
  --accent:         #3d85ff;
  --accent-light:   #699dff;
  --accent-dark:    #2563eb;
  --clr-success:    #22c55e;
  --clr-warn:       #f59e0b;
  --clr-danger:     #ef4444;

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Cascadia Code", "Fira Code", "Courier New", monospace;

  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.25rem;
  --text-2xl:  1.5rem;
  --text-3xl:  1.875rem;
  --text-4xl:  2.25rem;
  --text-5xl:  3rem;
  --text-6xl:  3.75rem;

  /* Spacing scale */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Borders & shadows */
  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  20px;
  --radius-xl:  32px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,.4), 0 1px 2px rgba(0,0,0,.3);
  --shadow-md: 0 4px 16px rgba(0,0,0,.5), 0 2px 6px rgba(0,0,0,.3);
  --shadow-lg: 0 8px 40px rgba(0,0,0,.6), 0 4px 12px rgba(0,0,0,.4);
  --shadow-accent: 0 0 24px rgba(61,133,255,.25);

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --duration: 220ms;

  /* Layout */
  --container: 1200px;
  --container-narrow: 800px;
  --header-h: 100px;
}

/* ── 2. Reset ───────────────────────────────────────────────── */
*,
*::before,
*::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--font-sans);
  background: var(--clr-bg);
  color: var(--clr-text);
  line-height: 1.65;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--accent-light); text-decoration: none; }
a:hover { color: var(--accent); }
ul, ol { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea, select { font-family: inherit; }

/* ── 3. Typography ──────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--clr-text);
}
h1 { font-size: clamp(var(--text-3xl), 6vw, var(--text-6xl)); }
h2 { font-size: clamp(var(--text-2xl), 4vw, var(--text-4xl)); }
h3 { font-size: clamp(var(--text-xl),  3vw, var(--text-2xl)); }
h4 { font-size: var(--text-xl); }

p { max-width: 68ch; }

.text-muted  { color: var(--clr-text-muted); }
.text-accent { color: var(--accent-light); }
.text-center { text-align: center; }
.text-sm     { font-size: var(--text-sm); }
.text-xs     { font-size: var(--text-xs); }

/* ── 4. Layout ──────────────────────────────────────────────── */
.container {
  width: min(var(--container), 100% - var(--space-8));
  margin-inline: auto;
}
.container-narrow {
  width: min(var(--container-narrow), 100% - var(--space-8));
  margin-inline: auto;
}

section { padding-block: var(--space-20); }
section + section { padding-top: 0; }

.section-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent-light);
  margin-bottom: var(--space-4);
}
.section-label::before {
  content: '';
  display: block;
  width: 20px; height: 2px;
  background: var(--accent);
  border-radius: var(--radius-full);
}

.section-header { margin-bottom: var(--space-12); }
.section-header p { color: var(--clr-text-muted); margin-top: var(--space-3); }

/* ── 5. Header ──────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 9999;
  height: var(--header-h);
  background: rgba(13,15,20,.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--clr-border);
  display: flex;
  align-items: center;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  width: 100%;
  min-width: 0;
}

.logo {
  display: flex;
  align-items: center;
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-decoration: none;
}
.logo-img {
  display: block;
  height: 80px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

.main-nav { display: flex; flex: 1; }
.main-nav ul {
  display: flex;
  gap: var(--space-6);
  align-items: center;
}
.nav-item { position: relative; }
.main-nav a {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--clr-text-muted);
  transition: color var(--duration);
  padding-block: var(--space-2);
}
.main-nav a:hover,
.main-nav a[aria-current="page"] { color: var(--clr-text); }
.nav-item--has-dropdown > a {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}
.nav-item--has-dropdown > a::after {
  content: '';
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
  transition: transform var(--duration);
}

.nav-dropdown {
  position: absolute;
  top: calc(100% + var(--space-2));
  left: 0;
  min-width: 220px;
  padding: var(--space-2);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  background: rgba(19,22,29,.98);
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity var(--duration), transform var(--duration), visibility var(--duration);
  z-index: 1000;
}
.nav-dropdown a {
  display: block;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  color: var(--clr-text-muted);
}
.nav-dropdown a:hover,
.nav-dropdown a[aria-current="page"] {
  background: rgba(61,133,255,.15);
  color: var(--clr-text);
}
.nav-item--has-dropdown:hover .nav-dropdown,
.nav-item--has-dropdown:focus-within .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.nav-item--has-dropdown:hover > a::after,
.nav-item--has-dropdown:focus-within > a::after {
  transform: rotate(-135deg) translateY(-1px);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-shrink: 0;
}

/* Burger */
.nav-toggle { display: none; padding: var(--space-2); }
.burger, .burger::before, .burger::after {
  display: block;
  width: 22px; height: 2px;
  background: var(--clr-text);
  border-radius: var(--radius-full);
  transition: transform var(--duration), opacity var(--duration);
}
.burger { position: relative; }
.burger::before, .burger::after {
  content: '';
  position: absolute;
  left: 0;
}
.burger::before { top: -6px; }
.burger::after  { top:  6px; }

/* Mobile nav */
.mobile-nav {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(100dvh - var(--header-h));
  background: var(--clr-surface);
  padding: var(--space-8);
  border-top: 1px solid var(--clr-border);
  z-index: 99;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}
.mobile-nav ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}
.mobile-nav a {
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--clr-text);
}
.mobile-nav-group > a {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}
.mobile-nav-group > a::after {
  content: '';
  width: 8px;
  height: 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  opacity: .8;
}
.mobile-nav-group { display: grid; gap: var(--space-2); }
.mobile-subnav {
  display: grid;
  gap: var(--space-3);
  padding-left: var(--space-4);
}
.mobile-subnav a {
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--clr-text-muted);
}
.mobile-nav[hidden] { display: none; }
.btn-full { width: 100%; justify-content: center; }

/* ── 6. Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-weight: 600;
  border-radius: var(--radius-full);
  transition: background var(--duration), box-shadow var(--duration),
              transform var(--duration) var(--ease-out);
  text-decoration: none;
  cursor: pointer;
  border: none;
  outline: none;
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-base);
  white-space: nowrap;
}
.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-accent);
}
.btn-primary:hover {
  background: var(--accent-dark);
  box-shadow: 0 0 32px rgba(61,133,255,.4);
  color: #fff;
}

.btn-secondary {
  background: var(--clr-surface-2);
  color: var(--clr-text);
  border: 1px solid var(--clr-border);
}
.btn-secondary:hover {
  background: var(--clr-surface);
  color: var(--clr-text);
  border-color: rgba(255,255,255,.18);
}

.btn-ghost {
  background: transparent;
  color: var(--clr-text-muted);
  border: 1px solid var(--clr-border);
}
.btn-ghost:hover { color: var(--clr-text); border-color: rgba(255,255,255,.2); }

.btn-sm {
  padding: var(--space-2) var(--space-5);
  font-size: var(--text-sm);
}
.btn-lg {
  padding: var(--space-5) var(--space-10);
  font-size: var(--text-lg);
}

/* ── 7. Cards ───────────────────────────────────────────────── */
.card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  box-shadow: var(--shadow-md);
  transition: border-color var(--duration), box-shadow var(--duration),
              transform var(--duration) var(--ease-out);
}
.card:hover {
  border-color: rgba(61,133,255,.3);
  box-shadow: var(--shadow-lg), var(--shadow-accent);
  transform: translateY(-4px);
}

/* Glass panel */
.glass {
  background: rgba(19,22,29,.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
}

/* ── 8. Tabs ────────────────────────────────────────────────── */
.tabs-control {
  display: inline-flex;
  background: var(--clr-surface-2);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-full);
  padding: var(--space-1);
  gap: var(--space-1);
}

.tab-btn {
  padding: var(--space-2) var(--space-6);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--clr-text-muted);
  transition: background var(--duration), color var(--duration);
  border: none;
  background: transparent;
}
.tab-btn:hover { color: var(--clr-text); }
.tab-btn[aria-selected="true"] {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-accent);
}
.tab-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.tab-panel { display: none; }
.tab-panel[data-active] { display: block; }

/* ── 8b. Page-hero (shared across inner pages) ──────────────── */
.page-hero {
  position: relative;
  padding-block: var(--space-20) var(--space-10);
  overflow: hidden;
}
.page-hero h1   { margin-top: var(--space-3); margin-bottom: var(--space-4); }
.page-hero-sub  { font-size: var(--text-lg); color: var(--clr-text-muted); max-width: 52ch; }
.page-hero-glow {
  position: absolute;
  top: -30%; left: 50%;
  transform: translateX(-50%);
  width: 700px; height: 400px;
  background: radial-gradient(ellipse, rgba(61,133,255,.09) 0%, transparent 70%);
  pointer-events: none;
}

/* ── 9. Forms ───────────────────────────────────────────────── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.form-group label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--clr-text-muted);
}
.form-control {
  background: var(--clr-surface-2);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  color: var(--clr-text);
  font-size: var(--text-base);
  transition: border-color var(--duration), box-shadow var(--duration);
  width: 100%;
}
.form-control:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(61,133,255,.2);
}

/* ── 10. Footer ─────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--clr-border);
  background: var(--clr-surface);
  padding-top: var(--space-16);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: var(--space-12);
  padding-bottom: var(--space-12);
}
.footer-brand .logo { margin-bottom: var(--space-4); }
.footer-brand .logo-img { height: 32px; }
.footer-tagline {
  font-size: var(--text-sm);
  color: var(--clr-text-muted);
  max-width: 26ch;
}
.footer-nav-heading {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--clr-text-muted);
  margin-bottom: var(--space-4);
}
.footer-nav ul { display: flex; flex-direction: column; gap: var(--space-3); }
.footer-nav a {
  font-size: var(--text-sm);
  color: var(--clr-text-muted);
  transition: color var(--duration);
}
.footer-nav a:hover { color: var(--clr-text); }
.footer-contact address {
  font-style: normal;
  font-size: var(--text-sm);
  color: var(--clr-text-muted);
  line-height: 1.8;
  margin-bottom: var(--space-5);
}
.footer-contact address a { color: var(--clr-text-muted); }
.footer-contact address a:hover { color: var(--accent-light); }
.footer-bottom {
  border-top: 1px solid var(--clr-border);
  padding-block: var(--space-6);
}
.footer-bottom p {
  font-size: var(--text-xs);
  color: var(--clr-text-muted);
  max-width: none;
}

/* ── 11. Utilities ──────────────────────────────────────────── */
.flex        { display: flex; }
.flex-col    { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-4       { gap: var(--space-4); }
.gap-6       { gap: var(--space-6); }
.gap-8       { gap: var(--space-8); }
.mt-4        { margin-top: var(--space-4); }
.mt-8        { margin-top: var(--space-8); }
.mb-4        { margin-bottom: var(--space-4); }
.mb-8        { margin-bottom: var(--space-8); }
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
.divider {
  height: 1px;
  background: var(--clr-border);
  border: none;
  margin-block: var(--space-8);
}

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-xs);
  font-weight: 700;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.badge-accent {
  background: rgba(61,133,255,.15);
  color: var(--accent-light);
  border: 1px solid rgba(61,133,255,.3);
}
.badge-success {
  background: rgba(34,197,94,.15);
  color: var(--clr-success);
  border: 1px solid rgba(34,197,94,.3);
}

/* ── 11b. Cookie Banner ─────────────────────────────────────── */
#cookie-banner {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 3rem);
  max-width: 860px;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.25rem 1.75rem;
  background: rgba(19, 22, 29, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(61, 133, 255, 0.2);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
  transition: opacity 0.35s var(--ease-out), transform 0.35s var(--ease-out);
}
#cookie-banner.is-hidden {
  opacity: 0;
  transform: translateX(-50%) translateY(120%);
  pointer-events: none;
}
.cookie-text {
  font-size: 0.875rem;
  color: var(--clr-text-muted);
  line-height: 1.5;
}
.cookie-text a {
  color: var(--accent-light);
  text-decoration: underline;
}
.cookie-actions {
  display: flex;
  gap: 0.75rem;
  flex-shrink: 0;
}
@media (max-width: 640px) {
  #cookie-banner {
    flex-direction: column;
    align-items: flex-start;
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
    width: auto;
    transform: none;
  }
  #cookie-banner.is-hidden {
    transform: translateY(120%);
  }
  .cookie-actions { width: 100%; }
  .cookie-actions .btn { flex: 1; text-align: center; }
}

/* ── 12. Reduced Motion ─────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ── 13. Responsive ─────────────────────────────────────────── */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-10);
  }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
  :root { --header-h: 60px; }

  .main-nav { display: none; }
  .nav-toggle { display: flex; }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

  section { padding-block: var(--space-12); }

  .logo-img { height: 44px; }
}

@media (max-width: 640px) {
  :root { --header-h: 56px; }

  .header-inner {
    gap: 8px;
    overflow: hidden;
  }

  .logo {
    flex: 1 1 0;
  }

  .logo-img {
    max-width: 140px;
    height: 32px;
  }

  .header-actions {
    flex: 0 0 auto;
    gap: 6px;
  }

  .header-actions .btn {
    display: none;
  }

  .nav-toggle {
    padding: 6px;
    flex: 0 0 auto;
  }
}

@media (max-width: 480px) {
  h1 { font-size: clamp(var(--text-2xl), 8vw, var(--text-4xl)); }
}
