/* ═══════════════════════════════════════════════════════════════════════════
   PMI Media Solutions — Modernist
   Flach, Archivo, Rot auf hellem Grund, 0px Radius, 2px-Linien, alles bündig
   links. Tokens aus design_handoff_pmi_hero/design-system/styles.css.
   ═══════════════════════════════════════════════════════════════════════ */

:root {
  --bg: #f3f2f2;
  --ink: #201e1d;
  --accent: #ec3013;
  --accent-hover: #dd2b0f;
  --accent-deep: #ae1800;
  --text-2: #444141;
  --text-muted: #605d5d;
  --line: rgba(32, 30, 29, .4);
  --grid: rgba(32, 30, 29, .10);

  --font: "Archivo", system-ui, sans-serif;

  --nav-h: 78px;   /* Logo 34px + line-height-1.2-Button + 2x20px Padding + 2px Linie */
  --gutter: 40px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 { margin: 0; font-weight: 800; }
p { margin: 0; }
img { max-width: 100%; }

a { color: var(--accent); }
a:hover { color: var(--accent-deep); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: rgba(236, 48, 19, .18); }

/* Icon-Sprite: nimmt keinen Platz im Fluss ein. Muss hier stehen, nicht als
   style-Attribut — die CSP der Seite erlaubt keine Inline-Styles. */
.icon-sprite { position: absolute; width: 0; height: 0; }

/* ── Hintergrund-Ebenen ────────────────────────────────────────────────── */

.bg-layer {
  position: sticky;
  top: 0;
  height: 100vh;
  margin-bottom: -100vh;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, var(--grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid) 1px, transparent 1px);
  background-size: 120px 120px;
}

/* Der Canvas nimmt die volle Breite — beschnitte man ihn links (der Entwurf
   sah left:340px vor), schnitte diese Kante bei schmaleren Fenstern senkrecht
   durch das Objekt. Nach rechts versetzt wird stattdessen im 3D-Raum,
   viewportunabhaengig: siehe js/pmi-knot.js. */
pmi-knot {
  position: absolute;
  top: -60px;
  bottom: -60px;
  left: 0;
  right: 0;
}

.grain {
  position: sticky;
  top: 0;
  height: 100vh;
  margin-bottom: -100vh;
  z-index: 5;
  pointer-events: none;
  opacity: .35;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 .18 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ── Navigation ────────────────────────────────────────────────────────── */

.nav {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 20px var(--gutter);
  border-bottom: 2px solid var(--line);
  background: rgba(243, 242, 242, .85);
  backdrop-filter: blur(8px);
}

/* Das Logo schiebt den Rest der Nav nach rechts — auf der Startseite steht es
   nackt, sonst in einem Link zurück auf "/". */
.nav-logo { height: 34px; width: auto; margin-right: auto; display: block; }
.nav-brand { margin-right: auto; display: block; }
.nav-brand .nav-logo { margin-right: 0; }

.nav-link {
  color: inherit;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}
.nav-link:hover { color: var(--accent); }

.nav-toggle { display: none; }

/* ── Buttons ───────────────────────────────────────────────────────────── */

/* Gilt für <a> UND <button>. Ohne den Reset zieht sich ein <button> das
   UA-Stylesheet: Arial auf Systemgrau, kein Hand-Cursor. */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-family: var(--font);
  font-weight: 800;
  font-size: 15px;
  padding: 14px 20px;
  border: 0;
  line-height: 1.2;
  white-space: nowrap;
  background: none;
  color: inherit;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}
.btn svg { flex: none; }

.btn-primary { background: var(--accent); color: var(--bg); }
.btn-primary:hover { background: var(--accent-hover); color: var(--bg); }

.btn-secondary { border: 1px solid var(--line); color: var(--ink); }
.btn-secondary:hover { background: rgba(32, 30, 29, .07); color: var(--ink); }

.btn-invert { background: var(--bg); color: var(--ink); }
.btn-invert:hover { background: #fff; color: var(--ink); }

.btn-outline-invert { border: 1px solid var(--bg); color: var(--bg); }
.btn-outline-invert:hover { background: rgba(243, 242, 242, .12); color: var(--bg); }

.btn-sm { font-size: 14px; padding: 10px 16px; }

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

.hero {
  position: relative;
  z-index: 2;
  min-height: calc(100vh - var(--nav-h));
  min-height: calc(100dvh - var(--nav-h));
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 32px var(--gutter);
}

.hero-tags { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }

.tag {
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 4px 10px;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-weight: 600;
}

.hero h1 {
  align-self: center;
  /* 168px auf dem gezeichneten 1440x900-Frame (168/1440 = 11.67vw). An flacheren
     Viewports bindet die Höhe: was nach Nav, Padding, Tag-Zeile und Bottom-Row
     übrig bleibt (~272px), geteilt durch 4 Zeilen x line-height .9 — so bleibt
     die Bottom-Row im Fold. */
  font-size: clamp(56px, min(11.67vw, (100vh - 272px) / 3.6), 168px);
  font-size: clamp(56px, min(11.67vw, (100dvh - 272px) / 3.6), 168px);
  line-height: .9;
  letter-spacing: -.045em;
  text-transform: uppercase;
  text-wrap: balance;
}
.hero h1 .accent { color: var(--accent); }

.hero-bottom {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 40px;
  align-items: end;
  border-top: 2px solid var(--line);
  padding-top: 20px;
}

.hero-lead { font-size: 18px; line-height: 1.4; max-width: 400px; }

.hero-actions { display: flex; gap: 12px; }
/* Der Knoten liegt hinter dieser Zeile — ohne Fuellung waere das Label des
   Sekundaer-Buttons auf dem Rot kaum zu lesen. */
.hero-actions .btn-secondary { background: var(--bg); }

.hero-scroll {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ── Marquee ───────────────────────────────────────────────────────────── */

.marquee {
  position: relative;
  z-index: 3;
  background: var(--ink);
  color: var(--bg);
  overflow: hidden;
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 28s linear infinite;
  font-size: clamp(28px, 3.5vw, 44px);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -.02em;
  padding: 22px 0;
  white-space: nowrap;
}
.marquee-track span { padding-right: 48px; }
.marquee-track .sep { color: var(--accent); padding: 0; }

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

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

.section {
  position: relative;
  z-index: 3;
  background: var(--bg);
  padding: 64px var(--gutter) 80px;
}

/* Zellenraster enden offen — die Sektionsgrenze trägt die Linie. */
.section + .section { border-top: 2px solid var(--line); }

/* Ankersprünge dürfen nicht unter der klebenden Nav landen. */
.section, .poster { scroll-margin-top: var(--nav-h); }

.section-head {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 2px solid var(--line);
}

.kicker {
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 800;
}

.section-head h2 {
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1;
  letter-spacing: -.03em;
}

.section-head .lead {
  font-size: 18px;
  line-height: 1.4;
  color: var(--text-2);
  margin-top: 16px;
  max-width: 640px;
}

/* Zellenraster: Trennlinien statt Karten. Erste Spalte bündig links, letzte
   bündig rechts, letzte Reihe ohne Bodenlinie. */
.cells { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }

.cell {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 32px;
  border-right: 2px solid var(--line);
  border-bottom: 2px solid var(--line);
}
.cell:nth-child(3n + 1) { padding-left: 0; }
.cell:nth-child(3n) { padding-right: 0; border-right: 0; }
.cells .cell:nth-last-child(-n + 3):nth-child(3n + 1),
.cells .cell:nth-last-child(-n + 3):nth-child(3n + 1) ~ .cell { border-bottom: 0; }

/* Zwei Spalten — bricht den Rhythmus der 3er- und 4er-Raster auf. */
.cells-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cells-2 .cell { border-right: 2px solid var(--line); border-bottom: 2px solid var(--line); padding: 32px; }
.cells-2 .cell:nth-child(2n + 1) { padding-left: 0; }
.cells-2 .cell:nth-child(2n) { padding-right: 0; border-right: 0; }
.cells-2 .cell:nth-last-child(-n + 2) { border-bottom: 0; }

.cell-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--accent);
}
.cell-num { font-size: 12px; color: var(--text-muted); font-weight: 600; }

.cell h3 { font-size: 28px; letter-spacing: -.02em; line-height: 1.1; }
.cell p { font-size: 15px; line-height: 1.5; color: var(--text-2); }

.cell-link {
  margin-top: auto;
  font-weight: 800;
  font-size: 14px;
  text-decoration: none;
  color: var(--accent);
  display: inline-flex;
  gap: 6px;
  align-items: center;
}
.cell-link:hover { color: var(--accent-deep); }

/* Prozess: vier Schritte, die Nummer trägt die Struktur. */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }

.step {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 32px;
  border-right: 2px solid var(--line);
}
.step:first-child { padding-left: 0; }
.step:last-child { padding-right: 0; border-right: 0; }

.step-num {
  font-size: 44px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.03em;
  color: var(--accent);
}
.step h3 { font-size: 20px; letter-spacing: -.01em; }
.step p { font-size: 15px; line-height: 1.5; color: var(--text-2); }

/* ── Kontakt: die eine rote Fläche ─────────────────────────────────────── */

.poster {
  position: relative;
  z-index: 3;
  background: var(--accent);
  color: var(--bg);
  padding: 80px var(--gutter);
  border-top: 2px solid var(--accent);
}

.poster .kicker { color: var(--bg); opacity: .8; }

.poster h2 {
  font-size: clamp(40px, 7vw, 96px);
  line-height: .92;
  letter-spacing: -.04em;
  text-transform: uppercase;
  margin: 24px 0 32px;
  max-width: 14ch;
}

.poster-lead {
  font-size: 24px;
  line-height: 1.35;
  max-width: 560px;
  margin-bottom: 40px;
}

.poster-actions { display: flex; gap: 12px; flex-wrap: wrap; }

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

.footer {
  position: relative;
  z-index: 3;
  background: var(--ink);
  color: var(--bg);
  padding: 48px var(--gutter);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: end;
}

.footer-logo { height: 34px; width: auto; display: block; margin-bottom: 16px; }
.footer-meta { font-size: 14px; line-height: 1.6; color: rgba(243, 242, 242, .7); }

.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-links a {
  color: var(--bg);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}
.footer-links a:hover { color: var(--accent); }

/* ── Reveal ────────────────────────────────────────────────────────────── */

.reveal { opacity: 0; transform: translateY(12px); transition: opacity .5s ease, transform .5s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ── Responsive ────────────────────────────────────────────────────────── */

@media (max-width: 1100px) {
  .hero-bottom { grid-template-columns: 1fr; gap: 24px; align-items: start; }
  .hero-scroll { justify-content: flex-start; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .step:nth-child(2n) { padding-right: 0; border-right: 0; }
  .step:nth-child(2n + 1) { padding-left: 0; }
  .step:nth-child(-n + 2) { border-bottom: 2px solid var(--line); }
}

@media (max-width: 900px) {
  :root { --gutter: 24px; --nav-h: 72px; }   /* schmalere Nav, aber gemessen 71-73px */

  .nav { gap: 16px; padding: 16px var(--gutter); }
  /* Logo zuerst, Menü-Knopf rechts daneben — beide vor den umbrechenden Links. */
  .nav-logo, .nav-brand { order: -2; }
  .nav-link, .nav .btn { display: none; }
  .nav-simple .btn { display: inline-flex; }
  .nav-simple .nav-toggle { display: none; }
  .nav-toggle {
    display: inline-flex;
    order: -1;   /* bleibt beim aufgeklappten Menü in der ersten Zeile */
    align-items: center;
    gap: 8px;
    background: none;
    border: 1px solid var(--line);
    color: var(--ink);
    font: 800 14px/1 var(--font);
    padding: 10px 14px;
    cursor: pointer;
  }
  .nav.is-open { flex-wrap: wrap; }
  .nav.is-open .nav-link {
    display: block;
    width: 100%;
    padding: 12px 0;
    border-top: 1px solid var(--line);
    font-size: 18px;
  }
  .nav.is-open .btn { display: inline-flex; width: 100%; justify-content: flex-start; }

  /* Knoten zentriert in der oberen Hälfte — hinter der Headline, aber weg
     vom Fließtext, der sonst auf dem Rot nicht mehr lesbar wäre. */
  pmi-knot { top: 15vh; bottom: auto; height: 44vh; }

  .hero { gap: 24px; padding: 24px var(--gutter) 32px; }
  .hero h1 { align-self: start; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { justify-content: flex-start; }

  .section { padding: 48px var(--gutter) 56px; }
  .section-head { grid-template-columns: 1fr; gap: 16px; padding-bottom: 24px; }

  .cells { grid-template-columns: 1fr; }
  .cell {
    padding: 24px 0;
    border-right: 0;
    border-bottom: 2px solid var(--line);
  }
  .cell:last-child { border-bottom: 0; }

  .steps { grid-template-columns: 1fr; }
  .step {
    padding: 24px 0;
    border-right: 0;
    border-bottom: 2px solid var(--line);
  }
  .step:last-child { border-bottom: 0; }

  .poster { padding: 56px var(--gutter); }
  .poster-lead { font-size: 20px; }
  .poster-actions .btn { width: 100%; justify-content: flex-start; }

  .footer { grid-template-columns: 1fr; align-items: start; }
}

/* ── Reduzierte Bewegung ───────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee-track { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ── Rechtsseiten ──────────────────────────────────────────────────────── */

.nav-simple { justify-content: space-between; }

.legal {
  position: relative;
  z-index: 3;
  padding: 64px var(--gutter) 96px;
  max-width: 860px;
}

.legal h1 {
  font-size: clamp(40px, 6vw, 72px);
  line-height: .95;
  letter-spacing: -.035em;
  text-transform: uppercase;
  padding-bottom: 24px;
  border-bottom: 2px solid var(--line);
  margin-bottom: 40px;
}

.legal h2 {
  font-size: 28px;
  letter-spacing: -.02em;
  line-height: 1.15;
  margin: 48px 0 16px;
  padding-top: 24px;
  border-top: 2px solid var(--line);
}

/* Die Linie unter h1 ist schon die Trennung — keine zweite direkt darunter. */
.legal h1 + h2 { margin-top: 0; padding-top: 0; border-top: 0; }

.legal h3 {
  font-size: 18px;
  letter-spacing: -.01em;
  margin: 32px 0 12px;
}

.legal p,
.legal li {
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-2);
  margin: 0 0 16px;
}

.legal ul { padding-left: 20px; margin: 0 0 16px; }
.legal li { margin-bottom: 8px; }
.legal strong { color: var(--ink); font-weight: 800; }
.legal a { text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 900px) {
  .legal { padding: 40px var(--gutter) 64px; }
  .legal h2 { margin-top: 40px; }
}
