/* ==========================================================================
   LM Webdesign — Design System
   Deep Space Farbpalette, self-hosted Typografie, Grundlayout
   ========================================================================== */

@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("../fonts/space-grotesk-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("../fonts/space-grotesk-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("../fonts/space-grotesk-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0a0a0f;
  --surface: #15151d;
  --surface-hover: #1d1d28;
  --border: #26262f;
  --text: #f5f5f7;
  --text-muted: #9a9aa5;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --cta: #ffb84d;
  --cta-hover: #ffa726;

  --font-display: "Space Grotesk", "Inter", sans-serif;
  --font-body: "Inter", sans-serif;

  --container: 1180px;
  --nav-h: 84px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: auto; }

html, body {
  background: var(--bg);
  color: var(--text);
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.lenis, .lenis-smooth { scroll-behavior: auto; }

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

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  margin: 0;
  letter-spacing: -0.01em;
}

p { margin: 0; }

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

section { position: relative; }

/* -------------------- Custom Cursor -------------------- */
.cursor-dot,
.cursor-ring {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9999;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  will-change: transform;
}
.cursor-dot {
  width: 6px; height: 6px;
  background: var(--accent);
}
.cursor-ring {
  width: 34px; height: 34px;
  border: 1px solid rgba(59, 130, 246, 0.5);
  transition: width .2s var(--ease-out), height .2s var(--ease-out), border-color .2s;
}
.cursor-ring.is-active {
  width: 54px; height: 54px;
  border-color: var(--cta);
  background: rgba(255, 184, 77, 0.08);
}
@media (hover: none), (pointer: coarse) {
  .cursor-dot, .cursor-ring { display: none; }
}

/* -------------------- Nav -------------------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 1000;
  display: flex;
  align-items: center;
  background: rgba(10, 10, 15, 0.7);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.nav.is-scrolled { border-bottom-color: var(--border); }
.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.nav-logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.01em;
}
.nav-logo span { color: var(--accent); }
.nav-links {
  display: flex;
  align-items: center;
  gap: 40px;
  list-style: none;
  margin: 0; padding: 0;
}
.nav-links a {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-muted);
  position: relative;
  padding: 4px 0;
  transition: color .25s;
}
.nav-links a:hover, .nav-links a.is-current { color: var(--text); }
.nav-links a.is-current::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 100%; height: 1px;
  background: var(--accent);
}
.nav-cta {
  padding: 10px 22px;
  border-radius: 100px;
  background: var(--cta);
  color: #14100a;
  font-weight: 600;
  font-size: 14px;
  transition: background .25s, transform .25s;
}
.nav-cta:hover { background: var(--cta-hover); transform: translateY(-1px); }

.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  border: none;
  background: none;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.nav-toggle span {
  width: 22px; height: 1.5px;
  background: var(--text);
  transition: transform .3s var(--ease-out), opacity .3s;
}
.nav-mobile {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s var(--ease-out);
}
.nav-mobile.is-open { opacity: 1; pointer-events: auto; }
.nav-mobile a {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  color: var(--text);
}

@media (max-width: 860px) {
  .nav-links, .nav-cta.desktop-only { display: none; }
  .nav-toggle { display: flex; }
}

/* -------------------- Buttons -------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 30px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  border: none;
  transition: transform .3s var(--ease-out), background .25s, border-color .25s;
}
.btn-primary {
  background: var(--cta);
  color: #14100a;
}
.btn-primary:hover { background: var(--cta-hover); transform: translateY(-2px); }
.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-outline:hover { border-color: var(--accent); transform: translateY(-2px); }

/* -------------------- Sections / Utility -------------------- */
.section { padding: 140px 0; }
.section-tight { padding: 90px 0; }
.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}
.section-head { max-width: 640px; margin-bottom: 64px; }
.section-head h2 { font-size: clamp(30px, 4vw, 44px); margin-bottom: 18px; }
.section-head p { color: var(--text-muted); font-size: 17px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  transition: background .3s, border-color .3s, transform .3s var(--ease-out);
}
.card:hover { background: var(--surface-hover); border-color: #33333f; }

.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity .8s var(--ease-out), transform .8s var(--ease-out);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='90' height='90'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* -------------------- Hero (Ken-Burns + Partikel-Canvas) -------------------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--bg);
}
.hero-media {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.hero-media img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  animation: kenburns 14s ease-in-out infinite alternate;
  opacity: 0.9;
}
@keyframes kenburns {
  from { transform: scale(1) translate(0, 0); }
  to   { transform: scale(1.09) translate(-1.5%, -1%); }
}
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, var(--bg) 0%, rgba(10,10,15,0.55) 32%, rgba(10,10,15,0.15) 60%),
    linear-gradient(180deg, rgba(10,10,15,0.65) 0%, transparent 30%);
}
.hero-particles {
  position: absolute;
  inset: 0;
  z-index: 1;
}
.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-bottom: 110px;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 26px;
}
.hero-eyebrow::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--cta);
  box-shadow: 0 0 0 4px rgba(255,184,77,0.15);
}
.hero-content h1 {
  font-size: clamp(38px, 6vw, 74px);
  max-width: 900px;
  margin-bottom: 26px;
}
.hero-content h1 em {
  font-style: normal;
  color: var(--accent);
}
.hero-content .lede {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 540px;
  margin-bottom: 40px;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-scroll {
  position: absolute;
  bottom: 40px; right: 28px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}
.hero-scroll .line {
  width: 1px; height: 34px;
  background: linear-gradient(var(--accent), transparent);
}

@media (max-width: 640px) {
  .hero-scroll { display: none; }
}

/* -------------------- Browser-Frame Mockup -------------------- */
.browser-frame {
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 40px 80px -30px rgba(0,0,0,0.6);
}
.browser-frame-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: #101016;
  border-bottom: 1px solid var(--border);
}
.browser-frame-bar .dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: #3a3a45;
}
.browser-frame-bar .url {
  margin-left: 14px;
  font-size: 11.5px;
  color: var(--text-muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 12px;
  flex: 1;
  max-width: 260px;
}
.browser-frame-view {
  position: relative;
  width: 100%;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--bg);
}
.browser-frame-view iframe {
  position: absolute;
  top: 0; left: 0;
  width: 250%;
  height: 250%;
  border: 0;
  transform: scale(0.4);
  transform-origin: top left;
  pointer-events: none;
}

/* CSS-built mockup (no live source available) */
.mock-site {
  position: absolute; inset: 0;
  display: flex;
  flex-direction: column;
}
.mock-site .mock-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.mock-site .mock-logo { font-family: var(--font-display); font-weight: 700; font-size: 14px; }
.mock-site .mock-links { display: flex; gap: 16px; }
.mock-site .mock-links span { width: 28px; height: 6px; border-radius: 3px; background: rgba(255,255,255,0.18); display: block; }
.mock-site .mock-hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 30px 26px;
  gap: 14px;
}
.mock-site .mock-title { height: 20px; width: 62%; border-radius: 4px; }
.mock-site .mock-title.short { width: 40%; }
.mock-site .mock-text { height: 8px; width: 80%; border-radius: 3px; background: rgba(255,255,255,0.14); }
.mock-site .mock-text.w60 { width: 60%; }
.mock-site .mock-btn { margin-top: 6px; width: 96px; height: 26px; border-radius: 20px; }
.mock-site .mock-grid { display: flex; gap: 10px; margin-top: 8px; }
.mock-site .mock-grid div { flex: 1; height: 54px; border-radius: 8px; background: rgba(255,255,255,0.08); }

/* -------------------- Portrait vignette (blends studio-white bg into theme) -------------------- */
.portrait-frame { position: relative; }
.portrait-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04), inset 0 -60px 70px -20px rgba(10,10,15,0.75), inset 0 60px 70px -20px rgba(10,10,15,0.55);
}
.portrait-frame img { filter: saturate(0.94) contrast(1.03); }

/* -------------------- Legal pages -------------------- */
.legal { max-width: 760px; }
.legal h1 { font-size: clamp(30px,4vw,42px); margin-bottom: 40px; }
.legal h2 { font-size: 20px; margin: 44px 0 14px; }
.legal h2:first-of-type { margin-top: 0; }
.legal p, .legal li { color: var(--text-muted); font-size: 15.5px; line-height: 1.75; }
.legal p { margin-bottom: 14px; }
.legal ul { padding-left: 20px; margin-bottom: 14px; }
.legal li { margin-bottom: 6px; }
.legal strong { color: var(--text); font-weight: 600; }
.legal a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.legal .legal-meta { color: var(--text-muted); font-size: 13.5px; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--border); }

/* -------------------- Footer -------------------- */
.footer {
  border-top: 1px solid var(--border);
  padding: 72px 0 32px;
}
.footer-top {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
  margin-bottom: 56px;
}
.footer-brand .nav-logo { display: block; margin-bottom: 14px; }
.footer-brand p { color: var(--text-muted); max-width: 320px; font-size: 14.5px; }
.footer-cols { display: flex; gap: 64px; flex-wrap: wrap; }
.footer-col h4 {
  font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 18px;
}
.footer-col a, .footer-col p {
  display: block;
  font-size: 14.5px;
  color: var(--text-muted);
  margin-bottom: 12px;
  transition: color .25s;
}
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-muted);
}
.footer-bottom a:hover { color: var(--text); }

@media (max-width: 640px) {
  .section { padding: 90px 0; }
  .footer-top { flex-direction: column; gap: 32px; }
}

/* Responsive overrides for inline-styled grids (used across pages) */
@media (max-width: 900px) {
  .services-grid, .ref-grid { grid-template-columns: 1fr !important; }
  .about-teaser, .about-hero { grid-template-columns: 1fr !important; }
  .about-hero > div:first-child { position: static !important; }
  .leistung-row { grid-template-columns: 1fr !important; gap: 32px !important; }
  .leistung-row > div { order: 0 !important; }
  .ref-detail { grid-template-columns: 1fr !important; align-items: start !important; }
  .kontakt-grid { grid-template-columns: 1fr !important; }
}
@media (max-width: 560px) {
  .form-row { grid-template-columns: 1fr !important; }
}
@media (max-width: 640px) {
  .services-grid { gap: 16px !important; }
}
