/* DigitDog GmbH – Website
   CI-Farben: Dunkelblau #1F2A44 (Grundfarbe), Smaragd #109664 (Marke), Koralle #E85D50 (Akzent) */

:root {
  --navy: #1F2A44;
  --navy-soft: #3A4561;
  --green: #109664;
  --green-dark: #0B7A51;
  --coral: #E85D50;
  --ink: #1F2A44;
  --muted: #5E6678;
  --line: #E3E6EC;
  --bg: #FFFFFF;
  --bg-soft: #F5F6F8;
  --radius: 10px;
  --max: 1120px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
}
img, svg { display: block; max-width: 100%; }
a { color: var(--green-dark); }
a:hover { color: var(--navy); }
:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* ---------- Kopf ---------- */
.site-head {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy); }
.brand img { width: 26px; height: 26px; }
.wordmark { font-weight: 800; font-size: 22px; letter-spacing: -.02em; line-height: 1; }
.wordmark span { color: var(--green); }
.wordmark small { font-weight: 400; font-size: 12px; color: var(--muted); letter-spacing: 0; margin-left: 4px; }
.nav { display: flex; gap: 28px; }
.nav a { color: var(--navy); text-decoration: none; font-weight: 600; font-size: 15px; }
.nav a:hover { color: var(--green); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; padding: 13px 22px; border-radius: 8px;
  font-weight: 700; font-size: 16px; text-decoration: none;
  transition: transform .15s ease, background .15s ease;
}
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--green-dark); color: #fff; transform: translateY(-1px); }
.btn-ghost { color: var(--navy); border: 2px solid var(--line); }
.btn-ghost:hover { border-color: var(--navy); color: var(--navy); }

/* ---------- Hero ---------- */
.hero { padding: 96px 0 88px; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.25fr 1fr; gap: 56px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--green-dark);
}
.eyebrow::before { content: ""; width: 10px; height: 10px; border-radius: 2px; background: var(--coral); }
h1 { font-size: clamp(36px, 5vw, 58px); line-height: 1.08; letter-spacing: -.03em; margin: 18px 0 22px; font-weight: 800; }
h1 em { font-style: normal; color: var(--green); }
.lead { font-size: 20px; color: var(--muted); max-width: 34em; margin: 0 0 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Am Desktop bleibt der Aufmacher beim Scrollen stehen (zusätzlich eine Bildschirmhöhe),
   damit man das Auseinanderdriften der Pixel komplett sieht – siehe assets/main.js */
.hero-visual { position: relative; width: 100%; max-width: 380px; margin-left: auto; }
.hero-reveal, .scroll-hint { display: none; }

/* Festhalten + Zerfall jetzt auch auf dem Handy (nur bei genug Bildschirmhöhe, nicht im Querformat) */
@media (min-height: 560px) and (prefers-reduced-motion: no-preference) {
  /* Platzhalter statt padding: "sticky" darf sich nur im Inhaltsbereich bewegen, nicht im Padding */
  .hero-track::after { content: ""; display: block; height: 80vh; }
  /* Leistungen gleiten schon während des Zerfalls von unten über den Aufmacher – keine leere Fläche dazwischen */
  .hero-track + section { position: relative; z-index: 3; margin-top: -28vh; background: transparent; }
  /* Aufmacher füllt den Bildschirm, damit beim Festhalten keine leere Fläche darunter steht */
  .hero {
    position: sticky; top: 68px;
    min-height: calc(100vh - 68px);
    min-height: calc(100svh - 68px); /* Handy: Adressleiste nicht mitzählen */
    display: flex; align-items: center;
    padding: 48px 0 72px;
  }
  .hero > .wrap { width: 100%; }

  /* Die vier Leistungen erscheinen dort, wo vorher die Pixel standen (Steuerung in main.js) */
  .hero-reveal {
    display: flex; flex-direction: column; justify-content: center; gap: 18px;
    position: absolute; inset: 0; margin: 0; padding: 0 0 0 12%; list-style: none;
    pointer-events: none;
  }
  .hero-reveal li {
    display: flex; align-items: center; gap: 16px;
    font-size: 28px; font-weight: 800; letter-spacing: -.02em; color: var(--navy);
    opacity: 0; translate: 0 14px;
  }
  .hero-reveal i { flex: none; width: 18px; height: 18px; border-radius: 4px; }

  /* Hinweis unten in der Mitte, verschwindet beim ersten Scrollen */
  .scroll-hint {
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    position: absolute; left: 50%; bottom: 22px; translate: -50% 0;
    font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
  }
  .scroll-hint::after {
    content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--green);
    animation: hint 1.6s ease-in-out infinite;
  }
  @keyframes hint { 0%, 100% { translate: 0 0; opacity: 1; } 50% { translate: 0 8px; opacity: .4; } }
}

/* Pixel-Raster als Bildmotiv */
.pixels { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; width: 100%; }
.pixels i { aspect-ratio: 1; border-radius: 12px; border: 1.5px solid var(--line); }
.pixels i.n, .pixels i.g, .pixels i.c { border: 0; }
.pixels i.n { background: var(--navy); }
.pixels i.g { background: var(--green); }
.pixels i.c { background: var(--coral); }

/* Mouseover: nur die farbigen Felder heben sich an und kippen leicht.
   Nur auf Geräten mit Maus – auf dem Handy würde der Effekt "hängen bleiben". */
@media (hover: hover) {
  .pixels i.n, .pixels i.g, .pixels i.c { transition: transform .3s ease, box-shadow .3s ease; }
  .pixels i.n:hover, .pixels i.g:hover, .pixels i.c:hover {
    transition: transform .15s ease, box-shadow .15s ease;
    transform: scale(1.1) rotate(-6deg);
    box-shadow: 0 10px 24px rgba(31, 42, 68, .22);
  }
}

@media (prefers-reduced-motion: no-preference) {
  /* "backwards" statt "both": nach dem Aufploppen gibt die Animation die Größe wieder frei,
     sonst würde sie den Mouseover-Effekt überschreiben */
  .pixels i.n, .pixels i.g, .pixels i.c { animation: pop .6s cubic-bezier(.2,.9,.3,1.3) backwards; }
  .pixels i:nth-child(4)  { animation-delay: .05s; }
  .pixels i:nth-child(7)  { animation-delay: .15s; }
  .pixels i:nth-child(8)  { animation-delay: .25s; }
  .pixels i:nth-child(10) { animation-delay: .35s; }
  .pixels i:nth-child(11) { animation-delay: .45s; }
  .pixels i:nth-child(12) { animation-delay: .55s; }
  .pixels i:nth-child(13) { animation-delay: .65s; }
  .pixels i:nth-child(16) { animation-delay: .75s; }
  /* nur Skalierung, keine Transparenz – so sind die Pixel auch sichtbar, falls die Animation nicht läuft */
  @keyframes pop { from { transform: scale(.4); } to { transform: scale(1); } }
}

/* ---------- Abschnitte ---------- */
section { padding: 88px 0; }
.soft { background: var(--bg-soft); }
.section-head { max-width: 640px; margin-bottom: 48px; }
h2 { font-size: clamp(28px, 3.4vw, 38px); line-height: 1.15; letter-spacing: -.02em; margin: 12px 0 14px; font-weight: 800; }
.section-head p { color: var(--muted); margin: 0; font-size: 18px; }

/* Leistungen */
.services { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 30px 26px; position: relative;
}
.card .dot { width: 14px; height: 14px; border-radius: 3px; margin-bottom: 18px; }
/* leichter Mouseover: Karte hebt sich etwas an, der Farbpunkt wächst mit */
@media (hover: hover) {
  .card { transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
  .card .dot { transition: transform .25s ease; transform-origin: left center; }
  .card:hover {
    transform: translateY(-3px);
    border-color: #D5D9E1;
    box-shadow: 0 12px 28px rgba(31, 42, 68, .08);
  }
  .card:hover .dot { transform: scale(1.35); }
}
.card h3 { font-size: 21px; margin: 0 0 8px; letter-spacing: -.01em; }
.card p { margin: 0 0 14px; color: var(--muted); }
.card ul { margin: 0; padding: 0; list-style: none; }
.card li { padding: 6px 0 6px 20px; position: relative; font-size: 15.5px; border-top: 1px solid var(--line); }
.card li::before { content: ""; position: absolute; left: 2px; top: 15px; width: 6px; height: 6px; border-radius: 1px; background: var(--navy); }

/* Arbeitsweise */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: step; }
/* Jeder Schritt hat eine graue Linie, die sich beim Scrollen mit seiner Farbe füllt.
   --fill (0–1) setzt assets/main.js; ohne Skript oder bei "Bewegung reduzieren" bleibt sie voll. */
.step { position: relative; padding-top: 18px; --c: var(--navy); }
.step:nth-child(2) { --c: var(--green); }
.step:nth-child(3) { --c: var(--coral); }
.step:nth-child(4) { --c: var(--navy-soft); }
.step::before, .step::after {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; border-radius: 2px;
}
.step::before { background: var(--line); }
.step::after { background: var(--c); transform: scaleX(var(--fill, 1)); transform-origin: left center; }
.step > * { opacity: calc(.3 + .7 * var(--fill, 1)); }
.step b { display: block; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.step h3 { margin: 0 0 6px; font-size: 19px; }
.step p { margin: 0; color: var(--muted); font-size: 15.5px; }

/* Über */
.about { display: grid; grid-template-columns: 1fr 1.3fr; gap: 56px; align-items: start; }
.facts { display: grid; gap: 14px; margin: 0; }
.facts div { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.facts dt { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.facts dd { margin: 2px 0 0; font-weight: 700; font-size: 18px; }

/* Kontakt */
.contact { background: var(--navy); color: #fff; }
.contact h2 { color: #fff; }
.contact .section-head p { color: #C9CFDB; }
.contact .eyebrow { color: #7FD6B1; }
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.contact-grid div { border-top: 1px solid rgba(255,255,255,.18); padding-top: 16px; }
.contact-grid dt { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: #9AA3B6; font-weight: 700; }
.contact-grid dd { margin: 4px 0 0; font-size: 18px; }
.contact a { color: #fff; }
.contact a:hover { color: #7FD6B1; }
.contact .btn-primary { background: var(--coral); margin-top: 36px; }
.contact .btn-primary:hover { background: #fff; color: var(--navy); }

/* ---------- Fuß ---------- */
.site-foot { padding: 28px 0; font-size: 14px; color: var(--muted); border-top: 1px solid var(--line); }
.site-foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.site-foot nav { display: flex; gap: 20px; }
.site-foot a { color: var(--muted); }

/* ---------- Rechtstexte ---------- */
.legal { padding: 64px 0 88px; }
.legal .wrap { max-width: 760px; }
.legal h1 { font-size: clamp(32px, 4vw, 44px); }
.legal h2 { font-size: 22px; margin-top: 36px; }
.legal p, .legal li { color: var(--ink); }
.todo { background: #FFF1EF; color: #A8362B; padding: 0 4px; border-radius: 3px; }

/* ---------- Mobil ---------- */
@media (max-width: 860px) {
  .hero { padding: 24px 0 72px; align-items: center; } /* Inhalt mittig: kein Loch unten, Leistungen bleiben verborgen */
  .hero .wrap, .about { grid-template-columns: 1fr; gap: 40px; }
  /* Handy: Überschrift links oben, Pixel-Raster rechts daneben, darunter Text und Buttons */
  .hero .wrap {
    grid-template-columns: 1fr 40%;
    grid-template-areas: "title visual" "lead lead";
    column-gap: 18px; row-gap: 32px; align-items: center;
  }
  .hero .wrap > div:first-child { display: contents; }
  .hero h1 { grid-area: title; margin: 0; font-size: clamp(32px, 9.6vw, 44px); }
  .hero .lead { grid-area: lead; margin: 0; }
  .hero-actions { display: none; } /* Handy: Buttons im Aufmacher ausgeblendet (hingen verloren unten dran) */
  .hero-visual { grid-area: visual; max-width: 170px; margin: 0 0 0 auto; }
  .pixels { gap: 6px; }
  .pixels i { border-radius: 5px; }
  .services, .contact-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  section { padding: 64px 0; }
  .nav { display: none; }
}
@media (max-width: 480px) {
  .wrap { padding: 0 16px; }
  .steps { grid-template-columns: 1fr; }
  .lead { font-size: 18px; }
  .card { padding: 24px 20px 20px; }
}

/* Kleiner Pixel-Hund im Fuß (dreifarbig in CI-Farben, Farben stehen direkt im SVG) */
.foot-left { display: inline-flex; align-items: center; gap: 10px; }
.foot-dog { shape-rendering: crispEdges; transition: transform .25s ease; }
.foot-dog:hover { transform: scale(1.25) rotate(-6deg); }

/* Zerfall-Effekt im Aufmacher (assets/dissolve.js) */
.hero .dissolve { position: absolute; top: 0; left: 0; pointer-events: none; opacity: 0; z-index: 2; }

/* Handy: Leistungs-Bereich gleitet später herein, damit der Pixel-Schweif nicht durch seine Überschrift zieht */
@media (max-width: 860px) and (min-height: 560px) and (prefers-reduced-motion: no-preference) {
  .hero-track + section { margin-top: -12vh; }
  /* längere Strecke: auf dem Handy wischt man schnell, der Schweif soll trotzdem sichtbar bleiben */
  .hero-track::after { height: 160vh; }
}
