/* =========================================================
   ELIAS LEDER — PORTFOLIO SITE
   Swiss International Style: precise grid, red/gold accent,
   living aurora background, dark + light themes.
   ========================================================= */

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

:root {
  /* Colors — light (default)
     Textfarben bewusst dunkel gehalten: --muted lag vorher bei #767B84 und
     erreichte auf --bg nur ein Kontrastverhaeltnis von 4.08, also unter dem
     Mindestwert 4.5 fuer lesbaren Fliesstext. Jetzt rund 6.7. */
  --bg:        #FBFAF7;
  --bg-soft:   #EFECE2;
  --surface:   #FFFFFF;
  --surface-2: #FDFCFA;
  --ink:       #101318;
  --ink-soft:  #3C4047;
  --muted:     #565A62;
  --red:       #D9001A;
  --red-dark:  #A8000D;
  --red-light: #FF5A47;
  --gold:      #B8952F;
  --border:    #DCD8CF;
  --border-strong: #BDB8AD;
  /* Farbe der Rasterlinien im Hintergrund. Bewusst sehr schwach, damit das
     Raster als Textur wirkt und nicht mit dem Text konkurriert. */
  --raster:    rgba(16, 19, 24, .055);

  /* Statistik-Leiste. Im Hellmodus ein ruhiger sandgrauer Streifen statt eines
     fast schwarzen Blocks: klar als eigener Bereich erkennbar, aber ohne den
     harten Schwarz-auf-Weiss-Bruch. Im Dunkelmodus bleibt sie dunkel. */
  --stats-bg1:   #E6E6E3;
  --stats-bg2:   #DCDCD9;
  --stats-text:  var(--ink);
  --stats-dim:   var(--muted);
  --stats-label: var(--muted);
  --stats-line:  rgba(16, 19, 24, .16);
  --stats-raster: rgba(16, 19, 24, .05);

  /* Constants — do not flip with theme */
  --white:     #FFFFFF;
  --ink-band:  #14171C;
  --mock-dark-bg: #14120E;
  --mock-gold:    #C8A84B;

  /* Layout */
  --radius:    4px;
  --radius-lg: 10px;
  --ease: cubic-bezier(.16,.8,.24,1);
  --transition: 0.25s var(--ease);
  --max: 1180px;

  --sp-sm: 8px;
  --sp-md: 16px;
  --sp-lg: 24px;
  --sp-xl: 48px;

  --shadow-sm: 0 2px 10px rgba(20,23,28,0.06);
  --shadow-md: 0 20px 40px -16px rgba(20,23,28,0.18);
  --shadow-lg: 0 30px 60px -20px rgba(20,23,28,0.28);

  --font-mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', monospace;
}

/* Hinweis: Es gibt bewusst KEINE Umschaltung nach Systemeinstellung.
   Die Website startet immer im hellen Design. Dunkel nur ueber den Schalter,
   der die Wahl in :root[data-theme="dark"] und im Browserspeicher ablegt. */
:root[data-theme="dark"] {
  --bg:        #0A0B0D;
  --bg-soft:   #111318;
  --surface:   #16181D;
  --surface-2: #1B1D22;
  --ink:       #F4F3F0;
  --ink-soft:  #C2C4C9;
  --muted:     #8B8E96;
  --red:       #FF3B30;
  --red-dark:  #E3001B;
  --red-light: #FF7A66;
  --gold:      #D8BC6E;
  --border:    #26282E;
  --border-strong: #34363D;
  --raster: rgba(255, 255, 255, .055);
  --stats-bg1:   #14171C;
  --stats-bg2:   #1D2027;
  --stats-text:  #FFFFFF;
  --stats-dim:   rgba(255,255,255,.5);
  --stats-label: rgba(255,255,255,.55);
  --stats-line:  rgba(255,255,255,.14);
  --stats-raster: rgba(255,255,255,.05);
  --shadow-sm: 0 2px 10px rgba(0,0,0,0.35);
  --shadow-md: 0 20px 40px -16px rgba(0,0,0,0.55);
  --shadow-lg: 0 30px 60px -20px rgba(0,0,0,0.65);
}

html { scroll-behavior: smooth; background: var(--bg); }

body {
  font-family: 'IBM Plex Sans', 'Segoe UI', system-ui, sans-serif;
  background: transparent;
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: color .4s var(--ease);
}

header, main, footer { position: relative; z-index: 1; }

h1, h2, h3 {
  font-family: 'IBM Plex Sans', 'Segoe UI', system-ui, sans-serif;
  font-weight: 600;
  letter-spacing: -0.5px;
  line-height: 1.1;
  text-wrap: balance;
}

a { color: inherit; text-decoration: none; }

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

img { width: 100%; height: auto; display: block; }

::selection { background: var(--red); color: #fff; }

::-webkit-scrollbar { width: 11px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 10px; border: 3px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }
html { scrollbar-color: var(--border-strong) var(--bg); scrollbar-width: thin; }

/* Focus visibility */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

/* ===== AMBIENT BACKGROUND ===== */
.bg-fx {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: var(--bg);
  transition: background .4s var(--ease);
}
/* Linienraster ueber die gesamte Seite, gleiche Optik wie in der Statistik-Leiste.
   Frueher war es ein Punktraster, das per Maske nur oben sichtbar war. Ohne Maske
   liegt es jetzt durchgehend hinter dem Inhalt, der Aurora-Effekt bleibt darunter. */
.bg-fx__grid {
  position: absolute;
  inset: -10%;
  background-image:
    linear-gradient(var(--raster) 1px, transparent 1px),
    linear-gradient(90deg, var(--raster) 1px, transparent 1px);
  background-size: 40px 40px;
  will-change: transform;
}
.bg-fx__aurora { position: absolute; inset: 0; filter: blur(90px); }
.blob { position: absolute; border-radius: 50%; opacity: .32; will-change: transform; }
.blob--red { width: 620px; height: 620px; top: -220px; left: -160px; background: radial-gradient(circle, var(--red) 0%, transparent 70%); animation: drift1 26s ease-in-out infinite alternate; }
.blob--gold { width: 520px; height: 520px; top: 6%; right: -180px; background: radial-gradient(circle, var(--gold) 0%, transparent 70%); animation: drift2 32s ease-in-out infinite alternate; }
.blob--ink { width: 600px; height: 600px; bottom: -260px; left: 28%; background: radial-gradient(circle, var(--ink-band) 0%, transparent 70%); opacity: .10; animation: drift3 38s ease-in-out infinite alternate; }
:root[data-theme="dark"] .blob { mix-blend-mode: screen; opacity: .22; }
:root[data-theme="dark"] .blob--ink { opacity: 0; }
@keyframes drift1 { 0% { transform: translate(0,0) scale(1); } 100% { transform: translate(70px,50px) scale(1.15); } }
@keyframes drift2 { 0% { transform: translate(0,0) scale(1); } 100% { transform: translate(-60px,70px) scale(1.1); } }
@keyframes drift3 { 0% { transform: translate(0,0) scale(1); } 100% { transform: translate(50px,-40px) scale(1.2); } }

.bg-fx__noise {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  opacity: .035;
  mix-blend-mode: overlay;
}
:root[data-theme="dark"] .bg-fx__noise { opacity: .05; }

@media (max-width: 900px) {
  .blob--red, .blob--gold, .blob--ink { width: 380px; height: 380px; }
}

/* ===== AURORA AM MAUSZEIGER =====
   Wird von cursor.js erzeugt. Bewusst ein weicher Farbverlauf statt filter:blur(),
   weil ein Weichzeichner auf einer so grossen Flaeche in jedem Bild neu berechnet
   werden muesste und die Seite spuerbar verlangsamt. */
.cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 520px;
  height: 520px;
  margin: -260px 0 0 -260px;   /* zentriert den Schein auf dem Zeiger */
  border-radius: 50%;
  pointer-events: none;         /* darf Klicks niemals abfangen */
  z-index: 3;
  background: radial-gradient(circle,
              color-mix(in srgb, var(--red) 70%, transparent) 0%,
              color-mix(in srgb, var(--red) 26%, transparent) 38%,
              transparent 68%);
  opacity: 0;
  transition: opacity .45s var(--ease);
  will-change: transform;
}
.cursor-glow.aktiv { opacity: .22; }

:root[data-theme="dark"] .cursor-glow { mix-blend-mode: screen; }
:root[data-theme="dark"] .cursor-glow.aktiv { opacity: .28; }

/* ===== SCROLL PROGRESS ===== */
.scroll-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 1001; pointer-events: none; }
.scroll-progress span { display: block; height: 100%; width: 0%; background: linear-gradient(90deg, var(--red), var(--gold)); }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform var(--transition), background var(--transition), border-color var(--transition), color var(--transition), box-shadow var(--transition);
  white-space: nowrap;
  will-change: transform;
}
.btn svg { flex: none; }
.btn:hover { transform: translateY(-1px); }
/* Primaerer Knopf: leichter Verlauf von oben hell nach unten dunkel plus feine
   Lichtkante innen. Das gibt dem Knopf Tiefe, statt ihn als flache Farbflaeche
   stehen zu lassen — wirkt hochwertiger und hebt ihn klarer vom Hintergrund ab. */
.btn-primary {
  background: linear-gradient(180deg,
              color-mix(in srgb, var(--red) 86%, #fff) 0%,
              var(--red) 45%,
              var(--red-dark) 100%);
  color: #fff;
  border-color: color-mix(in srgb, var(--red-dark) 60%, transparent);
  letter-spacing: .2px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.30),
    0 2px 4px -2px rgba(16,19,24,.35),
    0 10px 22px -10px color-mix(in srgb, var(--red) 62%, transparent);
}
.btn-primary:hover {
  background: linear-gradient(180deg,
              color-mix(in srgb, var(--red) 94%, #fff) 0%,
              var(--red) 40%,
              var(--red-dark) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.34),
    0 3px 6px -2px rgba(16,19,24,.42),
    0 16px 30px -12px color-mix(in srgb, var(--red) 72%, transparent);
}
.btn-outline { background: var(--surface); color: var(--ink); border-color: var(--border-strong); box-shadow: 0 1px 2px rgba(16,19,24,.05); }
.btn-outline:hover { border-color: var(--ink); box-shadow: 0 4px 12px -6px rgba(16,19,24,.25); }
.btn-arrow { width: 15px; height: 15px; transition: transform var(--transition); }
.btn-outline:hover .btn-arrow { transform: translateX(3px); }
.btn-lg { padding: 15px 30px; font-size: 1rem; }
.btn-block { width: 100%; }

/* ===== NAVBAR ===== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 72px;
  z-index: 3001;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}
.navbar.scrolled {
  border-bottom-color: var(--border);
  box-shadow: 0 4px 20px rgba(0,0,0,0.04);
}
.navbar-inner {
  max-width: var(--max);
  margin: 0 auto;
  height: 100%;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 10px; }
/* Logo-Monogramm. Das Bild bringt seinen eigenen dunklen Hintergrund mit,
   dadurch sieht es in hellem und dunklem Design identisch aus. */
.brand-mark {
  width: 34px; height: 34px;
  flex: none;
  display: block;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--ink-band);
}
.brand-name { font-family: 'IBM Plex Sans', 'Segoe UI', system-ui, sans-serif; font-weight: 600; font-size: 1.05rem; }

.nav { display: flex; align-items: center; gap: 32px; }
.nav-link { font-size: 0.95rem; font-weight: 500; color: var(--ink); position: relative; }
.nav-link::after {
  content: ''; position: absolute; left: 0; bottom: -4px; height: 2px; width: 0;
  background: var(--red); transition: width var(--transition);
}
.nav-link:hover::after, .nav-link.active::after { width: 100%; }
.nav-cta { margin-left: 8px; }
.nav-mobile-extra { display: none; }

.navbar-actions { display: flex; align-items: center; gap: 10px; position: relative; z-index: 3002; }
.theme-toggle {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: border-color var(--transition), transform var(--transition), background var(--transition);
  flex: none;
}
.theme-toggle:hover { border-color: var(--red); transform: translateY(-1px) rotate(-8deg); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px; height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
}
.hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--ink);
  transition: transform var(--transition), opacity var(--transition);
  margin: 0 auto;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-backdrop {
  position: fixed; inset: 0;
  background: rgba(10,11,13,0.5);
  z-index: 2999;
  opacity: 0; pointer-events: none;
  transition: opacity var(--transition);
}
.nav-backdrop.visible { opacity: 1; pointer-events: auto; }

/* ===== INTRO / EYEBROW ===== */
.intro-item {
  opacity: 0;
  transform: translateY(18px);
  animation: introIn .7s var(--ease) forwards;
  animation-delay: calc(var(--d, 0) * 0.09s + 0.15s);
}
@keyframes introIn { to { opacity: 1; transform: translateY(0); } }

.text-gradient {
  background: linear-gradient(100deg, var(--red) 0%, var(--red-light) 45%, var(--gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.72rem; font-weight: 500; text-transform: uppercase; letter-spacing: 1.5px;
  color: var(--ink-soft);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 7px 14px 7px 10px;
  border-radius: 999px;
  margin-bottom: 22px;
  box-shadow: var(--shadow-sm);
}
.eyebrow-dot {
  width: 7px; height: 7px; border-radius: 50%; flex: none;
  background: var(--red);
  animation: pulseDot 2.2s ease-out infinite;
}
.eyebrow-sep { opacity: .4; }
@keyframes pulseDot {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--red) 45%, transparent); }
  70% { box-shadow: 0 0 0 8px color-mix(in srgb, var(--red) 0%, transparent); }
  100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--red) 0%, transparent); }
}

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  padding-top: 72px;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.hero-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: var(--sp-xl) 24px;
  display: flex;
  align-items: center;
  gap: 64px;
  width: 100%;
}
.hero-text { max-width: 580px; position: relative; z-index: 2; }
.hero-title {
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  margin-bottom: 24px;
}
.hero-sub {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 480px;
  margin-bottom: 32px;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.hero-trust {
  display: flex; align-items: center; gap: 10px;
  font-size: 0.88rem; color: var(--muted);
}

/* Hero visual: stacked browser mockups */
.hero-visual { flex: 0 0 46%; position: relative; z-index: 2; perspective: 1400px; }
.browser-stack { position: relative; height: 420px; }
.browser-card {
  position: absolute;
  width: 92%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,0.28);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: transform .35s var(--ease), top var(--transition), left var(--transition), opacity var(--transition);
}
.browser-card--back { --base-rot: 4deg; top: 0; left: 8%; z-index: 1; opacity: 0.9; cursor: pointer; }
.browser-card--front { --base-rot: -3deg; top: 70px; left: 0; z-index: 2; cursor: pointer; }
.browser-card {
  transform: rotate(var(--base-rot, 0deg)) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--lift, 0px));
}
.browser-card:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

.expand-hint {
  position: absolute; top: 10px; right: 10px; z-index: 3;
  width: 30px; height: 30px; border-radius: 50%;
  background: rgba(0,0,0,.45); backdrop-filter: blur(4px);
  color: #fff; display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: scale(.8);
  transition: opacity var(--transition), transform var(--transition);
  pointer-events: none;
}
.expand-hint svg { width: 15px; height: 15px; }
.browser-card--front:hover .expand-hint,
.browser-card--front:focus-visible .expand-hint {
  opacity: 1; transform: scale(1);
}

.chip {
  position: absolute; z-index: 5;
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 0.72rem; font-weight: 500;
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
  padding: 8px 14px; box-shadow: var(--shadow-md); color: var(--ink-soft);
  animation: floatChip 5s ease-in-out infinite;
}
.chip--live { top: -14px; left: 4%; animation-delay: 0s; }
.chip--code { bottom: 8%; right: -4%; animation-delay: 1.4s; }
.chip-dot {
  width: 6px; height: 6px; border-radius: 50%; background: #3BB273;
  animation: pulseDotGreen 2s ease-out infinite;
}
@keyframes pulseDotGreen {
  0% { box-shadow: 0 0 0 0 rgba(59,178,115,.45); }
  70% { box-shadow: 0 0 0 6px rgba(59,178,115,0); }
  100% { box-shadow: 0 0 0 0 rgba(59,178,115,0); }
}
@keyframes floatChip { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* Live iframe previews inside browser mockups */
.browser-body.browser-body--live { padding: 0; overflow: hidden; }
.iframe-wrap { position: relative; width: 100%; height: 100%; overflow: hidden; transition: transform .5s var(--ease); }
.iframe-wrap iframe {
  --zoom: 0.25;
  position: absolute;
  top: 0; left: 0;
  width: calc(100% / var(--zoom));
  height: calc(100% / var(--zoom));
  border: 0;
  transform: scale(var(--zoom));
  transform-origin: top left;
  pointer-events: none;
}

.browser-chrome {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 12px;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
}
.dot { width: 8px; height: 8px; border-radius: 50%; }
.dot-r { background: #E3001B; }
.dot-y { background: #E8B93B; }
.dot-g { background: #3BB273; }
.browser-url {
  margin-left: 10px;
  font-size: 0.72rem;
  color: var(--muted);
  font-family: var(--font-mono);
}
.browser-body { padding: 24px 20px; height: 200px; }
.browser-body--warm { background: linear-gradient(145deg,#FFF9F0,#FBEFDC); }
.browser-body--dark { background: var(--mock-dark-bg); }


.scroll-cue { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 3; opacity: .6; transition: opacity var(--transition); }
.scroll-cue:hover { opacity: 1; }
.scroll-cue-mouse { display: block; width: 24px; height: 38px; border: 1.5px solid var(--ink-soft); border-radius: 14px; position: relative; }
.scroll-cue-wheel { position: absolute; top: 6px; left: 50%; width: 3px; height: 6px; margin-left: -1.5px; border-radius: 2px; background: var(--red); animation: scrollWheel 1.8s ease infinite; }
@keyframes scrollWheel {
  0% { opacity: 1; transform: translateY(0); }
  60% { opacity: 0; transform: translateY(10px); }
  61% { opacity: 0; transform: translateY(0); }
  100% { opacity: 0; }
}

/* ===== STATS BAR ===== */
.stats-bar {
  position: relative;
  background: linear-gradient(160deg, var(--stats-bg1) 0%, var(--stats-bg2) 100%);
  color: var(--stats-text);
  padding: 44px 0;
  overflow: hidden;
  border-top: 1px solid var(--stats-line);
  border-bottom: 1px solid var(--stats-line);
}
.stats-bar::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--stats-raster) 1px, transparent 1px),
    linear-gradient(90deg, var(--stats-raster) 1px, transparent 1px);
  background-size: 40px 40px;
  -webkit-mask-image: radial-gradient(ellipse 80% 100% at 50% 0%, black, transparent 80%);
  mask-image: radial-gradient(ellipse 80% 100% at 50% 0%, black, transparent 80%);
}
.stats-bar-inner {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.stat-card { display: flex; flex-direction: column; gap: 6px; padding: 4px 22px; border-left: 1px solid var(--stats-line); }
.stat-card:first-child { border-left: none; padding-left: 0; }
.stat-value {
  font-family: 'IBM Plex Sans', 'Segoe UI', system-ui, sans-serif;
  font-size: 2rem; font-weight: 700; letter-spacing: -.5px;
  display: flex; align-items: baseline; gap: 2px;
  font-variant-numeric: tabular-nums;
}
.stat-ratio { color: var(--stats-dim); }
.stat-label { font-size: 0.8rem; color: var(--stats-label); }

/* ===== SECTIONS ===== */
/* Leicht durchscheinend, damit der Aurora-Hintergrund spuerbar bleibt, aber
   deutlich deckender als zuvor (88/90%) — sonst verlieren Texte an Kontrast. */
/* Die Sektionen sind fast deckend, damit der Text guten Kontrast behaelt. Deshalb
   tragen sie das Raster selbst, statt es von hinten durchscheinen zu lassen.
   Wichtig: .section-alt setzt nur background-COLOR. Die Kurzform "background"
   wuerde das Rasterbild wieder loeschen. */
.section {
  padding: 96px 24px;
  background-color: color-mix(in srgb, var(--bg) 95%, transparent);
  background-image:
    linear-gradient(var(--raster) 1px, transparent 1px),
    linear-gradient(90deg, var(--raster) 1px, transparent 1px);
  background-size: 40px 40px;
}
.section-alt { background-color: color-mix(in srgb, var(--bg-soft) 96%, transparent); }
/* Bereichs-Bezeichnung mit vorangestellter Akzentlinie. Die Linie gibt dem
   kurzen Wort optisches Gewicht und verankert es an der Textkante, ohne dass
   die Schrift gross werden muss. */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2.4px;
  color: var(--red);
  margin-bottom: 16px;
}
.section-label::before {
  content: '';
  flex: none;
  width: 28px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--red), color-mix(in srgb, var(--red) 35%, transparent));
}
.section-title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin-bottom: 48px;
  max-width: 640px;
}

/* Services — bento grid */
/* Drei Spalten: sechs Leistungen ergeben zwei vollstaendige Reihen ohne Luecken. */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 1fr;
  gap: 20px;
}
.service-card {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px 26px;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.service-card:hover { border-color: color-mix(in srgb, var(--red) 45%, var(--border)); transform: translateY(-4px); box-shadow: var(--shadow-md); }

/* Zusatzleistung: hebt sich durch roten Rahmen, leichte Tönung und
   Preisschild vom uebrigen Leistungsangebot ab. */
.service-card--addon {
  border-color: color-mix(in srgb, var(--red) 42%, var(--border));
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--red) 6%, transparent), transparent 60%),
    var(--surface);
}
.service-card--addon .service-icon {
  border-color: color-mix(in srgb, var(--red) 35%, var(--border));
  background: color-mix(in srgb, var(--red) 8%, var(--surface));
}
/* Steht auf einer eigenen Zeile ueber dem Symbol. In der Ecke schwebend wuerde es
   in den schmalen Dreispaltenkarten die Ueberschrift umbrechen lassen. */
.service-tag {
  display: inline-flex;
  align-items: center;
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--red);
  background: color-mix(in srgb, var(--red) 12%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--red) 35%, transparent);
  padding: 5px 11px;
  border-radius: 999px;
  white-space: nowrap;
}
.service-price-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
  font-size: 0.88rem;
  color: var(--ink-soft);
}
.service-price {
  font-family: 'IBM Plex Sans', 'Segoe UI', system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: .2px;
  color: #fff;
  background: linear-gradient(180deg,
              color-mix(in srgb, var(--red) 86%, #fff) 0%,
              var(--red) 45%,
              var(--red-dark) 100%);
  border: 1px solid color-mix(in srgb, var(--red-dark) 60%, transparent);
  padding: 6px 14px;
  border-radius: 999px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.28),
    0 6px 14px -8px color-mix(in srgb, var(--red) 70%, transparent);
}
.service-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--red);
  margin-bottom: 18px;
}
.service-icon svg { width: 22px; height: 22px; }
.service-card h3 { font-size: 1.1rem; margin-bottom: 10px; }
.service-card p { color: var(--muted); font-size: 0.92rem; }

.leistungen-cta { display: flex; justify-content: center; margin-top: 28px; }

/* Cursor spotlight (services + projects) */
[data-spotlight] { position: relative; }
[data-spotlight]::after {
  content: '';
  position: absolute; inset: 0;
  border-radius: inherit;
  background: radial-gradient(280px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--red) 12%, transparent), transparent 65%);
  opacity: 0;
  transition: opacity var(--transition);
  pointer-events: none;
  z-index: 2;
}
[data-spotlight]:hover::after { opacity: 1; }

/* ===== TECH MARQUEE ===== */
.marquee-section {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background-color: color-mix(in srgb, var(--bg-soft) 92%, transparent);
  background-image:
    linear-gradient(var(--raster) 1px, transparent 1px),
    linear-gradient(90deg, var(--raster) 1px, transparent 1px);
  background-size: 40px 40px;
  overflow: hidden;
  padding: 18px 0;
}
.marquee { width: 100%; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent); mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent); }
.marquee-track {
  display: inline-flex; white-space: nowrap; gap: 14px; align-items: center;
  animation: marqueeScroll 34s linear infinite;
  font-family: var(--font-mono); font-size: 0.85rem; color: var(--ink-soft); letter-spacing: .3px;
}
.marquee-dot { color: var(--red); }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marqueeScroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* Process — scroll-fill timeline */
.process-list { position: relative; display: flex; flex-direction: column; gap: 0; padding-left: 56px; }
.process-rail { position: absolute; left: 22px; top: 6px; bottom: 6px; width: 2px; background: var(--border); }
.process-rail-fill { position: absolute; top: 0; left: 0; width: 100%; height: 0%; background: linear-gradient(180deg, var(--red), var(--gold)); }
.process-step { position: relative; display: flex; gap: 28px; padding: 28px 0; border-bottom: 1px solid var(--border); }
.process-step:last-child { border-bottom: none; }
.process-num {
  position: absolute; left: -56px; top: 24px;
  width: 44px; height: 44px; flex: none;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-family: 'IBM Plex Sans', 'Segoe UI', system-ui, sans-serif; font-weight: 700; font-size: 0.92rem;
  color: var(--muted);
  transition: color var(--transition), border-color var(--transition), background var(--transition), box-shadow var(--transition);
}
.process-step.active .process-num {
  color: #fff;
  border-color: var(--red);
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--red) 16%, transparent);
}
.process-step h3 { font-size: 1.1rem; margin-bottom: 6px; }
.process-step p { color: var(--muted); font-size: 0.95rem; max-width: 520px; }

/* Projects */
.projects-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.project-card {
  position: relative;
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.project-card:not(.project-card--placeholder):hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: color-mix(in srgb, var(--red) 35%, var(--border));
}
.project-card:hover .iframe-wrap { transform: scale(1.05); }
.project-preview { position: relative; }
/* Rechts Platz lassen, damit die Adresse nicht unter das Live-Abzeichen laeuft */
.project-preview .browser-chrome { padding: 10px 88px 10px 14px; }
.project-preview .browser-url { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Echter Screenshot der Kundenwebsite. object-position: top zeigt immer den
   oberen Bereich der Seite, unabhaengig von der Kachelbreite. */
.project-shot {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top center;
  background: var(--bg-soft);
  transition: transform .5s var(--ease);
}
.project-card:hover .project-shot { transform: scale(1.04); }
.project-live-badge {
  position: absolute; top: 12px; right: 12px; z-index: 3;
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 0.68rem; color: #fff;
  background: rgba(0,0,0,.45); backdrop-filter: blur(6px);
  padding: 5px 10px; border-radius: 999px;
}
.project-info { padding: 22px 24px 26px; }
.project-info h3 { font-size: 1.15rem; margin-bottom: 8px; }
.project-info p { color: var(--muted); font-size: 0.92rem; margin-bottom: 14px; }
.project-link { display: inline-flex; align-items: center; font-weight: 600; font-size: 0.9rem; color: var(--red); }
.project-link svg { width: 14px; height: 14px; margin-left: 3px; transition: transform var(--transition); }
.project-card:hover .project-link svg { transform: translateX(3px); }

/* About */
.about-inner { display: grid; grid-template-columns: 1fr 1.4fr; gap: 48px; align-items: start; }
.about-text { color: var(--muted); font-size: 1.05rem; max-width: 560px; }
.about-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 0.85rem; color: var(--muted); margin-top: 14px; }
.about-tag svg { width: 16px; height: 16px; color: var(--red); flex: none; }

/* FAQ */
.faq-list { max-width: 760px; display: flex; flex-direction: column; gap: 12px; }
.faq-item { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); transition: border-color var(--transition); }
.faq-item:has(.faq-question[aria-expanded="true"]) { border-color: color-mix(in srgb, var(--red) 45%, var(--border)); }
.faq-question {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  text-align: left; background: none; border: none; cursor: pointer; padding: 20px 22px;
  font-family: 'IBM Plex Sans', 'Segoe UI', system-ui, sans-serif; font-weight: 600; font-size: 1rem; color: var(--ink);
}
.faq-icon { position: relative; width: 18px; height: 18px; flex: none; }
.faq-icon::before, .faq-icon::after { content: ''; position: absolute; top: 50%; left: 50%; background: var(--red); transition: transform var(--transition); }
.faq-icon::before { width: 14px; height: 2px; transform: translate(-50%,-50%); }
.faq-icon::after { width: 2px; height: 14px; transform: translate(-50%,-50%); }
.faq-question[aria-expanded="true"] .faq-icon::after { transform: translate(-50%,-50%) rotate(90deg) scaleY(0); }
.faq-answer { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .35s var(--ease); }
.faq-answer > p { overflow: hidden; padding: 0 22px; color: var(--muted); font-size: 0.94rem; min-height: 0; }
.faq-question[aria-expanded="true"] + .faq-answer { grid-template-rows: 1fr; }
.faq-question[aria-expanded="true"] + .faq-answer > p { padding-bottom: 20px; }

/* Kontakt */
.kontakt-inner { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: start; }
.kontakt-sub { color: var(--muted); margin-bottom: 24px; max-width: 420px; }
.kontakt-email { font-weight: 600; color: var(--red); font-size: 1.05rem; border-bottom: 1px solid transparent; }
.kontakt-email:hover { border-color: var(--red); }

.kontakt-form { display: flex; flex-direction: column; gap: 22px; }
.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-group input, .form-group textarea {
  font-family: inherit;
  font-size: 0.95rem;
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  resize: vertical;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-group input:focus, .form-group textarea:focus {
  border-color: var(--red);
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--red) 14%, transparent);
}
.form-group.invalid input, .form-group.invalid textarea { border-color: var(--red); }
.form-error { display: none; font-size: 0.82rem; color: var(--red); }
.form-group.invalid .form-error { display: block; }
.form-hint { font-size: 0.82rem; color: var(--muted); text-align: center; }

/* Floating labels */
.form-group--float { position: relative; }
.form-group--float label {
  position: absolute; left: 14px; top: 14px;
  font-size: 0.95rem; font-weight: 500; color: var(--muted);
  pointer-events: none; background: var(--surface); padding: 0 4px;
  transition: transform var(--transition), font-size var(--transition), color var(--transition), top var(--transition);
}
.form-group--float input:focus + label,
.form-group--float input:not(:placeholder-shown) + label,
.form-group--float textarea:focus + label,
.form-group--float textarea:not(:placeholder-shown) + label {
  top: -9px; font-size: 0.75rem; font-weight: 600; color: var(--red);
}

/* ===== FOOTER ===== */
/* Footer ist immer dunkel, deshalb hier fest helle Rasterlinien statt --raster */
.footer {
  background-color: var(--ink-band);
  background-image:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 40px 40px;
  color: rgba(255,255,255,0.75);
  padding: 56px 24px 32px;
}
.footer-inner { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; }
.footer-brand { display: flex; align-items: center; gap: 10px; color: var(--white); }
/* Auf dem dunklen Footer hebt eine feine Umrandung das Logo ab,
   statt es wie früher zu invertieren (das Monogramm ist hell auf dunkel). */
.footer-brand .brand-mark { box-shadow: 0 0 0 1px rgba(255,255,255,0.22); }
.footer-text { font-size: 0.9rem; max-width: 380px; }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }
.footer-links a, .footer-link-btn {
  font-size: 0.88rem; color: rgba(255,255,255,0.7);
  background: none; border: none; cursor: pointer; font-family: inherit;
}
.footer-links a:hover, .footer-link-btn:hover { color: var(--white); }
.footer-copy { font-size: 0.8rem; color: rgba(255,255,255,0.4); margin-top: 18px; }

/* ===== BACK TO TOP ===== */
.back-to-top {
  position: fixed; right: 24px; bottom: 24px; z-index: 900;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--ink-band); color: #fff; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md);
  opacity: 0; transform: translateY(12px) scale(.9); pointer-events: none;
  transition: opacity var(--transition), transform var(--transition), background var(--transition);
}
.back-to-top.visible { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.back-to-top:hover { background: var(--red); }
.back-to-top svg { width: 18px; height: 18px; }

/* ===== TOAST ===== */
.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 5000;
  transform: translate(-50%, 20px);
  background: var(--ink-band); color: #fff;
  padding: 13px 22px; border-radius: 999px;
  font-size: 0.9rem; font-weight: 500;
  box-shadow: var(--shadow-md);
  opacity: 0; pointer-events: none;
  transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.toast.visible { opacity: 1; transform: translate(-50%, 0); }

/* ===== MODALS ===== */
.modal { position: fixed; inset: 0; z-index: 4000; display: none; }
.modal.open { display: block; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(10,11,13,0.55); }
.modal-box {
  position: relative;
  max-width: 520px;
  margin: 8vh auto;
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 36px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}
.modal-box h3 { margin-bottom: 16px; }
.modal-box p { margin-bottom: 14px; color: var(--muted); font-size: 0.92rem; }
.modal-close {
  position: absolute; top: 16px; right: 16px;
  background: none; border: none; cursor: pointer;
  font-size: 1.1rem; color: var(--muted);
}

/* Website-Vorschau (Lightbox) — vergrösserte Ansicht der Hero-Mockups.
   Auf Desktop zeigt die Box das Desktop-Layout der Zielseite (Seitenverhältnis 1600:1000).
   Unter 640px (siehe Media Query unten und PREVIEW_MOBILE_* in script.js) zeigt sie
   stattdessen deren echtes Smartphone-Layout in einem entsprechend hochformatigen
   Seitenverhältnis — genau wie die Hauptwebsite selbst dort ins Mobile-Format wechselt. */
.modal--preview.open { display: flex; align-items: center; justify-content: center; padding: 12px; }
.preview-box {
  position: relative;
  width: min(1800px, 90vw);
  aspect-ratio: 1600 / 1000;
  max-height: 90vh;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  animation: previewIn .3s var(--ease);
}
@keyframes previewIn { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: scale(1); } }
.preview-chrome { position: relative; flex: none; padding: 10px 96px 10px 16px; }
.preview-open-tab {
  position: absolute; right: 50px; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  color: var(--muted); border-radius: 50%;
  transition: color var(--transition), background var(--transition);
}
.preview-open-tab:hover, .preview-open-tab:focus-visible { color: var(--red); background: var(--bg-soft); }
.preview-open-tab svg { width: 16px; height: 16px; }

/* Grösserer, klar sichtbarer Schliessen-Button (überschreibt die generische .modal-close) */
.preview-close {
  position: absolute; top: 50%; right: 8px; transform: translateY(-50%);
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  font-size: 1.2rem;
  color: var(--ink-soft);
  background: transparent;
  transition: color var(--transition), background var(--transition);
}
.preview-close:hover, .preview-close:focus-visible { background: var(--red); color: #fff; }

.preview-frame-wrap { flex: 1; position: relative; background: var(--bg-soft); overflow: hidden; }
/* Rendert die Zielseite immer in fester Desktop-Grösse (1600x1000, siehe script.js),
   damit ihre eigene Navigation nie in einen ungünstigen Umbruchpunkt fällt, und skaliert
   das Ergebnis passend in die Box herunter — da die Box selbst dasselbe Seitenverhältnis
   hat, füllt die skalierte Seite den Rahmen exakt, ohne gestreckt zu werden. */
.preview-frame-wrap iframe {
  position: absolute; top: 0; left: 0;
  width: var(--preview-w, 1600px);
  height: var(--preview-h, 1000px);
  border: 0;
  transform: scale(var(--preview-scale, 1));
  transform-origin: top left;
  -webkit-overflow-scrolling: touch;
}

/* Gleicher Umbruchpunkt wie das Hamburger-Menü der Hauptwebsite (siehe previewMobileQuery
   in script.js) — ab hier zeigt die Vorschau das Mobile-Layout der Zielseite. */
@media (max-width: 900px) {
  .preview-box { width: 96vw; aspect-ratio: 420 / 900; }
  .preview-chrome { padding: 8px 78px 8px 12px; }
  .preview-open-tab { right: 42px; width: 28px; height: 28px; }
  .preview-close { width: 30px; height: 30px; right: 6px; }

  /* Kein transform auf Touch-Geräten: die Zielseite wird direkt in der echten Breite des
     Rahmens gerendert (auf dem Smartphone also in Smartphone-Breite, wodurch ihr eigenes
     Mobile-Layout erscheint). Skalierte iframes blockieren auf mobilen Browsern das
     Scrollen mit dem Finger — ohne transform funktioniert es nativ. */
  .preview-frame-wrap iframe {
    width: 100%;
    height: 100%;
    transform: none;
  }
}

/* ===== SCROLL REVEAL (progressive enhancement: hidden only once .js confirms JS ran) ===== */
.reveal { opacity: 1; }
html.js .reveal {
  opacity: 0;
  transform: translateY(26px) scale(.98);
  filter: blur(4px);
  transition: opacity .7s var(--ease), transform .7s var(--ease), filter .7s var(--ease);
}
html.js .reveal.visible { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }

.services-grid .reveal:nth-child(1) { transition-delay: .02s; }
.services-grid .reveal:nth-child(2) { transition-delay: .09s; }
.services-grid .reveal:nth-child(3) { transition-delay: .16s; }
.services-grid .reveal:nth-child(4) { transition-delay: .23s; }
.projects-grid .reveal:nth-child(2) { transition-delay: .08s; }
.projects-grid .reveal:nth-child(3) { transition-delay: .16s; }
.faq-list .reveal:nth-child(2) { transition-delay: .06s; }
.faq-list .reveal:nth-child(3) { transition-delay: .12s; }
.faq-list .reveal:nth-child(4) { transition-delay: .18s; }
.faq-list .reveal:nth-child(5) { transition-delay: .24s; }

/* =========================================================
   PREISSEITE (preise.html)
   Eigenstaendige Seite, nutzt dieselben Farbtoken und Schriften.
   Einblenden rein per CSS, damit die Seite kein Skript braucht.
   ========================================================= */

.preis-kopf,
.seiten-kopf {
  position: relative;
  z-index: 2;
  max-width: var(--max);
  margin: 0 auto;
  padding: 22px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.preis-kopf-aktionen,
.seiten-kopf-aktionen { display: flex; align-items: center; gap: 10px; }
.preis-schliessen,
.seiten-schliessen {
  width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  transition: background var(--transition), border-color var(--transition), color var(--transition), transform var(--transition);
}
.preis-schliessen svg,
.seiten-schliessen svg { width: 19px; height: 19px; }
.preis-schliessen:hover,
.seiten-schliessen:hover {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
  transform: rotate(90deg);
}

.preis-seite { position: relative; z-index: 1; padding: 12px 24px 70px; }
.preis-intro { max-width: 620px; margin-bottom: 34px; }
.preis-titel {
  font-family: 'IBM Plex Sans', 'Segoe UI', system-ui, sans-serif;
  font-weight: 600;
  letter-spacing: -0.5px;
  line-height: 1.12;
  text-wrap: balance;
  font-size: clamp(1.7rem, 3.4vw, 2.3rem);
  margin-bottom: 12px;
}
.preis-sub { color: var(--muted); font-size: 0.95rem; }

.preis-layout { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; align-items: start; }
.preis-spalte { display: flex; flex-direction: column; gap: 14px; }
.preis-gruppe-titel {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: 1.05rem;
  margin-bottom: 0;
}
.preis-optional {
  font-family: var(--font-mono);
  font-size: 0.64rem; font-weight: 700;
  letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--ink-soft);
  background: var(--bg-soft);
  border: 1px solid var(--border-strong);
  padding: 4px 10px; border-radius: 999px;
}
.preis-gruppe-hinweis { color: var(--muted); font-size: 0.86rem; margin-top: -4px; }

/* Die beiden Schritte mit Pfeil dazwischen: macht die Abfolge auf einen Blick klar. */
.preis-haupt { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: stretch; }
.preis-pfeil {
  align-self: center;
  flex: none;
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--red);
  opacity: 0;
  /* Eigene Animation nur fuer die Deckkraft: pkEin wuerde transform setzen und
     damit die Drehung des Pfeils auf schmalen Bildschirmen aufheben. */
  animation: pfeilEin .5s var(--ease) .12s forwards;
}
@keyframes pfeilEin { to { opacity: 1; } }
.preis-pfeil svg { width: 17px; height: 17px; transition: transform var(--transition); }

/* Preiskarte */
.pk {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 22px;
  box-shadow: var(--shadow-sm);
  opacity: 0;
  transform: translateY(18px);
  animation: pkEin .65s var(--ease) forwards;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}
@keyframes pkEin { to { opacity: 1; transform: translateY(0); } }
/* nth-of-type, damit der Pfeil zwischen den Karten nicht mitzaehlt */
.preis-haupt .pk:nth-of-type(1) { animation-delay: .05s; }
.preis-haupt .pk:nth-of-type(2) { animation-delay: .18s; }
.preis-spalte--zusatz .pk:nth-of-type(1) { animation-delay: .26s; }
.preis-spalte--zusatz .pk:nth-of-type(2) { animation-delay: .34s; }
.pk:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }

.pk--empfohlen {
  border-color: color-mix(in srgb, var(--red) 55%, var(--border));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--red) 22%, transparent), var(--shadow-md);
}
.pk-abzeichen {
  position: absolute; top: -13px; left: 26px;
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.66rem; font-weight: 700;
  letter-spacing: 1.2px; text-transform: uppercase;
  color: #fff;
  background: linear-gradient(180deg,
              color-mix(in srgb, var(--red) 86%, #fff) 0%,
              var(--red) 45%,
              var(--red-dark) 100%);
  border: 1px solid color-mix(in srgb, var(--red-dark) 60%, transparent);
  padding: 6px 12px; border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 6px 14px -8px color-mix(in srgb, var(--red) 70%, transparent);
}
.pk-abzeichen svg { width: 12px; height: 12px; }

/* Schrittkennzeichnung: nummerierter Kreis plus Beschriftung, damit die
   Reihenfolge der beiden Pakete sofort erkennbar ist. */
.pk-schritt {
  display: flex; align-items: center; gap: 9px;
  font-family: var(--font-mono);
  font-size: 0.68rem; font-weight: 700;
  letter-spacing: 1.6px; text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 10px;
}
.pk-schritt-num {
  flex: none;
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--bg-soft);
  border: 1px solid var(--border-strong);
  font-family: 'IBM Plex Sans', 'Segoe UI', system-ui, sans-serif;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0;
  color: var(--ink);
}
.pk--empfohlen { }
.pk--empfohlen .pk-schritt { margin-top: 8px; color: var(--red); }
.pk--empfohlen .pk-schritt-num {
  background: linear-gradient(180deg,
              color-mix(in srgb, var(--red) 86%, #fff) 0%,
              var(--red) 45%,
              var(--red-dark) 100%);
  border-color: color-mix(in srgb, var(--red-dark) 60%, transparent);
  color: #fff;
}

.pk-titel { font-size: 1.12rem; margin-bottom: 6px; }
.pk-untertitel { font-size: 0.85rem; color: var(--muted); margin-bottom: 16px; }
.pk-preis {
  display: flex; align-items: baseline; gap: 5px;
  font-family: 'IBM Plex Sans', 'Segoe UI', system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
}
.pk-plus { font-size: 1.5rem; font-weight: 700; color: var(--red); line-height: 1; }
.pk-waehrung { font-size: 0.95rem; font-weight: 600; color: var(--muted); }
.pk-zahl { font-size: 2.4rem; font-weight: 700; letter-spacing: -1.2px; line-height: 1; color: var(--ink); }
.pk-preis--klein .pk-zahl { font-size: 1.9rem; }
.pk-periode { font-size: 0.78rem; color: var(--muted); margin-top: 7px; }
.pk-text { font-size: 0.86rem; color: var(--muted); margin-top: 12px; }

.pk-liste { list-style: none; display: flex; flex-direction: column; gap: 9px; margin: 16px 0 18px; }
.pk-liste li { display: flex; align-items: flex-start; gap: 9px; font-size: 0.87rem; color: var(--ink-soft); }

/* Gesamtsumme deutlich hervorgehoben, damit klar ist, was die fertige Website kostet */
.pk-gesamt {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: auto; margin-bottom: 14px;
  padding: 11px 14px;
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--red) 8%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--red) 30%, transparent);
  font-size: 0.85rem;
  color: var(--ink-soft);
}
.pk-gesamt strong {
  font-family: 'IBM Plex Sans', 'Segoe UI', system-ui, sans-serif;
  font-size: 1.1rem;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
/* Gleiche Form, aber ohne Preisbetonung: haelt beide Karten optisch im Gleichgewicht */
.pk-gesamt--neutral {
  background: var(--bg-soft);
  border-color: var(--border);
  color: var(--muted);
  justify-content: flex-start;
}
.pk-haken {
  flex: none;
  width: 19px; height: 19px; margin-top: 1px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--red) 12%, transparent);
  color: var(--red);
}
.pk-haken svg { width: 11px; height: 11px; }

.pk-knopf { width: 100%; margin-top: auto; }
.pk-fussnote { font-size: 0.82rem; color: var(--muted); margin-top: 14px; text-align: center; }
.pk-fussnote strong { color: var(--ink); }

.pk-warnung {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 0.85rem; line-height: 1.5;
  color: var(--ink-soft);
  background: color-mix(in srgb, var(--gold) 14%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--gold) 45%, transparent);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-top: 4px;
}
.pk-warnung svg { width: 17px; height: 17px; flex: none; margin-top: 1px; color: var(--gold); }

/* Hinweiskasten unter den Hauptpaketen: gleicht die Hoehe der beiden
   Spalten aus und beantwortet die haeufigsten Rueckfragen zum Preis. */
.preis-info {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  opacity: 0;
  transform: translateY(18px);
  animation: pkEin .65s var(--ease) .38s forwards;
}
.preis-info-titel { font-size: 0.98rem; margin-bottom: 12px; }
.preis-info-liste { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.preis-info-liste li { display: flex; align-items: flex-start; gap: 9px; font-size: 0.86rem; color: var(--ink-soft); }

.preis-fuss {
  margin-top: 36px;
  padding-top: 26px;
  border-top: 1px solid var(--border);
  display: flex; flex-direction: column; align-items: center; gap: 22px;
  text-align: center;
}
.preis-fuss-text { color: var(--muted); font-size: 0.92rem; max-width: 660px; }
.preis-fuss-aktionen { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }

/* =========================================================
   ANFRAGEFORMULAR (anfrage.html) und Bestaetigung (danke.html)
   ========================================================= */

.seiten-inhalt { position: relative; z-index: 1; padding: 12px 24px 80px; }

.anfrage-wrap { max-width: 820px; margin: 0 auto; }
.anfrage-intro { margin-bottom: 34px; }
.anfrage-titel {
  font-weight: 600;
  letter-spacing: -0.5px;
  line-height: 1.12;
  text-wrap: balance;
  font-size: clamp(1.7rem, 3.4vw, 2.3rem);
  margin-bottom: 12px;
}
.anfrage-sub { color: var(--muted); font-size: 0.95rem; max-width: 620px; }

/* Unsichtbares Spamfeld: nicht display:none, sonst ueberspringen es manche
   Skripte. Aus dem Sichtfeld geschoben und vom Vorlesegeraet ausgenommen. */
.honigtopf {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.anfrage-form { display: flex; flex-direction: column; gap: 22px; }

.feldgruppe {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 22px 24px 24px;
  box-shadow: var(--shadow-sm);
}
.feldgruppe-titel {
  display: flex;
  align-items: center;
  gap: 11px;
  font-family: 'IBM Plex Sans', 'Segoe UI', system-ui, sans-serif;
  font-weight: 600;
  font-size: 1.02rem;
  color: var(--ink);
  padding: 0;
  margin-bottom: 18px;
}
.feldgruppe-num {
  flex: none;
  width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: linear-gradient(180deg,
              color-mix(in srgb, var(--red) 86%, #fff) 0%,
              var(--red) 45%,
              var(--red-dark) 100%);
  border: 1px solid color-mix(in srgb, var(--red-dark) 60%, transparent);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
}
.feldgruppe-hinweis { color: var(--muted); font-size: 0.85rem; margin: -8px 0 16px; }

.feld-reihe { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.feld { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.feld-reihe .feld { margin-bottom: 16px; }
.feldgruppe .feld:last-child { margin-bottom: 0; }
.feld label { font-size: 0.87rem; font-weight: 600; color: var(--ink-soft); }
.pflicht { color: var(--red); }
.feld-hinweis { font-size: 0.8rem; color: var(--muted); }

.feld input,
.feld select,
.feld textarea {
  font-family: inherit;
  font-size: 0.94rem;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 11px 13px;
  width: 100%;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.feld textarea { resize: vertical; min-height: 76px; }
.feld input:focus,
.feld select:focus,
.feld textarea:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--red) 14%, transparent);
}
.feld input::placeholder,
.feld textarea::placeholder { color: var(--muted); opacity: .75; }

/* Ankreuzfelder als anklickbare Kacheln: auf dem Handy deutlich leichter zu treffen */
.wahl-gitter { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.wahl {
  display: flex; align-items: center; gap: 9px;
  padding: 11px 13px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--bg);
  font-size: 0.87rem;
  color: var(--ink-soft);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}
.wahl:hover { border-color: color-mix(in srgb, var(--red) 45%, var(--border-strong)); }
.wahl input { accent-color: var(--red); width: 16px; height: 16px; flex: none; cursor: pointer; }
.wahl:has(input:checked) {
  border-color: var(--red);
  background: color-mix(in srgb, var(--red) 7%, var(--surface));
  color: var(--ink);
}
.wahl:has(input:focus-visible) { outline: 2px solid var(--red); outline-offset: 2px; }

.hinweis-kasten {
  display: flex; align-items: flex-start; gap: 10px;
  background: color-mix(in srgb, var(--gold) 14%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--gold) 45%, transparent);
  border-radius: var(--radius);
  padding: 13px 15px;
  margin-bottom: 18px;
  font-size: 0.87rem;
  line-height: 1.5;
  color: var(--ink-soft);
}
.hinweis-kasten svg { width: 18px; height: 18px; flex: none; margin-top: 1px; color: var(--gold); }
.hinweis-kasten a { color: var(--red); font-weight: 600; border-bottom: 1px solid transparent; }
.hinweis-kasten a:hover { border-color: var(--red); }

.anfrage-abschluss { display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.datenschutz-hinweis { font-size: 0.82rem; color: var(--muted); max-width: 620px; }
.anfrage-senden { width: 100%; max-width: 340px; }
.anfrage-zurueck { font-size: 0.88rem; color: var(--muted); border-bottom: 1px solid transparent; }
.anfrage-zurueck:hover { color: var(--ink); border-color: var(--border-strong); }

/* Bestaetigungsseite */
.danke-box {
  max-width: 620px;
  margin: 8vh auto 0;
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
}
.danke-haken {
  width: 68px; height: 68px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: color-mix(in srgb, #3BB273 14%, var(--surface));
  border: 1px solid color-mix(in srgb, #3BB273 45%, transparent);
  color: #3BB273;
  margin-bottom: 4px;
}
.danke-haken svg { width: 30px; height: 30px; }
.danke-titel { font-size: clamp(1.5rem, 3.2vw, 2rem); }
.danke-text { color: var(--muted); font-size: 0.98rem; }
.danke-text--klein { font-size: 0.88rem; }
.danke-text a { color: var(--red); font-weight: 600; }
.danke-aktionen { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; margin-top: 10px; }

/* Grosser Knopf, der auf der Startseite das frühere Formular ersetzt */
.kontakt-cta { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.kontakt-cta .btn { font-size: 1.05rem; padding: 18px 34px; }
.kontakt-cta-hinweis { font-size: 0.85rem; color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  html.js .reveal { opacity: 1; transform: none; filter: none; }
  .blob, .marquee-track, .eyebrow-dot, .chip, .chip-dot, .scroll-cue-wheel, .intro-item { animation: none !important; }
  .intro-item { opacity: 1; transform: none; }
  .pk, .preis-info, .preis-pfeil { opacity: 1; transform: none; animation: none !important; }
  * { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

/* =========================================================
   MEDIA QUERIES — must stay in this order (large → small)
   ========================================================= */

@media (max-width: 1100px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .preis-layout { grid-template-columns: 1fr; gap: 40px; }
  .wahl-gitter { grid-template-columns: repeat(2, 1fr); }
  .hero-inner { gap: 40px; }
  .about-inner, .kontakt-inner { grid-template-columns: 1fr; }
  .stats-bar-inner { grid-template-columns: repeat(2, 1fr); row-gap: 28px; }
  .stat-card:nth-child(3) { border-left: none; padding-left: 0; }
}

@media (max-width: 900px) {
  .nav {
    position: fixed;
    top: 0; right: 0;
    width: 78%; max-width: 320px;
    height: 100dvh;
    background: var(--surface);
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    padding: 100px 28px 32px;
    gap: 20px;
    transform: translateX(100%);
    transition: transform var(--transition);
    z-index: 3000;
    box-shadow: -20px 0 60px rgba(0,0,0,0.25);
  }
  .nav.open { transform: translateX(0); }
  .nav-link { font-size: 1.1rem; color: var(--ink) !important; width: 100%; }
  .nav-cta { margin-left: 0; width: 100%; text-align: center; }
  .nav-mobile-extra { display: block; width: 100%; }
  .nav-mobile-divider { height: 1px; background: var(--border); margin: 16px 0; width: 100%; }
  .nav-mobile-contact { font-size: 0.9rem; color: var(--muted) !important; }
  .hamburger { display: flex; }

  /* Auf schmalen Bildschirmen ausgeblendet: Die Angaben stehen ohnehin weiter
     unten auf der Seite, und der Platz gehoert der Ueberschrift. Auf dem
     Computer bleibt das Abzeichen sichtbar. */
  .eyebrow { display: none; }
  .hero { padding-top: 64px; min-height: auto; }
  .hero-inner { flex-direction: column; padding: 40px 16px; gap: 40px; }
  .hero-text { max-width: 100%; }
  .hero-visual { flex: none; width: 100%; }
  /* Der Rahmen muss die versetzt liegende vordere Karte samt Drehung fassen,
     sonst schneidet der Hero-Bereich sie unten ab.
     Rechnung: Versatz 70 + Kartenhoehe ~238 + Ueberhang durch Drehung ~15 */
  .browser-stack { height: 330px; }
  .chip { font-size: 0.64rem; padding: 6px 10px; }
  .chip--live { top: -10px; left: 0; }
  .chip--code { bottom: 4%; right: 0; }
  .scroll-cue { display: none; }

  .stats-bar-inner { grid-template-columns: 1fr; gap: 20px; }
  .stat-card { border-left: none; padding-left: 0; }
  .section { padding: 56px 16px; }
  /* Bei einer Spalte darf jede Karte ihre eigene Hoehe haben. Sonst erben alle
     die Hoehe der laengsten Karte und es entstehen grosse leere Flaechen. */
  .services-grid { grid-template-columns: 1fr; grid-auto-rows: auto; }
  /* Auf schmalen Bildschirmen rueckt das Zusatzleistung-Schild ueber den Text,
     damit die Beschreibung nicht darunter laeuft. */
  /* Untereinander: der Pfeil dreht sich nach unten und zeigt weiter die Abfolge an */
  .preis-haupt { grid-template-columns: 1fr; gap: 14px; }
  .preis-pfeil { margin: 0 auto; }
  .preis-pfeil svg { transform: rotate(90deg); }
  .preis-seite { padding: 12px 16px 70px; }
  .preis-kopf { padding: 18px 16px; }
  .preis-intro { margin-bottom: 28px; }
  .seiten-inhalt { padding: 12px 16px 60px; }
  .feld-reihe { grid-template-columns: 1fr; gap: 0; }
  .wahl-gitter { grid-template-columns: 1fr; }
  .feldgruppe { padding: 20px 18px; }
  .anfrage-senden { max-width: 100%; }
  .projects-grid { grid-template-columns: 1fr; }
  .process-list { padding-left: 46px; }
  .process-num { left: -46px; width: 38px; height: 38px; font-size: 0.82rem; }
  .process-rail { left: 18px; }
  .back-to-top { right: 16px; bottom: 16px; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 2rem; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  /* Auf sehr schmalen Bildschirmen werden die Vorschauen flacher, damit der
     Stapel nicht zu viel Hoehe braucht. Rahmenhoehe entsprechend angepasst:
     Versatz 52 + Kartenhoehe ~188 + Ueberhang durch Drehung ~15 */
  .browser-stack { height: 265px; }
  .browser-card { width: 100%; }
  .browser-card--back { left: 0; }
  .browser-card--front { left: 0; top: 52px; }
  .browser-body { height: 150px; }
  .chip--code { display: none; }
}

@media (max-width: 380px) {
  .navbar-inner { padding: 0 16px; }
  .brand-name { font-size: 0.95rem; }
  .section-title { font-size: 1.6rem; }
}
