/* ═══════════════════════════════════════════
   STEINWERK — Demo · Single Source of Truth
   ═══════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  background: var(--bg-1);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

:root[data-theme="dark"] {
  --bg-1: #15140f;
  --bg-2: #1c1a14;
  --fg:   #f3efe6;
  --rule: rgba(243, 239, 230, .12);
  --accent: #c0502a;
}
:root[data-theme="light"] {
  --bg-1: #f4f1ea;
  --bg-2: #ebe7dc;
  --fg:   #1a1812;
  --rule: rgba(26, 24, 18, .14);
  --accent: #c0502a;
}

a { color: inherit; }
::selection { background: var(--accent, #c25a2a); color: #fff; }

/* Subtle concrete grain layer */
.grain::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 1;
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .35 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  opacity: .12; mix-blend-mode: overlay;
}


/* ═══════════════════════════════════════════
   DEMO-BANNER (fixed top-right, scrollt mit)
   ═══════════════════════════════════════════ */
.demo-banner {
  position: fixed;
  top: 84px;
  right: 16px;
  z-index: 2147483647;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px 9px 14px;
  background: rgba(15, 14, 11, .82);
  border: 1px solid rgba(243, 239, 230, .14);
  border-radius: 999px;
  color: #f3efe6;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 6px 20px rgba(0, 0, 0, .25), 0 1px 0 rgba(255, 255, 255, .04) inset;
  transition: transform .3s cubic-bezier(.22, 1, .36, 1),
              border-color .3s,
              box-shadow .3s;
}
.demo-banner:hover,
.demo-banner:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(192, 80, 42, .55);
  box-shadow: 0 8px 26px rgba(0, 0, 0, .3), 0 0 0 1px rgba(192, 80, 42, .15);
  outline: none;
}
.demo-banner-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #c0502a;
  box-shadow: 0 0 10px rgba(192, 80, 42, .65);
  animation: demo-pulse 2.4s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes demo-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .35; transform: scale(.85); }
}
.demo-banner-arrow {
  width: 10px; height: 10px;
  opacity: .55;
  transition: transform .3s cubic-bezier(.22, 1, .36, 1), opacity .3s;
  flex-shrink: 0;
}
.demo-banner:hover .demo-banner-arrow {
  transform: translate(2px, -2px);
  opacity: 1;
}
@media (prefers-reduced-motion: reduce) {
  .demo-banner-dot { animation: none; }
  .demo-banner, .demo-banner-arrow { transition: none; }
}
@media (max-width: 540px) {
  .demo-banner { font-size: 10px; padding: 8px 12px 8px 11px; gap: 8px; }
}


/* ═══════════════════════════════════════════
   MOBILE NAV BURGER + OVERLAY
   ═══════════════════════════════════════════ */
.sw-nav-burger {
  display: none;
  background: transparent;
  border: none;
  padding: 10px 8px;
  cursor: pointer;
  color: inherit;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  align-items: center;
}
.sw-nav-burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  transition: transform .3s cubic-bezier(.22, 1, .36, 1), opacity .2s;
}
.sw-nav-burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.sw-nav-burger.is-open span:nth-child(2) { opacity: 0; }
.sw-nav-burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.sw-mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(15, 14, 11, .96);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  backdrop-filter: blur(20px) saturate(140%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 28px;
  padding: 40px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}
.sw-mobile-menu.is-open {
  opacity: 1;
  pointer-events: auto;
}
.sw-mobile-menu-link {
  color: #f3efe6;
  text-decoration: none;
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(28px, 7vw, 40px);
  font-weight: 500;
  letter-spacing: -0.02em;
  padding: 8px 16px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.sw-mobile-menu-cta {
  margin-top: 16px;
  color: #0d0c09;
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  padding: 16px 28px;
  border-radius: 999px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
@media (prefers-reduced-motion: reduce) {
  .sw-nav-burger span,
  .sw-mobile-menu { transition: none; }
}


/* ═══════════════════════════════════════════
   REFERENZEN — Hover Effekt
   ═══════════════════════════════════════════ */
.sw-ref-grid > article {
  transition: transform .35s cubic-bezier(.22, 1, .36, 1);
}
.sw-ref-grid > article:hover {
  transform: translateY(-3px);
}
.sw-ref-grid > article > img {
  transition: transform .7s cubic-bezier(.22, 1, .36, 1), filter .35s ease;
  will-change: transform;
}
.sw-ref-grid > article:hover > img {
  transform: scale(1.05);
  filter: brightness(0.95) saturate(1.05) !important;
}
@media (prefers-reduced-motion: reduce) {
  .sw-ref-grid > article,
  .sw-ref-grid > article > img { transition: none !important; }
  .sw-ref-grid > article:hover { transform: none !important; }
  .sw-ref-grid > article:hover > img { transform: none !important; }
}


/* ═══════════════════════════════════════════
   RESPONSIVE OVERRIDES (React inline-styles via className + !important)
   ═══════════════════════════════════════════ */

/* ── Tablet (≤ 1024px) ── */
@media (max-width: 1024px) {
  .sw-nav { padding: 18px 24px !important; }
  .sw-nav-est { display: none !important; }
  .sw-nav-links { gap: 18px !important; font-size: 12px !important; }

  .sw-hero-grid {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
    left: 24px !important;
    right: 24px !important;
    bottom: 60px !important;
  }

  .sw-stats { padding: 40px 24px !important; }
  .sw-stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 28px !important;
  }

  .sw-lst { padding: 80px 24px !important; }
  .sw-lst-head {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
    margin-bottom: 40px !important;
  }
  .sw-lst-head > p { margin-top: 0 !important; }
  .sw-lst-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .sw-lst-grid > article:nth-child(2n) { border-right: none !important; }
  .sw-lst-grid > article:nth-child(2n+1) { border-right: 1px solid var(--rule) !important; }
  .sw-lst-grid > article:nth-child(-n+4) { border-bottom: 1px solid var(--rule) !important; }
  .sw-lst-grid > article:nth-last-child(-n+2) { border-bottom: none !important; }

  .sw-pro { padding: 80px 24px !important; }
  .sw-pro-head {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
    margin-bottom: 40px !important;
  }
  .sw-pro-head > p { margin-top: 0 !important; }
  .sw-pro-steps { grid-template-columns: repeat(2, 1fr) !important; }
  .sw-pro-steps > li:nth-child(2) { border-right: none !important; }
  .sw-pro-steps > li:nth-child(3),
  .sw-pro-steps > li:nth-child(4) {
    border-top: 1px solid var(--rule) !important;
  }

  .sw-ref { padding: 80px 24px !important; }
  .sw-ref-head { flex-wrap: wrap !important; gap: 16px !important; }
  .sw-ref-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    grid-template-rows: 320px 320px !important;
  }
  .sw-ref-grid > article:first-child {
    grid-column: auto !important;
    grid-row: auto !important;
  }

  .sw-trust { padding: 80px 24px !important; }
  .sw-trust-grid {
    grid-template-columns: 1fr !important;
    gap: 40px !important;
  }

  .sw-kontakt-grid {
    grid-template-columns: 1fr !important;
    padding: 80px 24px !important;
    gap: 40px !important;
  }

  .sw-footer { padding: 28px 24px !important; flex-wrap: wrap !important; gap: 16px !important; }
}

/* ── Mobile (≤ 600px) ── */
@media (max-width: 600px) {
  .sw-nav { padding: 14px 16px !important; gap: 12px !important; }
  .sw-nav-links { display: none !important; }
  .sw-nav-cta { display: none !important; }
  .sw-nav-burger { display: inline-flex !important; }

  .sw-hero-grid {
    bottom: 40px !important;
    left: 16px !important;
    right: 16px !important;
    gap: 24px !important;
  }

  .sw-stats { padding: 32px 16px !important; }
  .sw-stats-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 20px !important;
  }

  .sw-lst, .sw-pro, .sw-ref, .sw-trust { padding: 56px 16px !important; }

  .sw-lst-grid { grid-template-columns: 1fr !important; }
  .sw-lst-grid > article {
    border-right: none !important;
    border-bottom: 1px solid var(--rule) !important;
    min-height: auto !important;
    padding: 28px 24px !important;
  }
  .sw-lst-grid > article:last-child { border-bottom: none !important; }

  .sw-pro-steps { grid-template-columns: 1fr !important; }
  .sw-pro-steps > li {
    border-right: none !important;
    border-top: 1px solid var(--rule) !important;
    padding: 24px 20px 28px !important;
  }
  .sw-pro-steps > li:first-child { border-top: none !important; }

  .sw-ref-grid {
    grid-template-columns: 1fr !important;
    grid-template-rows: repeat(4, 240px) !important;
  }
  .sw-ref-grid > article:first-child {
    grid-column: auto !important;
    grid-row: auto !important;
  }

  .sw-kontakt-grid { padding: 56px 16px !important; }
  .sw-form { padding: 20px !important; }

  .sw-footer {
    flex-direction: column !important;
    text-align: center !important;
    gap: 12px !important;
    padding: 24px 16px !important;
    font-size: 10px !important;
  }
}
