/* ==========================================================================
   toposoft Relaunch 2026 — zentrales Stylesheet
   Selbst gehostet, keine externen Fonts/CDNs (DSGVO-freundlich).
   ========================================================================== */

:root {
  --brand:        #962228;   /* toposoft-Rot aus dem Logo */
  --brand-dark:   #6e181d;
  --ink:          #16232e;   /* Fließtext */
  --ink-soft:     #47586a;   /* Sekundärtext */
  --water:        #0e2a3a;   /* dunkles Petrol für Hero/Footer */
  --water-2:      #133a50;
  --paper:        #ffffff;
  --paper-soft:   #f4f6f8;
  --line:         #dde4ea;
  --accent-cyan:  #3fb6c9;   /* Datenfluss-Akzent im Schaubild */
  --radius:       14px;
  --shadow:       0 2px 12px rgba(14, 42, 58, .08);
  --maxw:         1180px;
  font-size: 16px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
}

img { max-width: 100%; height: auto; }

a { color: var(--brand); }
a:hover { color: var(--brand-dark); }

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

/* --------------------------------------------------------------- Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; min-height: 68px;
}
.site-header .logo img { height: 40px; width: auto; display: block; }

.main-nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.main-nav a {
  text-decoration: none; color: var(--ink);
  font-weight: 600; font-size: .95rem;
  padding: 8px 12px; border-radius: 8px;
}
.main-nav a:hover { background: var(--paper-soft); color: var(--brand); }
.main-nav a[aria-current="page"] { color: var(--brand); }
.main-nav a.cta {
  background: var(--brand); color: #fff; margin-left: 8px;
}
.main-nav a.cta:hover { background: var(--brand-dark); }

.main-nav a.ext::after { content: " ↗"; font-size: .8em; }

.lang-switch {
  border: 1px solid var(--line); border-radius: 8px;
  padding: 5px 10px !important; font-size: .85rem !important;
  color: var(--ink-soft) !important;
}
.lang-switch:hover { border-color: var(--brand); color: var(--brand) !important; }

.nav-toggle { display: none; }

@media (max-width: 860px) {
  .nav-toggle {
    display: block; background: none; border: 1px solid var(--line);
    border-radius: 8px; padding: 8px 12px; font-size: 1.2rem; cursor: pointer;
    color: var(--ink);
  }
  .main-nav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch;
    background: #fff; border-bottom: 1px solid var(--line);
    padding: 12px 24px 20px;
  }
  .main-nav.open { display: flex; }
  .main-nav a.cta { margin-left: 0; text-align: center; }
}

/* ----------------------------------------------------------------- Hero */
.hero {
  background: linear-gradient(160deg, var(--water) 0%, var(--water-2) 55%, #1a4a63 100%);
  color: #fff;
  padding: 72px 0 64px;
}
.hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.9rem);
  line-height: 1.2; margin: 0 0 20px; max-width: 21ch;
}
.hero h1 em { font-style: normal; color: var(--accent-cyan); }
.hero .lede {
  font-size: clamp(1.02rem, 1.6vw, 1.25rem);
  color: #cfdde6; max-width: 62ch; margin: 0 0 32px;
}
.hero .btn-row { display: flex; gap: 14px; flex-wrap: wrap; }

.kicker {
  display: inline-block; font-size: .82rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent-cyan); margin-bottom: 14px;
}
section .kicker { color: var(--brand); }

.btn {
  display: inline-block; text-decoration: none; font-weight: 700;
  padding: 13px 26px; border-radius: 10px; font-size: 1rem;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); color: #fff; }
.btn-ghost { border: 2px solid rgba(255,255,255,.55); color: #fff; }
.btn-ghost:hover { border-color: #fff; color: #fff; }
.btn-ghost-dark { border: 2px solid var(--brand); color: var(--brand); }
.btn-ghost-dark:hover { background: var(--brand); color: #fff; }

.hero-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 18px; margin-top: 52px;
}
.hero-stats .stat {
  border-left: 3px solid var(--accent-cyan);
  padding: 4px 0 4px 16px;
}
.hero-stats .stat strong { display: block; font-size: 1.35rem; }
.hero-stats .stat span { color: #b9cdd9; font-size: .92rem; }

/* ------------------------------------------------------------- Sections */
section { padding: 72px 0; }
section.alt { background: var(--paper-soft); }

.section-head { max-width: 760px; margin-bottom: 44px; }
.section-head h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin: 0 0 12px; line-height: 1.25; }
.section-head p { color: var(--ink-soft); font-size: 1.05rem; margin: 0; }

/* ----------------------------------------------------------- Card grids */
.grid { display: grid; gap: 22px; }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow);
  display: flex; flex-direction: column;
}
.card h3 { margin: 0 0 8px; font-size: 1.15rem; }
.card .tagline { color: var(--brand); font-weight: 600; font-size: .88rem; margin: 0 0 10px; }
.card p { color: var(--ink-soft); font-size: .96rem; margin: 0 0 10px; }
.card ul { color: var(--ink-soft); font-size: .93rem; margin: 0; padding-left: 18px; }
.card ul li { margin-bottom: 5px; }
.card .more { margin-top: auto; padding-top: 14px; font-weight: 600; font-size: .92rem; text-decoration: none; }

.card .icon {
  width: 46px; height: 46px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: #f6ebec; color: var(--brand); margin-bottom: 16px;
  font-size: 1.3rem;
}

.badge {
  display: inline-block; font-size: .74rem; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase;
  background: #eaf6f8; color: #1d7d8e;
  border-radius: 999px; padding: 3px 10px; margin-bottom: 12px;
  align-self: flex-start;
}
.badge.red { background: #f6ebec; color: var(--brand); }

/* -------------------------------------------------------------- Diagram */
.diagram-box {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px;
  overflow-x: auto;
}
.diagram-box svg { display: block; min-width: 760px; width: 100%; height: auto; }
.diagram-legend { color: var(--ink-soft); font-size: .9rem; margin-top: 14px; }

/* ------------------------------------------------------------ Referenzen */
.logo-band {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 18px; align-items: center;
}
.logo-band .logo-tile {
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 14px; display: flex; align-items: center; justify-content: center;
  min-height: 150px;
}
.logo-band img { max-height: 120px; max-width: 100%; width: auto; filter: grayscale(35%); opacity: .9; }
.logo-band .logo-tile:hover img { filter: none; opacity: 1; }

.ref-list { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.ref-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.ref-card img { max-height: 130px; max-width: 100%; width: auto; margin-bottom: 14px; }
.ref-card h3 { margin: 0 0 4px; font-size: 1.05rem; }
.ref-card .country { color: var(--ink-soft); font-size: .88rem; margin-bottom: 10px; }
.ref-card .products { display: flex; flex-wrap: wrap; gap: 6px; }
.ref-card .products span,
.ref-card .products a {
  font-size: .78rem; background: var(--paper-soft); border: 1px solid var(--line);
  border-radius: 999px; padding: 2px 10px; color: var(--ink-soft);
  text-decoration: none;
}
.ref-card .products a:hover {
  border-color: var(--brand); color: var(--brand); background: #f6ebec;
}

/* ----------------------------------------------------------- Screenshots */
.shots {
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  margin-top: 16px;
}
.shots a {
  display: block; border: 1px solid var(--line); border-radius: 8px;
  overflow: hidden; background: #fff;
}
.shots img {
  display: block; width: 100%; height: 120px;
  object-fit: cover; object-position: top left;
}
.shots a:hover img { opacity: .8; }

/* ---------------------------------------------------------- Code-Panels */
.code-card {
  background: #0e2a3a; border-radius: var(--radius);
  padding: 18px 22px; overflow-x: auto;
  box-shadow: var(--shadow); margin-top: 16px;
}
.code-card .code-title {
  color: #9fd8e2; font-size: .78rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; margin: 0 0 10px;
}
.code-card pre {
  margin: 0; color: #e8f2f6;
  font-family: ui-monospace, "Cascadia Code", Consolas, "Liberation Mono", monospace;
  font-size: .8rem; line-height: 1.55;
}
.code-card .cmt { color: #7fa3b3; }
.code-card .kw  { color: #3fb6c9; font-weight: 700; }
.code-card .str { color: #f3b6ba; }
.code-card .grn { color: #33FF33;  }

/* ---------------------------------------------------------- Downloads */
.dl-list { list-style: none; padding: 0; margin: 0; columns: 2; column-gap: 40px; }
.dl-list li { margin-bottom: 10px; break-inside: avoid; }
.dl-list a { text-decoration: none; font-weight: 600; }
.dl-list .ft { color: var(--ink-soft); font-weight: 400; font-size: .85rem; }
@media (max-width: 700px) { .dl-list { columns: 1; } }

/* ------------------------------------------------------------------ FAQ */
.faq details {
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  margin-bottom: 12px; box-shadow: var(--shadow);
}
.faq summary {
  cursor: pointer; font-weight: 700; padding: 18px 22px;
  list-style: none; position: relative; padding-right: 48px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 22px; top: 50%;
  transform: translateY(-50%); font-size: 1.4rem; color: var(--brand);
}
.faq details[open] summary::after { content: "–"; }
.faq .answer { padding: 0 22px 20px; color: var(--ink-soft); }
.faq .answer p { margin-top: 0; }

/* ----------------------------------------------------------------- Team */
.team-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.team-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 20px; }
.team-card h3 { margin: 0 0 4px; font-size: 1.02rem; }
.team-card p { margin: 0; color: var(--ink-soft); font-size: .92rem; }

/* --------------------------------------------------------------- Kontakt */
.contact-band { background: var(--water); color: #fff; }
.contact-band h2 { color: #fff; }
.contact-band .section-head p { color: #cfdde6; }
.contact-cards { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.contact-cards .ccard {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.15);
  border-radius: 12px; padding: 22px;
}
.contact-cards .ccard strong { display: block; margin-bottom: 6px; }
.contact-cards .ccard a { color: #9fd8e2; text-decoration: none; }
.contact-cards .ccard a:hover { color: #fff; }

/* --------------------------------------------------------------- Footer */
.site-footer { background: #0a1f2c; color: #9fb3c0; padding: 40px 0 32px; font-size: .92rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 18px; justify-content: space-between; align-items: center; }
.site-footer a { color: #cfdde6; text-decoration: none; margin-right: 18px; }
.site-footer a:hover { color: #fff; }

/* --------------------------------------------------------- Utility misc */
.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li { padding-left: 30px; position: relative; margin-bottom: 12px; color: var(--ink-soft); }
.check-list li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  color: var(--brand); font-weight: 800;
}
.two-col { display: grid; gap: 40px; grid-template-columns: 1fr 1fr; align-items: start; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }

.prose { max-width: 74ch; color: var(--ink-soft); }
.prose h3 { color: var(--ink); }
