/* Function Forest – site styles. No external dependencies: fonts are self-hosted. */

@font-face {
  font-family: "Inter";
  src: url("fonts/inter-var.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("fonts/space-grotesk-var.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}

:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --ink: #000000;
  --muted: #555555;
  --line: #e2e2e2;
  --dark: #000000;
  --dark-2: #111111;
  --dark-line: rgba(255, 255, 255, 0.16);
  --on-dark: #ffffff;
  --on-dark-muted: #ababab;
  --accent: #ffffff;        /* on dark backgrounds */
  --accent-strong: #000000; /* on light backgrounds */
  --accent-soft: #f0f0f0;
  --radius: 18px;
  --wrap: 1140px;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: "Space Grotesk", "Inter", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.1; letter-spacing: -0.02em; margin: 0; font-weight: 600; }
p { margin: 0; }
:focus-visible { outline: 3px solid #7a7a7a; outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 1rem; top: 1rem; z-index: 100; background: #fff; color: var(--ink); padding: 0.6rem 1rem; border-radius: 8px; }

/* ---------- Logo mark (white PNG used as a mask, so it takes any colour) ---------- */
.mark {
  display: inline-block;
  aspect-ratio: 489 / 600;
  background: currentColor;
  -webkit-mask: url("logo-white.png") center / contain no-repeat;
  mask: url("logo-white.png") center / contain no-repeat;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  font: 600 1rem/1 var(--font-body);
  padding: 0.95rem 1.5rem;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.btn svg { width: 1.05em; height: 1.05em; transition: transform 0.15s ease; }
.btn:hover svg { transform: translateX(3px); }
.btn-primary { background: var(--accent); color: #000000; }
.btn-primary:hover { background: #dcdcdc; transform: translateY(-1px); }
.btn-ghost { border-color: rgba(255, 255, 255, 0.28); color: var(--on-dark); }
.btn-ghost:hover { border-color: rgba(255, 255, 255, 0.6); background: rgba(255, 255, 255, 0.06); }
.btn-sm { padding: 0.65rem 1.1rem; font-size: 0.94rem; }

/* ---------- Header / navigation ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  color: var(--on-dark);
  transition: background-color 0.25s ease, border-color 0.25s ease;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled, .site-header.open {
  background: rgba(0, 0, 0, 0.86);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom-color: var(--dark-line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 0.65rem; text-decoration: none; font: 600 1.15rem/1 var(--font-head); letter-spacing: -0.01em; }
.brand .mark { height: 34px; color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 2rem; list-style: none; margin: 0; padding: 0; }
.nav-links a:not(.btn) { text-decoration: none; font-size: 0.97rem; font-weight: 500; color: var(--on-dark-muted); transition: color 0.15s ease; }
.nav-links a:not(.btn):hover { color: #fff; }
.nav-toggle { display: none; background: none; border: 0; color: inherit; padding: 0.6rem; margin-right: -0.6rem; cursor: pointer; }
.nav-toggle svg { width: 26px; height: 26px; }
.nav-toggle .x { display: none; }
.site-header.open .nav-toggle .x { display: block; }
.site-header.open .nav-toggle .bars { display: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  color: var(--on-dark);
  background:
    radial-gradient(60rem 36rem at 85% 20%, rgba(255, 255, 255, 0.10), transparent 60%),
    radial-gradient(40rem 30rem at 0% 100%, rgba(255, 255, 255, 0.06), transparent 60%),
    var(--dark);
  padding: clamp(8.5rem, 16vh, 11rem) 0 clamp(4.5rem, 10vh, 7rem);
}
.hero::before { /* fine dot grid */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, 0.09) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
  mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1.25fr 0.75fr; gap: 3rem; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font: 600 0.8rem/1 var(--font-body); letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent);
}
.eyebrow::before { content: ""; width: 1.75rem; height: 1px; background: currentColor; }
.hero h1 { font-size: clamp(2.6rem, 6.4vw, 5rem); margin: 1.4rem 0 1.5rem; font-weight: 600; letter-spacing: -0.035em; text-wrap: balance; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lead { font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--on-dark-muted); max-width: 36rem; line-height: 1.6; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2.4rem; }

.hero-art { position: relative; display: grid; place-items: center; aspect-ratio: 1; max-width: 420px; width: 100%; justify-self: end; }
.hero-art::before, .hero-art::after { content: ""; position: absolute; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.22); }
.hero-art::before { inset: 0; }
.hero-art::after { inset: 13%; border-color: rgba(255, 255, 255, 0.12); background: radial-gradient(circle, rgba(255, 255, 255, 0.16), transparent 68%); }
.hero-art .mark { position: relative; z-index: 1; height: 56%; background: linear-gradient(160deg, #ffffff, #ffffff 50%, #8c8c8c); }

/* ---------- Sections ---------- */
.section { padding: clamp(4.5rem, 9vw, 7.5rem) 0; }
.section-head { max-width: 44rem; margin-bottom: clamp(2.2rem, 4vw, 3.5rem); }
.section-head .eyebrow { color: var(--accent-strong); }
.section-head h2 { font-size: clamp(2rem, 4vw, 3rem); margin-top: 1rem; text-wrap: balance; }
.section-head p { margin-top: 1rem; color: var(--muted); font-size: 1.12rem; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem 1.9rem 2.1rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.card:hover { transform: translateY(-4px); border-color: #000000; box-shadow: 0 22px 44px -26px rgba(0, 0, 0, 0.35); }
.card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.6rem; }
.icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: var(--accent-soft); color: var(--accent-strong); }
.icon svg { width: 26px; height: 26px; }
.num { font: 500 0.9rem/1 var(--font-head); color: #9a9a9a; letter-spacing: 0.06em; }
.card h3 { font-size: 1.35rem; margin-bottom: 0.7rem; }
.card p { color: var(--muted); font-size: 1rem; }

/* ---------- Solutions band ---------- */
.band { background: var(--dark); color: var(--on-dark); }
.band-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.band .eyebrow { color: var(--accent); }
.band h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); margin-top: 1rem; text-wrap: balance; }
.band p { color: var(--on-dark-muted); margin-top: 1rem; }
.tiles { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.8rem; }
.tiles li {
  display: flex; align-items: center; gap: 1rem;
  padding: 1.15rem 1.3rem;
  border: 1px solid var(--dark-line); border-radius: 14px;
  background: var(--dark-2);
  font: 500 1.08rem/1.3 var(--font-head);
}
.tiles svg { width: 24px; height: 24px; color: var(--accent); flex: none; }

/* ---------- Contact / CTA ---------- */
.cta-box {
  position: relative; overflow: hidden;
  border-radius: 28px;
  padding: clamp(2.5rem, 6vw, 5rem);
  color: var(--on-dark);
  background:
    radial-gradient(34rem 22rem at 100% 0%, rgba(255, 255, 255, 0.14), transparent 62%),
    var(--dark-2);
  text-align: center;
}
.cta-box h2 { font-size: clamp(2rem, 4.4vw, 3.2rem); text-wrap: balance; }
.cta-box p { color: var(--on-dark-muted); max-width: 40rem; margin: 1.2rem auto 2.2rem; font-size: 1.12rem; }
.cta-mail { display: block; margin-top: 1.3rem; font-size: 0.95rem; color: var(--on-dark-muted); }
.cta-mail a { color: var(--on-dark); text-underline-offset: 3px; }

/* ---------- Footer ---------- */
.site-footer { padding: 2.2rem 0 2.6rem; color: var(--muted); font-size: 0.94rem; border-top: 1px solid var(--line); }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; }
.footer-brand { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--ink); font: 600 1rem/1 var(--font-head); text-decoration: none; }
.footer-brand .mark { height: 26px; color: var(--accent-strong); }
.footer-links { display: flex; flex-wrap: wrap; gap: 0.4rem 1.6rem; list-style: none; margin: 0; padding: 0; }
.footer-links a { text-decoration: none; display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.3rem 0; }
.footer-links a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.footer-links svg { width: 16px; height: 16px; }

/* ---------- Legal page (Impressum) ---------- */
.page-head { background: var(--dark); color: var(--on-dark); padding: 8.5rem 0 3.5rem; }
.page-head h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); margin-top: 1rem; }
.prose { max-width: 46rem; padding: 3.5rem 0 5rem; }
.prose h2 { font-size: 1.6rem; margin: 2.8rem 0 0.4rem; }
.prose h3 { font-size: 1.15rem; margin: 2rem 0 0.6rem; letter-spacing: -0.01em; }
.prose p { color: #333333; margin-bottom: 1rem; }
.prose a { color: var(--accent-strong); text-underline-offset: 3px; }
.prose .facts { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem 1.8rem; margin: 1.2rem 0 0; }
.prose .facts p { margin-bottom: 0.9rem; color: var(--ink); }
.prose .facts p:last-child { margin-bottom: 0; }
.back { display: inline-flex; align-items: center; gap: 0.5rem; margin-top: 1.5rem; font-weight: 600; text-decoration: none; }
.back:hover { text-decoration: underline; }
.back svg { width: 1em; height: 1em; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { display: none; }
  .cards { grid-template-columns: 1fr; }
  .band-grid { grid-template-columns: 1fr; }
}
@media (min-width: 601px) and (max-width: 900px) {
  .cards { grid-template-columns: 1fr 1fr; }
  .cards .card:last-child { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  body { font-size: 1rem; }
  .nav { height: 64px; }
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute; left: 0; right: 0; top: 64px;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 0.5rem 1.25rem 1.5rem;
    background: rgba(0, 0, 0, 0.97);
    border-bottom: 1px solid var(--dark-line);
  }
  .site-header.open .nav-links { display: flex; }
  .nav-links a:not(.btn) { display: block; padding: 0.95rem 0; font-size: 1.05rem; color: var(--on-dark); border-bottom: 1px solid var(--dark-line); }
  .nav-links .btn { margin-top: 1.2rem; width: 100%; padding: 0.95rem; }
  .hero-actions .btn { width: 100%; }
  .footer-row { flex-direction: column; align-items: flex-start; }
  .cta-box { border-radius: 22px; }
  .cta-box .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
