/* ==========================================================================
   Probot — einheitliches Design für alle Seiten
   Video-Hintergrund (fixiert, bleibt beim Scrollen stehen), Retro-Dot-Matrix-
   Schrift für Überschriften, Inter für Fließtext. Normales Scrollen (kein
   overflow:hidden mehr) - der Kopfbereich ist "sticky" (bleibt oben kleben),
   verschwindet aber NICHT beim Scrollen und taucht nicht mittendrin erneut
   auf (kein Headroom-Verhalten mehr).
   ========================================================================== */

:root {
  --bg: #000000;
  --text: #ffffff;
  --muted: #8e8e8e;
  --nav-text: #2e2e2e;
  --pill-dark: #28282a;
  --sign-in-text: #c8c8c8;
  --nav-shadow: 0 4px 14px rgba(0, 0, 0, 0.16);
  --font-sans: "Inter", "Segoe UI", system-ui, sans-serif;
  --font-display: "BubbledotICG-FinePos", monospace;

  --glass-bg: rgba(255, 255, 255, 0.06);
  --glass-bg-strong: rgba(255, 255, 255, 0.1);
  --glass-border: rgba(255, 255, 255, 0.16);
  --color-border: rgba(255, 255, 255, 0.14);
  --blur-amount: 16px;
  --radius: 20px;

  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 40px;
  --space-5: 64px;
  --space-6: 96px;
}

* { box-sizing: border-box; }

/* Wichtig: .overlay/.mobile-sheet setzen weiter unten "display: flex" fest,
   das wuerde ohne diese Regel das hidden-Attribut ueberschreiben (genau das
   war der Bug: Menue war IMMER sichtbar, auch am PC, weil "display: flex"
   Vorrang vor dem Browser-Standardverhalten fuer [hidden] hatte). */
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.15;
  margin: 0 0 var(--space-2);
}
h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.2rem); }
h3 { font-family: var(--font-sans); font-weight: 600; font-size: 1.2rem; }

p { margin: 0 0 var(--space-2); }
a { color: inherit; text-decoration: none; }

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: #fff; color: #000; padding: 8px 16px;
  z-index: 200; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Hintergrundvideo: fixiert, bleibt beim Scrollen an Ort und Stelle ---------- */

.bg {
  position: fixed;
  inset: 0;
  background: #000;
  overflow: hidden;
  z-index: -1;
}
.bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  filter: brightness(0.5);
}
/* Zusätzliches Verdunkeln nach unten, damit langer Fließtext auf Unterseiten
   lesbar bleibt (das Video ist fürs erste Sichtfeld gedacht, nicht für
   beliebig langen Scroll-Inhalt). */
.bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.55) 55%, #000 100%);
}

/* ---------- Kopfbereich: sticky, kein Ein-/Ausblenden ---------- */

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 1.8vw, 20px);
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(14px, 2.2vh, 22px) clamp(14px, 3vw, 32px) clamp(10px, 1.6vh, 16px);
}

.logo {
  display: grid;
  place-items: center;
  width: clamp(40px, 4.4vw, 46px);
  height: clamp(40px, 4.4vw, 46px);
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--nav-shadow);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.logo:hover { transform: scale(1.04); }
.logo img { width: 72%; height: 72%; object-fit: contain; }

.nav-pill {
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  height: clamp(42px, 5vw, 46px);
  max-width: 460px;
  flex: 1;
  padding: 4px 6px;
  border-radius: 999px;
  background: #fff;
  box-shadow: var(--nav-shadow);
}

.nav-link {
  position: relative;
  font-weight: 500;
  font-size: clamp(12px, 1.3vw, 14px);
  letter-spacing: -0.01em;
  color: var(--nav-text);
  opacity: 0.5;
  padding: 6px 8px;
  transition: opacity 0.2s ease;
  white-space: nowrap;
}
.nav-link:hover { opacity: 0.75; }
.nav-link.active { opacity: 1; }

/* Login-Pille zum eigenstaendigen Cora-Dashboard: bewusst NICHT mehr Teil
   der weissen Nav-Pille (die wurde dadurch zu eng, "Dein Projekt" ragte
   heraus) - jetzt eine zweite dunkle Pille im exakt gleichen Stil wie
   .sign-in-pill (gleiche Klasse), direkt daneben in derselben Kopfzeile. */
.nav-link.active::after {
  content: "";
  position: absolute;
  left: 50%; bottom: 3px;
  width: 3px; height: 3px;
  border-radius: 50%;
  background: #000;
  box-shadow: -5px 0 0 #000, 5px 0 0 #000;
}

.sign-in-pill {
  display: flex; align-items: center; justify-content: center;
  height: clamp(42px, 5vw, 46px);
  padding: 0 clamp(14px, 2vw, 20px);
  border-radius: 999px;
  background: var(--pill-dark);
  color: var(--sign-in-text);
  font-size: clamp(12px, 1.3vw, 14px);
  font-weight: 500;
  box-shadow: var(--nav-shadow);
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}
.sign-in-pill:hover { background: #323234; color: #fff; transform: translateY(-1px); }

.burger {
  display: none;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--pill-dark);
  border: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  box-shadow: var(--nav-shadow);
}
.burger span { width: 18px; height: 1.5px; background: #fff; transition: transform 0.3s ease, opacity 0.2s ease, background 0.3s ease; }
.burger[aria-expanded="true"] { background: #fff; }
.burger[aria-expanded="true"] span { background: #000; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ---------- Mobiles Menü ---------- */

.overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.62);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 150;
  animation: overlayIn 0.28s ease both;
}
@keyframes overlayIn { from { opacity: 0; } to { opacity: 1; } }

.mobile-sheet {
  position: fixed;
  top: 78px; left: 50%;
  transform: translateX(-50%);
  width: min(320px, 88vw);
  background: #fff;
  border-radius: 28px;
  padding: 20px 16px 18px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.45);
  z-index: 151;
  display: flex; flex-direction: column; gap: 4px;
  animation: menuIn 0.38s cubic-bezier(0.22, 1, 0.36, 1) both;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
}
@keyframes menuIn {
  from { opacity: 0; transform: translateX(-50%) translateY(-10px) scale(0.96); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

.sheet-link {
  position: relative;
  padding: 12px 14px;
  border-radius: 14px;
  font-weight: 500;
  color: var(--nav-text);
  opacity: 0;
  animation: linkIn 0.4s ease forwards;
  animation-delay: calc(var(--i, 0) * 0.05s + 0.05s);
}
.sheet-link.active { font-weight: 600; }
.sheet-link.active::after {
  content: "";
  position: absolute; left: 14px; bottom: 8px;
  width: 3px; height: 3px; border-radius: 50%; background: #000;
  box-shadow: 5px 0 0 #000, 10px 0 0 #000;
}
@keyframes linkIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }

.sheet-signin {
  margin-top: 6px; text-align: center;
  background: var(--pill-dark); color: #fff;
  padding: 12px 14px; border-radius: 14px; font-weight: 600;
  opacity: 0; animation: linkIn 0.4s ease forwards;
  animation-delay: calc(var(--i, 0) * 0.05s + 0.05s);
}

body.menu-open { overflow: hidden; }

/* ---------- Hero (nur Startseite) ---------- */

.hero {
  min-height: calc(100vh - 100px);
  min-height: calc(100dvh - 100px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; max-width: 900px; margin: 0 auto;
  padding: var(--space-4) var(--space-3);
}

.headline {
  color: #fff;
  font-size: clamp(28px, 6.2vw, 80px);
  letter-spacing: -0.04em;
  line-height: 1.12;
  margin: 0 0 clamp(14px, 2vh, 20px);
}
.headline .line {
  display: inline-block; opacity: 0; transform: translateY(14px);
  animation: headlineFade 0.85s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: var(--d, 0s);
}
@keyframes headlineFade { to { opacity: 1; transform: translateY(0); } }

.subhead {
  max-width: min(500px, 92%);
  font-size: clamp(15.5px, calc(1.55vw + 2pt), 18.5px);
  color: #d0d0d0; opacity: 0.8; line-height: 1.55; font-weight: 400;
  margin: 0 auto clamp(20px, 3vh, 30px);
}

.cta {
  display: inline-flex; align-items: center; justify-content: center;
  background: #fff; color: #000;
  font-family: var(--font-sans); font-weight: 600;
  font-size: clamp(13.5px, 1.5vw, 14.5px);
  padding: clamp(11px, 1.6vh, 13px) clamp(22px, 3vw, 28px);
  border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.15), 0 0 22px rgba(255,255,255,0.32), 0 0 44px rgba(255,255,255,0.12);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.cta:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.25), 0 0 30px rgba(255,255,255,0.45), 0 0 60px rgba(255,255,255,0.18);
}

/* ---------- Stats (Startseite) ---------- */

.stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: clamp(10px, 2vw, 20px);
  max-width: 920px; margin: 0 auto;
  padding: 0 var(--space-3) var(--space-6);
}
.stat { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.stat-icon { font-family: var(--font-display); font-size: clamp(22px, 3vw, 33px); color: #fff; line-height: 1; }
.stat-value { color: #fff; font-size: clamp(18px, 2.2vw, 26px); letter-spacing: -0.025em; font-variant-numeric: tabular-nums; font-weight: 600; }
.stat-label { color: var(--muted); font-size: clamp(11px, 1.2vw, 12.5px); }

/* ---------- Seiteninhalt (Unterseiten) ---------- */

.page-hero {
  max-width: 820px; margin: 0 auto; text-align: center;
  padding: clamp(40px, 8vh, 80px) var(--space-3) var(--space-4);
}
.eyebrow {
  text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.8rem;
  color: var(--muted); font-weight: 600; margin-bottom: var(--space-1);
  font-family: var(--font-sans);
}
.page-hero .hero-text {
  font-size: 1.05rem; color: rgba(255,255,255,0.8);
  max-width: 60ch; margin: 0 auto;
}

.section { max-width: 1100px; margin: 0 auto; padding: 0 var(--space-3) var(--space-6); }

.glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  backdrop-filter: blur(var(--blur-amount));
  -webkit-backdrop-filter: blur(var(--blur-amount));
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}
@supports not (backdrop-filter: blur(1px)) { .glass { background: rgba(18,18,18,0.92); } }

.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--space-3); margin-bottom: var(--space-4); }
.card { padding: var(--space-3); transition: transform 0.22s ease, background 0.22s ease; }
.card:hover { transform: translateY(-4px); background: var(--glass-bg-strong); }
.card p { color: rgba(255,255,255,0.8); font-size: 0.98rem; }
.card-note { font-size: 0.85rem; color: var(--muted); border-top: 1px solid var(--color-border); padding-top: var(--space-1); margin-top: var(--space-1); }
.card-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; margin-top: var(--space-1); }
.card-link svg { transition: transform 0.2s ease; }
.card-link:hover svg { transform: translateX(4px); }

.pricing-panel { padding: var(--space-4); margin-bottom: var(--space-3); }
.pricing-intro { color: var(--muted); font-size: 0.95rem; }
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--space-3); margin-top: var(--space-3); }
.pricing-tier { background: rgba(255,255,255,0.04); border: 1px solid var(--color-border); border-radius: 14px; padding: var(--space-2); text-align: center; }
.tier-name { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.8rem; color: var(--muted); margin: 0 0 4px; }
.tier-price { font-size: 1.8rem; font-weight: 700; margin: 0 0 var(--space-1); font-family: var(--font-sans); }
.tier-price span { font-size: 0.9rem; font-weight: 400; color: var(--muted); }
.tier-desc { font-size: 0.88rem; color: rgba(255,255,255,0.75); margin: 0; }

.differentiators { padding: var(--space-4); }
.differentiators ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
.differentiators li { position: relative; padding-left: var(--space-3); color: rgba(255,255,255,0.85); }
.differentiators li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 8px; height: 8px; border-radius: 50%; background: #fff; }

.portfolio-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: var(--space-3); }
.portfolio-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; transition: transform 0.22s ease, box-shadow 0.22s ease; }
.portfolio-card:hover { transform: translateY(-6px); box-shadow: 0 20px 50px rgba(0,0,0,0.55); }
.portfolio-media { height: 160px; background: linear-gradient(135deg, rgba(255,255,255,0.12), rgba(255,255,255,0.02)); display: flex; align-items: center; justify-content: center; border-bottom: 1px solid var(--color-border); font-weight: 700; font-size: 1.4rem; color: rgba(255,255,255,0.5); letter-spacing: 0.04em; }
.portfolio-body { padding: var(--space-3); flex: 1; display: flex; flex-direction: column; }
.portfolio-tag { display: inline-block; align-self: flex-start; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--color-border); color: var(--muted); margin-bottom: var(--space-1); }
.portfolio-tag.live { color: #fff; border-color: rgba(255,255,255,0.4); }
a.portfolio-tag.live {
  transition: background 0.2s ease, transform 0.2s ease;
  cursor: pointer;
}
a.portfolio-tag.live:hover {
  background: rgba(255,255,255,0.15);
  transform: translateY(-1px);
}
a.portfolio-tag.live::before {
  content: "";
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #22c55e;
  margin-right: 6px;
  vertical-align: middle;
}
.portfolio-diff { margin: var(--space-2) 0 0; padding: var(--space-2) 0 0; border-top: 1px solid var(--color-border); display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); font-size: 0.85rem; }
.portfolio-diff dt { color: var(--muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; }
.portfolio-diff dd { margin: 2px 0 0; }

.about-panel, .contact-panel { padding: var(--space-5) var(--space-4); max-width: 780px; margin: 0 auto; }
.contact-panel { text-align: center; }
.contact-panel p { color: rgba(255,255,255,0.8); }
.contact-email { margin-top: var(--space-2); font-size: 1.05rem; }

.value-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--space-2); margin-top: var(--space-3); }
.value-item { background: rgba(255,255,255,0.04); border: 1px solid var(--color-border); border-radius: 14px; padding: var(--space-2); }
.value-item h3 { font-size: 1.05rem; margin-bottom: 4px; }
.value-item p { font-size: 0.92rem; color: rgba(255,255,255,0.75); margin: 0; }

.site-footer { text-align: center; padding: var(--space-4) var(--space-2); color: var(--muted); font-size: 0.85rem; border-top: 1px solid var(--color-border); }
.site-footer a { text-decoration: underline; text-underline-offset: 3px; }

/* Impressum / Datenschutz */
.legal-section { padding-top: var(--space-4); padding-bottom: var(--space-6); }
.legal-panel { max-width: 760px; margin: 0 auto; padding: clamp(28px, 5vw, 48px); }
.legal-title { font-size: clamp(28px, 4vw, 40px); margin-bottom: var(--space-3); }
.legal-panel h2 { font-size: 1.05rem; margin-top: 2em; margin-bottom: 0.5em; color: var(--text); }
.legal-panel h2:first-of-type { margin-top: 1.2em; }
.legal-panel p, .legal-panel li { color: var(--muted); line-height: 1.6; font-size: 0.95rem; }
.legal-panel ul { padding-left: 1.2em; margin: 0.5em 0; }
.legal-panel a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.legal-updated { margin-top: 2.5em; font-size: 0.8rem; opacity: 0.6; }

/* ---------- Gemeinsame Einblend-Animation für Unterseiten-Inhalte ---------- */

[data-reveal], [data-reveal-item] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.5s cubic-bezier(.22,.8,.2,1), transform 0.5s cubic-bezier(.22,.8,.2,1);
  will-change: transform, opacity;
}
[data-reveal].is-visible, [data-reveal-item].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .headline .line { animation: none !important; opacity: 1 !important; transform: none !important; }
}

/* ---------- Mobile ---------- */

@media (max-width: 720px) {
  .nav-pill, .sign-in-pill { display: none; }
  .header { justify-content: space-between; }
  .burger { display: flex; }
  .headline { letter-spacing: -0.08em; line-height: 1.05; }
  .stats { grid-template-columns: repeat(2, 1fr); row-gap: 18px; }
}
@media (max-width: 420px) {
  .headline { letter-spacing: -0.09em; line-height: 1.04; }
}

/* ---------- Projektzugang-Formular ("Dein Projekt") ---------- */

.project-form { display: flex; flex-direction: column; gap: var(--space-2); text-align: left; }
.form-label {
  display: block; font-size: 0.8rem; color: var(--muted);
  margin-bottom: 6px; font-weight: 500;
}
.form-input {
  width: 100%; min-height: 50px; padding: 0 16px;
  border-radius: 12px; border: 1px solid var(--color-border);
  background: rgba(255,255,255,0.05); color: #fff;
  font-size: 0.98rem; font-family: var(--font-sans);
  transition: border-color 0.2s ease, background 0.2s ease;
}
.form-input:focus {
  outline: none; border-color: rgba(255,255,255,0.5); background: rgba(255,255,255,0.08);
}
.form-input::placeholder { color: rgba(255,255,255,0.3); }
#project-code {
  font-family: "SFMono-Regular", Consolas, monospace;
  letter-spacing: 0.06em; text-transform: uppercase; text-align: center;
}
.form-error {
  color: #f87171; font-size: 0.85rem; margin: 0; min-height: 1.2em;
}
.project-form .cta { border: none; cursor: pointer; margin-top: 4px; }
.project-form .cta:disabled { opacity: 0.6; cursor: default; }
