/* ==========================================================================
   Boday-IT — Seitenlayout
   Aufbau angelehnt an fullstackspectrum.com, Farben in Blau.
   Zwei Farbschemata: "blue" (Standard) und "dark", umschaltbar im Header.
   ========================================================================== */

:root,
[data-theme="blue"] {
  --bg: #0b1a30;
  --bg-elev: #0f2340;
  --bg-card: #12294b;
  --line: #1e3a62;
  --line-strong: #2b4e80;
  --text: #eef4fc;
  --text-dim: #a9bad3;
  --text-faint: #7188aa;
  --header-bg: rgba(11, 26, 48, 0.75);
  --dots: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] {
  --bg: #0a0d12;
  --bg-elev: #10151d;
  --bg-card: #121821;
  --line: #222b38;
  --line-strong: #2f3a4b;
  --text: #eef1f6;
  --text-dim: #9aa4b2;
  --text-faint: #6b7686;
  --header-bg: rgba(10, 13, 18, 0.72);
  --dots: rgba(255, 255, 255, 0.07);
}

:root {
  /* Boday-Blau und Abstufungen davon */
  --accent: #1c92cc;
  --accent-hi: #2ea8e6;
  --accent-soft: #8fd3f5;
  --spec-1: #0b5f8a;
  --spec-2: #1c92cc;
  --spec-3: #3db1ea;
  --spec-4: #7fcdf3;
  --spec-5: #c4e8fa;

  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --radius: 10px;
  --max: 1160px;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg);
  background-image: radial-gradient(circle at 1px 1px, var(--dots) 1px, transparent 0);
  background-size: 28px 28px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color .25s, color .25s;
}

main { flex: 1; }

a { color: var(--accent-soft); text-decoration: none; }
a:hover { color: var(--text); }
img, svg { max-width: 100%; height: auto; }
code, pre, kbd { font-family: var(--font-mono); }

::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent-hi); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

.skip-link {
  position: absolute; left: 8px; top: -48px; z-index: 100;
  background: var(--accent); color: #fff; padding: 8px 12px; border-radius: 6px;
  font-family: var(--font-mono); font-size: 13px;
}
.skip-link:focus { top: 8px; color: #fff; }

/* Spektrum-Balken (in Blautönen) ----------------------------------------- */
.spectrum { display: flex; gap: 6px; }
.spectrum span { width: 28px; height: 8px; border-radius: 1px; }
.spectrum span:nth-child(1) { background: var(--spec-1); }
.spectrum span:nth-child(2) { background: var(--spec-2); }
.spectrum span:nth-child(3) { background: var(--spec-3); }
.spectrum span:nth-child(4) { background: var(--spec-4); }
.spectrum span:nth-child(5) { background: var(--spec-5); }

/* Header ----------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, background .25s;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.site-header .wrap { position: relative; display: flex; align-items: center; justify-content: space-between; height: 64px; }

.brand { display: flex; align-items: center; gap: 12px; color: var(--text); font-weight: 700; letter-spacing: 0.04em; }
.brand:hover { color: var(--text); }
.brand-mark {
  width: 28px; height: 28px; border: 2px solid var(--text); border-radius: 6px;
  display: grid; place-items: center;
}
.brand-mark::after { content: ""; width: 10px; height: 10px; background: var(--accent); border-radius: 2px; transition: background .2s; }
.brand:hover .brand-mark::after { background: var(--spec-4); }
.brand-it { color: var(--accent-hi); margin-left: 6px; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  font-family: var(--font-mono); font-size: 14px; color: var(--text-dim);
  padding: 8px 12px; border-radius: 6px; text-transform: lowercase;
}
.nav a:hover, .nav a[aria-current="page"], .nav a.ancestor { color: var(--text); background: var(--bg-card); }

.lang-switch {
  display: inline-flex; margin-left: 8px; border: 1px solid var(--line-strong); border-radius: 6px; overflow: hidden;
}
.nav .lang-switch a { border-radius: 0; padding: 6px 10px; font-size: 13px; }
.nav .lang-switch a[aria-current="true"] { background: var(--accent); color: #fff; }

.theme-toggle {
  display: inline-flex; align-items: center; gap: 8px; margin-left: 8px; cursor: pointer;
  font-family: var(--font-mono); font-size: 13px; color: var(--text);
  background: transparent; border: 1px solid var(--line-strong); border-radius: 6px; padding: 6px 10px;
}
.theme-toggle:hover { border-color: var(--text-dim); }
.theme-dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: linear-gradient(90deg, var(--accent) 50%, #0a0d12 50%);
  box-shadow: 0 0 0 1px var(--text-dim);
}
[data-theme="dark"] .theme-dot { background: linear-gradient(90deg, #0a0d12 50%, var(--accent) 50%); }

.nav-toggle { display: none; }

@media (max-width: 820px) {
  .nav-toggle {
    display: grid; place-items: center; width: 40px; height: 40px;
    background: none; border: 1px solid var(--line-strong); border-radius: 8px; color: var(--text); cursor: pointer;
  }
  .nav {
    position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 16px;
    display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px; }
  .lang-switch, .theme-toggle { margin: 8px 0 0; justify-content: center; }
  .lang-switch a { flex: 1; text-align: center; }
}

/* Hero ------------------------------------------------------------------- */
.hero { padding: clamp(48px, 8vw, 96px) 0 clamp(24px, 4vw, 48px); position: relative; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1fr; gap: 40px; align-items: center; position: relative; z-index: 1; }

/* Weltkarte aus dem alten Auftritt: dezent rechts unten im Kopfbereich */
.hero::before {
  content: ""; position: absolute; pointer-events: none;
  bottom: 0; right: max(var(--gutter), calc((100vw - var(--max)) / 2));
  width: min(520px, 48vw); aspect-ratio: 537 / 285;
  transform: translateY(12%);
  background: url(../img/world.png) center / contain no-repeat;
  opacity: .45;
}
[data-theme="dark"] .hero::before { opacity: .3; }
.hero--home::before { width: min(600px, 52vw); opacity: .28; }
[data-theme="dark"] .hero--home::before { opacity: .2; }
.hero--home .terminal { backdrop-filter: blur(2px); background: color-mix(in srgb, var(--bg-elev) 88%, transparent); }
@media (max-width: 900px) {
  .hero::before { width: 70vw; right: -10vw; opacity: .18; }
  [data-theme="dark"] .hero::before { opacity: .12; }
}
.hero--home { padding-bottom: clamp(96px, 14vw, 180px); }
.hero--home .wrap { grid-template-columns: 1.1fr 0.9fr; }

.hero h1 {
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1; letter-spacing: -0.035em; font-weight: 700;
  margin: 24px 0 18px;
}
.hero--home h1 { font-size: clamp(48px, 8vw, 104px); line-height: 0.95; letter-spacing: -0.04em; }

.hero-lede {
  font-family: var(--font-mono); font-size: clamp(14px, 1.6vw, 16px);
  color: var(--text-dim); max-width: 60ch; margin: 0;
}
.cursor {
  display: inline-block; width: 9px; height: 1.1em; background: var(--accent-hi);
  vertical-align: text-bottom; margin-left: 2px; animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

@media (max-width: 900px) {
  .hero--home .wrap { grid-template-columns: 1fr; }
}

/* Terminal --------------------------------------------------------------- */
.terminal {
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  font-family: var(--font-mono); font-size: 13.5px;
}
.terminal-bar { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.terminal-bar i { width: 11px; height: 11px; border-radius: 50%; background: var(--line-strong); }
.terminal-bar i:nth-child(1) { background: var(--spec-1); }
.terminal-bar i:nth-child(2) { background: var(--spec-3); }
.terminal-bar i:nth-child(3) { background: var(--spec-5); }
.terminal-bar span { margin-left: auto; color: var(--text-faint); font-size: 12px; }
.terminal pre { margin: 0; padding: 18px; white-space: pre-wrap; color: var(--text-dim); line-height: 1.75; }
.terminal .c-p { color: var(--accent-hi); }
.terminal .c-k { color: var(--accent-soft); }
.terminal .c-v { color: var(--text); }
.terminal .c-y { color: var(--spec-4); }

/* Ticker ----------------------------------------------------------------- */
.ticker {
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: var(--bg-elev); overflow: hidden; white-space: nowrap;
  font-family: var(--font-mono); font-size: 13px; color: var(--text-faint);
}
.ticker-track { display: inline-flex; gap: 48px; padding: 14px 0; animation: marquee 40s linear infinite; }
.ticker-track span::before { content: "▪"; color: var(--accent-hi); margin-right: 12px; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Abschnitte ------------------------------------------------------------- */
.section { padding: clamp(32px, 6vw, 72px) 0 clamp(64px, 10vw, 112px); }
.tpl-home .section { padding-top: clamp(56px, 8vw, 96px); }
.feature:empty { display: none; }

/* Buttons ---------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 14px; font-weight: 500;
  padding: 12px 18px; border-radius: 8px; border: 1px solid var(--line-strong);
  color: var(--text); background: var(--bg-card);
  transition: transform .15s, border-color .15s, background .15s;
}
.btn:hover { color: var(--text); border-color: var(--text-dim); transform: translateY(-1px); }
.btn--primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-hi); border-color: var(--accent-hi); color: #fff; }
.btn .arrow { transition: transform .15s; }
.btn:hover .arrow { transform: translateX(3px); }

/* CMS-Inhalte (Text-Plugins) -------------------------------------------- */
.cms-content { font-size: 17px; line-height: 1.75; color: var(--text-dim); }
.cms-content > p, .cms-content > ul, .cms-content > ol, .cms-content > h2, .cms-content > h3 { max-width: 78ch; }
.cms-content strong { color: var(--text); font-weight: 600; }
.cms-content h2 { color: var(--text); font-size: clamp(28px, 4vw, 40px); letter-spacing: -0.03em; line-height: 1.1; margin: 56px 0 16px; }
.cms-content h3 { color: var(--text); font-size: 24px; letter-spacing: -0.02em; line-height: 1.2; margin: 48px 0 12px; }
.cms-content h3::before {
  content: "// "; font-family: var(--font-mono); font-size: 14px; color: var(--accent-hi);
  display: block; margin-bottom: 6px; letter-spacing: .04em;
}
.cms-content h3:first-child { margin-top: 0; }
.cms-content p { margin: 0 0 16px; }
.cms-content ul { padding-left: 0; list-style: none; margin: 0 0 20px; }
.cms-content ul li { position: relative; padding-left: 22px; margin: 6px 0; }
.cms-content ul li::before { content: "▪"; position: absolute; left: 0; color: var(--accent-hi); }
.cms-content ol { padding-left: 22px; }
.cms-content a { color: var(--accent-soft); border-bottom: 1px solid color-mix(in srgb, var(--accent-soft) 40%, transparent); }
.cms-content a:hover { color: var(--text); border-bottom-color: var(--accent-soft); }
.cms-content a.btn { border-bottom: 1px solid var(--accent); }
.cms-content img { border-radius: 8px; }
.cms-content hr { border: 0; height: 1px; background: var(--line); margin: 48px 0; }
.cms-content blockquote { margin: 24px 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--accent); color: var(--text-dim); }
.cms-content :not(pre) > code { font-size: .88em; background: var(--bg-card); border: 1px solid var(--line); padding: 2px 6px; border-radius: 4px; color: var(--text); }
.cms-content pre { background: var(--bg-elev); border: 1px solid var(--line); border-radius: 8px; padding: 18px; overflow-x: auto; font-size: 14px; color: var(--text); }
.cms-content table { width: 100%; border-collapse: collapse; margin: 0 0 24px; }
.cms-content th, .cms-content td { border-bottom: 1px solid var(--line); padding: 10px 12px; text-align: left; }
.cms-content th { color: var(--text); font-family: var(--font-mono); font-size: 13px; }

/* Lead-Text */
.leadText { margin: 0 0 48px; max-width: 64ch; }
.leadText p:first-child strong { display: block; font-size: clamp(28px, 4vw, 42px); line-height: 1.1; letter-spacing: -0.03em; font-weight: 700; color: var(--text); }
.leadText p:first-child { margin-bottom: 20px; }
.leadText p { font-size: 19px; }

/* Kacheln: ehemals blaue Boxen, jetzt Karten im Spectrum-Stil */
.blue-box {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 16px; margin: 0 0 48px;
}
.blue-box-child {
  position: relative; display: flex; flex-direction: column;
  background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; overflow: hidden; line-height: 1.6;
  transition: border-color .2s, transform .2s;
}
.blue-box-child::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--accent);
  transform: scaleX(0); transform-origin: left; transition: transform .35s ease;
}
.blue-box-child::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 0%), color-mix(in srgb, var(--accent) 14%, transparent), transparent 60%);
}
.blue-box-child:hover { border-color: var(--line-strong); transform: translateY(-3px); }
.blue-box-child:hover::before { transform: scaleX(1); }
.blue-box-child:hover::after { opacity: 1; }
.blue-box-child p { margin: 0 0 8px; font-size: 15px; }
.blue-box-child p:first-child strong { display: block; font-size: 22px; letter-spacing: -0.02em; line-height: 1.15; margin-bottom: 4px; }
.blue-box-child ul { margin: 4px 0 0; }
.blue-box-child li { font-size: 15px; margin: 4px 0; }

/* Kontakt */
.page--contact {
  display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  position: relative; overflow: hidden;
  border: 1px solid var(--line); border-radius: 16px; background: var(--bg-elev);
  padding: clamp(24px, 5vw, 48px); margin: 0 0 24px;
  font-family: var(--font-mono); font-size: 15px;
}
.page--contact::before {
  content: ""; position: absolute; right: -120px; top: -120px; width: 320px; height: 320px; border-radius: 50%;
  border: 1px dashed color-mix(in srgb, var(--accent) 45%, transparent); pointer-events: none;
}
.page--contact .contact-child { margin: 0; position: relative; }
.page--contact .contact-child:nth-of-type(2) { text-align: right; }
.page--contact a { color: var(--text); border-bottom: 0; }
.page--contact a:hover { color: var(--accent-soft); }
@media (max-width: 560px) {
  .page--contact .contact-child:nth-of-type(2) { text-align: left; }
}

/* Sidebar-Vorlagen ------------------------------------------------------- */
.with-sidebar { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 48px; align-items: start; }
.with-sidebar--left { grid-template-columns: 260px minmax(0, 1fr); }
.with-sidebar--left .sidebar { order: -1; }
.sidenav { display: flex; flex-direction: column; gap: 2px; margin-bottom: 24px; border-left: 1px solid var(--line); }
.sidenav a { font-family: var(--font-mono); font-size: 14px; color: var(--text-dim); padding: 6px 14px; }
.sidenav a:hover, .sidenav a[aria-current="page"] { color: var(--text); border-left: 2px solid var(--accent); margin-left: -1px; }
@media (max-width: 860px) {
  .with-sidebar, .with-sidebar--left { grid-template-columns: 1fr; }
  .with-sidebar--left .sidebar { order: 0; }
}

/* Meldungen -------------------------------------------------------------- */
.alert {
  border: 1px solid var(--line-strong); border-left: 3px solid var(--accent); border-radius: 8px;
  background: var(--bg-card); padding: 12px 16px; margin: 16px 0; font-family: var(--font-mono); font-size: 14px;
}
.alert p { margin: 0; }
.alert-error, .alert-danger { border-left-color: #ff4d5e; }
.alert-warning { border-left-color: #f5c84c; }

/* Footer ----------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--line); padding: 32px 0 48px; }
.site-footer .wrap { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer-brand { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.footer-logo { display: block; height: 40px; width: auto; opacity: .55; transition: opacity .2s; }
.footer-logo:hover { opacity: .9; }
.site-footer p { margin: 0; font-family: var(--font-mono); font-size: 13px; color: var(--text-faint); }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; font-family: var(--font-mono); font-size: 13px; }
.footer-links a { color: var(--text-dim); }
.footer-links a:hover { color: var(--text); }
.footer-extra { margin-top: 16px; color: var(--text-faint); font-size: 14px; }
.footer-extra:empty { display: none; }

/* Weniger Bewegung, wenn gewünscht --------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* CMS-Toolbar im Bearbeitungsmodus: Header darunter andocken */
html.cms-toolbar-expanded .site-header { top: 46px; }

/* Abbildungen in CMS-Inhalten (z. B. Architektur-Grafik) */
.cms-content figure { margin: 24px 0 40px; max-width: none; }
.cms-content figure img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 16px; }
.cms-content figcaption { margin-top: 10px; font-family: var(--font-mono); font-size: 13px; color: var(--text-faint); }
