/* ============================================================
   TANGENT CAPRICORN SOLUTIONS GmbH - Design-System
   Version 1.0 - Juli 2026
   Quelle: Fable 5 - Gesamtprompt (MindNode-Brief)
   ------------------------------------------------------------
   HINWEIS: --accent = Fallback #0071E3 laut Brief.
   Vor Veröffentlichung: dominante Akzentfarbe aus TCS-Logo
   (/images/500x500-400x500.png) extrahieren und hier ersetzen.
   ============================================================ */

:root {
  /* ── Farbpalette "Navy" - Revision 2, Juli 2026 ──────────────────────
     Hintergrund: Deep Navy statt Schwarz → freundlicher, nicht erdrückend.
     Text-Muted:  Deutlich heller → WCAG AA auf allen Surfaces (5.1:1).
     Akzent:      Helleres Blau → lebendiger, bleibt nah am TCS-Logo.
     ──────────────────────────────────────────────────────────────────── */
  --accent: #3D8FFF;            /* FALLBACK - aus TCS-Logo ersetzen (Revision 2) */
  --accent-hover: #5AABFF;
  --bg: #141E32;                /* Deep Navy - klar unterscheidbar von Schwarz */
  --surface: #1B2A42;           /* Surface - sichtbar abgesetzt */
  --surface-2: #213252;         /* Interaktive Flächen & Hover */
  --text: #ECF3FF;              /* Leicht blaustichiges Weiß - harmoniert mit Navy */
  --text-muted: #8CB4D8;        /* Blue-Gray - deutlich lesbarer als zuvor */
  --divider: rgba(140, 180, 216, 0.14);

  /* Navbar-Hintergründe (navy-transparent, nicht hartes Schwarz) */
  --nav-scrolled-bg: rgba(14, 24, 44, 0.88);
  --mobile-drawer-bg: rgba(12, 20, 38, 0.97);

  /* Typografie (Default - Brief-Knoten leer) */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", "Fira Code", Consolas, monospace;

  /* Spacing - 8px-Raster (Default - Brief-Knoten leer) */
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-6: 48px;
  --space-8: 64px;
  --space-12: 96px;
  --space-15: 120px;

  --container: 1200px;
  --radius: 16px;
  --radius-pill: 999px;
  --nav-height: 64px;

  --ease-reveal: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ---------- Reset & Basis ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--text); text-decoration: none; }

main { display: block; }

/* ---------- Typografie-Skala ---------- */
h1 {
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-weight: 700;
}

h2 {
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.015em;
  font-weight: 700;
}

h3 {
  font-size: clamp(20px, 2.5vw, 28px);
  line-height: 1.2;
  font-weight: 600;
}

.lead { font-size: clamp(18px, 2vw, 22px); color: var(--text-muted); }
.muted { color: var(--text-muted); }
.mono { font-family: var(--font-mono); }

/* ---------- Layout ---------- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-3);
}

section { padding: var(--space-15) 0; }

@media (max-width: 768px) {
  section { padding: var(--space-8) 0; }
}

.section-intro { max-width: 640px; margin-bottom: var(--space-8); }
.section-intro p { margin-top: var(--space-2); }

/* ---------- Navigation ---------- */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  z-index: 100;
  display: flex;
  align-items: center;
  background: transparent;
  transition: background 0.3s ease;
}

.navbar.scrolled {
  background: var(--nav-scrolled-bg);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  width: 100%;
}

.nav-logo { display: flex; align-items: center; gap: 12px; }
.nav-logo img { height: 46px; width: auto; }
.nav-brand { display: flex; flex-direction: column; line-height: 1.12; }
.nav-brand .brand-name { font-size: 16px; font-weight: 700; color: var(--text); letter-spacing: -0.01em; }
.nav-brand .brand-sub { font-size: 10px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-muted); }
@media (max-width: 940px) { .nav-brand { display: none; } }

.nav-links {
  display: flex;
  gap: var(--space-3);
  list-style: none;
  margin-left: auto;
  margin-right: var(--space-4);
}

.nav-links a {
  font-size: 13px;
  color: var(--text-muted);
  transition: color 0.2s;
}

.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); }

.nav-cta {
  font-size: 13px;
  font-weight: 600;
  background: var(--accent);
  color: #fff;
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  transition: background 0.2s;
}

.nav-cta:hover { background: var(--accent-hover); }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  color: var(--text);
  font-size: 24px;
  cursor: pointer;
}

/* Mobile-Drawer unter 768px - kein Hamburger auf Desktop */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: fixed;
    top: var(--nav-height);
    left: 0; right: 0;
    transform: none;
    flex-direction: column;
    gap: 0;
    background: var(--mobile-drawer-bg);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    padding: var(--space-2) 0;
  }
  .nav-links.open { display: flex; }
  .nav-links a { display: block; padding: 12px var(--space-3); font-size: 16px; }
  .nav-toggle { display: block; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-weight: 600;
  font-size: 16px;
  padding: 14px 32px;
  border-radius: var(--radius-pill);
  border: 0;
  cursor: pointer;
  transition: background 0.2s; /* kein scale-transform */
}

.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-hover); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--divider);
}
.btn-ghost:hover { background: var(--surface-2); }

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 0;
}

/* Shader-Mesh-Ersatz: Navy-Tinted, langsame Bewegung, nicht ablenkend.
   Leuchtstärke an die Navy-Palette angepasst - weniger dunkel, mehr Tiefe.
   In Framer: Fable 5 Shader-Mesh-Komponente verwenden. */
.hero-mesh {
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(40% 50% at 20% 30%, rgba(61, 143, 255, 0.28), transparent 70%),
    radial-gradient(35% 45% at 80% 20%, rgba(61, 143, 255, 0.14), transparent 70%),
    radial-gradient(50% 60% at 60% 80%, rgba(20, 50, 110, 0.50), transparent 70%),
    var(--bg);
  animation: mesh-drift 24s ease-in-out infinite alternate;
  z-index: 0;
}

@keyframes mesh-drift {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(4%, -3%, 0) scale(1.08); }
}

.hero .container { position: relative; z-index: 1; }
.hero h1 { max-width: 800px; }
.hero .lead { max-width: 640px; margin: var(--space-3) 0 var(--space-6); }

/* ---------- KPI-Leiste ---------- */
.kpi-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
  border-top: 1px solid var(--divider);
  padding-top: var(--space-6);
}

.kpi-value {
  font-family: var(--font-mono);
  font-size: clamp(40px, 5vw, 72px);
  font-weight: 700;
  line-height: 1;
}

.kpi-label { color: var(--text-muted); font-size: 14px; margin-top: var(--space-1); }

@media (max-width: 768px) {
  .kpi-bar { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  padding: var(--space-4);
  transition: transform 0.3s var(--ease-reveal), box-shadow 0.3s var(--ease-reveal);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.30), 0 0 0 1px rgba(61, 143, 255, 0.18);
}

.card h3 { margin-bottom: var(--space-2); }
.card p { color: var(--text-muted); font-size: 15px; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
}

@media (max-width: 768px) {
  /* Mobile: Karten gestapelt (untereinander), damit alle sichtbar sind */
  .card-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    overflow: visible;
  }
  .card-grid .card { min-width: 0; }
}

/* ---------- Branchen-Zeile / Icons ---------- */
.industry-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
  text-align: center;
}

.industry-row .icon { font-size: 32px; margin-bottom: var(--space-1); }
.industry-row .label { color: var(--text-muted); font-size: 14px; }

@media (max-width: 768px) { .industry-row { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Credentials-Leiste (gedämpft) ---------- */
.credentials {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2) var(--space-4);
  color: var(--text-muted);
  font-size: 13px;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

/* ---------- Card-Liste (Branchen) ---------- */
.card-list {
  list-style: none;
  margin-top: var(--space-2);
}

.card-list li {
  padding-left: var(--space-3);
  position: relative;
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 6px;
  line-height: 1.5;
}

.card-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

/* ---------- Branchen-Media (SVG-Illustrationen) ----------
   PLATZHALTER: In Framer durch echte Fotografie ersetzen
   (Automotive: Fahrzeug, Defense: Drohne/UAV, MedTech: Gerät, Electronics: Platine). */
.branch-media {
  border-radius: 12px;
  overflow: hidden;
  background:
    radial-gradient(120% 120% at 30% 10%, rgba(61,143,255,0.16), transparent 60%),
    linear-gradient(135deg, var(--surface-2), var(--surface));
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-3);
  border: 1px solid var(--divider);
}

.branch-media svg { width: 74%; height: auto; color: var(--accent); }

/* Echte Fotos in der Branchen-Media-Box */
.branch-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Service-Visual als echtes Foto (z. B. Cybersecurity-Screen) */
.service-visual.photo { padding: 0; overflow: hidden; border-color: rgba(61,143,255,0.25); }
.service-visual.photo img { width: 100%; height: 340px; object-fit: cover; display: block; }
@media (max-width: 768px) { .service-visual.photo img { height: 240px; } }

/* ---------- Service-Visual: SVG-Illustration ---------- */
.service-visual svg { width: 86%; height: auto; max-height: 220px; color: var(--accent); }

/* Hacker-/Terminal-Screen (Cybersecurity) - dunkler Bildschirm, randlos */
.service-visual.screen {
  background: #0B1220;
  padding: 0;
  overflow: hidden;
  border-color: rgba(61,143,255,0.25);
}
.service-visual.screen svg { width: 100%; max-height: none; }

/* ---------- Akademie-Querverweis (Leistungen) ---------- */
.akademie-link {
  margin-top: var(--space-3);
  font-size: 13px;
  font-family: var(--font-mono);
  color: var(--accent);
  letter-spacing: 0.01em;
}
.akademie-link a {
  color: var(--accent);
  border-bottom: 1px solid rgba(61,143,255,0.4);
}
.akademie-link a:hover { border-bottom-color: var(--accent); }

/* ---------- Aufklappbare Details (Leistungen) ---------- */
.svc-more { margin-top: var(--space-3); }
.svc-more > summary {
  cursor: pointer;
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-mono);
  letter-spacing: 0.01em;
  color: var(--accent);
}
.svc-more > summary::-webkit-details-marker { display: none; }
.svc-more > summary::after { content: "▸"; transition: transform 0.2s; }
.svc-more[open] > summary::after { transform: rotate(90deg); }
.svc-more[open] > summary { margin-bottom: var(--space-2); }
.svc-more ul { margin-top: 0; }

/* ---------- Profil-/Netzwerk-Links (Wer wir sind) ---------- */
.profile-links { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-3); }
.profile-links a, .profile-links .todo {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--divider);
  color: var(--text);
  transition: background 0.2s, border-color 0.2s;
}
.profile-links a:hover { background: var(--surface-2); border-color: var(--accent); color: var(--text); }
.profile-links a svg, .profile-links .todo svg { width: 16px; height: 16px; flex-shrink: 0; }
.profile-links .todo { color: var(--text-muted); border-style: dashed; }

/* ---------- Blog-Artikel ---------- */
.article { max-width: 760px; margin: 0 auto; }
.article .back-link { display: inline-block; color: var(--accent); font-size: 14px; font-weight: 600; margin-bottom: var(--space-4); }
.article h1 { margin-top: var(--space-2); }
.article-meta { color: var(--text-muted); font-family: var(--font-mono); font-size: 14px; margin: var(--space-2) 0 var(--space-6); }
.article p { margin-bottom: var(--space-3); }
.article ul { list-style: none; margin: var(--space-3) 0; }
.article ul li { padding-left: var(--space-3); position: relative; margin-bottom: var(--space-2); color: var(--text-muted); }
.article ul li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.article .case { border-left: 2px solid var(--accent); padding-left: var(--space-3); color: var(--text); }
/* Blog-Index-Karten */
.post-meta { font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent); font-family: var(--font-mono); }

/* ---------- Badge-Grid (Wer wir sind) ---------- */
.badge-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  margin-top: var(--space-3);
}

.badge {
  border: 1px solid var(--divider);
  background: var(--surface-2);
  color: var(--text-muted);
  border-radius: var(--radius-pill);
  padding: 6px 14px;
  font-size: 13px;
}

/* ---------- Personen-Block ---------- */
.person {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: var(--space-6);
  align-items: start;
}

.person img {
  border-radius: var(--radius);
  width: 100%;
  aspect-ratio: 4 / 5;         /* Hochformat statt Quadrat - Kopf bleibt vollständig sichtbar */
  object-fit: cover;
  object-position: top center; /* Anker oben: Kopf/Gesicht wird nicht weggeschnitten */
  background: var(--surface-2);
}

.person .role { color: var(--text-muted); margin-bottom: var(--space-2); }

@media (max-width: 768px) { .person { grid-template-columns: 1fr; } }

/* ---------- Phasen (Vorgehensweise) ---------- */
.phase {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: var(--space-6);
  align-items: start;
  padding: var(--space-8) 0;
  border-top: 1px solid var(--divider);
}

.phase-num {
  font-family: var(--font-mono);
  font-size: clamp(64px, 10vw, 120px);
  font-weight: 700;
  color: var(--text-muted);
  opacity: 0.5;
  line-height: 1;
}

@media (max-width: 768px) { .phase { grid-template-columns: 1fr; gap: var(--space-3); } }

/* ---------- Alternierende Service-Sektionen ---------- */
.service-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
  align-items: center;
  padding: var(--space-8) 0;
  border-top: 1px solid var(--divider);
}

.service-row:nth-child(even) .service-text { order: 2; }

.service-visual {
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  color: var(--text-muted);
  font-size: 14px;
  letter-spacing: 0.05em;
  text-align: center;
  padding: var(--space-3);
}

.service-row ul { list-style: none; margin-top: var(--space-3); }

.service-row ul li {
  padding-left: var(--space-3);
  position: relative;
  color: var(--text-muted);
  margin-bottom: var(--space-1);
}

.service-row ul li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

@media (max-width: 768px) {
  .service-row { grid-template-columns: 1fr; }
  .service-row:nth-child(even) .service-text { order: 0; }
}

/* ---------- Accordion (Akademie) ---------- */
.accordion { border: 1px solid var(--divider); border-radius: var(--radius); overflow: hidden; }

.accordion-item + .accordion-item { border-top: 1px solid var(--divider); }

.accordion-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  background: var(--surface);
  border: 0;
  color: var(--text);
  padding: var(--space-3) var(--space-4);
  font-size: 18px;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  text-align: left;
  transition: background 0.2s;
}

.accordion-trigger:hover { background: var(--surface-2); }

.accordion-trigger .num { font-family: var(--font-mono); color: var(--accent); font-size: 14px; }
.accordion-trigger .chevron { margin-left: auto; color: var(--text-muted); transition: transform 0.3s; }
.accordion-item.open .chevron { transform: rotate(45deg); }

.accordion-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s var(--ease-reveal);
  background: var(--surface);
}

.accordion-panel-inner { padding: 0 var(--space-4) var(--space-3) calc(var(--space-4) + 38px); color: var(--text-muted); }
.accordion-panel-inner p + p { margin-top: var(--space-2); }
.accordion-panel-inner strong { color: var(--text); font-weight: 600; }

/* ---------- Footer-CTA ---------- */
.footer-cta {
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  padding: var(--space-8);
  text-align: center;
}

.footer-cta p { color: var(--text-muted); margin: var(--space-2) 0 var(--space-4); }

/* ---------- Formulare ---------- */
.form-field { margin-bottom: var(--space-3); }

.form-field label { display: block; font-size: 14px; color: var(--text-muted); margin-bottom: var(--space-1); }

.form-field input[type="text"],
.form-field input[type="email"] {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--divider);
  border-radius: 10px;
  color: var(--text);
  padding: 12px 16px;
  font-size: 16px;
  font-family: var(--font-sans);
}

.form-field input:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }

.form-check { display: flex; gap: var(--space-1); align-items: flex-start; font-size: 14px; color: var(--text-muted); margin-bottom: var(--space-3); }
.form-check input { margin-top: 4px; }
.form-check a { text-decoration: underline; }

/* ---------- Rechtsseiten ---------- */
.legal { max-width: 720px; margin: 0 auto; color: var(--text-muted); }
.legal h1 { color: var(--text); font-size: clamp(32px, 4vw, 48px); margin-bottom: var(--space-6); }
.legal h2 { color: var(--text); font-size: 22px; margin: var(--space-6) 0 var(--space-2); padding-top: var(--space-6); border-top: 1px solid var(--divider); }
.legal p { margin-bottom: var(--space-2); }
.legal a { color: var(--text); text-decoration: underline; }

/* ---------- Footer ---------- */
/* DEFAULT-FOOTER: Brief-Knoten "FOOTER (wörtlich)" war leer.
   Aus Impressumsdaten abgeleitet - vor Veröffentlichung prüfen. */
footer.site-footer {
  border-top: 1px solid var(--divider);
  padding: var(--space-8) 0 var(--space-4);
  color: var(--text-muted);
  font-size: 14px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-6);
  margin-bottom: var(--space-6);
}

.footer-grid h4 { color: var(--text); font-size: 14px; margin-bottom: var(--space-2); }
.footer-grid ul { list-style: none; }
.footer-grid li { margin-bottom: var(--space-1); }
.footer-grid a:hover { color: var(--text); }
.footer-grid a { color: var(--text-muted); }

.footer-bottom {
  border-top: 1px solid var(--divider);
  padding-top: var(--space-3);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-2);
}

@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Scroll-Reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s var(--ease-reveal), transform 0.6s var(--ease-reveal);
}

.reveal.visible { opacity: 1; transform: translateY(0); }

/* Sektions-Stagger: gestaffelt, nicht gleichzeitig */
.stagger > .reveal:nth-child(2) { transition-delay: 0.1s; }
.stagger > .reveal:nth-child(3) { transition-delay: 0.2s; }
.stagger > .reveal:nth-child(4) { transition-delay: 0.3s; }
.stagger > .reveal:nth-child(5) { transition-delay: 0.4s; }

/* ---------- prefers-reduced-motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-mesh { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .card, .card:hover { transform: none; transition: none; }
  .accordion-panel { transition: none; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
