/* =========================================================================
   Meine Trafik – Mitreden statt zusehen
   Design 1:1 nach Layout der Fichtinger Werbeagentur (Jessica Veit).
   Farben/Font sind an die Vorlage angenähert; Jessicas Original-Font wird
   per @font-face self-hosted eingebunden, sobald geliefert (siehe unten).
   ========================================================================= */

:root {
  /* Offizielle Marken-Farben laut Style-Guide (Fichtinger/Jessica Veit). */
  --dark: #1a1a1a; /* dunkler Hero-Hintergrund (Schwarz-Bereich) */
  --red: #e2001a; /* Signalrot (offiziell) */
  --red-dark: #b80016; /* Hover */
  --blue: #80a1c7; /* EU-Sektion (Hellblau) */
  --blue-dark: #00476e; /* Dunkelblau (Akzent) */
  --excl: #3c3c3b; /* Grau des Ausrufezeichens */
  --white: #ffffff;
  --ink: #000000; /* Schwarz (Fließtext) */
  --ink-soft: #000000;

  /* Full-Bleed-Background + contained Content:
     Hintergründe laufen bis zum Rand, der Text sitzt in einer zentrierten
     1280px-Zone. --edge ist der Außeneinzug bis zu dieser Zone. */
  --content: 1280px;
  --pad: clamp(24px, 4vw, 56px);
  --edge: max(var(--pad), calc((100vw - var(--content)) / 2));

  /* Public Sans (self-hosted, Jessicas Vorschlag als DIN-Pro-Ersatz).
     Eine Variable-Font-Datei deckt alle Schnitte 100–900 ab. */
  --font-display: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Helvetica, Arial, sans-serif;
  --font-body: var(--font-display);
}

@font-face {
  font-family: "Public Sans";
  src: url("/fonts/public-sans-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden; /* Schutz vor minimalem 100vw/Scrollbar-Overflow */
}

img {
  max-width: 100%;
}

/* ============================ HERO ============================ */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr; /* zwei Hälften, volle Viewport-Breite */
  align-items: stretch;
}

/* ---- linke Spalte (dunkel) ---- */
.hero__left {
  position: relative;
  background: var(--dark);
  color: var(--white);
  /* Content bis zur zentrierten Zone (rechts: kleiner Abstand zur Mitte) */
  padding: clamp(32px, 5vw, 72px) var(--pad) clamp(32px, 5vw, 72px) var(--edge);
  overflow: hidden;
}

.hero__headline {
  position: relative;
  margin: 0;
  padding-left: 1.15em; /* Text eingerückt -> Rufzeichen sitzt weiter links */
  letter-spacing: -0.01em;
  text-transform: uppercase;
  font-size: clamp(2.6rem, 6.5vw, 4.6rem);
}

/* Echtes Ausrufezeichen "!" (Original-SVG von Jessica) hinter der Headline –
   deckt MEINE..STATT. aspect-ratio hält die Proportion, height skaliert in em. */
.hero__headline::before {
  content: "";
  position: absolute;
  left: 0;
  top: -0.02em;
  height: 6.7em;
  aspect-ratio: 67.93 / 388.98;
  background: url("/assets/rufzeichen.svg") center / contain no-repeat;
  z-index: 0;
}
.hero__headline span {
  position: relative;
  z-index: 1;
}

.hero__headline .is-white {
  display: block;
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 900; /* fetter, breiter Markenname */
  line-height: 1.08; /* etwas mehr Zeilenabstand (Jessica) */
}

.hero__headline .is-red {
  display: block;
  color: var(--red);
  font-family: var(--font-body);
  font-weight: 500; /* MITREDEN STATT ZUSEHEN – DIN Pro Medium (Style-Guide) */
  line-height: 1.08; /* etwas mehr Zeilenabstand (Jessica) */
  margin-top: 0.3em;
}

/* Divider = Jessicas Original-SVG – längere Variante (Jessica: "Geht die Linie länger?") */
.hero__divider {
  border: 0;
  height: 9px;
  width: min(92%, 460px);
  background: url("/assets/linie-lang.svg") left center / contain no-repeat;
  margin: clamp(20px, 3vw, 34px) 0;
}

.hero__claim {
  font-family: var(--font-body);
  font-weight: 400;
  text-transform: uppercase;
  line-height: 1.02;
  font-size: clamp(2rem, 5vw, 3.6rem);
  margin: 0 0 clamp(28px, 5vw, 56px);
  color: var(--white);
}

.hero__thanks {
  color: var(--red);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  font-size: clamp(1.1rem, 1.6vw, 1.35rem); /* gleiche Größe wie „DANKE!“ (Jessica) */
  line-height: 1.2;
  margin: 0;
}

/* ---- rechte Spalte (weiß) ---- */
.hero__right {
  background: var(--white);
  /* Content bis zur zentrierten Zone (links: kleiner Abstand von der Mitte) */
  padding: clamp(28px, 4vw, 64px) var(--edge) clamp(28px, 4vw, 64px) var(--pad);
  display: flex;
  flex-direction: column;
}

.logo {
  align-self: flex-end;
  margin-bottom: clamp(24px, 4vw, 48px);
}
.logo img {
  display: block;
  width: clamp(160px, 24vw, 240px);
  height: auto;
}
.logo__meine {
  display: block;
  color: var(--red);
  font-weight: 500;
  font-size: clamp(1.1rem, 2vw, 1.5rem);
}
.logo__trafik {
  display: block;
  color: var(--ink);
  font-weight: 900;
  letter-spacing: -0.02em;
  font-size: clamp(2rem, 3.6vw, 2.9rem);
}

/* Farbe auf den Container – sonst überschreibt der Element-Selektor
   ".copy p" die Farbklassen .t-red / .lead-red (höhere Spezifität). */
.copy {
  color: var(--ink-soft);
}
.copy p {
  margin: 0 0 1.3em;
  font-size: clamp(1.05rem, 1.3vw, 1.18rem); /* etwas größer (Jessica) */
  line-height: 1.6; /* mehr Zeilenabstand (Jessica) */
  max-width: 26em;
}

.copy strong {
  color: var(--ink);
}

.t-red {
  color: var(--red);
}
.t-red strong,
strong.t-red {
  color: var(--red);
}
.t-bold {
  font-weight: 700;
}

.lead-red {
  color: var(--red);
  text-transform: uppercase;
  line-height: 1.25;
  font-size: clamp(1.1rem, 1.6vw, 1.35rem) !important; /* einheitlich wie „DANKE!“ (Jessica) */
}
.lead-red strong {
  color: var(--red);
  font-weight: 700;
}
.lead-red__soft {
  display: block;
  font-weight: 400;
  opacity: 0.92;
}

.t-danke {
  text-transform: uppercase;
  font-size: clamp(1.1rem, 1.6vw, 1.35rem) !important;
  margin-bottom: 1.4em !important;
}

/* ---- Umfrage / encommit ---- */
.survey {
  margin-top: clamp(28px, 4vw, 52px);
}

/* Bracket-Rahmen: 4 Eck-Klammern via Gradients (kein Extra-Markup) */
.survey__bracket {
  --bc: var(--ink);
  --bs: 26px; /* Länge der Klammer */
  --bt: 2px; /* Strichstärke */
  position: relative;
  max-width: 430px; /* rotes Feld mittig statt full-width (Jessica) */
  margin: 0 auto;
  padding: 22px;
  background-image: linear-gradient(var(--bc), var(--bc)),
    linear-gradient(var(--bc), var(--bc)),
    linear-gradient(var(--bc), var(--bc)),
    linear-gradient(var(--bc), var(--bc)),
    linear-gradient(var(--bc), var(--bc)),
    linear-gradient(var(--bc), var(--bc)),
    linear-gradient(var(--bc), var(--bc)), linear-gradient(var(--bc), var(--bc));
  background-repeat: no-repeat;
  background-size: var(--bs) var(--bt), var(--bt) var(--bs),
    var(--bs) var(--bt), var(--bt) var(--bs), var(--bs) var(--bt),
    var(--bt) var(--bs), var(--bs) var(--bt), var(--bt) var(--bs);
  background-position: 0 0, 0 0, 100% 0, 100% 0, 0 100%, 0 100%, 100% 100%,
    100% 100%;
}

.survey__btn {
  display: block;
  background: var(--red);
  color: var(--white);
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  padding: 18px 20px;
  font-size: clamp(0.95rem, 1.3vw, 1.1rem);
  transition: background 0.15s ease;
}
.survey__btn:hover,
.survey__btn:focus-visible {
  background: var(--red-dark);
}

/* Container für den echten encommit-Dialog (leer bis DynDIALOG_ID gesetzt) */
.encommit-embed {
  width: 100%;
}
.encommit-embed:not(:empty) {
  margin-top: 16px;
}

.survey__note {
  font-size: clamp(1.05rem, 1.3vw, 1.18rem); /* wie Fließtext oben (Jessica) */
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 16px 0 0;
  text-align: left; /* linksbündig statt zentriert (Jessica) */
}

.download {
  display: inline-block;
  margin-top: clamp(20px, 3vw, 30px);
  color: var(--red);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.download:hover {
  color: var(--red-dark);
}

/* ============================ EU-SEKTION (blau) ============================ */
.eu {
  background: var(--blue);
  color: var(--white);
}
.eu__inner {
  padding: clamp(40px, 5vw, 72px) var(--edge);
  display: grid;
  grid-template-columns: minmax(130px, 190px) 1fr;
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
}

/* Rechtliches links (wie "IMPRESSUM" im Layout) */
.eu__legal {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.eu__legal a {
  color: var(--white);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-decoration: none;
  font-size: 0.95rem;
}
.eu__legal a:hover {
  text-decoration: underline;
}

.eu__title {
  text-transform: uppercase;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  line-height: 1.2;
  margin: 0 0 16px;
  max-width: 34em;
}
.eu__text {
  margin: 0 0 20px;
  max-width: 60em;
  color: rgba(255, 255, 255, 0.92);
}
.eu__cta {
  text-transform: uppercase;
  font-weight: 700;
  font-size: clamp(0.95rem, 1.4vw, 1.1rem);
  margin: 0;
}
.eu__cta a {
  color: var(--white);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Sticky-CTA – nur Mobil sichtbar (Regel im Media-Query unten) */
.sticky-cta {
  display: none;
}

/* ============================ RESPONSIVE ============================ */
@media (max-width: 860px) {
  /* Mobil-Reihenfolge lt. Jessica/Florian (Mobil-PDF):
     Logo → Headline → encommit-Dialog (im Schwarzen) → Claim → Fließtext → blau.
     display:contents löst die beiden Spalten auf, sodass ihre Kinder als
     flex-Items frei umsortiert werden; Hintergründe wandern auf die Blöcke. */
  .hero {
    display: flex;
    flex-direction: column;
  }
  .hero__left,
  .hero__right {
    display: contents;
  }

  /* --- weiß: Logo oben --- */
  .logo {
    order: 1;
    align-self: stretch;
    background: var(--white);
    margin: 0;
    padding: clamp(20px, 6vw, 32px) var(--pad) clamp(12px, 3vw, 18px);
  }
  .logo img {
    width: clamp(150px, 44vw, 210px);
    margin-left: auto; /* Logo rechtsbündig (wie PDF) */
  }

  /* --- schwarz: Headline + Dialog + Claim als durchgehender Block --- */
  .hero__headline {
    order: 2;
    background: var(--dark);
    margin: 0;
    padding: clamp(22px, 6vw, 40px) var(--pad) 0 calc(var(--pad) + 0.38em);
    font-size: clamp(1.85rem, 9vw, 2.8rem);
  }
  /* Mobil: 2 Wörter pro Zeile (Wort-Umbrüche aus) – Headline UND Claim */
  .hero .br-w {
    display: none;
  }
  .hero__headline::before {
    left: var(--pad);
    top: clamp(22px, 6vw, 40px);
    height: 5em; /* Strich deckt 3 Zeilen, Punkt bei Zeile 4 (STATT ZUSEHEN!) */
  }
  .survey {
    order: 3;
    background: var(--dark);
    margin: 0;
    padding: clamp(22px, 6vw, 34px) var(--pad);
  }
  .hero__claim {
    order: 4;
    background: var(--dark);
    margin: 0;
    padding: clamp(6px, 2vw, 12px) var(--pad) clamp(28px, 7vw, 44px);
    font-size: clamp(2.1rem, 9vw, 2.7rem); /* füllt die Breite wie im PDF */
  }

  /* --- weiß: Fließtext + Plakat --- */
  .copy {
    order: 5;
    background: var(--white);
    padding: clamp(28px, 7vw, 44px) var(--pad) 0;
  }
  .copy p {
    max-width: none;
    font-size: clamp(1.15rem, 4.4vw, 1.3rem); /* mobil größer, gut lesbar */
  }
  .download {
    order: 6;
    background: var(--white);
    margin: 0;
    padding: clamp(16px, 4vw, 24px) var(--pad) clamp(32px, 8vw, 48px);
  }

  /* auf Mobil nicht im Layout (Jessicas Mobil-PDF) */
  .hero__divider,
  .hero__thanks {
    display: none;
  }

  /* Dialog-Platzhalter auf schwarzem Grund lesbar */
  .survey__bracket {
    --bc: var(--white);
    max-width: none;
  }
  .survey__note {
    color: rgba(255, 255, 255, 0.82);
    text-align: center;
  }

  /* blaue Sektion: Content oben, Rechtliches darunter */
  .eu__inner {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .eu__main {
    order: 1;
  }
  .eu__legal {
    order: 2;
    flex-direction: column;
    gap: 10px;
  }
  /* blaue Texte mobil größer (füllen die Breite wie im PDF) */
  .eu__title {
    font-size: clamp(1.3rem, 5.4vw, 1.6rem);
  }
  .eu__text {
    font-size: clamp(1.1rem, 4.4vw, 1.25rem);
  }
  .eu__cta {
    font-size: clamp(1.1rem, 4.6vw, 1.25rem);
  }
}

@media (max-width: 480px) {
  .hero__headline {
    font-size: clamp(1.85rem, 9vw, 2.5rem);
  }
  .hero__claim {
    font-size: clamp(1.9rem, 8.4vw, 2.5rem);
  }
}

/* ============================ LEGAL-SEITEN ============================ */
.legal-header {
  background: var(--dark);
  padding: 16px var(--edge);
}
.legal-header a {
  text-decoration: none;
  line-height: 0.9;
  display: inline-block;
}
.legal-header .logo__meine {
  color: var(--red);
  font-weight: 600;
  font-size: 0.85rem;
}
.legal-header .logo__trafik {
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.4rem;
  letter-spacing: -0.02em;
}

.legal {
  max-width: 820px;
  margin: 0 auto;
  padding: clamp(36px, 5vw, 60px) clamp(20px, 4vw, 32px) clamp(56px, 7vw, 88px);
}
.legal h1 {
  font-family: var(--font-display);
  font-weight: 900;
  text-transform: uppercase;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}
.legal h2 {
  font-size: 1.2rem;
  margin: 36px 0 10px;
}
.legal p,
.legal li {
  color: var(--ink-soft);
  max-width: 680px;
}
.legal ul {
  padding-left: 20px;
}
.legal a {
  color: var(--red);
}
.legal code {
  background: #f2f3f5;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 0.9em;
}
.legal .updated {
  color: #7a828c;
  font-size: 0.9rem;
  margin: 0 0 32px;
}
.legal .box {
  border: 1px solid #e4e7ec;
  border-radius: 10px;
  padding: 16px 20px;
  background: #fafbfc;
  max-width: 680px;
  margin: 14px 0;
}
/* noch zu ergänzende Angaben deutlich markiert */
.legal .todo {
  background: #fff4e5;
  border: 1px solid #ffd8a8;
  color: #8a5300;
  padding: 1px 6px;
  border-radius: 4px;
  font-style: normal;
  font-size: 0.92em;
}
.legal .back {
  display: inline-block;
  margin-top: 40px;
  color: var(--red);
  font-weight: 600;
  text-decoration: none;
}
.legal .back:hover {
  text-decoration: underline;
}
