/* ============================================================
   VerSiTec.de GmbH — versitec.de
   Design-Tokens & Basis
   ============================================================ */

@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/space-grotesk-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/space-grotesk-latin-700-normal.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/ibm-plex-sans-latin-400-italic.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2");
}

:root {
  /* Farben */
  --ink: #16242c;          /* Text, fast schwarz mit Blaustich */
  --ink-soft: #3e4c56;     /* Sekundärtext = Grau der Logo-Tagline */
  --deep: #15445a;         /* Tiefblau — Primärfläche */
  --deep-2: #0e3245;       /* dunklere Stufe */
  --brand: #2aa6da;        /* Logo-Blau — Balken, Flächen */
  --teal: #1b7fae;         /* dunkleres Logo-Blau für Text/Links (WCAG-Kontrast) */
  --teal-soft: #dcf0f9;    /* helle Logo-Blau-Fläche */
  --amber: #e8a33d;        /* Meilenstein-Bernstein */
  --paper: #f4f7f8;        /* Seitenhintergrund */
  --card: #ffffff;
  --line: #dde5e8;

  /* Typografie */
  --font-display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", "Consolas", monospace;

  --maxw: 1120px;
  --radius: 10px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 96px; }

body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }

a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 2px;
  border-radius: 4px;
}

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

/* Eyebrow im Stil von Projekt-Codes */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 8px;
  background: var(--brand);
  border-radius: 2px;
  display: inline-block;
}

h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); font-weight: 700; margin: 0.5rem 0 1rem; }
h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 0.5rem; }

section { padding: 88px 0; }
.section-intro { max-width: 640px; color: var(--ink-soft); }

/* ============================================================
   Navigation
   ============================================================ */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 84px;
}
.brand { display: flex; align-items: center; flex: none; }
.brand img { height: 56px; width: auto; }
.brand:hover { text-decoration: none; }

nav.main > ul { list-style: none; display: flex; gap: 28px; align-items: center; }
nav.main a {
  color: var(--ink); font-weight: 600; font-size: 0.95rem;
  text-decoration: none;
}
nav.main a:hover { color: var(--teal); }
.nav-cta {
  background: var(--deep); color: #fff !important;
  padding: 9px 18px; border-radius: 999px;
}
.nav-cta:hover { background: var(--deep-2); color: #fff; }

.nav-toggle { display: none; }

/* ============================================================
   Hero mit Gantt-Motiv
   ============================================================ */
.hero {
  background: linear-gradient(160deg, var(--deep) 0%, var(--deep-2) 70%);
  color: #fff;
  padding: 96px 0 80px;
}
.hero .wrap {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 56px;
  align-items: center;
}
.hero h1 {
  font-size: clamp(2.2rem, 4.6vw, 3.3rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0.6rem 0 1.2rem;
}
.hero h1 .milestone { color: var(--amber); }
.hero p.lead { color: #d6e4ea; font-size: 1.1rem; max-width: 34em; }
.hero .eyebrow { color: var(--amber); }
.hero .eyebrow::before { background: var(--amber); }

.hero-actions { margin-top: 2rem; display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-block;
  font-family: var(--font-display); font-weight: 700; font-size: 1rem;
  padding: 13px 26px; border-radius: 999px;
  text-decoration: none;
  transition: transform 0.15s ease, background 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-amber { background: var(--amber); color: var(--deep-2); }
.btn-amber:hover { background: #f0b358; }
.btn-ghost { border: 2px solid rgba(255,255,255,0.45); color: #fff; }
.btn-ghost:hover { border-color: #fff; }

/* animiertes Gantt-SVG */
.gantt-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: var(--radius);
  padding: 22px 22px 16px;
}
.gantt-card .gantt-title {
  font-family: var(--font-mono); font-size: 0.78rem;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: #a9cbdc; margin-bottom: 14px;
}
.gantt-bar { transform-origin: left center; transform: scaleX(0); }
.gantt-ms { opacity: 0; }
@keyframes growbar { to { transform: scaleX(1); } }
@keyframes popms { to { opacity: 1; } }
.gantt-animate .gantt-bar { animation: growbar 0.9s cubic-bezier(.2,.7,.2,1) forwards; }
.gantt-animate .b2 { animation-delay: 0.35s; }
.gantt-animate .b3 { animation-delay: 0.7s; }
.gantt-animate .b4 { animation-delay: 1.05s; }
.gantt-animate .gantt-ms { animation: popms 0.4s ease 1.6s forwards; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .gantt-bar { transform: none; animation: none !important; }
  .gantt-ms { opacity: 1; animation: none !important; }
  .btn:hover { transform: none; }
}

/* ============================================================
   Leistungen
   ============================================================ */
.cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
  margin-top: 2.2rem;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  position: relative;
}
.card.featured { border-top: 5px solid var(--amber); }
.card .tag {
  font-family: var(--font-mono); font-size: 0.72rem;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-soft);
}
.card p { color: var(--ink-soft); margin-top: 0.4rem; }
.card ul { margin: 0.9rem 0 0 1.1rem; color: var(--ink-soft); }
.card li { margin-bottom: 0.3rem; }
.card li::marker { color: var(--amber); }

/* ============================================================
   Vorgehensmodell (Phasen — echte Sequenz)
   ============================================================ */
.phases { background: var(--card); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.phase-track {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin-top: 2.4rem;
  position: relative;
}
.phase {
  padding: 0 22px 0 0;
  position: relative;
}
.phase + .phase { padding-left: 22px; }
.phase .bar {
  height: 10px; border-radius: 4px;
  background: var(--brand);
  margin-bottom: 16px;
  position: relative;
}
.phase:nth-child(2) .bar { background: #4fb7e2; }
.phase:nth-child(3) .bar { background: #79c8ea; }
.phase:nth-child(4) .bar { background: #a3d9f1; }
.phase .bar::after {
  /* Meilenstein-Raute am Phasenende */
  content: "";
  position: absolute; right: -7px; top: -3px;
  width: 14px; height: 14px;
  background: var(--amber);
  transform: rotate(45deg);
  border-radius: 2px;
}
.phase .ph-id {
  font-family: var(--font-mono); font-size: 0.75rem;
  letter-spacing: 0.12em; color: var(--teal);
}
.phase p { color: var(--ink-soft); font-size: 0.97rem; margin-top: 0.3rem; }

/* ============================================================
   Unternehmen / Historie als Meilenstein-Timeline
   ============================================================ */
.history { }
.history-grid {
  display: grid; grid-template-columns: 1fr 1.2fr; gap: 56px;
  align-items: start; margin-top: 1rem;
}
.timeline { list-style: none; position: relative; padding-left: 34px; }
.timeline::before {
  content: "";
  position: absolute; left: 6px; top: 8px; bottom: 8px;
  width: 4px; border-radius: 2px;
  background: linear-gradient(var(--brand), var(--teal-soft));
}
.timeline li { position: relative; padding-bottom: 26px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: "";
  position: absolute; left: -34px; top: 7px;
  width: 16px; height: 16px;
  background: var(--amber);
  transform: rotate(45deg);
  border-radius: 3px;
}
.timeline .year {
  font-family: var(--font-mono); font-weight: 500;
  color: var(--deep); font-size: 0.95rem; letter-spacing: 0.06em;
}
.timeline p { color: var(--ink-soft); font-size: 0.99rem; }

.partnerbox {
  background: var(--teal-soft);
  border-radius: var(--radius);
  padding: 26px 28px;
  margin-top: 28px;
}
.partnerbox h3 { color: var(--deep); }
.partnerbox p { color: var(--ink-soft); font-size: 0.98rem; }

/* ============================================================
   Unterseiten (Impressum / Datenschutz)
   ============================================================ */
.legal { padding: 72px 0; max-width: 760px; }
.legal h1 { font-size: 2.1rem; margin-bottom: 1.4rem; }
.legal h2 { font-size: 1.25rem; margin-top: 2rem; }
.legal p, .legal address { color: var(--ink-soft); margin-top: 0.6rem; font-style: normal; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 920px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .history-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .phase-track { grid-template-columns: 1fr; gap: 18px; }
  .phase, .phase + .phase { padding: 0; }
}

@media (max-width: 760px) {
  section { padding: 60px 0; }
  .topbar .wrap { height: 64px; }
  .brand img { height: 40px; }
  .cards { grid-template-columns: 1fr; }

}

/* ============================================================
   Über uns — Fließtext & Werte (Vertrauen · Sicherheit · Technologie)
   ============================================================ */
.about-text p { color: var(--ink-soft); margin-bottom: 1rem; max-width: 40em; }
.about-text .about-lead { color: var(--ink); font-size: 1.15rem; line-height: 1.6; }
.values-title {
  margin-top: 3.5rem;
  font-family: var(--font-mono); font-weight: 500;
  font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--teal);
}
.values {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 22px; margin-top: 1rem;
}
.values .card { border-top: 4px solid var(--brand); }
.values + .partnerbox { margin-top: 22px; }
@media (max-width: 920px) {
  .values { grid-template-columns: 1fr; }
}

/* ============================================================
   Mehrseiten-Struktur
   ============================================================ */
.skip {
  position: absolute; left: -999px; top: 8px; z-index: 100;
  background: var(--deep); color: #fff; padding: 8px 14px; border-radius: 6px;
}
.skip:focus { left: 12px; }

/* Navigation mit Untermenüs */
nav.main li { position: relative; }
nav.main a.is-active, nav.main a[aria-current="page"] { color: var(--teal); }
nav.main .nav-cta[aria-current="page"] { color: #fff; }
.has-sub > a::after {
  content: ""; display: inline-block; margin-left: 6px;
  width: 6px; height: 6px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: translateY(-3px) rotate(45deg);
}
.sub {
  list-style: none;
  position: absolute; top: 100%; left: -16px;
  min-width: 250px; padding: 10px 0;
  margin-top: 12px;
  background: var(--card);
  border: 1px solid var(--line); border-top: 3px solid var(--brand);
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: 0 14px 30px rgba(22, 36, 44, 0.12);
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .15s ease, transform .15s ease, visibility .15s;
}
.sub::before { content: ""; position: absolute; left: 0; right: 0; top: -16px; height: 16px; }
.has-sub:hover > .sub, .has-sub:focus-within > .sub { opacity: 1; visibility: visible; transform: none; }
.sub a { display: block; padding: 8px 18px; font-weight: 400; }
.sub a:hover { background: var(--teal-soft); text-decoration: none; }

/* Seitenkopf der Unterseiten */
.page-hero {
  background: linear-gradient(160deg, var(--deep) 0%, var(--deep-2) 70%);
  color: #fff; padding: 72px 0 64px;
}
.page-hero h1 { font-size: clamp(2rem, 4vw, 2.9rem); font-weight: 700; margin: 0.6rem 0 1rem; }
.page-hero .lead { color: #d6e4ea; font-size: 1.1rem; max-width: 40em; }
.page-hero .eyebrow { color: var(--amber); }
.page-hero .eyebrow::before { background: var(--amber); }

/* Inhalt + Seitenleiste */
.content-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 300px;
  gap: 56px; align-items: start;
}
.prose { max-width: 44em; }
.prose h2 { font-size: 1.5rem; margin: 2.4rem 0 0.7rem; }
.prose h2:first-child { margin-top: 0; }
.prose p { color: var(--ink-soft); margin-bottom: 1rem; }
.prose ul { margin: 0 0 1rem 1.2rem; color: var(--ink-soft); }
.prose li { margin-bottom: 0.45rem; }
.prose li::marker { color: var(--amber); }
.prose strong { color: var(--ink); }

/* echte Abfolgen: nummerierte Schritte mit Meilenstein-Raute */
.steps { list-style: none; counter-reset: step; margin: 0.5rem 0 1.2rem !important; padding: 0; }
.steps li {
  counter-increment: step; position: relative;
  padding: 0 0 14px 46px; color: var(--ink-soft);
}
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--teal-soft); color: var(--deep);
  font-family: var(--font-mono); font-weight: 500; font-size: 0.9rem;
  display: grid; place-items: center;
}

.side-box {
  position: sticky; top: 110px;
  background: var(--card); border: 1px solid var(--line);
  border-top: 4px solid var(--brand);
  border-radius: var(--radius); padding: 24px;
}
.side-box .tag, .contact-card .tag, .card .tag {
  font-family: var(--font-mono); font-size: 0.72rem;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-soft);
}
.side-box .side-name { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; margin: 0.2rem 0 0.5rem; }
.side-box p { color: var(--ink-soft); font-size: 0.97rem; margin-bottom: 0.8rem; }
.side-box .btn { margin-top: 0.4rem; }

.chip-list { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 1rem; }
.chip-list span {
  background: var(--teal-soft); color: var(--deep);
  border-radius: 999px; padding: 6px 14px; font-size: 0.93rem; font-weight: 600;
}
.chip-soft span { background: var(--card); border: 1px solid var(--line); color: var(--ink-soft); font-weight: 400; }

/* Buttons */
.btn-deep { background: var(--deep); color: #fff; }
.btn-deep:hover { background: var(--deep-2); color: #fff; }

/* Leistungs-Kacheln auf der Startseite */
.service-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 2.2rem; }
.service-grid .span-2 { grid-column: span 2; }
.card-link { display: block; color: var(--ink); transition: transform .15s ease, box-shadow .15s ease; }
.card-link:hover { text-decoration: none; transform: translateY(-3px); box-shadow: 0 12px 28px rgba(22,36,44,.10); }
.card .more, .card-link .more {
  display: inline-block; margin-top: 1rem;
  font-family: var(--font-display); font-weight: 700; color: var(--teal);
}
.card .more::after, .card-link .more::after { content: " →"; }

/* Persönlicher Teaser & Porträt */
.person-teaser { display: grid; grid-template-columns: 220px 1fr; gap: 48px; align-items: center; }
.portrait {
  width: 220px; aspect-ratio: 1; border-radius: 50%;
  background: linear-gradient(145deg, var(--brand), var(--deep));
  display: grid; place-items: center; overflow: hidden;
  box-shadow: 0 0 0 6px var(--card), 0 0 0 8px var(--line);
}
.portrait span { font-family: var(--font-display); font-weight: 700; font-size: 4rem; color: #fff; }
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.person-role { font-family: var(--font-mono); font-size: 0.85rem; color: var(--ink-soft); letter-spacing: 0.04em; }
.person-teaser blockquote, blockquote.pull {
  font-family: var(--font-display); font-weight: 500;
  font-size: 1.3rem; line-height: 1.45; color: var(--deep);
  border-left: 4px solid var(--amber); padding: 4px 0 4px 20px;
  margin: 1.2rem 0 1.6rem;
}
.profile-hero { display: grid; grid-template-columns: 180px 1fr; gap: 40px; align-items: center; }
.portrait-lg { width: 180px; box-shadow: 0 0 0 6px rgba(255,255,255,.12); }
.portrait-lg span { font-size: 3.2rem; }

/* Abschluss-Band */
.cta-band { background: var(--teal-soft); padding: 56px 0; }
.cta-band .wrap { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.cta-band h2 { margin: 0 0 0.3rem; font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
.cta-band p { color: var(--ink-soft); max-width: 36em; }

/* Kontaktseite */
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.contact-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.contact-card p { margin-top: 0.5rem; font-size: 1.08rem; }
.contact-card a { font-weight: 600; }
.contact-card .small { font-size: 0.92rem; }
.contact-hint { margin-top: 48px; max-width: 44em; }
.contact-hint h2 { font-size: 1.4rem; }
.contact-hint p { color: var(--ink-soft); }

/* Footer */
.site-footer { background: var(--deep-2); color: #a9cbdc; padding: 56px 0 0; font-size: 0.95rem; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 32px; }
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 0.4rem; }
.site-footer p { margin-bottom: 0.8rem; }
.site-footer a { color: #e6f0f4; }
.footer-brand { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; color: #fff; }
.footer-brand span { color: var(--brand); }
.footer-head { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--amber); }
.footer-note { font-size: 0.85rem; margin-top: 1rem; }
.footer-bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  border-top: 1px solid rgba(255,255,255,.12);
  margin-top: 36px; padding: 18px 24px 22px; font-size: 0.85rem;
}

.legal-wrap { padding: 0; }

/* ------------------------------------------------------------
   Responsive (Mehrseiten)
   ------------------------------------------------------------ */
@media (max-width: 980px) {
  .content-layout { grid-template-columns: 1fr; gap: 36px; }
  .side-box { position: static; }
  .service-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .service-grid { grid-template-columns: 1fr; }
  .service-grid .span-2 { grid-column: auto; }
  .contact-grid { grid-template-columns: 1fr; }
  .person-teaser, .profile-hero { grid-template-columns: 1fr; gap: 24px; }
  .portrait { width: 160px; }
  .portrait-lg { width: 130px; }
  .footer-grid { grid-template-columns: 1fr; }

  .nav-toggle {
    display: block; background: none; border: 0; cursor: pointer;
    font-family: var(--font-display); font-weight: 700; font-size: 1rem;
    color: var(--ink); padding: 8px 4px;
  }
  nav.main {
    display: none; position: absolute; left: 0; right: 0; top: 64px;
    background: var(--card); border-bottom: 1px solid var(--line);
    padding: 16px 24px 22px; max-height: calc(100vh - 64px); overflow-y: auto;
  }
  nav.main.open { display: block; }
  nav.main > ul { flex-direction: column; align-items: stretch; gap: 6px; }
  .has-sub > a::after { display: none; }
  .sub {
    position: static; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: 0; border-left: 3px solid var(--teal-soft);
    border-radius: 0; margin: 6px 0 10px; padding: 0 0 0 4px; min-width: 0;
  }
  .sub::before { display: none; }
  .nav-cta { display: inline-block; margin-top: 8px; }
}
.side-box .side-link { margin-top: 1rem; font-size: 0.95rem; }
.service-grid .span-3 { grid-column: 1 / -1; }
