/* ============================================================
   Kadrell: Design-System der Landingpage
   Charakter: Terminal-Fenster, Editor-Palette (Mocha), Statuspunkte
   als Marken-Motiv. Selbst gehostete Fonts, kein Drittanbieter.
   ============================================================ */

@font-face { font-family: "Space Grotesk"; font-weight: 500; font-display: swap; src: url("fonts/space-grotesk-500.woff2") format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-weight: 700; font-display: swap; src: url("fonts/space-grotesk-700.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-display: swap; src: url("fonts/ibm-plex-sans-400.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-display: swap; src: url("fonts/ibm-plex-sans-600.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-display: swap; src: url("fonts/ibm-plex-mono-400.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-display: swap; src: url("fonts/ibm-plex-mono-500.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 600; font-display: swap; src: url("fonts/ibm-plex-mono-600.woff2") format("woff2"); }

:root {
  /* Dieselbe Palette wie die App (Mocha) */
  --bg:        #11111b;
  --bg-deep:   #0b0b13;
  --surface:   #181825;
  --surface-2: #1e1e2e;
  --line:      #313244;
  --line-soft: rgba(255,255,255,0.06);

  --text:   #cdd6f4;
  --text-2: #a6adc8;
  --text-3: #8b92ad;

  --blue:     #89b4fa;
  --lavender: #b4befe;
  --peach:    #fab387;
  --green:    #a6e3a1;
  --yellow:   #f9e2af;
  --red:      #f38ba8;
  --mauve:    #cba6f7;

  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body:    "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  --font-mono:    "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --r-sm: 8px;
  --r:    14px;
  --r-lg: 22px;
  --maxw: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
html, body { overflow-x: hidden; }
[id] { scroll-margin-top: 80px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* Kachel-Raster wie im App-Icon, sehr dezent */
  background-image:
    linear-gradient(rgba(137,180,250,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(137,180,250,0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  background-position: center top;
}
::selection { background: var(--peach); color: #1a0d03; }
a { color: var(--blue); text-decoration: none; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: 12px; left: -9999px; z-index: 100; padding: 10px 16px; border-radius: 999px; font-weight: 600; font-size: 14px; color: var(--bg-deep); background: var(--blue); }
.skip-link:focus { left: 12px; }
kbd {
  font-family: var(--font-mono);
  font-size: 0.85em;
  padding: 1px 7px;
  border-radius: 6px;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  background: var(--surface-2);
  color: var(--text);
  white-space: nowrap;
}

/* Statuspunkte: das Marken-Motiv (arbeitet, wartet, fertig, Fehler) */
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 999px; background: var(--c, var(--text-3)); flex: none; }
.dot.running { --c: var(--blue); box-shadow: 0 0 8px var(--blue); animation: pulse 1.4s ease-in-out infinite; }
.dot.waiting { --c: var(--yellow); }
.dot.idle    { --c: var(--green); }
.dot.error   { --c: var(--red); }
@keyframes pulse { 50% { opacity: 0.35; } }

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 18px; letter-spacing: -0.01em; color: var(--text); }
.brand .mark { width: 30px; height: 30px; border-radius: 8px; display: block; transition: transform 0.5s var(--ease); }
.brand:hover .mark { transform: rotate(-6deg) scale(1.06); }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { color: var(--text-2); font-size: 14px; font-weight: 500; padding: 7px 12px; border-radius: 999px; transition: color 0.2s, background 0.2s; }
.nav a:hover { color: var(--text); background: var(--surface-2); }
.nav .nav-cta { color: var(--bg-deep); background: var(--blue); font-weight: 600; }
.nav .nav-cta:hover { background: var(--lavender); color: var(--bg-deep); }
.nav-links { display: inline-flex; align-items: center; gap: 4px; }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 13px 22px; border-radius: 999px;
  font-family: var(--font-body); font-weight: 600; font-size: 16px;
  border: 1px solid transparent; cursor: pointer;
  transition: transform 0.18s var(--ease), background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--blue); color: var(--bg-deep); box-shadow: 0 6px 22px -8px rgba(137,180,250,0.7); }
.btn-primary:hover { background: var(--lavender); transform: translateY(-2px); }
.btn-secondary { background: transparent; color: var(--text); border-color: var(--line); }
.btn-secondary:hover { border-color: var(--blue); color: var(--blue); transform: translateY(-2px); }
.btn-soon { cursor: default; }
.btn-soon:hover { transform: none; background: var(--blue); }
.btn-soon .soon-dot { width: 8px; height: 8px; border-radius: 999px; background: var(--bg-deep); opacity: 0.55; animation: soonpulse 1.6s ease-in-out 8; }
@keyframes soonpulse { 0%,100% { opacity: 0.25; } 50% { opacity: 0.85; } }

/* ============================================================
   Editorial-Bausteine
   ============================================================ */
.section-tag {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 12.5px; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--blue);
}
.section-tag::before { content: attr(data-index); color: var(--text-3); }
.section-tag .rule { width: 38px; height: 1px; background: linear-gradient(90deg, var(--blue), transparent); }
section.block {
  padding: 92px 0;
  border-top: 1px solid transparent;
  border-image: linear-gradient(90deg, transparent, rgba(255,255,255,0.09) 28%, rgba(255,255,255,0.09) 72%, transparent) 1;
}
.section-head { max-width: 64ch; margin-bottom: 48px; }
.section-head h2 { font-family: var(--font-display); font-weight: 700; font-size: clamp(28px, 4.2vw, 44px); line-height: 1.1; letter-spacing: -0.02em; margin: 16px 0 14px; }
.section-head .lead { color: var(--text-2); font-size: 18px; max-width: 58ch; }
.section-head .lead code, p code, li code { font-family: var(--font-mono); font-size: 0.9em; color: var(--peach); }

/* ============================================================
   Panel (große Kachel) mit Glow-Hintergrund
   ============================================================ */
.panel {
  position: relative; border-radius: 30px;
  border: 1px solid rgba(255,255,255,0.08);
  overflow: hidden; isolation: isolate;
  box-shadow: 0 40px 90px -50px rgba(0,0,0,0.95);
}
.panel > .glow {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 80% at 15% 20%, rgba(137,180,250,0.28), transparent 60%),
    radial-gradient(50% 70% at 85% 15%, rgba(203,166,247,0.20), transparent 62%),
    radial-gradient(70% 90% at 90% 95%, rgba(250,179,135,0.18), transparent 60%),
    radial-gradient(50% 60% at 45% 100%, rgba(166,227,161,0.14), transparent 70%),
    linear-gradient(160deg, #171727, #0f0f19 70%);
  filter: saturate(120%);
}
.panel > .glow::after {
  content: ""; position: absolute; inset: 0; opacity: 0.4; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
}

.pill {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.02em;
  color: rgba(255,255,255,0.95); background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14); border-radius: 999px;
  padding: 6px 14px 6px 12px; backdrop-filter: blur(6px);
}

/* ============================================================
   Hero: Text oben, Fenster-Screenshot darunter
   ============================================================ */
.hero-panel { margin: 28px 0 0; padding: 0; }
.hero-panel .pad { position: relative; padding: 64px clamp(24px, 5vw, 64px) 0; text-align: center; }
.hero-panel h1 {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(34px, 6vw, 72px); line-height: 1.02; letter-spacing: -0.03em;
  margin: 22px auto 18px; max-width: 18ch; overflow-wrap: break-word;
}
.hero-panel h1 .accent {
  background: linear-gradient(100deg, var(--blue), var(--lavender) 45%, var(--peach));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-panel p.sub { color: rgba(205,214,244,0.92); font-size: clamp(17px, 2vw, 20px); max-width: 54ch; margin: 0 auto 28px; }
.hero-panel .cta-row { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.hero-panel .legend {
  display: flex; gap: 22px; flex-wrap: wrap; justify-content: center;
  margin: 30px 0 0; font-family: var(--font-mono); font-size: 12.5px; color: var(--text-2);
}
.hero-panel .legend span { display: inline-flex; align-items: center; gap: 8px; }
.hero-shot { padding: 40px clamp(16px, 4vw, 56px) 0; }

/* Mac-Fenster um die Screenshots */
.window {
  position: relative; display: block;
  border-radius: 12px 12px 0 0;
  background: #181825;
  border: 1px solid rgba(255,255,255,0.12); border-bottom: 0;
  box-shadow: 0 -20px 60px -30px rgba(137,180,250,0.35), 0 30px 80px -30px rgba(0,0,0,0.9);
  overflow: hidden;
}
.window.rounded { border-radius: 12px; border-bottom: 1px solid rgba(255,255,255,0.12); }
.window .titlebar {
  display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px;
  background: linear-gradient(#22223a, #1b1b2c); border-bottom: 1px solid rgba(255,255,255,0.07);
  font-family: var(--font-mono); font-size: 12px; color: var(--text-3);
}
.window .titlebar .lights { display: flex; gap: 7px; }
.window .titlebar .lights i { width: 12px; height: 12px; border-radius: 999px; display: block; }
.window .titlebar .lights i:nth-child(1) { background: #ff5f57; }
.window .titlebar .lights i:nth-child(2) { background: #febc2e; }
.window .titlebar .lights i:nth-child(3) { background: #28c840; }
.window .titlebar .name { flex: 1; text-align: center; margin-right: 50px; }
.window img { display: block; width: 100%; height: auto; }

/* ============================================================
   Feature-Bento
   ============================================================ */
.bento { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.feature {
  position: relative; background: var(--surface);
  border: 1px solid var(--line-soft); border-radius: var(--r);
  padding: 26px; grid-column: span 2; overflow: hidden;
  transition: transform 0.25s var(--ease), border-color 0.25s, background 0.25s;
}
.feature.wide { grid-column: span 3; }
.feature::after { content: ""; position: absolute; inset: 0 0 auto 0; height: 2px; background: var(--c, var(--blue)); transform: scaleX(0); transform-origin: left; transition: transform 0.3s var(--ease); }
.feature:hover { transform: translateY(-4px); border-color: var(--line); background: var(--surface-2); }
.feature:hover::after { transform: scaleX(1); }
.feature.peach { --c: var(--peach); } .feature.green { --c: var(--green); } .feature.mauve { --c: var(--mauve); } .feature.yellow { --c: var(--yellow); }
.feature .ico { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 11px; background: color-mix(in srgb, var(--c, var(--blue)) 12%, transparent); color: var(--c, var(--blue)); margin-bottom: 16px; }
.feature .ico svg { width: 22px; height: 22px; }
.feature h3 { font-family: var(--font-display); font-weight: 500; font-size: 18px; letter-spacing: -0.01em; margin-bottom: 7px; }
.feature p { color: var(--text-2); font-size: 15px; }
@media (max-width: 900px) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature, .feature.wide { grid-column: span 1; }
}
@media (max-width: 560px) { .bento { grid-template-columns: minmax(0, 1fr); } }

/* ============================================================
   Layouts: drei Fenster nebeneinander
   ============================================================ */
.layouts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.layout { display: flex; flex-direction: column; gap: 14px; }
.layout .window { transition: transform 0.3s var(--ease); }
.layout:hover .window { transform: translateY(-6px); }
.layout figcaption h3 { font-family: var(--font-display); font-weight: 500; font-size: 18px; letter-spacing: -0.01em; margin-bottom: 4px; }
.layout figcaption p { color: var(--text-2); font-size: 15px; }
.layout figcaption .kbd-row { margin-top: 8px; font-family: var(--font-mono); font-size: 12.5px; color: var(--text-3); }
@media (max-width: 900px) { .layouts { grid-template-columns: minmax(0, 1fr); } }

/* ============================================================
   Schritte (Panel mit Split)
   ============================================================ */
.panel .split { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 48px; align-items: center; padding: 56px clamp(24px, 5vw, 60px); }
.panel .split > * { min-width: 0; max-width: 100%; }
.panel .panel-head .section-tag { color: #fff; }
.panel .panel-head .section-tag::before { color: rgba(255,255,255,0.45); }
.panel .panel-head h2 { font-family: var(--font-display); font-weight: 700; font-size: clamp(26px, 3.6vw, 40px); line-height: 1.08; letter-spacing: -0.02em; margin: 14px 0 28px; }
.steps { display: grid; gap: 22px; }
.step { display: flex; gap: 16px; align-items: flex-start; }
.step .n { flex: none; width: 36px; height: 36px; border-radius: 999px; display: grid; place-items: center; font-family: var(--font-mono); font-weight: 600; font-size: 15px; color: var(--bg-deep); background: linear-gradient(135deg, var(--blue), var(--peach)); }
.step h3 { font-family: var(--font-display); font-weight: 500; font-size: 19px; margin-bottom: 4px; letter-spacing: -0.01em; }
.step p { color: rgba(205,214,244,0.9); font-size: 15px; }
@media (max-width: 880px) {
  .panel .split { grid-template-columns: 1fr; gap: 36px; }
  .panel .split .media { order: -1; }
}

/* ============================================================
   Tastenkürzel-Tabelle
   ============================================================ */
.keys { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.keygroup { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.keygroup h3 { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-2); font-weight: 500; background: var(--surface-2); padding: 11px 18px; border-bottom: 1px solid var(--line); }
.keygroup table { width: 100%; border-collapse: collapse; }
.keygroup td { padding: 10px 18px; border-bottom: 1px solid var(--line-soft); font-size: 15px; color: var(--text-2); vertical-align: top; }
.keygroup tr:last-child td { border-bottom: 0; }
.keygroup td:first-child { width: 34%; color: var(--text); white-space: nowrap; }
.keygroup tr:hover td { background: var(--surface-2); }
.keys-note { color: var(--text-3); font-family: var(--font-mono); font-size: 13.5px; margin-top: 18px; }
@media (max-width: 760px) { .keys { grid-template-columns: minmax(0, 1fr); } .keygroup td:first-child { white-space: normal; } .keygroup table { table-layout: fixed; } }

/* ============================================================
   Voraussetzungen
   ============================================================ */
.req { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.req div { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--r); padding: 22px 24px; }
.req .lbl { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); margin-bottom: 8px; }
.req p { color: var(--text-2); font-size: 15px; }
.req b { color: var(--text); font-weight: 600; display: block; margin-bottom: 4px; font-size: 17px; }
@media (max-width: 760px) { .req { grid-template-columns: minmax(0, 1fr); } }

.note-box {
  border-left: 2px solid var(--line); padding: 4px 0 4px 18px;
  color: var(--text-3); font-size: 14px; font-family: var(--font-mono); line-height: 1.6;
  max-width: 82ch; margin-top: 26px;
}

/* ============================================================
   Schluss-CTA
   ============================================================ */
.endcta { position: relative; text-align: center; padding: clamp(64px, 9vw, 104px) 28px; }
.endcta .appicon { width: 96px; height: 96px; border-radius: 22px; margin: 0 auto 22px; display: block; box-shadow: 0 20px 50px -20px rgba(0,0,0,0.9); }
.endcta h2 { font-family: var(--font-display); font-weight: 700; font-size: clamp(30px, 5vw, 50px); letter-spacing: -0.03em; line-height: 1.05; margin-bottom: 18px; }
.endcta p { color: var(--text-2); font-size: 18px; max-width: 48ch; margin: 0 auto 30px; }
.endcta .cta-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ============================================================
   Rechtstexte
   ============================================================ */
.prose { max-width: 760px; margin: 0 auto; padding: 64px 0 96px; }
.prose .section-tag { margin-bottom: 18px; }
.prose h1 { font-family: var(--font-display); font-weight: 700; font-size: clamp(32px, 5vw, 44px); letter-spacing: -0.02em; margin-bottom: 6px; }
.prose h2 { font-family: var(--font-display); font-weight: 500; font-size: 21px; letter-spacing: -0.01em; margin: 40px 0 12px; padding-top: 20px; border-top: 1px solid var(--line-soft); }
.prose p, .prose li { color: var(--text-2); margin-bottom: 12px; }
.prose ul { padding-left: 22px; }
.prose strong { color: var(--text); }
.prose a { border-bottom: 1px solid rgba(137,180,250,0.35); }
.prose a:hover { border-bottom-color: var(--blue); }
.prose .meta { color: var(--text-3); font-family: var(--font-mono); font-size: 14px; }
.prose code { font-family: var(--font-mono); font-size: 0.9em; color: var(--peach); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 56px 0; }
.prose .lang-switch { font-family: var(--font-mono); font-size: 13px; color: var(--text-3); margin-bottom: 24px; }

/* ============================================================
   Footer
   ============================================================ */
.site-footer { border-top: 1px solid var(--line-soft); padding: 44px 0; margin-top: 24px; background: var(--bg-deep); }
.site-footer .container { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; justify-content: space-between; }
.site-footer .foot-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text-2); }
.site-footer .foot-brand .mark { width: 22px; height: 22px; border-radius: 6px; }
.site-footer .copy { color: var(--text-3); font-family: var(--font-mono); font-size: 13px; }
.site-footer .links { display: flex; gap: 20px; }
.site-footer .links a { color: var(--text-2); font-size: 14px; }
.site-footer .links a:hover { color: var(--text); }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 880px) {
  section.block { padding: 68px 0; }
  .nav-links { display: none; }
}
@media (max-width: 520px) {
  .container { padding: 0 16px; }
  body { font-size: 16px; }
  .hero-panel .pad { padding-top: 44px; }
  .window .titlebar { height: 28px; font-size: 11px; }
}
