/* MAPA AI – Onepager
   Farben laut assets/brand/BRAND.md. Türkis nie als Text auf hellem Grund (2,41 : 1) – nur Flächen,
   Linien und Grafik. Auf Petrol nur für große Elemente und Grafik (3,8 : 1). */

/* ---------- Schriften (selbst gehostet, SIL OFL, siehe fonts/OFL-*.txt) ---------- */
@font-face {
  font-family: "Space Grotesk";
  src: url("../fonts/space-grotesk-latin-var.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --petrol: #0a4a55;
  --petrol-900: #05262c;   /* abgeleitet: Text auf Türkis (6,1 : 1) */
  --tuerkis: #14b3b0;
  --nebel: #f4f7f7;
  --weiss: #ffffff;

  --text: var(--petrol);
  --text-muted: #3d5f66;   /* 6,4 : 1 auf Nebel */
  --text-on-dark: var(--weiss);
  --text-on-dark-muted: #b6d1d4; /* 6,1 : 1 auf Petrol */
  --line: #d3e0e1;
  --line-dark: rgb(255 255 255 / 0.16);

  --font-head: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  --step--1: clamp(0.84rem, 0.82rem + 0.1vw, 0.9rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  --step-1: clamp(1.2rem, 1.1rem + 0.45vw, 1.45rem);
  --step-2: clamp(1.5rem, 1.3rem + 1vw, 2.1rem);
  --step-3: clamp(1.9rem, 1.5rem + 2vw, 3.1rem);
  --step-4: clamp(2.4rem, 1.7rem + 3.6vw, 4.6rem);

  --space-s: clamp(1rem, 0.9rem + 0.5vw, 1.25rem);
  --space-m: clamp(1.5rem, 1.2rem + 1.5vw, 2.5rem);
  --space-l: clamp(2.5rem, 2rem + 2.5vw, 4rem);
  --space-xl: clamp(4rem, 3rem + 5vw, 8rem);

  --radius: 6px;
  --wrap: 72rem;
  --header-h: 4.5rem;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- Basis ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}
body {
  margin: 0;
  background: var(--weiss);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; height: auto; }
h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: var(--step-4); letter-spacing: -0.035em; }
h2 { font-size: var(--step-3); letter-spacing: -0.03em; }
h3 { font-size: var(--step-1); }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
::selection { background: var(--tuerkis); color: var(--petrol-900); }
html { scrollbar-color: var(--petrol) var(--nebel); caret-color: var(--petrol); }
.icon, .scene__arrow {
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--petrol);
  outline-offset: 3px;
  border-radius: 2px;
}
.site-header :focus-visible,
.hero :focus-visible,
.section--petrol :focus-visible {
  outline-color: var(--tuerkis);
}

.wrap {
  width: min(100% - 2.5rem, var(--wrap));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--weiss);
  color: var(--petrol);
  font-weight: 600;
  border-radius: var(--radius);
}
.skip-link:focus { top: 1rem; }

/* ---------- Bausteine ---------- */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3rem;
  padding: 0.8rem 1.5rem;
  border-radius: var(--radius);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.0625rem;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.btn--accent { background: var(--tuerkis); color: var(--petrol-900); }
.btn--accent:hover { background: #2cc4c1; text-decoration: none; }
.btn--primary { background: var(--petrol); color: var(--weiss); }
.btn--primary:hover { background: var(--petrol-900); text-decoration: none; }
.btn--small { min-height: 2.75rem; padding: 0.55rem 1.1rem; font-size: 1rem; }
.btn--large { min-height: 3.5rem; padding: 1rem 2rem; font-size: 1.15rem; text-align: center; }
@media (max-width: 39.99rem) { .btn--large { width: 100%; } }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 3rem;
  font-weight: 600;
  text-decoration: underline;
}
.link-arrow .icon { transition: transform 0.2s var(--ease); }
.link-arrow:hover .icon { transform: translateX(3px); }
.link-arrow--back:hover .icon { transform: translateX(-3px); }
.link-arrow--light { color: var(--weiss); }

/* Sichtbare Platzhalter für fehlende Inhalte */
.todo {
  display: inline-block;
  padding: 0.1em 0.45em;
  border: 1px dashed currentColor;
  border-radius: 3px;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.8em;
  line-height: 1.5;
  color: var(--petrol);
  background: #fff6d6;
}
.todo--dark { color: var(--petrol-900); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--petrol);
  color: var(--weiss);
  border-bottom: 1px solid var(--line-dark);
}
.site-header__inner {
  display: flex;
  align-items: center;
  gap: var(--space-s);
  min-height: var(--header-h);
}
.site-header__logo { margin-right: auto; padding-block: 0.5rem; }
.site-header__logo img { width: clamp(150px, 30vw, 196px); height: auto; }

.site-nav { display: none; }
.site-nav ul { display: flex; gap: 0.25rem; }
.site-nav a {
  display: block;
  padding: 0.6rem 0.8rem;
  border-radius: var(--radius);
  color: var(--text-on-dark-muted);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s var(--ease);
}
.site-nav a:hover { color: var(--weiss); text-decoration: underline; }

@media (min-width: 52rem) {
  .site-nav { display: block; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--petrol);
  color: var(--text-on-dark);
}
.hero__inner {
  display: grid;
  gap: var(--space-m);
  padding-block: var(--space-l) 0;
}
.hero__text { position: relative; z-index: 1; max-width: 40rem; }
.hero h1 { margin-bottom: 1.5rem; max-width: 14ch; }
.hero__lead {
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--text-on-dark-muted);
  max-width: 34rem;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.75rem;
  margin-top: var(--space-m);
}
.hero__art { margin-top: calc(var(--space-m) * -0.5); }
.hero__art svg { width: min(12rem, 50vw); margin-left: auto; }

.ridge { stroke: var(--weiss); stroke-width: 2; }
.ridge--1 { opacity: 0.55; }
.ridge--2 { opacity: 0.42; }
.ridge--3 { opacity: 0.3; }
.ridge--4 { opacity: 0.2; }
.ridge--5 { opacity: 0.12; }
.peak { stroke-width: 26; }
.peak--left { stroke: var(--weiss); }
.peak--right { stroke: var(--tuerkis); }

@media (min-width: 60rem) {
  .hero__inner {
    grid-template-columns: 1.15fr 1fr;
    align-items: end;
    min-height: min(44rem, calc(100svh - var(--header-h)));
    padding-block: var(--space-xl) 0;
  }
  .hero__text { align-self: center; padding-bottom: var(--space-l); }
  .hero__art { margin: 0 -2rem 0 0; }
  .hero__art svg { width: 100%; max-width: none; }
}

/* ---------- Bewegung ----------
   Nur transform/opacity, alles in prefers-reduced-motion: no-preference.
   Ohne JS (.js fehlt) bleiben Inhalte sofort sichtbar. */
@media (prefers-reduced-motion: no-preference) {
  /* Hero: Linien zeichnen sich ein */
  .hero__art polyline {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    animation: draw 1.8s var(--ease) forwards;
  }
  .peak--left { animation-delay: 0.1s !important; }
  .peak--right { animation-delay: 0.35s !important; }
  .ridge--1 { animation-delay: 0.5s !important; }
  .ridge--2 { animation-delay: 0.62s !important; }
  .ridge--3 { animation-delay: 0.74s !important; }
  .ridge--4 { animation-delay: 0.86s !important; }
  .ridge--5 { animation-delay: 0.98s !important; }

  /* Hero: Überschrift gleitet aus einer Maske (ohne Opacity, damit LCP nicht wartet),
     Text und Aktionen folgen gestaffelt */
  .hero h1 .line { display: block; overflow: hidden; padding-bottom: 0.08em; margin-bottom: -0.08em; }
  .hero h1 .line > span { display: block; animation: slide-up 0.9s var(--ease) both; }
  .hero h1 .line:nth-child(2) > span { animation-delay: 0.08s; }
  .hero h1 .line:nth-child(3) > span { animation-delay: 0.16s; }
  .hero__lead { animation: fade-up 0.8s var(--ease) 0.3s both; }
  .hero__actions { animation: fade-up 0.8s var(--ease) 0.4s both; }

  /* Hero beim Scrollen: die Höhenlinien sinken langsamer ab als der Gipfel (Scroll als Zeitachse) */
  @supports (animation-timeline: scroll()) {
    .hero__art .ridges {
      animation: ridge-drift linear both;
      animation-timeline: scroll(root);
      animation-range: 0 70vh;
    }
  }

  /* Scroll-Reveals, gestaffelt über --i (setzt js/main.js) */
  .js .reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
    transition-delay: calc(var(--i, 0) * 0.1s);
  }
  .js .reveal.is-visible { opacity: 1; transform: none; }

  /* Hover-Belohnungen */
  .btn:hover { transform: translateY(-2px); }
  .btn:active { transform: translateY(0); }
  .scene__col--after { transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease); }
  .scene__col--after:hover {
    transform: translateY(-3px);
    box-shadow: 0 2px 4px rgb(10 74 85 / 0.06), 0 16px 32px -14px rgb(10 74 85 / 0.3);
  }
  .tags li { transition: background-color 0.3s var(--ease); }
  .service:hover .tags li { background: #e6eeef; }
  .step__num { transition: transform 0.3s var(--ease), background-color 0.3s var(--ease); }
  .step:hover .step__num { transform: scale(1.08); background: var(--petrol-900); }
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes slide-up { from { transform: translateY(105%); } }
@keyframes fade-up { from { opacity: 0; transform: translateY(30px); } }
@keyframes ridge-drift { to { transform: translateY(48px); } }

/* ---------- Sektionen ---------- */
.section { padding-block: var(--space-xl); }
.section--mist { background: var(--nebel); }
.section--petrol { background: var(--petrol); color: var(--text-on-dark); }
.section__head { max-width: 44rem; margin-bottom: var(--space-l); }
.section__head h2 { max-width: 22ch; }
.section__intro { margin-top: 1rem; color: var(--text-muted); font-size: var(--step-1); line-height: 1.5; }

/* Leistungen */
.services {
  display: grid;
  border-top: 1px solid var(--line);
}
.service {
  display: grid;
  gap: 0.75rem;
  padding-block: var(--space-m);
  border-bottom: 1px solid var(--line);
}
.service p { color: var(--text-muted); max-width: 36rem; }
.tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.25rem; }
.tags li {
  padding: 0.4rem 0.8rem;
  line-height: 1.3;
  border-radius: 999px;
  background: var(--nebel);
  font-size: var(--step--1);
  font-weight: 500;
}

@media (min-width: 48rem) {
  .services { grid-template-columns: 1fr 1fr; column-gap: var(--space-l); border-top: 0; }
  .service { border-top: 1px solid var(--line); border-bottom: 0; }
}

/* Ablauf */
.steps { display: grid; gap: var(--space-m); counter-reset: step; }
.step { position: relative; display: grid; gap: 0.6rem; }
.step__num {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  margin-bottom: 0.5rem;
  border-radius: 50%;
  background: var(--petrol);
  color: var(--weiss);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.15rem;
}
.step p { color: var(--text-muted); }

@media (min-width: 48rem) {
  .steps { grid-template-columns: repeat(3, 1fr); gap: var(--space-l); }
  .step:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 1.5rem;
    left: 4rem;
    right: calc(var(--space-l) * -1 + 1rem);
    height: 2px;
    background: linear-gradient(90deg, var(--tuerkis), var(--line));
  }
}

/* Alltagsszene (Beispiel) */
.scene {
  margin: var(--space-l) 0 0;
  padding: var(--space-m);
  border-radius: var(--radius);
  background: var(--nebel);
}
.scene__title {
  font-family: var(--font-head);
  font-size: var(--step-2);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-m);
}
.scene__grid { display: grid; gap: 1.25rem; align-items: start; }
.scene__label {
  font-family: var(--font-head);
  font-weight: 600;
  margin-bottom: 0.4rem;
}
.scene__col p:not(.scene__label) { color: var(--text-muted); max-width: 30rem; }
.scene__col--after {
  padding: 1.25rem;
  border-radius: var(--radius);
  background: var(--weiss);
  box-shadow: 0 1px 2px rgb(10 74 85 / 0.06), 0 8px 24px -12px rgb(10 74 85 / 0.25);
}
.scene__arrow { width: 2.5rem; color: var(--petrol); transform: rotate(90deg); justify-self: center; }
.scene__note { margin-top: var(--space-s); font-size: var(--step--1); color: var(--text-muted); }

@media (min-width: 48rem) {
  .scene__grid { grid-template-columns: 1fr auto 1fr; gap: var(--space-m); align-items: center; }
  .scene__arrow { transform: none; width: 3rem; }
}

/* Zwischen-Aufruf nach dem Ablauf */
.next-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  margin-top: var(--space-l);
  padding-top: var(--space-m);
  border-top: 1px solid var(--line);
  font-family: var(--font-head);
  font-size: var(--step-1);
  font-weight: 500;
}

/* Warum */
.why { display: grid; gap: var(--space-l); }
.why h2 { color: var(--weiss); margin-bottom: 1.25rem; }
.why__person { display: grid; align-content: start; }
.portrait {
  display: block;
  width: min(100%, 15rem);
  margin-bottom: var(--space-m);
}
.portrait img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius);
  background: rgb(255 255 255 / 0.04);
}
.why__name { font-family: var(--font-head); font-size: var(--step-1); font-weight: 600; }
.why__meta { margin-top: 0.35rem; color: var(--text-on-dark-muted); max-width: 30rem; }
.why__meta a { color: var(--weiss); }
.reasons { display: grid; margin: 0; }
.reason {
  padding-block: var(--space-s) var(--space-m);
  border-top: 1px solid var(--line-dark);
}
.reason dt {
  font-family: var(--font-head);
  font-size: var(--step-1);
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.reason dd { margin: 0; color: var(--text-on-dark-muted); max-width: 32rem; }

@media (min-width: 60rem) {
  .why { grid-template-columns: 0.9fr 1.1fr; align-items: start; }
  .why__person { position: sticky; top: calc(var(--header-h) + 2rem); }
}

/* Projekte */
.projects { display: grid; gap: var(--space-m) var(--space-l); }
.project {
  display: grid;
  gap: 0.5rem;
  align-content: start;
  padding-top: var(--space-s);
  border-top: 2px solid var(--petrol);
}
.project__kind { font-size: var(--step--1); font-weight: 600; color: var(--text-muted); }
.project p:not(.project__kind) { color: var(--text-muted); max-width: 34rem; }
.project .link-arrow { min-height: 2.75rem; justify-self: start; }
.projects__todo { margin-top: var(--space-m); }

@media (min-width: 48rem) {
  .projects { grid-template-columns: repeat(2, 1fr); }
}

/* Kontakt */
.contact__inner { display: grid; gap: var(--space-l); }
.contact h2 { color: var(--weiss); margin-bottom: 1.25rem; }
.contact__lead { color: var(--text-on-dark-muted); font-size: var(--step-1); line-height: 1.5; max-width: 34rem; }
.next {
  display: grid;
  gap: 0.75rem;
  margin-top: var(--space-m);
  counter-reset: next;
  max-width: 34rem;
}
.next li {
  position: relative;
  padding-left: 2.5rem;
  color: var(--text-on-dark-muted);
  counter-increment: next;
}
.next li::before {
  content: counter(next);
  position: absolute;
  left: 0;
  top: 0.05em;
  display: grid;
  place-items: center;
  width: 1.7rem;
  height: 1.7rem;
  border: 1.5px solid var(--tuerkis);
  border-radius: 50%;
  color: var(--weiss);
  font-family: var(--font-head);
  font-size: 0.9rem;
  font-weight: 600;
}
.contact__actions { display: grid; gap: 1.5rem; align-content: start; justify-items: start; }
.contact__detail { display: grid; gap: 0.25rem; }
.contact__label {
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-on-dark-muted);
}
.contact__value { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; }
.contact__value a { color: var(--weiss); font-size: var(--step-1); }
.copy {
  min-height: 2.75rem;
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  background: transparent;
  color: var(--weiss);
  font: 500 0.95rem/1.2 var(--font-body);
  cursor: pointer;
  transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.copy:hover { border-color: var(--tuerkis); background: rgb(255 255 255 / 0.06); }
.copy__status { min-height: 1.5em; font-size: var(--step--1); color: var(--text-on-dark-muted); }

@media (min-width: 60rem) {
  .contact__inner { grid-template-columns: 1.2fr 1fr; align-items: start; }
  .contact__actions { padding-top: 0.5rem; }
}

/* ---------- Footer ---------- */
.site-footer { background: var(--nebel); padding-block: var(--space-l); font-size: 0.95rem; }
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem 2rem;
}
.site-footer img { width: 160px; margin-right: auto; }
.site-footer nav ul { display: flex; gap: 0.5rem 1.25rem; flex-wrap: wrap; }
.site-footer nav a { display: inline-block; padding-block: 0.6rem; }
.site-footer__copy { color: var(--text-muted); width: 100%; }

@media (min-width: 48rem) {
  .site-footer__copy { width: auto; }
}

/* ---------- Unterseiten (Impressum, Datenschutz) ---------- */
.page { padding-block: var(--space-xl); }
.page__body { max-width: 44rem; }
.page__body h1 { font-size: var(--step-3); margin-bottom: var(--space-m); }
.page__body h2 { font-size: var(--step-1); margin: var(--space-m) 0 0.75rem; }
.page__body p + p { margin-top: 1rem; }
.page__body a { overflow-wrap: anywhere; }
.page__meta { color: var(--text-muted); font-size: var(--step--1); margin-top: -1.5rem; margin-bottom: var(--space-m); }
.page__back { margin-top: var(--space-l); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
