/* ==========================================================================
   HEIMSPIEL.io — Design-System
   Eine CSS-Datei für alle Seiten. Wird einmal geladen, dann gecacht.
   ========================================================================== */

/* ---------- Fonts (selbst gehostet, DSGVO-sauber) ----------
   Lege die Dateien in /fonts/ ab (siehe fonts/README.txt).
   Fehlen sie, greift der System-Fallback — die Seite bleibt voll nutzbar. */
@font-face {
  font-family: "Barlow Condensed";
  src: url("/fonts/barlow-condensed-v13-latin-600.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Barlow Condensed";
  src: url("/fonts/barlow-condensed-v13-latin-700.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/fonts/inter-v13-latin-regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/fonts/inter-v13-latin-600.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --red: #E63946;
  --red-dark: #C4303C;
  --red-soft: #FDECEE;
  --ink: #12161D;
  --ink-2: #1B212B;
  --paper: #FFFFFF;
  --court: #F5F6F8;
  --line: #E4E7EC;
  --gray: #55606E;
  --gray-2: #8A93A2;
  --ok: #1F9D55;

  --font-display: "Barlow Condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", "Consolas", monospace;

  --w: 1160px;
  --r: 14px;
  --shadow: 0 10px 30px rgba(18, 22, 29, .08);
}

/* ---------- Reset & Basics ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px; line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--red-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; border-radius: 4px; }

.container { max-width: var(--w); margin-inline: auto; padding-inline: 24px; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.08;
  letter-spacing: .2px;
  margin: 0 0 .5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.5rem, 6vw, 4.2rem); font-weight: 700; text-transform: none; }
h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); font-weight: 700; }
h3 { font-size: clamp(1.3rem, 2.4vw, 1.6rem); font-weight: 600; }
p { margin: 0 0 1em; }
ul { padding-left: 1.2em; }
li { margin-bottom: .4em; }
strong { font-weight: 600; }

/* Section-Label im Code-Kommentar-Stil (Markenzeichen) */
.label {
  font-family: var(--font-mono);
  font-size: .85rem;
  color: var(--red);
  letter-spacing: .04em;
  display: block;
  margin-bottom: .8rem;
}
.hero--dark .label, .cta-band .label { color: #FF98A1; }

/* Signatur: Laufweg-Pfeil (Taktikboard-Motiv) unter der H1 */
.runpath {
  width: 150px; height: 18px;
  margin-top: 14px;
  background-repeat: no-repeat;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='150' height='18' viewBox='0 0 150 18'%3E%3Cpath d='M2 14 C 40 2, 80 20, 128 8' fill='none' stroke='%23E63946' stroke-width='3' stroke-linecap='round' stroke-dasharray='7 7'/%3E%3Cpath d='M124 2 L 140 7 L 127 15' fill='none' stroke='%23E63946' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 1.15rem; font-weight: 600;
  letter-spacing: .3px;
  padding: 13px 26px;
  border-radius: 999px;
  border: 2px solid transparent;
  transition: transform .15s ease, background .15s ease, color .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn--primary { background: var(--red); color: #fff; }
.btn--primary:hover { background: var(--red-dark); }
.btn--ghost { border-color: var(--ink); color: var(--ink); }
.hero--dark .btn--ghost, .cta-band .btn--ghost { border-color: #fff; color: #fff; }
.btn--ghost:hover { background: var(--ink); color: #fff; }
.hero--dark .btn--ghost:hover, .cta-band .btn--ghost:hover { background: #fff; color: var(--ink); }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 1.6rem; }

/* ---------- Header / Navigation ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; gap: 20px;
  min-height: 68px;
}
.brand {
  font-family: var(--font-display);
  font-weight: 700; font-size: 1.5rem;
  color: var(--ink);
  margin-right: auto;
  display: flex; align-items: baseline; gap: 1px;
}
.brand:hover { text-decoration: none; }
.brand .dot { color: var(--red); }
.nav-list { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-list > li { position: relative; }
.nav-list a {
  display: block;
  padding: 10px 12px;
  color: var(--ink);
  font-weight: 600; font-size: .95rem;
  border-radius: 8px;
}
.nav-list a:hover { background: var(--court); text-decoration: none; }
.nav-list a[aria-current="true"] { color: var(--red-dark); }
.nav-cta { margin-left: 8px; }
.nav-cta .btn { font-size: 1rem; padding: 9px 20px; }

/* Dropdowns (CSS-only) */
.has-sub > a::after { content: " ▾"; font-size: .7em; color: var(--gray-2); }
.sub {
  position: absolute; top: 100%; left: 0;
  min-width: 300px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 8px;
  list-style: none; margin: 6px 0 0;
  display: none;
}
.has-sub:hover .sub, .has-sub:focus-within .sub { display: block; }
.sub a { font-weight: 400; font-size: .92rem; padding: 8px 12px; }
.sub .sub-head { font-family: var(--font-mono); font-size: .75rem; color: var(--gray-2); padding: 8px 12px 2px; }

.nav-toggle {
  display: none;
  background: none; border: 0; cursor: pointer;
  padding: 10px; margin-left: auto;
}
.nav-toggle span { display: block; width: 24px; height: 2.5px; background: var(--ink); margin: 5px 0; border-radius: 2px; transition: transform .2s, opacity .2s; }

@media (max-width: 980px) {
  .nav-toggle { display: block; }
  .brand { margin-right: 0; }
  .nav { flex-wrap: wrap; }
  .nav-menu { display: none; width: 100%; padding-bottom: 16px; }
  .nav-menu.open { display: block; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
  .sub { position: static; display: block; border: 0; box-shadow: none; padding: 0 0 0 16px; }
  .has-sub > a::after { content: ""; }
  .nav-cta { margin: 10px 0 0; }
  body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
  body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }
}

/* ---------- Breadcrumbs ---------- */
.crumbs { font-size: .85rem; color: var(--gray-2); padding: 14px 0 0; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.crumbs li + li::before { content: "›"; margin-right: 6px; color: var(--line); }
.crumbs a { color: var(--gray); }

/* ---------- Hero ---------- */
.hero { padding: 64px 0 72px; }
.hero--dark {
  background:
    radial-gradient(ellipse 900px 420px at 85% -10%, rgba(230, 57, 70, .22), transparent 60%),
    var(--ink);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.hero--dark::before {
  /* Mittelkreis + Grundlinie: dezente Spielfeld-Anmutung */
  content: "";
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1200' height='500' viewBox='0 0 1200 500'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.06' stroke-width='2'%3E%3Ccircle cx='1050' cy='430' r='150'/%3E%3Ccircle cx='1050' cy='430' r='60'/%3E%3Cpath d='M0 470 H1200'/%3E%3C/g%3E%3C/svg%3E");
  background-size: cover;
  pointer-events: none;
}
.hero--dark .container { position: relative; }
.hero--dark p { color: #C7CDD6; }
.hero .lead { font-size: 1.2rem; max-width: 720px; }
.hero--light { background: var(--court); border-bottom: 1px solid var(--line); }

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section--court { background: var(--court); }
.section--dark { background: var(--ink-2); color: #fff; }
.section--dark p, .section--dark li { color: #C7CDD6; }
.section .intro { max-width: 760px; }
.prose { max-width: 780px; }
.prose h2 { margin-top: 1.6em; }
.prose h2:first-child { margin-top: 0; }

/* Hinweis-Box (Baukasten-Prinzip etc.) */
.note {
  border-left: 4px solid var(--red);
  background: var(--red-soft);
  border-radius: 0 12px 12px 0;
  padding: 16px 20px;
  margin: 1.4em 0;
}
.note p:last-child { margin-bottom: 0; }

/* ---------- Karten & Kacheln ---------- */
.grid { display: grid; gap: 22px; margin-top: 2rem; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; } }

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 26px;
  display: flex; flex-direction: column;
  transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.section--dark .card { background: rgba(255, 255, 255, .04); border-color: rgba(255, 255, 255, .1); }
.card h3 a { color: inherit; }
.card h3 a::after { content: " →"; color: var(--red); }
.card p { font-size: .95rem; color: var(--gray); flex: 1; }
.section--dark .card p { color: #AEB6C2; }
.card .icon { font-size: 1.6rem; margin-bottom: 10px; }

/* Säulen-Kacheln auf der Startseite */
.pillar { border-top: 4px solid var(--red); }
.pillar .num {
  font-family: var(--font-mono); font-size: .8rem; color: var(--gray-2);
  margin-bottom: 6px;
}

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip {
  font-size: .78rem; font-weight: 600;
  background: var(--court);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 12px;
  color: var(--gray);
}
.chip--ok { color: var(--ok); border-color: #CBE8D6; background: #EFF9F3; }
.chip--new { color: var(--red-dark); border-color: #F6C6CB; background: var(--red-soft); }

/* Trust-Leiste */
.trust { display: flex; flex-wrap: wrap; gap: 14px 34px; margin-top: 2.2rem; }
.trust div { font-size: .9rem; color: #C7CDD6; }
.trust strong { display: block; color: #fff; font-size: .98rem; }

/* ---------- Screenshot-Platzhalter mit Geräte-Frames ---------- */
.shots { display: grid; gap: 26px; margin-top: 2rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); align-items: end; }
.shot { text-align: center; }
.shot figcaption { font-size: .82rem; color: var(--gray-2); margin-top: 10px; }
.frame {
  background: var(--ink);
  border-radius: 22px;
  padding: 14px;
  box-shadow: var(--shadow);
  margin-inline: auto;
}
.frame .screen {
  background: repeating-linear-gradient(45deg, #EDF0F4 0 14px, #F5F6F8 14px 28px);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: var(--gray);
  font-family: var(--font-mono); font-size: .78rem;
  padding: 12px; text-align: center;
}
.frame--phone { max-width: 240px; border-radius: 30px; }
.frame--phone .screen { aspect-ratio: 9 / 17; }
.frame--tablet { max-width: 460px; }
.frame--tablet .screen { aspect-ratio: 4 / 3; }
.frame--tablet.landscape .screen { aspect-ratio: 16 / 10; }
.frame--desktop { max-width: 560px; border-radius: 12px; padding: 10px 10px 22px; }
.frame--desktop .screen { aspect-ratio: 16 / 9; }

/* ---------- FAQ ---------- */
.faq { max-width: 780px; margin-top: 1.6rem; }
.faq details {
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 12px;
  background: #fff;
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  padding: 16px 20px;
  list-style: none;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute; right: 20px; top: 50%; transform: translateY(-50%);
  font-family: var(--font-display); font-size: 1.4rem; color: var(--red);
}
.faq details[open] summary::after { content: "–"; }
.faq .a { padding: 0 20px 16px; color: var(--gray); }

/* ---------- CTA-Band ---------- */
.cta-band {
  background:
    radial-gradient(ellipse 700px 300px at 15% 120%, rgba(230, 57, 70, .3), transparent 60%),
    var(--ink);
  color: #fff;
  text-align: center;
  padding: 72px 0;
}
.cta-band p { color: #C7CDD6; max-width: 620px; margin-inline: auto; }
.cta-band .btn-row { justify-content: center; }

/* ---------- Verwandte Seiten ---------- */
.related { border-top: 1px solid var(--line); padding: 40px 0; }
.related h2 { font-size: 1.2rem; }
.related ul { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; padding: 0; margin: 0; }
.related a {
  display: inline-block;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 18px;
  font-size: .9rem; font-weight: 600;
  color: var(--ink);
}
.related a:hover { border-color: var(--red); color: var(--red-dark); text-decoration: none; }

/* ---------- Preistabellen ---------- */
.price-card { border: 2px solid var(--line); }
.price-card.featured { border-color: var(--red); }
.price-card .price { font-family: var(--font-display); font-size: 2.6rem; font-weight: 700; }
.price-card .price small { font-size: 1rem; color: var(--gray-2); font-family: var(--font-body); font-weight: 400; }
.price-list { list-style: none; padding: 0; }
.price-list li { padding-left: 1.4em; position: relative; font-size: .95rem; }
.price-list li::before { content: "✓"; position: absolute; left: 0; color: var(--ok); font-weight: 700; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #AEB6C2; padding: 56px 0 32px; font-size: .92rem; }
.site-footer a { color: #DDE2E9; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 { color: #fff; font-size: 1.05rem; margin-bottom: .8em; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .5em; }
.footer-brand { font-family: var(--font-display); font-weight: 700; font-size: 1.4rem; color: #fff; }
.footer-brand .dot { color: var(--red); }
.footer-legal { border-top: 1px solid rgba(255, 255, 255, .1); margin-top: 40px; padding-top: 24px; font-size: .82rem; color: #7C8595; }

/* ---------- Scroll-Reveal ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .5s ease, transform .5s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .card { transition: none; }
}

/* ── Eigenes Iconset in Feature-Kacheln ───────────────────── */
.card .icon { color: #E11D34; line-height: 0; font-size: 0; }
.card.pillar .icon { color: #E11D34; }
.card .icon svg.hsi { width: 30px; height: 30px; display: block; }

/* ── Screenshots in Geräte-Rahmen ─────────────────────────── */
.frame .shot-img { display: block; width: 100%; height: auto; border-radius: 10px; }

/* ── Flitz-Maskottchen auf der Startseite ─────────────────── */
.hero { position: relative; overflow: hidden; }
.hero .container { position: relative; z-index: 2; }
.hero-flitz { position: absolute; right: 4%; bottom: -6px; width: clamp(84px, 12vw, 148px);
  height: auto; opacity: .97; pointer-events: none; z-index: 1;
  filter: drop-shadow(0 8px 22px rgba(0,0,0,.14)); }
@media (max-width: 820px){ .hero-flitz { opacity: .12; right: 1%; bottom: 6px; width: 160px; } }

/* ── Fix: Dropdown-Lücke überbrücken (Untermenü klappte beim Runterfahren zu) ── */
.nav-list .sub::before { content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 16px; }
@media (max-width: 980px){ .nav-list .sub::before { content: none; } }

/* ── Kontaktformular ─────────────────────────────────────── */
.contact-form { max-width: 660px; margin-top: 1.6rem; display: grid; gap: 16px; }
.cf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 620px){ .cf-row { grid-template-columns: 1fr; } }
.contact-form label { display: grid; gap: 6px; font-size: .9rem; font-weight: 600; color: var(--ink); }
.contact-form input, .contact-form select, .contact-form textarea {
  font: inherit; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; color: var(--ink); width: 100%; }
.contact-form textarea { resize: vertical; min-height: 130px; }
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus {
  outline: 2px solid #E11D34; outline-offset: 1px; border-color: #E11D34; }
.cf-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.cf-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 4px; }
.cf-status { font-size: .92rem; font-weight: 600; }
.cf-status.ok { color: #15803d; }
.cf-status.err { color: #b91c1c; }
