/* Datenstrom Website — global site styles, layered above tokens.css */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  font-weight: 400;
  background: var(--ds-2);
  color: #fff;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

/* ==================================================================
   Light theme — Variante D: weiße Basis, blaue Hero-Sektionen
   Grün + Blau bleiben als Akzente. Nur der Grundton wird hell.
   ================================================================== */
html[data-theme="light"] {
  --ds-1: #FFFFFF;          /* cards / surfaces */
  --ds-2: #E8EFF7;          /* soft section band */
  --ds-3: #F2F6FB;          /* subtle blue band */
  --on-accent: #233149;     /* dark text on green — stays dark */
  --ink: #1F2A44;           /* body / heading text */
}
/* higher specificity than html[data-signal] so the readable green wins */
html[data-theme="light"][data-signal] { --signal-active: #90ff4b; --signal-glow: rgba(144,255,75,.35); --hairline: rgba(31,42,68,.12); --hairline-soft: rgba(31,42,68,.09); --chip-bg: rgba(31,42,68,.07); }
html[data-theme="light"] body { background: #FFFFFF; color: var(--ink); }

/* section bands flip their hardcoded white text to ink */
html[data-theme="light"] .bg-ds1,
html[data-theme="light"] .bg-ds2,
html[data-theme="light"] .bg-ds3 { color: var(--ink); }

/* nav */
html[data-theme="light"] .nav-bar {
  background: rgba(255,255,255,0.88);
  color: var(--ink);
  border-bottom: 1px solid rgba(31,42,68,0.08);
}
html[data-theme="light"] .nav-bar a { color: var(--ink); }

/* cards → white, soft shadow + hairline so they read on white */
html[data-theme="light"] .card {
  background: #FFFFFF;
  color: var(--ink);
  box-shadow: 0 12px 32px -14px rgba(31,42,68,.20);
  border: 1px solid rgba(31,42,68,.07);
}

/* ghost buttons: dark on light (hero keeps white — see .hero-band) */
html[data-theme="light"] .btn--ghost { color: var(--ink); border-color: var(--ink); }
html[data-theme="light"] .btn--ghost:hover { background: rgba(31,42,68,.05); }

/* white pill would vanish on light → make it brand blue */
html[data-theme="light"] .pill--white { background: #243149; color: #fff; }
/* Outline-Pille: gr\u00fcn auf wei\u00df ist unlesbar \u2014 auf hellem Grund dunkelblau zeichnen */
html[data-theme="light"] .pill--outline:not(.hero-band .pill--outline):not(.footer .pill--outline) {
  color: #243149;
  border-color: #243149;
}

/* footer stays dark for grounding + keeps bright green accent */
html[data-theme="light"][data-signal] .footer { background: #1B2740; color: #fff; --signal-active: #90FF4B; --signal-glow: rgba(144,255,75,.35); }

/* Welle: soft tints inside light bands (hero keeps dark waves on blue) */
html[data-theme="light"] .bg-ds1 .welle-wrap path,
html[data-theme="light"] .bg-ds2 .welle-wrap path,
html[data-theme="light"] .bg-ds3 .welle-wrap path { fill: #E7EEF7; }
html[data-theme="light"] .bg-ds1 .welle-wrap path:nth-of-type(2),
html[data-theme="light"] .bg-ds2 .welle-wrap path:nth-of-type(2),
html[data-theme="light"] .bg-ds3 .welle-wrap path:nth-of-type(2) { fill: #DCE6F2; }
html[data-theme="light"] .bg-ds1 .welle-wrap path:nth-of-type(3),
html[data-theme="light"] .bg-ds2 .welle-wrap path:nth-of-type(3),
html[data-theme="light"] .bg-ds3 .welle-wrap path:nth-of-type(3) { fill: #D0DDEE; }

/* Hero band stays blue in BOTH themes */
.hero-band { background: #243149 !important; color: #fff; }html[data-theme="light"][data-signal] .hero-band {
  --ds-2: #233149;          /* keep badge text dark on green inside hero */
  --signal-active: #90FF4B;
  --signal-glow: rgba(144,255,75,.35);
}
html[data-theme="light"] .hero-band .btn--ghost { color: #fff; border-color: #fff; }
html[data-theme="light"] .nav-bar .logo-link img { /* logo swap handled in JS */ }

/* Signal intensity — drives a single CSS var */
html[data-signal="lime"]   { --signal-active: #90ff4b; --signal-glow: rgba(144,255,75,.35); }
html[data-signal="bright"] { --signal-active: #90ff4b; --signal-glow: rgba(144,255,75,.35); }
html[data-signal="deep"]   { --signal-active: #90ff4b; --signal-glow: rgba(144,255,75,.35); }
html { --signal-active: #90ff4b; --signal-glow: rgba(144,255,75,.35); --hairline: rgba(255,255,255,.1); --hairline-soft: rgba(255,255,255,.07); --chip-bg: rgba(255,255,255,.1); }

/* Layout container */
.container { max-width: 1280px; margin: 0 auto; padding: 0 40px; }
@media (max-width: 720px) { .container { padding: 0 20px; } }

/* Section spacing */
.section { padding: 96px 0; position: relative; overflow: hidden; }
.section--tight { padding: 64px 0; }
@media (max-width: 720px) { .section { padding: 64px 0; } }

/* Background bands */
.bg-ds2  { background: var(--ds-2); color: #fff; }
.bg-ds1  { background: var(--ds-1); color: #fff; }
.bg-ds3  { background: var(--ds-3); color: #fff; }
.bg-light { background: #EEF3F7; color: var(--ds-3); }
.bg-white { background: #fff; color: var(--ds-3); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 16px 26px;
  border-radius: 999px;
  background: var(--signal-active);
  color: var(--on-accent);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .08em;
  text-transform: uppercase;
  border: 0; cursor: pointer;
  transition: transform .12s cubic-bezier(.2,.8,.2,1), box-shadow .2s, background .2s;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover  { transform: translateY(-1px); box-shadow: 0 10px 30px var(--signal-glow); }
.btn:active { transform: translateY(1px); box-shadow: none; }
.btn--ghost { background: transparent; color: #fff; border: 2px solid currentColor; padding: 14px 24px; }
.btn--ghost:hover { background: rgba(255,255,255,.08); box-shadow: none; }
.btn--ghost-dark { background: transparent; color: var(--on-accent); border: 2px solid var(--on-accent); padding: 14px 24px; }
.btn--ghost-dark:hover { background: rgba(0,0,0,.05); box-shadow: none; }

/* Pill */
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--signal-active);
  color: var(--on-accent);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
  white-space: nowrap;
}
.pill--outline {
  background: transparent;
  border: 1.5px solid currentColor;
  color: var(--signal-active);
}
.pill--white { background: #fff; color: var(--on-accent); }

/* Type helpers */
.eyebrow {
  display: inline-block;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--signal-active);
  margin-bottom: 16px;
}
.h1 { font-family: var(--font-display); font-weight: 700; font-size: clamp(48px, 7vw, 96px); line-height: 1.02; letter-spacing: -.02em; margin: 0; }
.h2 { font-family: var(--font-display); font-weight: 700; font-size: clamp(36px, 4.5vw, 64px); line-height: 1.05; letter-spacing: -.01em; margin: 0; }
.h3 { font-family: var(--font-display); font-weight: 700; font-size: clamp(24px, 2.4vw, 32px); line-height: 1.15; margin: 0; }
.h4 { font-family: var(--font-display); font-weight: 700; font-size: 20px; line-height: 1.2; margin: 0; }
.lede { font-size: 20px; line-height: 1.55; opacity: .85; max-width: 60ch; margin: 0; }
.muted { opacity: .7; }
.signal-ink { color: var(--signal-active); }

/* Light theme: grüne Überschriften-Akzente lesbar machen — grüne Fläche, dunkle Schrift
   (gleiches Prinzip wie der CTA-Button). Gilt nicht in dunkelblauen Bändern. */
html[data-theme="light"] .eyebrow:not(.hero-band .eyebrow):not(.footer .eyebrow) {
  background: var(--signal-active);
  color: var(--on-accent);
  padding: 7px 14px;
  border-radius: 999px;
  line-height: 1;
}
html[data-theme="light"] .signal-ink:not(.hero-band .signal-ink):not(.footer .signal-ink) {
  color: var(--ink);
  background: linear-gradient(to top, var(--signal-active) 0.32em, transparent 0.32em);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
html[data-theme="light"] .stat-num:not(.hero-band .stat-num):not(.footer .stat-num) {
  color: var(--ink);
}
html[data-theme="light"] .stat-num:not(.hero-band .stat-num):not(.footer .stat-num)::after {
  content: '';
  display: block;
  width: 56px; height: 6px;
  margin-top: 14px;
  border-radius: 3px;
  background: var(--signal-active);
}

/* Reveal-on-scroll — animate transform only; opacity stays 1 so RAF throttling never hides content */
.reveal { transform: translateY(24px); transition: transform .8s cubic-bezier(.2,.8,.2,1); }
.reveal.is-visible { transform: none; }

/* Card */
.card {
  background: var(--ds-1);
  border-radius: 14px;
  padding: 28px;
  color: #fff;
  position: relative;
  overflow: hidden;
  transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s;
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
}
.card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(0,0,0,.32); }

/* Nav */
.nav-bar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 18px 40px;
  background: rgba(35,49,73,.72);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.nav-bar a { transition: color .15s; }
.nav-bar nav a:hover, .nav-bar nav a.active { color: var(--signal-active); }
.nav-bar > a:first-child { flex-shrink: 0; } /* logo never truncates */
.nav-bar .logo-word { white-space: nowrap; }
.nav-links { display: flex; gap: 24px; font-weight: 500; font-size: 14px; flex-wrap: nowrap; }
.nav-links a { white-space: nowrap; }
@media (max-width: 1100px) { .nav-links { display: none; } }
@media (max-width: 1100px) { .nav-bar { padding: 16px 28px; } }
@media (max-width: 1100px) { .nav-burger { display: inline-flex !important; font-size: 22px; padding: 8px 12px; } }
@media (max-width: 540px) { .nav-bar .btn { display: none; } }

/* Footer */
.footer { background: var(--ds-3); color: #fff; padding: 72px 0 32px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
@media (max-width: 880px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer h5 { font-weight: 700; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; opacity: .55; margin: 0 0 18px; }
.footer a, .footer .footer-item { display: block; padding: 6px 0; opacity: .85; font-size: 14px; transition: opacity .15s; }
.footer a:hover { opacity: 1; color: var(--signal-active); }
.footer-bottom { margin-top: 56px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.1); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; font-size: 13px; opacity: .6; }
/* Footer bleibt in beiden Themes dunkel — dort gilt die helle Hairline */
.footer { --hairline: rgba(255,255,255,.1); --hairline-soft: rgba(255,255,255,.07); --chip-bg: rgba(255,255,255,.1); }

/* Form */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
@media (max-width: 720px) { .form-row { grid-template-columns: 1fr; } }
.input, .select, .textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: 8px;
  border: 1.5px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.06);
  color: #fff;
  font: inherit;
  font-size: 16px;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--signal-active);
  box-shadow: 0 0 0 4px var(--signal-glow);
}
.input::placeholder, .textarea::placeholder { color: rgba(255,255,255,.45); }
.textarea { min-height: 140px; resize: vertical; }
.label { display:block; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; opacity: .7; margin-bottom: 8px; font-weight: 600; }

html[data-theme="light"] .input,
html[data-theme="light"] .select,
html[data-theme="light"] .textarea {
  background: #fff;
  color: var(--ink);
  border-color: rgba(0,0,0,.12);
}
html[data-theme="light"] .input::placeholder,
html[data-theme="light"] .textarea::placeholder { color: rgba(0,0,0,.4); }

/* Decorative */
.glow-dot {
  position: absolute; width: 6px; height: 6px; border-radius: 50%;
  background: var(--signal-active); box-shadow: 0 0 20px var(--signal-glow);
}

/* Welle wrapper */
.welle-wrap { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
/* Anything inside a section that contains a Welle should sit above it */
section { position: relative; }
section > *:not(.welle-wrap) { position: relative; z-index: 1; }

/* Numbers — stat tiles */
.stat-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(48px, 6vw, 88px);
  line-height: 1;
  letter-spacing: -.02em;
  color: var(--signal-active);
}

/* Marquee */
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.marquee { display: flex; gap: 80px; animation: marquee 40s linear infinite; width: max-content; }

/* Page transitions — animate transform only; never gate visibility on RAF */
@keyframes fadeUp { from { transform: translateY(20px); } to { transform: none; } }
.page-fade { animation: fadeUp .6s cubic-bezier(.2,.8,.2,1) both; opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .page-fade { animation: none; }
  .reveal { transform: none; transition: none; }
}

/* Hero ticker */
/* Hero-Headline: Marker-Unterstreichung hinter dem Text (hugs the text, nicht die ganze Zeile) */
.hero-line {
  position: relative;
  background-image: linear-gradient(to top, var(--signal-active) 0.32em, transparent 0.32em);
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 100%;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  animation: heroUnderline 1.4s .8s cubic-bezier(.2,.8,.2,1) forwards;
}
@keyframes heroUnderline { to { background-size: 100% 100%; } }

@media (max-width: 880px) { .grid-3-responsive { grid-template-columns: repeat(2, 1fr) !important; } }
@media (max-width: 880px) { .ai-hero-grid, .ai-scope { grid-template-columns: 1fr !important; gap: 36px !important; } }
@media (max-width: 560px) { .grid-3-responsive { grid-template-columns: 1fr !important; } }

/* Hero photo treatment */
.photo-tilt {
  border-radius: 16px;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.55);
  transform: rotate(-1.5deg);
  overflow: hidden;
}

/* Service icon — pure CSS abstract glyph */
.glyph {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: var(--signal-active);
  color: var(--on-accent);
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 800; font-size: 22px;
}

/* Selection */
::selection { background: var(--signal-active); color: var(--on-accent); }
