/* ==========================================================================
   DigitalDiveClub – Designsystem
   Farbwelt: Tiefes Wasser (Navy/Petrol) + warmes Messing als Akzent.
   Typografie: Sora (Headlines) + Inter (Fließtext), beide lokal eingebunden.
   ========================================================================== */

/* ---------- Fonts (lokal, kein Google-Server) ---------- */
@font-face {
  font-family: "Sora";
  font-style: normal;
  font-weight: 600 700;
  font-display: swap;
  src: url("../assets/fonts/sora-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../assets/fonts/inter-latin.woff2") format("woff2");
}

/* ---------- Design-Tokens ---------- */
:root {
  /* Farben */
  --ink: #12242f;          /* Text auf hell */
  --ink-muted: #52666f;    /* Sekundärtext auf hell */
  --deep: #0b2331;         /* Tiefsee – dunkle Flächen */
  --deep-2: #10374b;       /* Verlaufspartner */
  --paper: #f5f3ee;        /* warmes Off-White */
  --white: #ffffff;
  --line: #e3e0d8;         /* Hairlines auf hell */
  --line-dark: #ffffff1f;  /* Hairlines auf dunkel */
  --petrol: #0e7181;       /* Akzent: Links, Icons */
  --petrol-deep: #0a5561;
  --foam: #bfe6ec;         /* helles Wasser – Text-Akzent auf dunkel */
  --brass: #e0a43c;        /* warmer Akzent, sparsam – nur auf DUNKLEM Grund */
  --brass-ink: #a86f18;    /* dieselbe Messingfamilie, aber lesbar auf HELL.
                              #e0a43c erreicht auf Weiß nur 2.2:1 und fällt
                              damit unter die 3:1-Grenze für Großschrift. */
  --text-on-dark: #eef4f4;
  --muted-on-dark: #9fb4bc;

  /* Typografie */
  --font-head: "Sora", "Avenir Next", "Segoe UI", sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;
  /* Untergrenze von 2.1rem auf 1.95rem: bei 375px lief die Headline sonst
     auf fünf Zeilen. Gemessen – 31px ist die Schwelle zu vier Zeilen. */
  --fs-hero: clamp(1.95rem, 5.5vw + 0.5rem, 4rem);
  --fs-h2: clamp(1.7rem, 3vw + 0.5rem, 2.6rem);
  --fs-h3: clamp(1.15rem, 1vw + 0.8rem, 1.4rem);
  --fs-body: 1.0625rem;
  --fs-small: 0.9375rem;

  /* Layout */
  --container: 71rem;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  /* Kapitel sollen sich wie Kapitel anfühlen: deutlich mehr Luft als vorher
     (war 4.5–7.5rem). Große Abstände sind der billigste Weg zu Wertigkeit. */
  --section: clamp(5.5rem, 12vw, 10rem);
  --radius: 14px;
  --radius-lg: 20px;
  --shadow-lg: 0 24px 60px -24px rgba(11, 35, 49, 0.35);
  --shadow-sm: 0 10px 30px -18px rgba(11, 35, 49, 0.35);
}

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

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

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
}

::selection {
  background: var(--foam);
  color: var(--deep);
}

h1,
h2,
h3 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 0.6em;
  /* verhindert einzelne Wörter in der letzten Zeile – bei deutschen
     Komposita („Festpreis-Angebot") sonst besonders auffällig */
  text-wrap: balance;
}

p,
li {
  text-wrap: pretty;
}

p {
  margin: 0 0 1em;
}

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

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

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

:focus-visible {
  outline: 3px solid var(--petrol);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Auf den dunklen Flächen war der petrolfarbene Ring mit 2.85:1 zu schwach
   (WCAG 2.4.11 verlangt 3:1) – und dort sitzen Header, Hero-Buttons und die
   Kontaktkarten, also genau das, was per Tastatur angesteuert wird.
   Messing erreicht hier 7.35:1 und bleibt in der Markenfarbwelt. */
.site-header :focus-visible,
.hero :focus-visible,
.on-dark :focus-visible,
.site-footer :focus-visible {
  outline-color: var(--brass);
}

/* Nur für Screenreader: sichtbar ausgeblendet, aber vorlesbar.
   Trägt die Inhalte, die als Dekoration aria-hidden sind (z. B. das Laufband). */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--deep);
  color: var(--white);
  padding: 0.75rem 1.25rem;
  z-index: 100;
  border-radius: 0 0 8px 0;
}

.skip-link:focus {
  left: 0;
  color: var(--white);
}

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

section {
  padding-block: var(--section);
}

/* Kicker: kleines Label über Überschriften */
.kicker {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--petrol);
  margin-bottom: 1rem;
}

.on-dark .kicker {
  color: var(--brass);
}

/* .section-head p ist spezifischer als .kicker und hat die Kicker sonst
   auf Fließtextgrau gezogen – diese zwei Regeln holen die Akzentfarbe zurück. */
.section-head p.kicker {
  color: var(--petrol);
}

.on-dark .section-head p.kicker {
  color: var(--brass);
}

.section-head {
  max-width: 44rem;
  margin-bottom: clamp(2.5rem, 6vw, 4rem);
}

.section-head p {
  color: var(--ink-muted);
  font-size: 1.0625rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  padding: 0.9rem 1.7rem;
  border-radius: 999px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  /* fühlbares Eindrücken statt nur Zurücksetzen des Hover-Hubs */
  transform: translateY(0) scale(0.985);
}

.btn-primary {
  background: var(--brass);
  color: #23190a;
  box-shadow: 0 10px 24px -12px rgba(224, 164, 60, 0.7);
}

.btn-primary:hover {
  background: #eab254;
  color: #23190a;
}

.btn-ghost {
  color: var(--text-on-dark);
  border: 1.5px solid var(--line-dark);
}

.btn-ghost:hover {
  color: var(--white);
  border-color: #ffffff55;
}

.btn-dark {
  background: var(--deep);
  color: var(--white);
}

.btn-dark:hover {
  background: var(--deep-2);
  color: var(--white);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 35, 49, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-dark);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--white);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
}

.brand svg {
  flex: none;
}

.brand-mark {
  display: block;
  flex: none;
  width: auto;
  height: 28px;
}

.site-footer .brand-mark {
  height: 26px;
}

.brand span span {
  color: var(--foam);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 2rem);
}

.site-nav a {
  color: var(--muted-on-dark);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  transition: color 0.15s ease;
}

.site-nav a:hover {
  color: var(--white);
}

/* Aktueller Abschnitt – auf einem Onepager der einzige Ortsanzeiger */
.site-nav a:not(.btn)[aria-current="true"] {
  color: var(--white);
  position: relative;
}

.site-nav a:not(.btn)[aria-current="true"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.45rem;
  height: 2px;
  border-radius: 2px;
  background: var(--brass);
}

.site-nav .btn {
  padding: 0.55rem 1.2rem;
  font-size: 0.9375rem;
}

.site-nav a.btn-primary,
.site-nav a.btn-primary:hover {
  color: #23190a;
}

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 0.5rem;
  cursor: pointer;
  color: var(--white);
}

@media (max-width: 47.9em) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--deep);
    border-bottom: 1px solid var(--line-dark);
    padding: 0.5rem var(--gutter) 1.25rem;
    display: none;
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    padding: 0.85rem 0.25rem;
    font-size: 1.0625rem;
    border-bottom: 1px solid var(--line-dark);
  }

  .site-nav a:last-child {
    border-bottom: 0;
  }

  .site-nav .btn {
    margin-top: 0.9rem;
    justify-content: center;
  }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: linear-gradient(168deg, var(--deep) 0%, var(--deep-2) 78%, #124156 100%);
  color: var(--text-on-dark);
  padding-block: clamp(5rem, 12vw, 8.5rem);
  padding-bottom: 0;
  overflow: hidden;
}

.hero-teck {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
  margin-top: clamp(2.5rem, 7vw, 4.5rem);
}

.hero::after {
  /* dezente Wellenlinien im Hintergrund */
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    -12deg,
    transparent 0 90px,
    rgba(191, 230, 236, 0.045) 90px 91px
  );
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 1;
  /* Bewusst KEINE eigene max-width mehr: mit 54rem lag der Hero-Inhalt
     136px weiter rechts als jede andere Sektion und als das Logo direkt
     darüber. Jetzt sitzt die Startseite auf derselben Kante wie der Rest. */
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--foam);
  border: 1px solid var(--line-dark);
  border-radius: 999px;
  padding: 0.4rem 1rem;
  margin-bottom: 1.75rem;
}

.hero-badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brass);
}

.hero h1 {
  font-size: var(--fs-hero);
  color: var(--white);
  /* Display-Größe verträgt engeren Satz als die Grundeinstellung */
  line-height: 1.04;
  letter-spacing: -0.03em;
  margin-bottom: 0.5em;
  /* 18ch zwang die Headline auf vier Zeilen (fünf auf dem Handy).
     Eine Display-Zeile darf zwei bis drei Zeilen haben, nicht mehr –
     darum deutlich breiter und mit ausgeglichenem Umbruch. */
  max-width: 30ch;
  text-wrap: balance;
}

.hero h1 em {
  font-style: normal;
  color: var(--foam);
}

.hero-sub {
  font-size: clamp(1.0625rem, 1.5vw + 0.6rem, 1.3125rem);
  color: var(--muted-on-dark);
  max-width: 38rem;
  margin-bottom: 2.25rem;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-bottom: 3rem;
}

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.8rem;
  padding: 0;
  margin: 0;
  list-style: none;
  font-size: var(--fs-small);
  color: var(--muted-on-dark);
}

.hero-facts li {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.hero-facts svg {
  flex: none;
  color: var(--brass);
}

/* ---------- Portfolio ---------- */
.portfolio {
  background: var(--paper);
}

.project {
  display: grid;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
  padding-block: clamp(2rem, 5vw, 3.5rem);
}

.project + .project {
  border-top: 1px solid var(--line);
}

@media (min-width: 62em) {
  .project {
    grid-template-columns: 7fr 4fr;
  }

  .project:nth-of-type(even) {
    grid-template-columns: 4fr 7fr;
  }

  .project:nth-of-type(even) .project-media {
    order: 2;
  }
}

/* Partner-Referenz: hebt das echte Kundenprojekt von den Studien ab */
.project-feature {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.25rem, 3.5vw, 2.5rem);
  box-shadow: var(--shadow-sm);
}

.project-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-head);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7a5312;
  background: rgba(224, 164, 60, 0.16);
  border-radius: 999px;
  padding: 0.3rem 0.8rem;
  margin-bottom: 0.9rem;
}

.project-facts {
  display: grid;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0 0 1.4rem;
  font-size: var(--fs-small);
  color: var(--ink-muted);
}

.project-facts li {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
}

.project-facts svg {
  flex: none;
  color: var(--brass-ink);
  margin-top: 0.3em;
}

/* Zwischenüberschrift zwischen Partnerprojekt und Design-Studien */
.section-head-sub {
  margin-top: clamp(3.5rem, 8vw, 6rem);
}

/* Handy-Ansicht: belegt sichtbar, dass mobil zuerst gebaut wird */
.project-media {
  position: relative;
}

.project-phone {
  position: absolute;
  right: -0.5rem;
  bottom: -1.6rem;
  width: clamp(78px, 20%, 122px);
  padding: 4px;
  border-radius: 15px;
  background: #0e1b24;
  box-shadow: 0 20px 42px -16px rgba(11, 35, 49, 0.6);
  line-height: 0;
  pointer-events: none;
}

.project-phone img {
  width: 100%;
  height: auto;
  border-radius: 11px;
}

.project-info h3 {
  font-size: var(--fs-h3);
  margin-bottom: 0.35em;
}

.project-info .project-tag {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--petrol);
  margin-bottom: 0.9rem;
}

.project-info p {
  color: var(--ink-muted);
  margin-bottom: 1.4rem;
}

.project-link {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.project-link svg {
  transition: transform 0.15s ease;
}

.project-link:hover svg {
  transform: translate(2px, -2px);
}

/* Browser-Mockup-Rahmen */
.browser {
  display: block;
  text-decoration: none;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

a.browser:hover {
  transform: translateY(-5px);
  box-shadow: 0 32px 70px -26px rgba(11, 35, 49, 0.45);
}

a.browser:active {
  transform: translateY(-2px) scale(0.995);
}

/* Bild zoomt im Rahmen, statt dass die ganze Karte kippt – aus dem
   Referenzprojekt übernommen, wirkt hochwertiger als reines Anheben. */
.browser picture {
  display: block;
  overflow: hidden;
}

.browser img {
  transition: transform 1.1s cubic-bezier(0.16, 1, 0.3, 1);
}

a.browser:hover img {
  transform: scale(1.045);
}

.browser-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.9rem;
  background: #eceae4;
  border-bottom: 1px solid var(--line);
}

.browser-dots {
  display: flex;
  gap: 5px;
  flex: none;
}

.browser-dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #d4d1c8;
}

.browser-url {
  flex: 1;
  min-width: 0;
  font-size: 0.75rem;
  color: var(--ink-muted);
  background: var(--white);
  border-radius: 6px;
  padding: 0.25rem 0.75rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- Ablauf ---------- */
.steps {
  display: grid;
  gap: clamp(1.5rem, 3vw, 2rem);
  counter-reset: step;
}

@media (min-width: 48em) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
  }
}

.step {
  position: relative;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem 1.75rem;
  box-shadow: var(--shadow-sm);
}

.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  display: block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 2.6rem;
  line-height: 1;
  color: var(--brass-ink);
  margin-bottom: 1.1rem;
}

.step h3 {
  font-size: 1.1875rem;
  margin-bottom: 0.4em;
}

.step p {
  color: var(--ink-muted);
  font-size: var(--fs-small);
  margin: 0;
}

.steps-note {
  margin-top: 2.5rem;
  color: var(--ink-muted);
  font-size: var(--fs-small);
  max-width: 62ch;
}

/* ---------- Für wen ---------- */
.audience {
  background: var(--paper);
}

.audience-grid {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
}

@media (min-width: 62em) {
  .audience-grid {
    grid-template-columns: 5fr 6fr;
  }
}

/* .audience-tags entfernt: die Pillenliste ist dem Endlos-Laufband
   am Ende der Sektion gewichen (siehe .ticker). */

.problem-list {
  display: grid;
  gap: 1rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.problem-list li {
  display: flex;
  gap: 1rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.4rem;
}

.problem-list svg {
  flex: none;
  margin-top: 0.2rem;
  color: var(--petrol);
}

.problem-list strong {
  display: block;
  font-family: var(--font-head);
  font-size: 1.0325rem;
  margin-bottom: 0.15rem;
}

.problem-list span {
  color: var(--ink-muted);
  font-size: var(--fs-small);
}

/* ---------- Über uns ---------- */
.team-grid {
  display: grid;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  margin-bottom: 2.5rem;
}

@media (min-width: 48em) {
  .team-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.person {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.person-photo {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: repeating-linear-gradient(
      45deg,
      #e9e7e0 0 14px,
      #e2e0d8 14px 28px
    );
  color: var(--ink-muted);
  font-family: var(--font-head);
  font-weight: 600;
  letter-spacing: 0.06em;
}

.person-photo picture,
.person-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.person-body {
  padding: 1.6rem 1.75rem 1.75rem;
}

.person-body h3 {
  margin-bottom: 0.1em;
}

.person-role {
  display: block;
  color: var(--petrol);
  font-weight: 600;
  font-size: var(--fs-small);
  margin-bottom: 0.8rem;
}

.person-body p {
  color: var(--ink-muted);
  font-size: var(--fs-small);
  margin: 0;
}

.about-note {
  max-width: 62ch;
  color: var(--ink-muted);
}

.region-photo {
  margin: clamp(2.5rem, 6vw, 4rem) 0 0;
}

.region-photo img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.region-photo figcaption {
  margin-top: 0.8rem;
  font-size: 0.875rem;
  color: var(--ink-muted);
}

/* ---------- Kontakt ---------- */
.contact {
  background: linear-gradient(168deg, var(--deep) 0%, var(--deep-2) 100%);
  color: var(--text-on-dark);
}

.contact .section-head p {
  color: var(--muted-on-dark);
}

.contact h2 {
  color: var(--white);
}

.contact-grid {
  display: grid;
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

@media (min-width: 48em) {
  .contact-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 62em) {
  .contact-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.contact-card {
  display: block;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.contact-card:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: #ffffff40;
  transform: translateY(-3px);
}

.contact-card:active {
  transform: translateY(0) scale(0.99);
}

.contact-card .label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 0.5rem;
}

.contact-card .value {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: clamp(1.05rem, 2vw, 1.4rem);
  color: var(--white);
  overflow-wrap: break-word;
  /* Telefonnummer mit gleich breiten Ziffern */
  font-variant-numeric: tabular-nums;
}

.contact-card .hint {
  display: block;
  margin-top: 0.4rem;
  color: var(--muted-on-dark);
  font-size: var(--fs-small);
}

.contact-area {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  color: var(--muted-on-dark);
  font-size: var(--fs-small);
  max-width: 40rem;
}

.contact-area svg {
  flex: none;
  color: var(--brass);
  margin-top: 0.15rem;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--deep);
  color: var(--muted-on-dark);
  border-top: 1px solid var(--line-dark);
  padding-block: 2.75rem;
  font-size: var(--fs-small);
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem 3rem;
}

.footer-claim {
  margin: 0.6rem 0 0;
  max-width: 24rem;
}

.footer-partner {
  margin: 0.5rem 0 0;
  max-width: 24rem;
}

.footer-partner a {
  color: var(--text-on-dark);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px solid var(--line-dark);
}

.footer-partner a:hover {
  color: var(--white);
  border-bottom-color: currentColor;
}

.footer-social {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.1rem;
  color: var(--muted-on-dark);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s ease;
}

.footer-social:hover {
  color: var(--white);
}

.footer-social svg {
  flex: none;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 1.1rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

/* Mindestens 24px hoch antippbar (WCAG 2.2, Zielgröße).
   Vorher waren es 19px – auf dem Handy zu leicht daneben. */
.footer-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding-block: 0.3rem;
  color: var(--muted-on-dark);
  text-decoration: none;
}

.footer-nav a:hover {
  color: var(--white);
}

.footer-meta {
  margin-top: 2.25rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line-dark);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
}

/* Impressum und Datenschutz: ebenfalls auf antippbare Größe bringen -
   das sind die beiden Links, die im Zweifel wirklich gebraucht werden. */
.footer-meta a {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  color: var(--muted-on-dark);
}

.footer-meta a:hover {
  color: var(--white);
}

/* ---------- Rechtsseiten ---------- */
.legal {
  padding-block: clamp(3rem, 8vw, 5rem);
}

.legal .container {
  max-width: 46rem;
}

.legal h1 {
  font-size: var(--fs-h2);
}

.legal h2 {
  font-size: 1.375rem;
  margin-top: 2.2em;
}

.legal h3 {
  font-size: 1.125rem;
  margin-top: 1.8em;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  text-decoration: none;
  margin-bottom: 2rem;
}

/* ---------- Korn auf dunklen Flächen ----------
   Große einfarbige Verläufe wirken digital-flach. Das Rauschen liegt als
   Daten-URI direkt im Stylesheet – kein zusätzlicher Request. */
.on-dark {
  position: relative;
  isolation: isolate;
}

.on-dark::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.4;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.3'/%3E%3C/svg%3E");
}

/* ---------- Tauchtiefe ----------
   Der Name der Agentur eingelöst: der Scrollfortschritt als Tiefenmesser.
   Erst ab sehr breiten Fenstern sichtbar, damit er nie mit Inhalt kollidiert. */
.depth {
  position: fixed;
  left: 1.75rem;
  top: 50%;
  z-index: 40;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  transform: translateY(-50%);
  pointer-events: none;
  font-family: var(--font-head);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-muted);
  transition: color 0.35s ease;
}

@media (min-width: 82em) {
  .depth {
    display: flex;
  }
}

.depth.is-on-dark {
  color: var(--muted-on-dark);
}

.depth-label {
  writing-mode: vertical-rl;
  letter-spacing: 0.24em;
  opacity: 0.7;
}

.depth-rail {
  position: relative;
  width: 2px;
  height: 168px;
  border-radius: 2px;
  background: rgba(122, 145, 156, 0.32);
  overflow: hidden;
}

.depth-fill {
  position: absolute;
  inset: 0;
  background: var(--brass);
  transform: scaleY(0);
  transform-origin: top;
}

@media (prefers-reduced-motion: no-preference) {
  .depth-fill {
    transition: transform 0.12s linear;
  }
}

.depth-value {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
  color: var(--petrol-deep);
}

.depth.is-on-dark .depth-value {
  color: var(--brass);
}

/* ---------- 404 ---------- */
.notfound {
  background: linear-gradient(168deg, var(--deep) 0%, var(--deep-2) 78%, #124156 100%);
  color: var(--text-on-dark);
  padding-block: clamp(4rem, 11vw, 7rem) 0;
  overflow: hidden;
}

.notfound .container {
  max-width: 44rem;
}

.notfound-code {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(4rem, 14vw, 8rem);
  line-height: 1;
  letter-spacing: -0.04em;
  color: transparent;
  -webkit-text-stroke: 2px var(--foam);
  opacity: 0.45;
  margin: 0 0 0.15em;
}

.notfound h1 {
  color: var(--white);
  font-size: var(--fs-h2);
}

.notfound-lead {
  color: var(--muted-on-dark);
  max-width: 52ch;
  margin-bottom: 2rem;
}

.notfound-help {
  margin-top: 2.5rem;
  color: var(--muted-on-dark);
  font-size: var(--fs-small);
  max-width: 62ch;
}

.notfound-help a {
  color: var(--foam);
}

.notfound-help a:hover {
  color: var(--white);
}

.notfound .hero-teck {
  margin-top: clamp(2.5rem, 7vw, 4rem);
}

/* ---------- Tippziele auf Touch-Geräten ----------
   Textlinks sind auf dem Desktop bewusst kompakt. Auf Touch-Geräten bekommen sie
   die empfohlenen 44 px Höhe – das Desktop-Layout bleibt davon unberührt. */
@media (hover: none) and (pointer: coarse) {
  .project-link,
  .footer-social,
  .footer-nav a,
  .footer-meta a,
  .back-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }

  /* Zeilenabstand zurücknehmen, den die neue Höhe schon mitbringt */
  .footer-nav {
    gap: 0 1.5rem;
  }

  .footer-meta {
    gap: 0 2rem;
  }
}

/* ---------- Scroll-Reveal ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.6s ease, transform 0.6s ease;
  }

  .js .reveal.is-visible {
    opacity: 1;
    transform: none;
  }

  /* Gruppen kaskadieren, statt gleichzeitig aufzuploppen */
  .js .steps .reveal:nth-child(2),
  .js .team-grid .reveal:nth-child(2),
  .js .problem-list .reveal:nth-child(2),
  .js .contact-grid .reveal:nth-child(2) {
    transition-delay: 90ms;
  }

  .js .steps .reveal:nth-child(3),
  .js .problem-list .reveal:nth-child(3),
  .js .contact-grid .reveal:nth-child(3) {
    transition-delay: 180ms;
  }

  .js .problem-list .reveal:nth-child(4) {
    transition-delay: 270ms;
  }
}

/* ==========================================================================
   Redaktionelle Ebene
   Zwei Bausteine, beide ohne zusätzliche Bibliothek:
   1. Endlos-Laufband der Branchen
   2. Bildeinzug beim Scrollen (CSS-Scroll-Animationen, nur wo unterstützt)
   ========================================================================== */

/* ---------- Endlos-Laufband der Branchen ---------- */
.ticker {
  position: relative;
  margin-top: clamp(2rem, 5vw, 3rem);
  overflow: hidden;
  /* Kanten ausblenden, damit der Lauf nicht abgeschnitten wirkt */
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.ticker-track {
  display: flex;
  width: max-content;
  gap: 0;
}

.ticker-track span {
  display: inline-flex;
  align-items: center;
  gap: clamp(1.4rem, 3vw, 2.4rem);
  padding-inline: clamp(0.7rem, 1.6vw, 1.2rem);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(1.5rem, 4.2vw, 2.9rem);
  letter-spacing: -0.02em;
  line-height: 1.25;
  white-space: nowrap;
  color: var(--ink);
}

/* Trennpunkt in Petrol – greift den Chevron aus dem Logo auf */
.ticker-track span::after {
  content: "";
  width: 8px;
  height: 11px;
  flex: none;
  background: var(--petrol);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}

/* Jedes zweite Wort ausgehöhlt: gibt dem Band Rhythmus, statt
   dreißig Mal dasselbe Gewicht zu wiederholen. */
.ticker-track span:nth-child(even) {
  color: transparent;
  -webkit-text-stroke: 1px var(--ink-muted);
}

@media (prefers-reduced-motion: no-preference) {
  .ticker-track {
    animation: ticker-run 34s linear infinite;
  }

  .ticker:hover .ticker-track {
    animation-play-state: paused;
  }

  @keyframes ticker-run {
    to {
      transform: translateX(-50%);
    }
  }
}

/* ---------- 2. Bildeinzug beim Scrollen ----------
   Native CSS-Scroll-Animationen. Bewusst hinter @supports: Browser ohne
   Unterstützung (aktuell Firefox, ältere Safari) zeigen schlicht das
   fertige Bild – kein Fallback-Code, kein Skript, kein Risiko. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .project-media .browser {
      animation: media-in linear both;
      animation-timeline: view();
      animation-range: entry 5% cover 34%;
    }

    @keyframes media-in {
      from {
        opacity: 0;
        transform: translateY(2.5rem) scale(0.955);
      }
      to {
        opacity: 1;
        transform: none;
      }
    }

    /* Beim Hinausscrollen abdunkeln, damit der Blick nach vorn wandert */
    .region-photo picture,
    .project-media .browser {
      animation-composition: replace;
    }

    .region-photo img {
      animation: media-dim linear both;
      animation-timeline: view();
      animation-range: exit -10% exit 90%;
    }

    @keyframes media-dim {
      to {
        opacity: 0.45;
      }
    }
  }
}
