/* Schriften lokal eingebunden – kein Abruf bei Google (DSGVO) */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/assets/fonts/inter-latin.woff2') format('woff2');
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/assets/fonts/jetbrains-mono-latin.woff2') format('woff2');
}

/* Farben aus app/src/index.css übernommen, damit Website und App gleich aussehen */
:root {
  --bg: #fbfbfd;
  --surface: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --line: rgba(17, 24, 39, 0.10);
  --primary: #2d4a6f;
  --on-primary: #ffffff;
  --band: #1a2535;
  --band-text: #e8edf4;
  --band-muted: #8fa3bb;
  --band-line: rgba(255, 255, 255, 0.10);

  /* Auf Apple-Geräten SF Pro, sonst Inter */
  --font-sans: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --text-hero: clamp(2.6rem, 1.4rem + 5vw, 5.6rem);
  --text-h2: clamp(2rem, 1.3rem + 2.8vw, 3.5rem);
  --space-section: clamp(5rem, 3.5rem + 6vw, 10rem);
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1180px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111925;
    --surface: #1a2535;
    --text: #e8edf4;
    --muted: #8fa3bb;
    --line: rgba(255, 255, 255, 0.10);
    --primary: #5588c8;
    --band: #0b111a;
  }
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

img { max-width: 100%; display: block; }

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

.mono {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--primary);
  color: var(--on-primary);
  padding: 8px 14px;
  z-index: 100;
}
.skip-link:focus { left: 8px; }

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 52px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
}

.brand img {
  width: 24px;
  height: 24px;
  border-radius: 6px;
}

.nav {
  display: flex;
  gap: 24px;
}

.nav a {
  text-decoration: none;
  color: var(--muted);
  transition: color 150ms;
}
.nav a:hover { color: var(--text); }

.site-header .btn { justify-self: end; }

@media (max-width: 760px) {
  .site-header .wrap { grid-template-columns: 1fr auto; }
  .nav { display: none; }
}

/* ---------- Buttons & Links ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 20px;
  border-radius: 6px;
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 150ms, border-color 150ms;
}

.btn-primary {
  background: var(--primary);
  color: var(--on-primary);
}
.btn-primary:hover { background: color-mix(in srgb, var(--primary) 88%, black); }

.btn-ghost {
  border-color: var(--line);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--muted); }

.btn-small { padding: 6px 12px; font-size: 0.8rem; }

/* ---------- Hero ---------- */

.hero {
  padding: clamp(3rem, 2rem + 3.5vw, 5.5rem) 0 0;
  text-align: center;
}

.hero .eyebrow {
  color: var(--muted);
  margin: 0 0 24px;
}

.hero h1 {
  font-size: var(--text-hero);
  line-height: 1.04;
  letter-spacing: -0.035em;
  font-weight: 600;
  margin: 0 auto;
  max-width: 14ch;
}

.hero h1 span { color: var(--primary); }

.hero-lead {
  font-size: clamp(1.1rem, 1rem + 0.5vw, 1.4rem);
  color: var(--muted);
  max-width: 36ch;
  margin: 24px auto 32px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.store-note { color: var(--muted); margin: 18px 0 0; }

/* Bühne mit dem echten App-Screenshot, Punktraster wie bei Northstar.
   Ohne JavaScript (oder bei reduzierter Bewegung) steht das Handy angeschnitten da. */
.scrolly {
  position: relative;
  margin-top: clamp(2.5rem, 2rem + 2vw, 4rem);
  border-top: 1px solid var(--line);
  background-image: radial-gradient(var(--line) 1px, transparent 1px);
  background-size: 18px 18px;
}

.scrolly-sticky {
  position: relative;
  height: clamp(420px, 40vw + 240px, 640px);
  padding-top: clamp(2.5rem, 5vw, 4.5rem);
  overflow: hidden;
}

.device {
  position: relative;
  width: min(330px, 76vw);
  margin: 0 auto;
  padding: 11px;
  background: #0b0d12;
  border-radius: 54px;
  box-shadow: 0 50px 100px -40px rgba(17, 24, 39, 0.45);
  will-change: transform;
}

.device-screen {
  border-radius: 44px;
  overflow: hidden;
}

.device img {
  width: 100%;
  height: auto;
}

.screen-fill {
  position: absolute;
  inset: 0;
  background: var(--band);
  opacity: 0;
  pointer-events: none;
}

/* Mit JavaScript: Sequenz über mehrere Bildschirmhöhen, Bühne bleibt stehen */
.has-scrolly .scrolly { height: 280vh; }

.has-scrolly .scrolly-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 0;
  display: grid;
  place-items: center;
}

.has-scrolly .device {
  width: min(330px, 76vw, calc((100vh - 120px) * 0.44));
}

/* ---------- Dunkles Band ---------- */

.band {
  background: var(--band);
  color: var(--band-text);
  padding: var(--space-section) 0;
}

.band-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(3rem, 6vw, 6rem) clamp(2rem, 6vw, 6rem);
  align-items: end;
}

.band h2 {
  grid-column: 2;
  grid-row: 1;
  font-size: var(--text-h2);
  line-height: 1.06;
  letter-spacing: -0.03em;
  font-weight: 600;
  margin: 0;
  text-align: right;
}

.band p {
  grid-column: 1;
  grid-row: 2;
  font-size: clamp(1.15rem, 1rem + 0.6vw, 1.5rem);
  line-height: 1.5;
  color: var(--band-muted);
  margin: 0;
  max-width: 30ch;
}

.band p strong { color: var(--band-text); font-weight: 500; }

.band-stats {
  grid-column: 2;
  grid-row: 2;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--band-line);
}

.band-stats div { padding: 18px 0 0; }

.band-stats div + div {
  padding-left: 18px;
  border-left: 1px solid var(--band-line);
}

.band-stats strong {
  display: block;
  font-size: clamp(1.3rem, 1rem + 1.2vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.band-stats span { color: var(--band-muted); }

@media (max-width: 820px) {
  .band-grid { grid-template-columns: minmax(0, 1fr); }
  .band h2, .band p, .band-stats { grid-column: 1; grid-row: auto; text-align: left; }
}

/* ---------- Abschnitte mit Linienraster ---------- */

.section { padding: var(--space-section) 0 0; }

.section-label {
  color: var(--muted);
  margin: 0 0 18px;
}

.section h2 {
  font-size: var(--text-h2);
  line-height: 1.06;
  letter-spacing: -0.03em;
  font-weight: 600;
  margin: 0 0 clamp(2rem, 4vw, 3.5rem);
  max-width: 18ch;
}

.grid {
  display: grid;
  grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.grid > * {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: clamp(20px, 2.4vw, 32px);
  transition: background 200ms;
}

.grid > *:hover { background: var(--surface); }

.cell-num {
  display: block;
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: clamp(2.5rem, 5vw, 4.5rem);
  font-variant-numeric: tabular-nums;
}

.grid h3 {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
}

.grid p { margin: 0; color: var(--muted); }

.grid-2 { --cols: 2; }

.audience h3 {
  font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.4rem);
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}

.audience ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.audience li {
  padding: 12px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

@media (max-width: 820px) {
  .grid, .grid-2 { --cols: 1; }
  .cell-num { margin-bottom: 1.5rem; }
}

/* ---------- Kontakt ---------- */

.contact {
  text-align: center;
  padding: var(--space-section) 0 0;
}

.contact h2 {
  font-size: var(--text-h2);
  letter-spacing: -0.03em;
  font-weight: 600;
  line-height: 1.06;
  margin: 0 0 16px;
}

.contact p { color: var(--muted); margin: 0 auto 28px; max-width: 40ch; }

.contact-mail {
  font-size: clamp(1.2rem, 0.9rem + 1.4vw, 2rem);
  font-weight: 500;
  color: var(--primary);
  text-decoration: none;
  overflow-wrap: anywhere;
}
.contact-mail:hover { text-decoration: underline; }

.contact-meta { color: var(--muted); margin-top: 18px; }
.contact-meta a { text-decoration: none; }
.contact-meta a:hover { color: var(--text); }

/* ---------- Footer ---------- */

.site-footer {
  margin-top: var(--space-section);
  border-top: 1px solid var(--line);
  padding: 22px 0;
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  color: var(--muted);
}

.footer-row nav { display: flex; flex-wrap: wrap; gap: 20px; }
.footer-row a { text-decoration: none; }
.footer-row a:hover { color: var(--text); }

/* ---------- Rechtstexte ---------- */

.legal {
  padding: clamp(3rem, 2rem + 4vw, 5rem) 0 0;
}

.legal .wrap { max-width: 720px; }

.legal h1 {
  font-size: clamp(2.2rem, 1.4rem + 3vw, 3.4rem);
  letter-spacing: -0.035em;
  font-weight: 600;
  line-height: 1.05;
  margin: 0 0 12px;
}

.legal .updated { color: var(--muted); margin: 0 0 40px; }

.legal h2 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 36px 0 8px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.legal p { margin: 0; color: var(--muted); }
.legal p strong { color: var(--text); font-weight: 600; }
.legal a { color: var(--primary); }

.back-link {
  display: inline-block;
  margin-bottom: 28px;
  color: var(--muted);
  text-decoration: none;
}
.back-link:hover { color: var(--text); }

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: no-preference) {
  .reveal { animation: reveal 1s var(--ease) both; }
  .reveal-2 { animation-delay: 100ms; }
  .reveal-3 { animation-delay: 200ms; }

  @keyframes reveal {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: none; }
  }
}

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