@font-face {
  font-family: "Lexend";
  src: url("fonts/lexend.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}

/* Farben nach dem PINA-Markenauftritt (PINA-Docs/marke/README.md, Abschnitt 5).
   Etwa 60 % Nebel, 30 % Nachtblau, höchstens 10 % Signalgelb. Grün nur für den Zustand „sicher“. */
:root {
  --accent: #152238;         /* Nachtblau: Buttons, Ränder, Hervorhebungen */
  --accent-strong: #2E4470;  /* Dämmerung */
  --on-accent: #F4F6F9;
  --link: #2E4470;           /* Dämmerung: Links und kleine Auszeichnungen */
  --soft: #E8ECF2;
  --bg: #F4F6F9;             /* Nebel */
  --surface: #ffffff;
  --text: #152238;
  --muted: #55627A;          /* Grauton */
  --line: #DCE1EA;
  --yellow: #FFC24B;         /* Signalgelb: pro Seite höchstens eine Aktion */
  --on-yellow: #3D2A00;
  --yellow-soft: #FFE3A3;
  --safe: #2F9E6E;
  --safe-soft: #E1F3EA;
  --safe-text: #1D6B49;
  --band: #152238;           /* Kopf- und Fußbereich */
  --band-2: #2E4470;
  --on-band: #F4F6F9;
  --band-muted: #AAB4C8;
  --band-line: #26375A;
  --bubble-in: #ffffff;
  --bubble-out: #152238;
  --on-bubble-out: #F4F6F9;
  --shadow: rgba(21, 34, 56, .28);
  --radius: 14px;
}

/* Dunkel: Mitternacht als Grund, Nachtblau für Flächen, Signalgelb übernimmt die Buttons. */
@media (prefers-color-scheme: dark) {
  :root {
    --accent: #FFC24B;
    --accent-strong: #FFE3A3;
    --on-accent: #3D2A00;
    --link: #FFE3A3;
    --soft: #101C30;
    --bg: #0B1424;
    --surface: #152238;
    --text: #F4F6F9;
    --muted: #AAB4C8;
    --line: #26375A;
    --safe: #6FD3A4;
    --safe-soft: #14432F;
    --safe-text: #B9EED3;
    --bubble-in: #152238;
    --bubble-out: #2E4470;
    --on-bubble-out: #ffffff;
    --shadow: rgba(0, 0, 0, .5);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Lexend", system-ui, sans-serif;
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--link); }

h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); font-weight: 600; letter-spacing: -.02em; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); font-weight: 600; letter-spacing: -.01em; }
h3 { font-size: 1.15rem; font-weight: 600; }
p { margin: 0 0 1em; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }

/* Kopfzeile */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-size: 1.15rem; }
.brand strong { color: var(--link); font-weight: 600; letter-spacing: .04em; }
.brand-mark { width: 28px; height: 28px; flex: none; }
nav { display: flex; gap: 20px; }
nav a { color: var(--muted); text-decoration: none; font-size: .95rem; }
nav a:hover { color: var(--accent); }

/* Einstieg */
.hero { padding: 72px 0 80px; }
.hero-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 56px; align-items: center; }
.eyebrow { color: var(--link); font-weight: 500; font-size: .9rem; text-transform: uppercase; letter-spacing: .08em; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 34em; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 28px; }
.btn {
  display: inline-block; padding: 14px 24px; border-radius: 999px; text-decoration: none;
  font-weight: 500; font-size: 1rem;
}
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-strong); }
.status-pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px;
  background: var(--soft); color: var(--text); font-size: .9rem;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--yellow); }

/* Telefon-Ansicht */
.phone {
  justify-self: center; width: 100%; max-width: 300px; aspect-ratio: 9 / 18;
  border-radius: 40px; padding: 12px; background: var(--text);
  box-shadow: 0 30px 60px -20px var(--shadow);
}
.phone-screen {
  height: 100%; border-radius: 30px; background: var(--surface); padding: 20px 14px;
  display: flex; flex-direction: column; gap: 10px; overflow: hidden; font-size: .85rem; line-height: 1.4;
}
.phone-head { display: flex; flex-direction: column; padding: 4px 6px 12px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.phone-title { font-weight: 600; font-size: 1.05rem; }
.phone-sub { color: var(--link); font-size: .75rem; }
.bubble { max-width: 82%; padding: 9px 12px; border-radius: 16px; }
.bubble.in { background: var(--bubble-in); align-self: flex-start; border-bottom-left-radius: 4px; }
.bubble.out { background: var(--soft); align-self: flex-end; border-bottom-right-radius: 4px; }
.who { display: block; color: var(--link); font-weight: 600; font-size: .75rem; }
.tick { display: block; color: var(--muted); font-size: .7rem; margin-top: 2px; text-align: right; }

/* Abschnitte */
.section { padding: 80px 0; }
.section-tint { background: var(--soft); }

.steps { list-style: none; padding: 0; margin: 32px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.step-num {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--accent); color: var(--on-accent); font-weight: 600; margin-bottom: 16px;
}
.steps p, .card p { color: var(--muted); }

.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 32px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.card p { margin: 0; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.note { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--radius); padding: 24px 28px; }
.note p { margin: 0; color: var(--muted); }

/* Fußzeile */
.footer { border-top: 1px solid var(--line); padding: 40px 0; color: var(--muted); font-size: .9rem; }
.footer-inner { display: grid; gap: 4px; }
.footer p { margin: 0; }
.fine { font-size: .8rem; max-width: 52em; }

/* Unterseiten */
.page { padding: 64px 0 96px; max-width: 720px; }

@media (max-width: 820px) {
  .hero { padding: 48px 0 56px; }
  .hero-grid, .split { grid-template-columns: 1fr; gap: 40px; }
  .steps { grid-template-columns: 1fr; gap: 28px; }
  .cards { grid-template-columns: 1fr; }
  .section { padding: 56px 0; }
  .phone { max-width: 260px; }
}

/* Dachmarke und Produkte */
.hero-solo { max-width: 820px; }
.product { display: flex; flex-direction: column; gap: 8px; }
.product h3 { font-size: 1.5rem; margin: 0; }
.product-tag { color: var(--link); font-size: .8rem; font-weight: 500; text-transform: uppercase; letter-spacing: .06em; margin: 0; }
.product-soon { background: transparent; border-style: dashed; }
.more { margin-top: auto; padding-top: 12px; font-weight: 500; text-decoration: none; }
.more::after { content: " →"; }
.steps-compact { grid-template-columns: 1fr; gap: 18px; margin-top: 28px; }
.steps-compact li { display: flex; gap: 16px; align-items: flex-start; }
.steps-compact .step-num { flex: none; margin: 0; }
.steps-compact h3 { margin: 0 0 2px; }
.steps-compact p { margin: 0; }
.cards-4 { grid-template-columns: repeat(4, 1fr); margin-top: 64px; }
@media (max-width: 1000px) { .cards-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 820px) { .cards-4 { grid-template-columns: 1fr; margin-top: 40px; } }
section[id] { scroll-margin-top: 64px; }

/* Zweiter Button, Sprunglink, Brotkrumen */
.btn-ghost { color: var(--accent); border: 1.5px solid var(--accent); padding: 12.5px 22.5px; }
.btn-ghost:hover { background: var(--soft); }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--accent); color: var(--on-accent); padding: 8px 14px; border-radius: 8px; z-index: 20; }
.skip:focus { left: 16px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
nav a[aria-current="page"] { color: var(--accent); }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: .85rem; color: var(--muted); margin-bottom: 28px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.section-lead { color: var(--muted); max-width: 40em; }
.cards-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 820px) { .cards-3 { grid-template-columns: 1fr; } }
.product-link { color: inherit; text-decoration: none; transition: border-color .15s, transform .15s; }
.product-link:hover { border-color: var(--accent); transform: translateY(-2px); }
.product-link p { color: var(--muted); }
.product-link .product-tag { color: var(--link); }
.product-link .more { color: var(--link); }

/* Rechtstexte */
.legal { max-width: 760px; padding-top: 64px; padding-bottom: 96px; }
.legal h2 { font-size: 1.25rem; margin-top: 2.2em; }
.legal p, .legal dd { color: var(--muted); }
.legal address { font-style: normal; line-height: 1.7; }
.legal-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 28px; margin: 24px 0; }
.legal-card h2 { margin-top: 0; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 24px; margin: 20px 0 0; }
.facts dt { font-weight: 500; }
.facts dd { margin: 0; }
@media (max-width: 520px) { .facts { grid-template-columns: 1fr; gap: 0; } .facts dd { margin-bottom: 10px; } }
.todo { background: var(--yellow-soft); color: var(--on-yellow); border-radius: 4px; padding: 0 4px; }
.notfound { min-height: 60vh; }

/* Fußzeile mit Spalten */
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; padding-bottom: 28px; }
.footer-nav { display: flex; flex-direction: column; gap: 6px; }
.footer-nav a { color: var(--muted); text-decoration: none; }
.footer-nav a:hover { color: var(--accent); }
.footer-head { font-weight: 600; color: var(--text); margin-bottom: 4px !important; }
.footer .brand { margin-bottom: 6px; }
.footer-bottom { border-top: 1px solid var(--line); padding-top: 20px; display: grid; gap: 4px; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > div:first-child { grid-column: 1 / -1; } }

/* Funkgeräte */
.hero-short { padding-bottom: 48px; }
.devices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 32px; }
.device { display: flex; flex-direction: column; gap: 6px; }
.device h3 { font-size: 1.35rem; margin: 6px 0 0; }
.device > p { color: var(--muted); margin: 0; }
.device .device-maker { font-size: .9rem; margin-bottom: 8px; }
.device-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; }
.badge { font-size: .75rem; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.badge-ok { background: var(--safe-soft); color: var(--safe-text); }
.badge-pending { background: transparent; color: var(--muted); border: 1px solid var(--line); }
.device-facts { margin: 12px 0 20px; padding-left: 1.1em; color: var(--muted); font-size: .95rem; }
.device-facts li { margin-bottom: 4px; }
.device .btn { margin-top: auto; align-self: flex-start; }
.btn-small { padding: 11px 20px; font-size: .95rem; }
.ad-mark { margin-left: 2px; }
.route .product-tag { margin-bottom: 4px; }
.disclosure { margin: 0; max-width: 52em; }
@media (max-width: 1000px) { .devices { grid-template-columns: 1fr 1fr; } }
@media (max-width: 820px) { .devices { grid-template-columns: 1fr; } }

/* Store-Links */
.stores { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 28px; }
.store {
  display: flex; flex-direction: column; padding: 18px 22px; border-radius: 16px;
  background: var(--text); color: var(--bg); text-decoration: none; transition: transform .15s;
}
.store:hover { transform: translateY(-2px); }
.store-small { font-size: .75rem; opacity: .8; }
.store-name { font-size: 1.4rem; font-weight: 600; line-height: 1.2; }
.store-meta { font-size: .8rem; opacity: .7; margin-top: 6px; }
.store-note { margin-top: 16px; }
@media (max-width: 820px) { .stores { grid-template-columns: 1fr; } }

/* Kopfzeile auf kleinen Bildschirmen */
.menu-toggle { display: none; }

@media (max-width: 820px) {
  /* Ohne JavaScript: Menü als Zeile unter dem Logo */
  .topbar-inner { flex-wrap: wrap; height: auto; padding-top: 12px; padding-bottom: 10px; row-gap: 8px; }
  .topbar nav { width: 100%; gap: 6px; overflow-x: auto; scrollbar-width: none; }
  .topbar nav::-webkit-scrollbar { display: none; }
  .topbar nav a { flex: none; padding: 6px 12px; border-radius: 999px; background: var(--soft); color: var(--text); font-size: .9rem; }
  .topbar nav a[aria-current="page"] { background: var(--accent); color: var(--on-accent); }
  section[id] { scroll-margin-top: 110px; }

  /* Mit JavaScript: klassisches Klappmenü */
  .js .topbar-inner { flex-wrap: nowrap; height: 64px; padding-top: 0; padding-bottom: 0; }
  .js section[id] { scroll-margin-top: 64px; }
  .js .menu-toggle {
    display: grid; place-items: center; width: 44px; height: 44px; margin-right: -10px;
    background: none; border: 0; border-radius: 12px; cursor: pointer; color: var(--text);
  }
  .js .menu-toggle:hover { background: var(--soft); }
  .menu-bars, .menu-bars::before, .menu-bars::after {
    display: block; width: 22px; height: 2px; border-radius: 2px; background: currentColor;
    transition: transform .2s ease, opacity .2s ease;
  }
  .menu-bars { position: relative; }
  .menu-bars::before, .menu-bars::after { content: ""; position: absolute; left: 0; }
  .menu-bars::before { top: -7px; }
  .menu-bars::after { top: 7px; }
  .menu-open .menu-bars { background: transparent; }
  .menu-open .menu-bars::before { transform: translateY(7px) rotate(45deg); }
  .menu-open .menu-bars::after { transform: translateY(-7px) rotate(-45deg); }

  .js .topbar nav {
    position: absolute; top: 64px; left: 0; right: 0; width: auto;
    flex-direction: column; gap: 0; overflow: visible; padding: 8px 16px 20px;
    background: var(--bg); border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 40px -24px var(--shadow);
    visibility: hidden; opacity: 0; transform: translateY(-8px);
    transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s;
  }
  .menu-open .topbar nav { visibility: visible; opacity: 1; transform: none; transition: opacity .2s ease, transform .2s ease; }
  .js .topbar nav a {
    padding: 14px 4px; border-radius: 0; background: none; color: var(--text);
    font-size: 1.15rem; border-bottom: 1px solid var(--line);
  }
  .js .topbar nav a:last-child { border-bottom: 0; }
  .js .topbar nav a[aria-current="page"] { background: none; color: var(--accent); font-weight: 500; }
  .menu-open .topbar { background: var(--bg); backdrop-filter: none; }
}

@media (max-width: 360px) {
  .topbar nav a { padding: 6px 10px; font-size: .85rem; }
}

@media (prefers-reduced-motion: reduce) {
  .menu-bars, .menu-bars::before, .menu-bars::after, .js .topbar nav { transition: none; }
}

/* Support: FAQ und Kontaktformular */
.faq-wrap { max-width: 860px; }
.faq { margin-top: 28px; display: grid; gap: 12px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 0 22px; }
.faq details[open] { border-color: var(--accent); }
.faq summary {
  cursor: pointer; list-style: none; padding: 18px 32px 18px 0; position: relative;
  font-weight: 500; font-size: 1.05rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  font-size: 1.5rem; font-weight: 300; color: var(--link); line-height: 1;
}
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--muted); margin: 0 0 20px; }

.contact { display: grid; grid-template-columns: .9fr 1.1fr; gap: 48px; align-items: start; }
.form { display: grid; gap: 18px; padding: 28px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 500; font-size: .95rem; }
.optional { color: var(--muted); font-weight: 400; }
.field input, .field select, .field textarea {
  font: inherit; font-size: 1rem; color: var(--text); background: var(--bg);
  border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; width: 100%;
}
.field textarea { resize: vertical; min-height: 140px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--soft); }
.form .btn { justify-self: start; border: 0; cursor: pointer; font-family: inherit; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 820px) { .contact { grid-template-columns: 1fr; gap: 28px; } .form { padding: 22px; } }

/* Testversion */
.beta-card .btn { margin: 20px 0 12px; }
.beta-card .fine { margin: 0; }
.hash { font-size: .75rem; word-break: break-all; }
.install-steps { color: var(--muted); padding-left: 1.3em; }
.install-steps li { margin-bottom: 10px; }
.install-steps strong { color: var(--text); font-weight: 500; }

/* ---------- Markenauftritt: nachtblauer Kopf- und Fußbereich, Signalgelb für die eine Hauptaktion ---------- */
.btn-yellow { background: var(--yellow); color: var(--on-yellow); }
.btn-yellow:hover { background: var(--yellow-soft); }
.status-pill { background: var(--surface); border: 1px solid var(--line); }
.bubble.out { background: var(--bubble-out); color: var(--on-bubble-out); }
.bubble.in { background: var(--bubble-in); border: 1px solid var(--line); }
.tick { color: var(--band-muted); }
.phone { background: var(--band); }
.phone-screen { background: var(--bg); padding: 0 12px 16px; }
.phone-head { background: var(--band); color: var(--on-band); margin: 0 -12px 6px; padding: 22px 18px 12px; border-bottom: 0; }
.phone-sub { color: var(--yellow); }

.topbar { background: var(--band); backdrop-filter: none; border-bottom: 1px solid var(--band-line); color: var(--on-band); }
.brand-logo { display: block; height: 32px; width: auto; }
.topbar nav a { color: var(--band-muted); }
.topbar nav a:hover { color: var(--on-band); }
.topbar nav a[aria-current="page"] { color: var(--yellow); }
.skip { background: var(--yellow); color: var(--on-yellow); }

.footer { background: var(--band); color: var(--band-muted); border-top: 0; }
.footer a { color: var(--band-muted); }
.footer a:hover, .footer-nav a:hover { color: var(--on-band); }
.footer-head { color: var(--on-band); }
.footer-bottom { border-top-color: var(--band-line); }
.footer :focus-visible, .topbar :focus-visible { outline-color: var(--yellow); }

@media (max-width: 820px) {
  .topbar nav a { background: var(--band-2); color: var(--on-band); }
  .topbar nav a[aria-current="page"] { background: var(--yellow); color: var(--on-yellow); }
  .js .menu-toggle { color: var(--on-band); }
  .js .menu-toggle:hover { background: var(--band-2); }
  .js .topbar nav { background: var(--band); border-bottom-color: var(--band-line); }
  .js .topbar nav a { background: none; color: var(--on-band); border-bottom-color: var(--band-line); }
  .js .topbar nav a[aria-current="page"] { background: none; color: var(--yellow); }
  .menu-open .topbar { background: var(--band); }
}
.store { background: var(--band); color: var(--on-band); border: 1px solid var(--band-line); }
