/* ── Fonts ─────────────────────────────────────────────── */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/plus-jakarta-sans-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/plus-jakarta-sans-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/plus-jakarta-sans-700.woff2') format('woff2');
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('/fonts/plus-jakarta-sans-800.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/jetbrains-mono-400.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/jetbrains-mono-700.woff2') format('woff2');
}
@font-face {
  font-family: 'Orbitron';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/orbitron-700.woff2') format('woff2');
}

/* ── Design tokens ──────────────────────────────────────── */
:root {
  --cyan:       #006590;
  --cyan-dim:   rgba(0, 101, 144, 0.10);
  --cyan-border: rgba(0, 101, 144, 0.30);
  --btn-color:  #ffffff;
  --bg:         #f5f5f8;
  --bg2:        #eeeef4;
  --bg3:        #e5e5ef;
  --border:     rgba(0, 0, 0, 0.09);
  --text:       #0f0f18;
  --text-muted: #666680;
  --nav-bg:     rgba(245, 245, 248, 0.9);
  --card-hover: rgba(0, 180, 230, 0.06);
  --input-bg:   rgba(0, 0, 0, 0.04);
  --grid-line:  rgba(0, 101, 144, 0.06);
}

/* ── Base ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  margin: 0;
}
h1, h2, h3, h4, p, ul, figure { margin: 0; }

/* ── Keyframes ─────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(-1.5deg); }
  50%       { transform: translateY(-10px) rotate(-1.5deg); }
}

/* ── Scroll reveal ─────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Shared utilities ──────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 4rem; }

.eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 3px;
  color: var(--cyan);
  text-transform: uppercase;
  margin-bottom: 0.875rem;
}

.divider { width: 36px; height: 2px; background: var(--cyan); }
.leistungen .divider  { margin-top: 1.25rem; margin-bottom: 1.25rem; }
.standards .divider  { margin: 1.25rem 0 1.5rem; }
.refs .divider      { margin: 1.25rem 0 3rem; }
.kontakt .divider   { margin: 1.25rem 0 1.375rem; }

.leistungen h2,
.standards h2 {
  font-size: clamp(32px, 3.5vw, 46px);
  font-weight: 800;
  letter-spacing: -0.3px;
  line-height: 1.12;
}

/* ── Nav ───────────────────────────────────────────────── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 999;
  background: var(--nav-bg); backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 4rem; padding-left: max(4rem, calc(4rem + env(safe-area-inset-left)));
  padding-right: max(4rem, calc(4rem + env(safe-area-inset-right))); height: 68px;
}
.logo {
  font-family: 'Orbitron', sans-serif;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.logo .tag { color: var(--cyan); }
.nav-links { display: flex; gap: 2rem; }
.nav-links a {
  font-size: 13px; font-weight: 500; color: var(--text-muted);
  text-decoration: none; transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }
.nav-right { display: flex; align-items: center; gap: 0.75rem; }
.nav-cta {
  font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 1.5px;
  background: var(--cyan); color: var(--btn-color); padding: 9px 20px;
  text-decoration: none; font-weight: 700; border-radius: 4px; transition: opacity 0.2s;
}
.nav-cta:hover { opacity: 0.85; }
.hamburger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 4px;
}
.hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--text); border-radius: 2px; transition: all 0.3s;
}
.mobile-overlay {
  display: none; position: fixed; inset: 0; z-index: 1000;
  background: var(--bg); flex-direction: column;
  align-items: center; justify-content: center; gap: 2rem;
}
.mobile-overlay.open { display: flex; }
.mobile-close {
  position: absolute; top: 1.5rem; right: 1.5rem;
  font-size: 24px; background: none; border: none;
  color: var(--text-muted); cursor: pointer;
}
.mobile-link {
  font-size: 24px; font-weight: 700; color: var(--text);
  text-decoration: none; transition: color 0.2s;
}
.mobile-link:hover { color: var(--cyan); }
.mobile-cta {
  font-family: 'JetBrains Mono', monospace; font-size: 13px; letter-spacing: 2px;
  background: var(--cyan); color: var(--btn-color); padding: 12px 28px;
  text-decoration: none; font-weight: 700; border-radius: 4px; margin-top: 1rem;
}
/* ── Hero ──────────────────────────────────────────────── */
.hero {
  min-height: 100vh; min-height: 100svh; padding-top: 68px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  position: relative; overflow: hidden; padding-bottom: 2rem;
}
.hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at 40% 50%, black 10%, transparent 75%);
}
.hero-glow {
  position: absolute; right: 8%; top: 50%; transform: translateY(-50%);
  width: 480px; height: 480px; border-radius: 50%;
  background: radial-gradient(circle, var(--cyan-dim) 0%, transparent 70%);
  pointer-events: none;
}
.hero-inner {
  max-width: 1200px; width: 100%; margin: 0 auto; padding: 0 4rem;
  display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center;
  position: relative; z-index: 2;
}
.hero-text .eyebrow {
  display: flex; align-items: center; gap: 10px;
  font-family: 'JetBrains Mono', monospace; font-size: 11px;
  letter-spacing: 3px; color: var(--cyan); text-transform: uppercase; margin-bottom: 1.5rem;
  animation: fadeUp 0.6s ease both;
}
.hero-text .eyebrow::before { content: ''; width: 18px; height: 1px; background: var(--cyan); }
.hero-text h1 {
  font-size: clamp(38px, 4.5vw, 62px); font-weight: 800; line-height: 1.1;
  letter-spacing: -0.5px; margin-bottom: 1.25rem;
  animation: fadeUp 0.6s ease 0.12s both;
}
.hero-text h1 span { color: var(--cyan); }
.hero-sub {
  font-size: 16px; color: var(--text-muted); line-height: 1.8;
  max-width: 420px; margin-bottom: 2rem;
  animation: fadeUp 0.6s ease 0.24s both;
}
.hero-ctas {
  display: flex; gap: 0.75rem; flex-wrap: wrap;
  animation: fadeUp 0.6s ease 0.36s both;
}
.btn-primary {
  background: var(--cyan); color: var(--btn-color); font-size: 14px; font-weight: 700;
  padding: 13px 28px; text-decoration: none; border-radius: 6px;
  transition: opacity 0.2s, transform 0.2s;
}
.btn-primary:hover { opacity: 0.88; transform: translateY(-2px); }
.btn-ghost {
  font-size: 14px; font-weight: 500; color: var(--text-muted); padding: 13px 28px;
  text-decoration: none; border: 1px solid var(--border); border-radius: 6px; transition: all 0.2s;
}
.btn-ghost:hover { border-color: var(--cyan-border); color: var(--text); }
.btn-primary:focus-visible,
.btn-ghost:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
.hero-visual { display: flex; justify-content: center; animation: fadeUp 0.7s ease 0.3s both; }
.dashboard {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 16px; padding: 1.5rem; width: 100%; max-width: 400px;
  box-shadow: 0 40px 80px rgba(0,0,0,0.3);
  animation: float 6s ease-in-out infinite;
}
.dash-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 1rem; padding-bottom: 0.875rem; border-bottom: 1px solid var(--border);
}
.dash-title { font-family: 'JetBrains Mono', monospace; font-size: 10px; color: var(--cyan); letter-spacing: 2px; }
.dash-status { display: flex; align-items: center; gap: 5px; }
.dash-dot { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 8px rgba(34,197,94,0.6); }
.dash-status span { font-family: 'JetBrains Mono', monospace; font-size: 10px; color: var(--text-muted); }
.dash-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 0.625rem; margin-bottom: 1rem; }
.dash-stat { background: var(--bg3); border-radius: 8px; padding: 0.75rem; text-align: center; }
.stat-num { font-family: 'JetBrains Mono', monospace; font-size: 17px; font-weight: 700; color: var(--cyan); }
.stat-lbl { font-size: 9px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; margin-top: 2px; }
.dash-bars { display: flex; flex-direction: column; gap: 0.625rem; margin-bottom: 1rem; }
.bar-meta { display: flex; justify-content: space-between; font-size: 10px; color: var(--text-muted); margin-bottom: 4px; }
.bar-meta span:last-child { color: var(--cyan); font-family: 'JetBrains Mono', monospace; }
.bar-track { height: 3px; background: var(--bg3); border-radius: 2px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--cyan); border-radius: 2px; }
.dash-sites { display: flex; flex-direction: column; gap: 0.5rem; }
.site-row { display: flex; align-items: center; gap: 0.625rem; background: var(--bg3); border-radius: 6px; padding: 0.5rem 0.75rem; }
.site-dot { width: 5px; height: 5px; border-radius: 50%; background: #22c55e; flex-shrink: 0; }
.site-name { font-size: 11px; color: var(--text-muted); flex: 1; }
.site-speed { font-family: 'JetBrains Mono', monospace; font-size: 10px; color: var(--cyan); }
.badge-strip {
  display: flex; gap: 0.625rem; flex-wrap: wrap; justify-content: center;
  max-width: 1200px; width: 100%; padding: 1.5rem 4rem 0;
  position: relative; z-index: 2;
  animation: fadeUp 0.6s ease 0.5s both;
}
.badge {
  font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 1.5px;
  border: 1px solid var(--border); color: var(--text-muted);
  padding: 5px 13px; border-radius: 100px;
}

/* ── Leistungen ────────────────────────────────────────── */
.leistungen { padding: 6rem 0; background: var(--bg2); }
.section-header { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: end; margin-bottom: 3.5rem; }
.section-sub { font-size: 15px; color: var(--text-muted); line-height: 1.8; }
.services-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1px; background: var(--border);
  border: 1px solid var(--border); border-radius: 12px; overflow: hidden;
  margin-top: 2.5rem;
}
.service-card {
  background: var(--bg3); padding: 2.25rem 1.75rem;
  position: relative; overflow: hidden; transition: background 0.3s;
  cursor: pointer; border: none; text-align: left; color: var(--text);
  display: flex; flex-direction: column; font-family: inherit; font-size: inherit;
}
.service-card::after {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--cyan); transform: scaleX(0); transform-origin: left; transition: transform 0.3s;
}
.service-card:hover::after { transform: scaleX(1); }
.service-card:hover { background: var(--card-hover); }
.service-card:focus-visible { outline: 2px solid var(--cyan); outline-offset: -2px; }
.service-icon {
  width: 44px; height: 44px; background: var(--cyan-dim); border: 1px solid var(--cyan-border);
  border-radius: 10px; display: flex; align-items: center; justify-content: center;
  font-size: 20px; margin-bottom: 1.125rem;
}
.service-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 0.5rem; }
.service-card p { font-size: 13px; color: var(--text-muted); line-height: 1.75; flex: 1; }
.service-more {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 1.25rem;
  font-family: 'JetBrains Mono', monospace; font-size: 9px; letter-spacing: 1.5px;
  color: var(--cyan); text-transform: uppercase;
  border: 1px solid var(--cyan-border); border-radius: 100px;
  padding: 5px 12px; align-self: flex-start;
  transition: background 0.2s, border-color 0.2s;
}
.service-card:hover .service-more {
  background: var(--cyan-dim); border-color: var(--cyan);
}

/* ── Leistungen Modal ── */
.svc-modal-overlay {
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(0,0,0,0.75);
  display: flex; align-items: center; justify-content: center;
  padding: 2rem; opacity: 0; pointer-events: none;
  transition: opacity 0.3s;
}
.svc-modal-overlay.open { opacity: 1; pointer-events: all; }
body.modal-open { overflow: hidden; }
.svc-modal-box {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 16px; padding: 2.5rem; max-width: 520px; width: 100%;
  max-height: 88vh; overflow-y: auto;
  position: relative;
  transform: scale(0.93) translateY(16px);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.svc-modal-overlay.open .svc-modal-box { transform: scale(1) translateY(0); }
.svc-modal-close {
  position: absolute; top: 1.25rem; right: 1.25rem;
  width: 32px; height: 32px; border-radius: 50%;
  background: none; border: 1px solid var(--border);
  color: var(--text-muted); font-size: 15px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.2s, color 0.2s;
}
.svc-modal-close:hover { border-color: var(--cyan); color: var(--cyan); }
.svc-modal-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.svc-modal-label {
  font-family: 'JetBrains Mono', monospace; font-size: 9px;
  letter-spacing: 2px; color: var(--cyan); text-transform: uppercase; margin-bottom: 0.4rem;
}
.svc-modal-title { font-size: 1.3rem; font-weight: 800; margin-bottom: 1rem; }
.svc-modal-text { font-size: 14.5px; color: var(--text); line-height: 1.85; }

.leistungen-cta {
  text-align: center; padding: 3rem 0 0;
  border-top: 1px solid var(--border); margin-top: 3rem;
}
.leistungen-cta p {
  font-size: 15px; color: var(--text-muted); max-width: 540px;
  margin: 0 auto 1.75rem; line-height: 1.8;
}


/* ── Über mich ─────────────────────────────────────────── */
.ueber { padding: 6rem 0; background: var(--bg2); }
.about-text { max-width: 680px; }
.about-text h2 { font-size: clamp(32px, 3.5vw, 46px); font-weight: 800; letter-spacing: -0.3px; margin-bottom: 4px; }
.about-text h2 span { color: var(--cyan); }
.role { font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 3px; color: var(--cyan); opacity: 0.7; margin-bottom: 1.375rem; }
.about-text p { font-size: 15px; color: var(--text-muted); line-height: 1.9; margin-bottom: 0.875rem; }
.about-text p:last-child { color: var(--text-muted); border-left: 2px solid var(--cyan); padding-left: 1.25rem; margin-top: 1.5rem; }
.certs { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 1.375rem; }
.cert {
  font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 1px;
  border: 1px solid var(--cyan-border); color: var(--cyan);
  padding: 5px 13px; border-radius: 100px;
}

/* ── Referenzen ────────────────────────────────────────── */
.refs { padding: 6rem 0; background: var(--bg); }
.refs h2 { font-size: clamp(32px, 3.5vw, 46px); font-weight: 800; letter-spacing: -0.3px; }
.placeholder {
  text-align: center; padding: 4.5rem 1.25rem;
  background: var(--bg2); border: 1px dashed var(--border); border-radius: 12px;
}
.code { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--text-muted); letter-spacing: 2px; margin-bottom: 0.75rem; }
.refs p { font-size: 14px; color: var(--text-muted); }
.refs a { color: var(--cyan); text-decoration: none; }
.refs a:hover { text-decoration: underline; }
.refs a:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; border-radius: 2px; }

/* ── Kontakt ───────────────────────────────────────────── */
.kontakt { padding: 6rem 0; background: var(--bg2); }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; }
.contact-info h2 { font-size: 32px; font-weight: 800; letter-spacing: -0.3px; line-height: 1.2; }
.contact-info p { font-size: 14px; color: var(--text-muted); line-height: 1.8; margin-bottom: 1.5rem; }
.detail { display: flex; gap: 0.75rem; align-items: center; margin-bottom: 0.75rem; font-size: 13px; }
.key { font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 1px; color: var(--text-muted); min-width: 70px; }
/* ── Legal page container (shared) ────────────────────── */
.legal-page {
  padding: 8rem 4rem 6rem;
  max-width: 800px;
  margin: 0 auto;
  min-height: 70vh;
}

/* ── Impressum page layout ─────────────────────────────── */
.impressum-layout {
  max-width: 800px;
  margin: 0 auto;
  min-height: 70vh;
  padding: 8rem 4rem 6rem;
}

.impressum-layout h1 {
  font-size: 2.75rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 2rem;
}

.impressum-layout h1::before {
  content: 'RECHTLICHES';
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--cyan);
  font-weight: 400;
  margin-bottom: 0.6rem;
}

/* Address card — first <p> right after h1 */
.impressum-layout h1 + p {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--cyan);
  border-radius: 0 4px 4px 0;
  padding: 1.25rem 1.5rem;
  font-size: 14px;
  line-height: 2;
  color: var(--text);
  margin-bottom: 2.5rem;
}

.impressum-layout h2 {
  font-size: 11px !important;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--cyan) !important;
  font-weight: 700;
  margin-top: 2rem !important;
  margin-bottom: 0.6rem !important;
}

.impressum-layout h2 + p {
  font-size: 14px;
  color: var(--text);
  line-height: 1.9;
  margin-bottom: 0;
  padding: 1rem 1.25rem;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 4px;
}

/* last section (dispute resolution) — muted */
.impressum-layout h2:last-of-type + p {
  color: var(--text-muted);
  background: transparent;
  border-color: transparent;
  padding: 0;
  font-size: 13px;
}

.contact-details-row { display: flex; align-items: flex-start; gap: 1.5rem; margin-top: 0.25rem; }
.contact-details { flex: none; }
.wa-qr-link { display: block; flex-shrink: 0; margin-left: 70px; }
.wa-qr { display: block; width: 125px; height: 125px; object-fit: contain; border-radius: 6px; }
.contact-form { display: flex; flex-direction: column; gap: 1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
label { font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 2px; color: var(--text-muted); text-transform: uppercase; }
input, textarea {
  background: var(--input-bg); border: 1px solid var(--border);
  color: var(--text); padding: 12px 14px; font-size: 14px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  outline: none; border-radius: 8px; transition: all 0.2s; width: 100%;
}
input:focus, textarea:focus { border-color: var(--cyan-border); background: var(--cyan-dim); }
input:focus-visible, textarea:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
textarea { resize: vertical; min-height: 120px; }
.contact-form button {
  background: var(--cyan); color: #fff; border: none;
  font-size: 14px; font-weight: 700; padding: 13px 28px;
  cursor: pointer; transition: opacity 0.2s, transform 0.2s; border-radius: 6px;
  font-family: 'Plus Jakarta Sans', sans-serif; align-self: flex-start;
}
.contact-form button:hover { opacity: 0.88; transform: translateY(-2px); }
.contact-form button:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }

/* ── Footer ────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border); padding: 1.75rem 4rem;
  padding-left: max(4rem, calc(4rem + env(safe-area-inset-left)));
  padding-right: max(4rem, calc(4rem + env(safe-area-inset-right)));
  padding-bottom: max(1.75rem, calc(1.75rem + env(safe-area-inset-bottom)));
}
.footer-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 1rem;
}
.footer-logo {
  font-family: 'Orbitron', sans-serif;
  font-size: 12px; font-weight: 700; letter-spacing: 0.08em;
  color: var(--text-muted);
}
.footer-logo .tag { color: var(--cyan); }
.links { display: flex; gap: 1.5rem; align-items: center; font-size: 12px; color: var(--text-muted); }
.links a { color: var(--text-muted); text-decoration: none; }
.links a:hover { color: var(--cyan); }
.links a:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; border-radius: 2px; }

/* ── Responsive – tablet (769–1024px) ──────────────────── */
@media (min-width: 769px) and (max-width: 1024px) {
  nav { padding: 0 2rem; }
  .hero-inner { padding: 0 2rem; gap: 2.5rem; }
  .container { padding: 0 2rem; }
  .badge-strip { padding: 1.5rem 2rem 0; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  footer { padding: 1.75rem 2rem; }
  .legal-page, .impressum-layout { padding: 7rem 3rem 5rem; }
}

/* ── Responsive – nav collapse (≤ 900px) ──────────────── */
@media (max-width: 900px) {
  nav { padding: 0 2rem; }
  .nav-links { display: none; }
}

/* ── Responsive – mobile (≤ 768px) ────────────────────── */
@media (max-width: 768px) {
  .container { padding: 0 1.5rem; }

  nav { padding: 0 1.25rem; padding-left: max(1.25rem, calc(1.25rem + env(safe-area-inset-left))); padding-right: max(1.25rem, calc(1.25rem + env(safe-area-inset-right))); height: 60px; }
  .nav-links, .nav-cta { display: none; }
  .hamburger { display: flex; }
  .logo { font-size: 13px; letter-spacing: 0.04em; }
  .hero { padding-top: 60px; }

  .hero-inner { grid-template-columns: 1fr; gap: 2rem; padding: 0 max(1.5rem, calc(1.5rem + env(safe-area-inset-left))); }
  .hero-glow { display: none; }
  .badge-strip { padding: 1.25rem 1.5rem 0; flex-wrap: wrap; gap: 0.5rem; }
  .dashboard { max-width: 100%; }

  .leistungen { padding: 4rem 0; }
  .leistungen .divider { margin-bottom: 1.25rem; }
  .section-header { grid-template-columns: 1fr; gap: 1rem; }
  .services-grid { grid-template-columns: 1fr; }
  .svc-modal-box { padding: 1.75rem; }

  .ueber { padding: 4rem 0; }

  .refs { padding: 4rem 0; }

  .kontakt { padding: 4rem 0; overflow-x: hidden; }
  .contact-grid { grid-template-columns: 1fr; gap: 2.5rem; max-width: 100%; }
  .contact-info, .contact-form { max-width: 100%; width: 100%; }
  .form-row { grid-template-columns: 1fr; }
  .contact-details-row { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .wa-qr-link { margin-left: 0 !important; }
  .contact-form button { align-self: stretch; }

  footer { padding: 1.5rem 1.5rem; padding-left: max(1.5rem, calc(1.5rem + env(safe-area-inset-left))); padding-right: max(1.5rem, calc(1.5rem + env(safe-area-inset-right))); padding-bottom: max(1.5rem, calc(1.5rem + env(safe-area-inset-bottom))); }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
  .links { flex-wrap: wrap; gap: 0.75rem 1.25rem; }

  .legal-page, .impressum-layout { padding: 5rem 1.5rem 4rem; max-width: 100%; }
  .impressum-layout h1 { font-size: 2.25rem; }
}

/* ── Responsive – small phones (≤ 480px) ──────────────── */
@media (max-width: 480px) {
  nav { height: 56px; padding: 0 1rem; padding-left: max(1rem, calc(1rem + env(safe-area-inset-left))); padding-right: max(1rem, calc(1rem + env(safe-area-inset-right))); }
  .hero { padding-top: 56px; }
  .hero-inner { gap: 1.75rem; padding: 0 max(1rem, calc(1rem + env(safe-area-inset-left))); }
  .hero-text h1 { font-size: clamp(28px, 7.5vw, 38px); }
  .hero-sub { font-size: 14px; }
  .badge-strip { padding: 1rem 1rem 0; gap: 0.375rem; }
  .badge { font-size: 9px; padding: 4px 10px; }

  .container { padding: 0 1rem; }

  .service-card { padding: 1.5rem 1.25rem; }
  .service-card h3 { font-size: 15px; }
  .svc-modal-box { padding: 1.25rem; margin: 0 0.5rem; }
  .svc-modal-title { font-size: 1.1rem; }

  .contact-info h2 { font-size: 26px; }

  footer { padding: 1.25rem 1rem; }
  .footer-logo { font-size: 11px; }
  .links { gap: 0.5rem 1rem; }
  .links > span { flex: 0 0 100%; }

  .legal-page, .impressum-layout { padding: 4.5rem 1rem 3rem; }
  .impressum-layout h1 { font-size: 1.875rem; }
}

/* ── Responsive – very small phones (≤ 360px) ─────────── */
@media (max-width: 360px) {
  .logo { font-size: 12px; }
  .hero-text h1 { font-size: clamp(24px, 7vw, 30px); }
  .btn-primary, .btn-ghost { font-size: 13px; padding: 11px 20px; }
  .hero-visual { display: none; }
  .legal-page, .impressum-layout { padding: 4rem 0.875rem 2.5rem; }
}

/* ── Landscape phones (height ≤ 500px) ────────────────── */
@media (max-height: 500px) and (orientation: landscape) {
  nav { height: 52px; padding-left: max(1.25rem, calc(1.25rem + env(safe-area-inset-left))); padding-right: max(1.25rem, calc(1.25rem + env(safe-area-inset-right))); }
  .hero { min-height: auto; padding: 60px 0 1.5rem; }
  .hero-inner { gap: 1.5rem; padding: 0 max(1.25rem, calc(1.25rem + env(safe-area-inset-left))); grid-template-columns: 1fr; }
  .hero-text h1 { font-size: clamp(22px, 4vw, 32px); margin-bottom: 0.75rem; }
  .hero-sub { font-size: 13px; margin-bottom: 1rem; line-height: 1.6; }
  .hero-ctas { gap: 0.5rem; }
  .btn-primary, .btn-ghost { padding: 10px 20px; font-size: 13px; }
  .badge-strip { padding: 0.75rem 1.25rem 0; }
  .hero-visual { display: none; }
  .leistungen, .ueber, .refs, .kontakt { padding: 3rem 0; }
  .legal-page, .impressum-layout { padding: 4rem 2rem 3rem; }
  .svc-modal-box { max-height: 80vh; }
  footer { padding-left: max(1.5rem, calc(1.5rem + env(safe-area-inset-left))); padding-right: max(1.5rem, calc(1.5rem + env(safe-area-inset-right))); }
}

/* ── Landscape tablets / wider phones in landscape (height 501–700px) ── */
@media (min-height: 501px) and (max-height: 700px) and (orientation: landscape) and (max-width: 900px) {
  .hero { min-height: auto; padding: 80px 0 2rem; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .leistungen, .ueber, .refs, .kontakt { padding: 3.5rem 0; }
}

/* ── Reduced motion ────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ── Legal content (Impressum / Datenschutz) ───────────── */
.legal-content h1 { font-size: 2rem; font-weight: 800; margin-bottom: 0.5rem; letter-spacing: -0.3px; overflow-wrap: break-word; hyphens: auto; }
.impressum-layout h1 { overflow-wrap: break-word; hyphens: auto; }
.legal-content h2 { font-size: 1.25rem; font-weight: 700; margin-top: 2rem; margin-bottom: 0.5rem; }
.legal-content h3 { font-size: 1rem; font-weight: 700; margin-top: 1.5rem; margin-bottom: 0.375rem; }
.legal-content p  { font-size: 14px; color: var(--text-muted); line-height: 1.8; margin-bottom: 0.75rem; }
.legal-content ul, .legal-content ol { padding-left: 1.5rem; margin-bottom: 0.75rem; }
.legal-content li { font-size: 14px; color: var(--text-muted); line-height: 1.8; }
.legal-content a  { color: var(--cyan); text-decoration: none; }
.legal-content a:hover { text-decoration: underline; }

/* ── Legal content responsive overrides (must come after base rules) ── */
@media (max-width: 768px) {
  .legal-content h1 { font-size: 1.875rem; }
}
@media (max-width: 480px) {
  .legal-content h1 { font-size: 1.625rem; }
  .legal-content h2 { font-size: 1.1rem; }
}
@media (max-width: 360px) {
  .legal-content h1, .impressum-layout h1 { font-size: 1.5rem; }
}
