/* ============================================================
   NearNeighbours — Landingpage
   Design-System nach der App: Material 3, Seed-Farbe #D32F2F
   (siehe App/lib/core/theme/app_theme.dart). Kein JavaScript,
   keine externen Ressourcen — bewusst, siehe Datenschutzseite.
   ============================================================ */

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

:root {
  /* Markenfarben — identisch zu App-Icon & Feature-Graphic */
  --brand:            #D32F2F;   /* AppTheme.emergencyRed */
  --brand-deep:       #BA1A1A;   /* Glocke im Icon (error) */
  --brand-container:  #FFDAD6;   /* Kreis im Icon (errorContainer) */
  --on-brand-container: #410002;

  /* M3-Light-Palette (Seed #D32F2F) */
  --bg:        #FFF8F7;
  --surface:   #FFFFFF;
  --surface-2: #FBEEEC;
  --text:      #231918;
  --muted:     #534341;
  --outline:   rgba(133, 115, 111, 0.30);

  --btn-bg:    #D32F2F;
  --btn-text:  #FFFFFF;

  --success:   #2E7D32;
  --warn-bg:   rgba(245, 158, 11, 0.10);
  --warn-border: rgba(245, 158, 11, 0.45);
  --warn-text: #7A4F01;

  --shadow:    0 20px 50px rgba(211, 47, 47, 0.16);
  --radius:    16px;
  --radius-lg: 24px;
  --radius-btn: 14px;
}

@media (prefers-color-scheme: dark) {
  :root {
    /* M3-Dark-Palette — wie die App im dunklen Modus */
    --bg:        #1A1110;
    --surface:   #231A19;
    --surface-2: #2B201E;
    --text:      #F1DEDC;
    --muted:     #CBB9B6;
    --outline:   rgba(216, 194, 191, 0.22);

    --brand:            #FFB4AB;
    --brand-deep:       #FF897D;
    --brand-container:  #73332C;
    --on-brand-container: #FFDAD6;

    --btn-bg:    #FFB4AB;
    --btn-text:  #690005;

    --warn-text: #FBBF24;
    --shadow:    0 20px 50px rgba(0, 0, 0, 0.45);
  }
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

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

body {
  font-family: "Roboto", system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
}

a { color: var(--brand-deep); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 4px; }

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

.container { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 1.25rem; }
.container--narrow { max-width: 780px; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--btn-bg); color: var(--btn-text);
  padding: 0.6em 1em; border-radius: 0 0 10px 0; z-index: 200; font-weight: 700;
}
.skip-link:focus { left: 0; }

/* ── Header ─────────────────────────────────────────────── */

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--outline);
}
@supports not (background: color-mix(in srgb, red 50%, transparent)) {
  .site-header { background: var(--bg); }
}

.header-inner {
  display: flex; align-items: center; gap: 1rem;
  padding-top: 0.65rem; padding-bottom: 0.65rem;
}

.brand { display: flex; align-items: center; gap: 0.6rem; color: var(--text); font-weight: 800; font-size: 1.05rem; }
.brand:hover { text-decoration: none; }

.brand-mark {
  width: 38px; height: 38px; flex-shrink: 0;
  border-radius: 11px;
  background: #D32F2F;             /* Marke bleibt auch im Dark Mode rot */
  display: inline-flex; align-items: center; justify-content: center;
}
.brand-mark .ring { width: 30px; height: 30px; border-radius: 50%; background: #FFDAD6; display: inline-flex; align-items: center; justify-content: center; }
.brand-mark svg { width: 18px; height: 18px; fill: #BA1A1A; }

.site-nav { display: flex; gap: 1.25rem; margin-left: auto; }
.site-nav a { color: var(--muted); font-weight: 600; font-size: 0.92rem; white-space: nowrap; }
.site-nav a:hover { color: var(--text); text-decoration: none; }

.lang { display: flex; gap: 0.25rem; margin-left: auto; }
.site-nav + .lang { margin-left: 0; }
.lang a {
  padding: 0.3em 0.65em; border-radius: 9px;
  font-weight: 700; font-size: 0.8rem; color: var(--muted);
  border: 1px solid transparent;
}
.lang a:hover { text-decoration: none; color: var(--text); border-color: var(--outline); }
.lang a[aria-current="true"] { background: var(--brand-container); color: var(--on-brand-container); }

/* Unterhalb von 1000px reicht der Platz nicht für Logo + Sektions-Nav +
   Sprachwahl (deutsche Labels) — Tablets zeigen den kompakten Header. */
@media (max-width: 999px) {
  .site-nav { display: none; }
}

/* ── Hero ───────────────────────────────────────────────── */

.hero { padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(2.5rem, 6vw, 4.5rem); }
.hero-grid {
  display: grid; gap: 2.5rem; align-items: center;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
}
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-phone { order: -1; }
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.8rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--brand-deep); margin-bottom: 1rem;
}

h1 {
  font-size: clamp(2.2rem, 5.5vw, 3.4rem);
  font-weight: 800; letter-spacing: -0.02em; line-height: 1.12;
  margin-bottom: 1.1rem; text-wrap: balance;
}
h1 .accent { color: var(--brand-deep); }

.hero-sub {
  font-size: clamp(1.02rem, 2.4vw, 1.2rem); color: var(--muted);
  max-width: 34em; margin-bottom: 1.75rem; text-wrap: pretty;
}

.store-badges { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 0.9rem; }
.store-badge {
  display: inline-flex; align-items: center; gap: 0.65rem;
  padding: 0.55rem 1.1rem; border-radius: var(--radius-btn);
  background: var(--text); color: var(--bg);
}
.store-badge svg { width: 26px; height: 26px; fill: currentColor; flex-shrink: 0; }
.store-badge .badge-text { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.store-badge .badge-small { font-size: 0.66rem; font-weight: 500; opacity: 0.85; }
.store-badge .badge-big { font-size: 1rem; font-weight: 700; }

.store-note { font-size: 0.85rem; color: var(--muted); margin-bottom: 1.5rem; }

.trust { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.trust li {
  list-style: none;
  display: inline-flex; align-items: center; gap: 0.45rem;
  background: var(--surface-2); border: 1px solid var(--outline);
  border-radius: 999px; padding: 0.4em 0.95em;
  font-size: 0.85rem; font-weight: 600; color: var(--text);
}
.trust .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); flex-shrink: 0; }

.hero-phone { display: flex; justify-content: center; }
.hero-phone img {
  width: min(320px, 78vw);
  border-radius: 34px;
  border: 1px solid var(--outline);
  box-shadow: var(--shadow);
}

/* ── Sektionen ──────────────────────────────────────────── */

section { padding: clamp(2.75rem, 6vw, 4.5rem) 0; }
section[id] { scroll-margin-top: 5rem; }

.section-label {
  text-align: center; font-size: 0.78rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--brand-deep); margin-bottom: 0.5rem;
}
h2 {
  text-align: center; font-size: clamp(1.5rem, 4vw, 2.1rem);
  font-weight: 800; letter-spacing: -0.01em;
  margin-bottom: 0.75rem; text-wrap: balance;
}
.section-intro {
  text-align: center; color: var(--muted);
  max-width: 560px; margin: 0 auto 2.5rem; text-wrap: pretty;
}

/* Alarmtypen-Band */
.alarm-strip { padding: 0.5rem 0 0; }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem; list-style: none; }
.chips li {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--surface); border: 1px solid var(--outline);
  border-radius: 999px; padding: 0.5em 1.05em;
  font-size: 0.92rem; font-weight: 600;
}

/* Schritte */
.steps { list-style: none; display: grid; gap: 1.25rem; grid-template-columns: repeat(3, 1fr); counter-reset: step; }
@media (max-width: 780px) { .steps { grid-template-columns: 1fr; } }
.steps li {
  counter-increment: step;
  background: var(--surface); border: 1px solid var(--outline);
  border-radius: var(--radius); padding: 1.6rem 1.4rem 1.4rem;
  position: relative;
}
.steps li::before {
  content: counter(step);
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--btn-bg); color: var(--btn-text);
  font-weight: 800; font-size: 1rem; margin-bottom: 0.9rem;
}
.steps h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 0.35rem; }
.steps p { font-size: 0.92rem; color: var(--muted); }

/* Feature-Karten */
.features { display: grid; gap: 1.1rem; grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .features { grid-template-columns: 1fr; } }
.feature-card {
  background: var(--surface); border: 1px solid var(--outline);
  border-radius: var(--radius); padding: 1.5rem 1.4rem;
}
.feature-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 13px;
  background: var(--brand-container);
  font-size: 1.45rem; margin-bottom: 0.9rem;
}
.feature-card h3 { font-size: 1.02rem; font-weight: 700; margin-bottom: 0.35rem; }
.feature-card p { font-size: 0.9rem; color: var(--muted); }

/* Screenshot-Galerie */
.gallery {
  display: flex; gap: 1.25rem; overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 0.5rem 0.25rem 1rem;
  -webkit-overflow-scrolling: touch;
}
.gallery figure { flex: 0 0 min(230px, 62vw); scroll-snap-align: center; }
.gallery img {
  border-radius: 26px; border: 1px solid var(--outline);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}
.gallery figcaption { text-align: center; font-size: 0.85rem; color: var(--muted); margin-top: 0.6rem; }

/* Datenschutz-Banner */
.privacy-banner {
  background: linear-gradient(135deg, #BA1A1A, #D32F2F);
  color: #FFFFFF; border-radius: var(--radius-lg);
  padding: clamp(1.8rem, 4.5vw, 3rem);
}
.privacy-banner h2 { color: #FFFFFF; text-align: left; margin-bottom: 0.5rem; }
.privacy-banner .section-label { color: #FFDAD6; text-align: left; }
.privacy-banner > p { color: rgba(255, 255, 255, 0.92); max-width: 46em; margin-bottom: 1.4rem; text-wrap: pretty; }
.privacy-list { list-style: none; display: grid; gap: 0.55rem 1.5rem; grid-template-columns: repeat(2, 1fr); margin-bottom: 1.6rem; }
@media (max-width: 720px) { .privacy-list { grid-template-columns: 1fr; } }
.privacy-list li { display: flex; gap: 0.6rem; align-items: flex-start; font-size: 0.95rem; }
.privacy-list .check {
  flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%;
  background: #FFDAD6; color: #410002; font-size: 0.8rem; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center; margin-top: 0.15em;
}
.privacy-banner .btn-ghost {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: #FFDAD6; color: #410002;
  font-weight: 700; font-size: 0.95rem;
  padding: 0.8rem 1.5rem; border-radius: var(--radius-btn);
}
.privacy-banner .btn-ghost:hover { text-decoration: none; opacity: 0.92; }

/* Für wen */
.audience p { text-align: center; color: var(--muted); max-width: 600px; margin: 0 auto; text-wrap: pretty; }

/* FAQ */
.faq { max-width: 780px; margin: 0 auto; }
.faq details { border-bottom: 1px solid var(--outline); }
.faq summary {
  cursor: pointer; list-style: none;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.1rem 0.25rem; font-weight: 700; font-size: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.3rem; font-weight: 600; color: var(--brand-deep); flex-shrink: 0; }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 0.25rem 1.2rem; color: var(--muted); font-size: 0.95rem; max-width: 60em; }
.faq details a { font-weight: 600; }

/* Notruf-Hinweis */
.disclaimer {
  background: var(--warn-bg); border: 1px solid var(--warn-border);
  border-radius: var(--radius); padding: 1.25rem 1.4rem;
  font-size: 0.9rem; color: var(--warn-text); line-height: 1.6;
}
.disclaimer strong { display: block; margin-bottom: 0.25rem; }

/* Kontakt / CTA */
.cta-card {
  background: var(--surface); border: 1px solid var(--outline);
  border-radius: var(--radius-lg); padding: clamp(1.8rem, 4.5vw, 2.8rem);
  text-align: center;
}
.cta-card h2 { margin-bottom: 0.5rem; }
.cta-card p { color: var(--muted); max-width: 42em; margin: 0 auto 1.4rem; text-wrap: pretty; }
.btn-primary {
  display: inline-flex; align-items: center; gap: 0.55rem;
  background: var(--btn-bg); color: var(--btn-text);
  font-weight: 700; font-size: 0.98rem;
  padding: 0.85rem 1.7rem; border-radius: var(--radius-btn);
}
.btn-primary:hover { text-decoration: none; opacity: 0.92; }
.btn-secondary {
  display: inline-flex; align-items: center; gap: 0.5rem;
  border: 1.5px solid var(--brand-deep); color: var(--brand-deep);
  font-weight: 700; font-size: 0.95rem;
  padding: 0.8rem 1.5rem; border-radius: var(--radius-btn);
}
.btn-secondary:hover { text-decoration: none; background: var(--brand-container); color: var(--on-brand-container); }
.cta-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; }

/* ── Legal-/Textseiten ──────────────────────────────────── */

.page { padding: clamp(2.5rem, 6vw, 4rem) 0; }
.page h1 { font-size: clamp(1.7rem, 4.5vw, 2.4rem); margin-bottom: 0.4rem; }
.page .page-meta { color: var(--muted); font-size: 0.9rem; margin-bottom: 2.2rem; }
.page h2 { text-align: left; font-size: 1.25rem; margin: 2.4rem 0 0.6rem; }
.page h3 { font-size: 1.05rem; font-weight: 700; margin: 1.8rem 0 0.4rem; }
.page p, .page li { color: var(--muted); font-size: 0.95rem; }
.page p { margin-bottom: 0.7rem; }
.page ul, .page ol { padding-left: 1.35rem; margin-bottom: 0.9rem; }
.page li { margin: 0.3rem 0; }
.page strong { color: var(--text); }
.page .note {
  background: var(--surface-2); border: 1px solid var(--outline);
  border-radius: var(--radius); padding: 1rem 1.2rem;
  font-size: 0.9rem; margin-bottom: 1.6rem;
}
.page table { width: 100%; border-collapse: collapse; font-size: 0.9rem; margin: 1rem 0 1.4rem; }
.page th, .page td { text-align: left; padding: 0.55rem 0.7rem; border-bottom: 1px solid var(--outline); vertical-align: top; }
.page th { color: var(--text); font-weight: 700; }
.page td { color: var(--muted); }
.table-scroll { overflow-x: auto; }
.backlink { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.9rem; font-weight: 600; margin-bottom: 1.8rem; }

/* ── Footer ─────────────────────────────────────────────── */

.site-footer {
  border-top: 1px solid var(--outline);
  padding: 2.5rem 0 3rem; margin-top: 2rem;
}
.footer-grid { display: flex; flex-wrap: wrap; gap: 1.5rem 3rem; align-items: flex-start; }
.footer-brand { display: flex; align-items: center; gap: 0.6rem; font-weight: 800; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; list-style: none; }
.footer-links a { color: var(--muted); font-size: 0.9rem; }
.footer-links a:hover { color: var(--text); }
.footer-meta { width: 100%; color: var(--muted); font-size: 0.82rem; margin-top: 0.5rem; }

/* ── 404 ────────────────────────────────────────────────── */

.error-page { min-height: 70vh; display: flex; align-items: center; text-align: center; }
.error-page .container { max-width: 560px; }
.error-page h1 { font-size: clamp(2rem, 6vw, 3rem); margin-bottom: 0.75rem; }
.error-page p { color: var(--muted); margin-bottom: 1rem; }
.error-page .btn-primary { margin-top: 1rem; }
