/* ==========================================================================
   eXtide Engineering & Consulting GmbH — Design-System
   Konzept: Präzisions-Ästhetik, Leiterbahn-Motiv, Marken-Blau aus dem Logo
   ========================================================================== */

:root {
  /* Farben — abgeleitet aus dem Logo (Wellenbögen) */
  --paper: #f7f9fc;
  --surface: #ffffff;
  --ink: #1a2540;
  --text: #3d4a63;
  --muted: #6b7689;
  --line: #dfe5ef;
  --navy: #1c3a63;
  --blue-600: #3068b0;
  --blue-500: #4878b8;
  --blue-300: #8ba3d4;
  --blue-100: #dfe8f6;
  --blue-050: #eef3fa;
  --trace: #c9d6ec;

  /* Typografie */
  --font-sans: 'IBM Plex Sans', -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* Layout */
  --content: 1100px;
  --radius: 12px;
  --radius-sm: 8px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; height: auto; }

a { color: var(--blue-600); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 2px solid var(--blue-600);
  outline-offset: 2px;
  border-radius: 2px;
}

h1, h2, h3 { color: var(--ink); line-height: 1.2; text-wrap: balance; font-weight: 600; }
h1 { font-size: clamp(1.9rem, 4.5vw, 3rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.45rem, 3vw, 2rem); letter-spacing: -0.015em; }
h3 { font-size: 1.15rem; }

.wrap {
  width: min(var(--content), 100% - 2.5rem);
  margin-inline: auto;
}

/* --- Eyebrow: Mono-Label über Überschriften ------------------------------ */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue-600);
  display: block;
  margin-bottom: 0.75rem;
}

/* --- Header --------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 64px;
}
.brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand img { height: 38px; width: auto; display: block; }
.brand-sub {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  display: none;
}
@media (min-width: 480px) { .brand-sub { display: block; } }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--ink);
}
.nav-toggle svg { width: 20px; height: 20px; }

.site-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0; right: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 12px 24px -12px rgba(26, 37, 64, 0.15);
}
.site-nav.open { display: block; }
.site-nav ul {
  list-style: none;
  padding: 0.5rem 1.25rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.site-nav a {
  display: block;
  padding: 0.6rem 0.5rem;
  color: var(--ink);
  font-weight: 500;
  border-radius: var(--radius-sm);
}
.site-nav a:hover { background: var(--blue-050); text-decoration: none; }
.site-nav a[aria-current="page"] { color: var(--blue-600); }
.site-nav .nav-cta a {
  background: var(--blue-600);
  color: #fff;
  text-align: center;
  margin-top: 0.5rem;
}
.site-nav .nav-cta a:hover { background: var(--navy); }

@media (min-width: 800px) {
  .nav-toggle { display: none; }
  .site-nav {
    display: block;
    position: static;
    background: none;
    border: none;
    box-shadow: none;
  }
  .site-nav ul {
    flex-direction: row;
    align-items: center;
    gap: 0.35rem;
    padding: 0;
  }
  .site-nav a { padding: 0.45rem 0.8rem; font-size: 0.95rem; }
  .site-nav .nav-cta a { margin: 0 0 0 0.5rem; padding: 0.45rem 1.1rem; border-radius: 999px; }
}

/* --- Buttons --------------------------------------------------------------- */
.btn {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 500;
  padding: 0.7rem 1.5rem;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--blue-600); color: #fff; }
.btn-primary:hover { background: var(--navy); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--blue-500); color: var(--blue-600); }

/* --- Hero ------------------------------------------------------------------ */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #ffffff 0%, var(--paper) 100%);
  border-bottom: 1px solid var(--line);
}
.hero-art {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: flex;
  justify-content: flex-end;
}
.hero-art svg, .hero-art img { height: 100%; width: auto; opacity: 0.85; }
@media (max-width: 860px) {
  .hero-art svg, .hero-art img { opacity: 0.35; }
}
.hero .wrap {
  position: relative;
  padding: clamp(3.5rem, 9vw, 6.5rem) 0 clamp(3rem, 8vw, 5.5rem);
  max-width: 720px;
  margin-left: max(calc((100% - var(--content)) / 2), 1.25rem);
  margin-right: 1.25rem;
}
@media (max-width: 1160px) {
  .hero .wrap { margin-left: 1.25rem; }
}
.hero p.lede {
  margin-top: 1.25rem;
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  max-width: 34em;
}
.hero-actions { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* --- Sektionen ------------------------------------------------------------- */
.section { padding: clamp(3rem, 7vw, 5rem) 0; }
.section-head { max-width: 620px; margin-bottom: 2.25rem; }
.section-head p { margin-top: 0.75rem; }
.section-alt { background: var(--surface); border-block: 1px solid var(--line); }

/* --- Karten (Leistungsfelder) ---------------------------------------------- */
.card-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}
@media (min-width: 680px) { .card-grid { grid-template-columns: repeat(3, 1fr); } }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.card:hover {
  border-color: var(--blue-300);
  box-shadow: 0 12px 32px -18px rgba(48, 104, 176, 0.35);
}
.card .icon {
  width: 48px; height: 48px;
  color: var(--blue-600);
}
.card p { font-size: 0.95rem; flex-grow: 1; }
.card .more {
  font-weight: 500;
  font-size: 0.95rem;
}
.card .more::after { content: " →"; }

/* --- Prozess (nummerierte Schritte — echte Sequenz) ------------------------ */
.steps {
  list-style: none;
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
  counter-reset: step;
}
@media (min-width: 680px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.steps li {
  counter-increment: step;
  position: relative;
  padding-top: 2.4rem;
}
.steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  top: 0; left: 0;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--blue-600);
  background: var(--blue-050);
  border: 1px solid var(--blue-100);
  border-radius: 6px;
  padding: 0.15rem 0.5rem;
}
.steps h3 { font-size: 1.02rem; margin-bottom: 0.35rem; }
.steps p { font-size: 0.92rem; }

/* --- Zweispalter (Text + Illustration) ------------------------------------- */
.split {
  display: grid;
  gap: 2.5rem;
  align-items: center;
  grid-template-columns: 1fr;
}
@media (min-width: 860px) {
  .split { grid-template-columns: 1.1fr 0.9fr; gap: 4rem; }
  .split.flip > .split-art { order: -1; }
}
.split-art { display: flex; justify-content: center; }
.split-art svg { width: 100%; max-width: 460px; }
.split h2 { margin-bottom: 0.75rem; }
.split p + p { margin-top: 0.85rem; }
.split ul { margin: 1rem 0 0 1.1rem; display: grid; gap: 0.4rem; }
.split ul li::marker { color: var(--blue-500); }

/* --- Feature-Liste (Was Sie erhalten) --------------------------------------- */
.deliverables {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}
@media (min-width: 680px) { .deliverables { grid-template-columns: repeat(3, 1fr); } }
.deliverables > div {
  border-left: 3px solid var(--blue-300);
  padding-left: 1.1rem;
}
.deliverables h3 { font-size: 1rem; margin-bottom: 0.3rem; }
.deliverables p { font-size: 0.92rem; }

/* --- CTA-Band --------------------------------------------------------------- */
.cta-band {
  background: var(--navy);
  color: #c9d6ec;
  position: relative;
  overflow: hidden;
}
.cta-band .wrap {
  position: relative;
  padding: clamp(3rem, 6vw, 4.5rem) 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.cta-band h2 { color: #fff; max-width: 16em; }
.cta-band p { max-width: 36em; margin-top: 0.5rem; }
.cta-band .btn-primary { background: #fff; color: var(--navy); }
.cta-band .btn-primary:hover { background: var(--blue-100); }
.cta-band .band-art {
  position: absolute;
  right: -40px; bottom: -60px;
  opacity: 0.12;
  pointer-events: none;
}

/* --- Prosa-Seiten (Impressum, Datenschutz, Unterseiten) --------------------- */
.prose { max-width: 720px; }
/* Als .wrap eingesetzt: links am Seitenraster ausrichten statt zu zentrieren */
.wrap.prose { margin-left: max(calc((100% - var(--content)) / 2), 1.25rem); }
.prose h2 { margin: 2.25rem 0 0.6rem; font-size: 1.35rem; }
.prose h3 { margin: 1.5rem 0 0.4rem; }
.prose p { margin-bottom: 0.9rem; }
.prose ul, .prose ol { margin: 0 0 0.9rem 1.25rem; }
.prose li { margin-bottom: 0.3rem; }
.prose li::marker { color: var(--blue-500); }
.prose table { border-collapse: collapse; width: 100%; margin-bottom: 1rem; }
.prose th, .prose td { text-align: left; padding: 0.5rem 0.75rem; border: 1px solid var(--line); font-size: 0.95rem; }
.prose th { background: var(--blue-050); color: var(--ink); }

.page-head {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.page-head .wrap { padding: clamp(2.5rem, 6vw, 4rem) 0; }
.page-head p.lede { margin-top: 0.9rem; max-width: 40em; font-size: 1.1rem; }

/* --- Formular ---------------------------------------------------------------- */
.form-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  max-width: 640px;
}
.field { margin-bottom: 1.25rem; }
.field label {
  display: block;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 0.35rem;
  font-size: 0.95rem;
}
.field .hint { font-size: 0.82rem; color: var(--muted); margin-top: 0.3rem; }
.field input[type="text"],
.field input[type="email"],
.field textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
  transition: border-color 0.15s ease;
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--blue-500);
  background: #fff;
  box-shadow: 0 0 0 3px var(--blue-050);
}
.field textarea { min-height: 160px; resize: vertical; }
.field-consent { display: flex; gap: 0.6rem; align-items: flex-start; font-size: 0.9rem; }
.field-consent input { margin-top: 0.3rem; width: 16px; height: 16px; accent-color: var(--blue-600); }
.form-note { font-size: 0.82rem; color: var(--muted); margin-top: 1rem; }
.hp-field { position: absolute; left: -9999px; top: -9999px; }

.alert {
  border-radius: var(--radius-sm);
  padding: 0.9rem 1.1rem;
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
}
.alert-ok { background: #e8f5ec; border: 1px solid #b5dfc2; color: #1d5c34; }
.alert-error { background: #fbeeee; border: 1px solid #ecc8c8; color: #8c2f2f; }

/* --- Footer ------------------------------------------------------------------- */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding: 2.5rem 0 2rem;
  font-size: 0.9rem;
  color: var(--muted);
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 3rem;
  justify-content: space-between;
  align-items: flex-start;
}
.footer-brand img { height: 30px; width: auto; }
.footer-brand p { margin-top: 0.6rem; max-width: 26em; }
.footer-nav { display: flex; gap: 2.5rem; flex-wrap: wrap; }
.footer-nav h3 {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.6rem;
}
.footer-nav ul { list-style: none; display: grid; gap: 0.35rem; }
.footer-nav a { color: var(--text); }
.footer-nav a:hover { color: var(--blue-600); }
.footer-legal {
  width: 100%;
  border-top: 1px solid var(--line);
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  justify-content: space-between;
  font-size: 0.82rem;
}

/* --- Scroll-Reveal (dezent, respektiert reduced motion) ---------------------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.5s ease, transform 0.5s ease; }
  .reveal.in { opacity: 1; transform: none; }
}
