/* =====================================================================
   TERSUS — BoardWiper Pro
   Statische One-Page-Website. Keine Frameworks, keine externen Fonts:
   die Seite muss auch offline per Doppelklick auf index.html laufen.
   ===================================================================== */

:root {
  /* Palette, abgeleitet aus den Produktfotos */
  --navy-900: #16255c;   /* Schattenpartien Gehäuse */
  --navy-700: #1e3a8a;   /* Primärton, Gehäuse-Blau */
  --navy-500: #2f52c4;   /* Hover, Akzent */
  --cyan-400: #5baee8;   /* Mikrofasertuch — sparsam als Akzent */

  --ink:       #101828;
  --muted:     #5b6478;
  --surface:   #ffffff;
  --surface-2: #f5f7fb;  /* Abschnittswechsel, passt zum Foto-Hintergrund */
  --line:      #e3e8f0;

  --container: 1120px;
  --radius: 14px;
  --radius-sm: 8px;

  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .06);
  --shadow-md: 0 8px 28px rgba(22, 37, 92, .10);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
          Arial, "Noto Sans", sans-serif;

  --step: clamp(1.6rem, 1.1rem + 1.6vw, 2.4rem);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body, h1, h2, h3, h4, p, ul, ol, dl, dd, figure, table { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ---------- Produktfotos ----------
   Die Fotos sind auf reinem Weiß freigestellt, aber als JPEG deckend — als
   Rechteck würden sie auf jedem getönten Hintergrund als weißer Kasten stehen.
   `multiply` rechnet das Weiß gegen den Hintergrund weg (weiß × X = X), sodass
   nur Produkt und der eingebackene Studio-Schatten übrig bleiben. Deshalb
   müssen alle Hintergründe hinter Fotos hell sein — siehe --surface/--surface-2. */
.hero-figure img,
.split-figure img {
  mix-blend-mode: multiply;
}

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--surface);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---------- Basis-Typografie ---------- */
h1, h2, h3, h4 { line-height: 1.2; letter-spacing: -0.02em; font-weight: 700; }
h1 { font-size: clamp(2.4rem, 1.6rem + 3.4vw, 4rem); }
h2 { font-size: clamp(1.75rem, 1.3rem + 1.8vw, 2.5rem); }
h3 { font-size: 1.125rem; }

a { color: var(--navy-700); }
strong { font-weight: 650; }

:where(a, button, [tabindex]):focus-visible {
  outline: 3px solid var(--navy-500);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Hilfsklassen ---------- */
.container {
  width: min(100% - 2.5rem, var(--container));
  margin-inline: auto;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  background: var(--navy-700);
  color: #fff;
  padding: .7rem 1.1rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: top .15s ease;
}
.skip-link:focus { top: 1rem; }

/* =====================================================================
   Header
   ===================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 68px;
}

.logo-link {
  text-decoration: none;
  color: inherit;
  display: inline-flex;
  align-items: center;
  gap: .6rem;
}

/* Die Wirbelsturm-Bildmarke trägt keinen Schriftzug — deshalb steht die
   Wortmarke daneben. Das Logo liegt auf fast weißem Grund (254,254,254) statt
   freigestellt, `multiply` rechnet ihn gegen den hellen Header weg. */
.logo-img {
  height: 30px;
  width: auto;
  mix-blend-mode: multiply;
}

/* Wortmarke — angelehnt an den geprägten Schriftzug auf dem Produkt-Inlay */
.site-logo {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: .34em;
  text-indent: .34em;   /* gleicht das Letter-Spacing rechts wieder aus */
  color: var(--navy-700);
  text-transform: uppercase;
}

.site-nav ul {
  display: flex;
  gap: .35rem;
}

.site-nav a {
  display: block;
  padding: .5rem .85rem;
  border-radius: var(--radius-sm);
  color: var(--muted);
  text-decoration: none;
  font-size: .95rem;
  font-weight: 550;
  transition: color .15s ease, background-color .15s ease;
}
.site-nav a:hover { color: var(--navy-700); background: var(--surface-2); }
.site-nav a.is-active { color: var(--navy-700); background: var(--surface-2); }

/* ---------- Mobile-Nav-Toggle ---------- */
.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 20px; height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle-bars { position: relative; }
.nav-toggle-bars::before,
.nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after  { top: 6px; }

.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after  { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 899px) {
  .nav-toggle { display: inline-flex; }

  .site-nav {
    position: absolute;
    left: 0; right: 0;
    top: 100%;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    display: none;
  }
  .site-nav.is-open { display: block; }

  .site-nav ul {
    flex-direction: column;
    gap: 0;
    width: min(100% - 2.5rem, var(--container));
    margin-inline: auto;
    padding: .5rem 0 1rem;
  }
  .site-nav a {
    padding: .85rem .75rem;
    font-size: 1rem;
    border-radius: var(--radius-sm);
  }
}

/* JS-los bleibt die Navigation sichtbar (Progressive Enhancement) */
.no-js .nav-toggle { display: none; }
@media (max-width: 899px) {
  .no-js .site-nav { position: static; display: block; box-shadow: none; border: 0; }
  .no-js .site-nav ul { flex-direction: row; flex-wrap: wrap; padding: 0 0 .75rem; }
}

/* =====================================================================
   Sections
   ===================================================================== */
.section { padding: clamp(3.5rem, 2rem + 6vw, 6.5rem) 0; }
.section-alt { background: var(--surface-2); }

.section-head {
  max-width: 46rem;
  margin: 0 auto clamp(2rem, 1rem + 3vw, 3.5rem);
  text-align: center;
}
.section-head-left { margin-inline: 0; text-align: left; }

.section-sub {
  margin-top: .9rem;
  color: var(--muted);
  font-size: 1.05rem;
}

.eyebrow {
  font-size: .8rem;
  font-weight: 650;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--navy-500);
  margin-bottom: .9rem;
}

.lead {
  margin-top: 1.25rem;
  font-size: clamp(1.05rem, 1rem + .3vw, 1.2rem);
  color: var(--muted);
  max-width: 34rem;
}

.prose { margin-top: 1.25rem; color: var(--muted); }

/* =====================================================================
   Hero
   ===================================================================== */
.hero {
  padding: clamp(2.5rem, 1rem + 6vw, 5rem) 0 clamp(2rem, 1rem + 3vw, 3.5rem);
  background:
    radial-gradient(120% 90% at 85% 15%, #eef3ff 0%, rgba(255,255,255,0) 60%),
    var(--surface);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  gap: clamp(1.5rem, 1rem + 3vw, 3rem);
  align-items: center;
}

.hero-figure img { width: 100%; }

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 2rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: .8rem 1.5rem;
  border-radius: 999px;
  background: var(--navy-700);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: .97rem;
  box-shadow: var(--shadow-sm);
  transition: background-color .15s ease, transform .15s ease;
}
.btn:hover { background: var(--navy-500); transform: translateY(-1px); }

.btn-ghost {
  background: transparent;
  color: var(--navy-700);
  box-shadow: inset 0 0 0 1.5px var(--line);
}
.btn-ghost:hover { background: var(--surface-2); color: var(--navy-700); }

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

/* =====================================================================
   Vergleich: vorher / nachher
   ===================================================================== */
.compare {
  display: grid;
  gap: 1.25rem;
  align-items: center;
}

.compare-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.4rem, 1rem + 1vw, 2rem);
  box-shadow: var(--shadow-sm);
}

.compare-after {
  border-color: transparent;
  background: var(--navy-700);
  color: #fff;
  box-shadow: var(--shadow-md);
}

.compare-tag {
  font-size: .78rem;
  font-weight: 650;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: .5rem;
}
.compare-after .compare-tag { color: var(--cyan-400); }

.compare-steps {
  counter-reset: cstep;
  margin-top: 1.1rem;
  display: grid;
  gap: .6rem;
}
.compare-steps li {
  counter-increment: cstep;
  position: relative;
  padding-left: 2rem;
  color: var(--muted);
  font-size: .97rem;
}
.compare-after .compare-steps li { color: rgba(255, 255, 255, .82); }

.compare-steps li::before {
  content: counter(cstep);
  position: absolute;
  left: 0; top: .1rem;
  width: 1.4rem; height: 1.4rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--muted);
  font-size: .75rem;
  font-weight: 650;
}
.compare-after .compare-steps li::before {
  background: rgba(255, 255, 255, .16);
  color: #fff;
}

.compare-arrow {
  text-align: center;
  font-size: 1.75rem;
  color: var(--navy-500);
  transform: rotate(90deg);
}

@media (min-width: 900px) {
  .compare { grid-template-columns: 1fr auto 1fr; }
  .compare-arrow { transform: none; }
}

/* =====================================================================
   Split-Layout (Text + Bild)
   ===================================================================== */
.split {
  display: grid;
  gap: clamp(2rem, 1rem + 4vw, 4rem);
  align-items: center;
}

.split-figure img { width: 100%; }

.split-figure figcaption {
  margin-top: .85rem;
  font-size: .88rem;
  color: var(--muted);
  text-align: center;
}

@media (min-width: 900px) {
  .split { grid-template-columns: 1fr 1fr; }
  .split-reverse .split-text { order: 2; }
  .split-reverse .split-figure { order: 1; }
}

/* ---------- Schritte ---------- */
.steps {
  counter-reset: step;
  display: grid;
  gap: 1.75rem;
  margin-top: 2.25rem;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 3.5rem;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0; top: -.1rem;
  width: 2.4rem; height: 2.4rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--navy-700);
  color: #fff;
  font-weight: 700;
  font-size: .95rem;
}

.steps p { margin-top: .4rem; color: var(--muted); font-size: .97rem; }

/* =====================================================================
   Feature-Grid
   ===================================================================== */
.features {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}

.features li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  border-top: 3px solid var(--navy-700);
}

.features p { margin-top: .45rem; color: var(--muted); font-size: .93rem; }

/* =====================================================================
   Projekt & Team
   ===================================================================== */
.project-intro {
  max-width: 44rem;
  margin-inline: auto;
  display: grid;
  gap: 1.1rem;
  color: var(--muted);
  font-size: 1.02rem;
}
.project-intro strong { color: var(--ink); }

.team-head {
  text-align: center;
  font-size: 1.3rem;
  margin: clamp(2.5rem, 1.5rem + 3vw, 4rem) 0 1.5rem;
}

.team {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
}

.team-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.team-name { font-weight: 650; }

.team-role {
  margin-top: .3rem;
  color: var(--muted);
  font-size: .88rem;
}

/* =====================================================================
   Footer
   ===================================================================== */
.site-footer {
  background: var(--navy-900);
  color: rgba(255, 255, 255, .72);
  padding: clamp(2.5rem, 1.5rem + 3vw, 3.5rem) 0;
}

.footer-inner {
  display: grid;
  gap: .75rem;
  text-align: center;
}

.footer-brand {
  font-weight: 600;
  letter-spacing: .34em;
  text-indent: .34em;
  color: #fff;
  text-transform: uppercase;
}

.footer-note {
  font-size: .88rem;
  max-width: 34rem;
  margin-inline: auto;
}

/* =====================================================================
   Reveal-on-Scroll — nur aktiv, wenn JS läuft und der Nutzer
   keine reduzierte Bewegung angefordert hat (siehe main.js).
   ===================================================================== */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .55s ease, transform .55s ease;
}
.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .btn:hover { transform: none; }
}
