/* ============================================================
   MARHOLD GmbH — Stahl & Maschinenbau
   Industrial design system
   ============================================================ */

/* Self-hosted open-source fonts (OFL) — no external/Google requests */
@font-face{font-family:'Archivo';font-style:normal;font-weight:800;font-display:swap;src:url('fonts/archivo-800.woff2') format('woff2');}
@font-face{font-family:'Archivo';font-style:normal;font-weight:900;font-display:swap;src:url('fonts/archivo-900.woff2') format('woff2');}
@font-face{font-family:'Barlow';font-style:normal;font-weight:300;font-display:swap;src:url('fonts/barlow-300.woff2') format('woff2');}
@font-face{font-family:'Barlow';font-style:normal;font-weight:400;font-display:swap;src:url('fonts/barlow-400.woff2') format('woff2');}
@font-face{font-family:'Barlow';font-style:normal;font-weight:500;font-display:swap;src:url('fonts/barlow-500.woff2') format('woff2');}
@font-face{font-family:'Barlow';font-style:normal;font-weight:600;font-display:swap;src:url('fonts/barlow-600.woff2') format('woff2');}
@font-face{font-family:'Barlow';font-style:normal;font-weight:700;font-display:swap;src:url('fonts/barlow-700.woff2') format('woff2');}
@font-face{font-family:'Space Mono';font-style:normal;font-weight:400;font-display:swap;src:url('fonts/space-mono-400.woff2') format('woff2');}
@font-face{font-family:'Space Mono';font-style:normal;font-weight:700;font-display:swap;src:url('fonts/space-mono-700.woff2') format('woff2');}

:root {
  /* Dark / graphite */
  --bg:        #0e1114;
  --surface:   #14181c;
  --surface-2: #1b2026;
  --surface-3: #232a31;
  --line:      rgba(255,255,255,0.09);
  --line-2:    rgba(255,255,255,0.16);

  /* Light / paper */
  --paper:     #f4f5f6;
  --paper-2:   #e8eaed;
  --paper-3:   #dde0e4;

  /* Ink */
  --ink:       #11151a;
  --ink-soft:  #49525c;
  --ink-mute:  #717a84;

  /* On-dark text */
  --on-dark:      #eef1f3;
  --on-dark-soft: #aab3bc;
  --on-dark-mute: #6c767f;

  /* Accent — brand blue */
  --accent:      #2a6fdb;
  --accent-deep: #225bb4;
  --accent-glow: rgba(42,111,219,0.25);

  --steel:     #5d6770;

  /* tweakable */
  --photo-gray: 0.53;

  --maxw: 1280px;
  --gutter: clamp(20px, 5vw, 72px);

  --ff-display: 'Archivo', sans-serif;
  --ff-body:    'Barlow', sans-serif;
  --ff-mono:    'Space Mono', monospace;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--ff-body);
  background: var(--bg);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

.wrap {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Type ---------- */
.kicker {
  font-family: var(--ff-mono);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.kicker::before {
  content: "";
  width: 26px; height: 2px;
  background: var(--accent);
  display: inline-block;
}

h1, h2, h3, h4 { font-family: var(--ff-display); font-weight: 800; line-height: 1.02; letter-spacing: -0.02em; }

.display {
  font-size: clamp(2.6rem, 7vw, 5.6rem);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.035em;
  text-transform: uppercase;
}

.h-section {
  font-size: clamp(2rem, 4.4vw, 3.4rem);
  text-transform: uppercase;
  letter-spacing: -0.025em;
}

.lead { font-size: clamp(1.1rem, 1.6vw, 1.35rem); line-height: 1.55; font-weight: 400; }

.accent { color: var(--accent); }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: fixed; inset: 0 0 auto 0;
  z-index: 100;
  display: flex; align-items: center;
  height: 84px;
  transition: background .35s var(--ease), height .35s var(--ease), border-color .35s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header .wrap { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.site-header.scrolled {
  background: rgba(14,17,20,0.88);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  height: 68px;
  border-bottom: 1px solid var(--line);
}
/* Solider Header auf Unterseiten (kein Hero dahinter) */
.site-header.solid { background: var(--bg); border-bottom: 1px solid var(--line); }
.site-header.solid.scrolled { background: rgba(14,17,20,0.96); }

.brand { display: flex; align-items: center; gap: 14px; }
.brand-mark {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  background: var(--accent);
  color: #fff;
  font-family: var(--ff-display);
  font-weight: 900;
  font-size: 22px;
  clip-path: polygon(0 0, 100% 0, 100% 72%, 72% 100%, 0 100%);
}
.brand-logo {
  width: 50px; height: 50px;
  flex: none;
  display: grid; place-items: center;
}
.brand-logo img { width: 100%; height: 100%; object-fit: contain; }
.site-header.scrolled .brand-logo { width: 44px; height: 44px; transition: width .35s var(--ease), height .35s var(--ease); }
.footer-brand .brand-logo { width: 58px; height: 58px; }
.brand-text { line-height: 1; }
.brand-text b { font-family: var(--ff-display); font-weight: 900; font-size: 20px; letter-spacing: -0.01em; color: var(--on-dark); text-transform: uppercase; display: block; }
.brand-text span { font-family: var(--ff-mono); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--on-dark-mute); }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  font-family: var(--ff-body);
  font-weight: 500;
  font-size: 14.5px;
  letter-spacing: 0.01em;
  color: var(--on-dark-soft);
  padding: 10px 16px;
  position: relative;
  transition: color .2s var(--ease);
}
.nav a:hover { color: var(--on-dark); }
.nav a.active { color: var(--on-dark); }
.nav a.active::after {
  content: ""; position: absolute; left: 16px; right: 16px; bottom: 2px;
  height: 2px; background: var(--accent);
}
/* Produkt-Sprungmarken-Dropdown */
.nav-item { position: relative; display: flex; align-items: center; }
.nav-item > a.has-sub-trigger { display: inline-flex; align-items: center; gap: 7px; }
.nav-item > a.has-sub-trigger::before {
  content: ""; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg); transition: transform .25s var(--ease); order: 2; opacity: .7;
}
.nav-item:hover > a.has-sub-trigger::before { transform: translateY(0) rotate(225deg); }
.subnav {
  position: absolute; top: 100%; left: 0; min-width: 304px;
  background: var(--surface-2); border: 1px solid var(--line);
  padding: 8px; display: flex; flex-direction: column; gap: 2px;
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity .22s var(--ease), transform .22s var(--ease), visibility .22s;
  z-index: 95; box-shadow: 0 26px 60px rgba(0,0,0,0.5);
}
.subnav::before { content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 12px; }
.nav-item:hover .subnav, .nav-item:focus-within .subnav { opacity: 1; visibility: visible; transform: none; }
.subnav a { padding: 12px 16px; font-size: 14px; color: var(--on-dark-soft); white-space: nowrap; display: block; }
.subnav a:hover { color: var(--on-dark); background: var(--surface-3); }
.subnav a .initial { color: var(--accent); font-size: 1.16em; font-weight: 600; }
.subnav a::after { display: none !important; }
.nav-cta {
  margin-left: 10px;
  background: var(--accent);
  color: #fff !important;
  padding: 11px 22px !important;
  font-weight: 700 !important;
  clip-path: polygon(0 0, 100% 0, 100% 70%, 90% 100%, 0 100%);
  transition: background .2s var(--ease) !important;
}
.nav-cta:hover { background: var(--accent-deep); }
.nav-cta::after { display: none; }

.menu-toggle { display: none; background: none; border: 0; cursor: pointer; width: 44px; height: 44px; position: relative; }
.menu-toggle span { position: absolute; left: 10px; right: 10px; height: 2px; background: var(--on-dark); transition: .3s var(--ease); }
.menu-toggle span:nth-child(1) { top: 15px; }
.menu-toggle span:nth-child(2) { top: 21px; }
.menu-toggle span:nth-child(3) { top: 27px; }
body.menu-open .menu-toggle span:nth-child(1) { top: 21px; transform: rotate(45deg); }
body.menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
body.menu-open .menu-toggle span:nth-child(3) { top: 21px; transform: rotate(-45deg); }

/* ============================================================
   HERO
   ============================================================ */
.hero { position: relative; min-height: 100vh; display: flex; align-items: flex-end; overflow: hidden; background: var(--bg); }
.hero-media { position: absolute; inset: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(var(--photo-gray)) contrast(1.05) brightness(0.7); }
.hero-media::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(14,17,20,0.55) 0%, rgba(14,17,20,0.15) 35%, rgba(14,17,20,0.85) 100%),
    linear-gradient(90deg, rgba(14,17,20,0.7) 0%, rgba(14,17,20,0) 60%);
}
.hero-inner { position: relative; width: 100%; padding-bottom: clamp(48px, 9vh, 110px); padding-top: 140px; }
.hero h1 { color: var(--on-dark); margin: 22px 0 0; max-width: 16ch; }
.hero .lead { color: var(--on-dark-soft); max-width: 52ch; margin-top: 26px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 38px; }

.hero-strip {
  position: relative; z-index: 2;
  background: var(--accent);
  color: #fff;
}
.hero-strip .wrap { display: flex; flex-wrap: wrap; gap: 8px 48px; padding-block: 18px; }
.hero-strip span { font-family: var(--ff-mono); font-size: 12.5px; letter-spacing: 0.12em; text-transform: uppercase; display: flex; align-items: center; gap: 10px; }
.hero-strip span::before { content: "›"; font-weight: 700; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--ff-body); font-weight: 700; font-size: 15px;
  letter-spacing: 0.02em;
  padding: 16px 30px;
  cursor: pointer; border: 0;
  transition: transform .2s var(--ease), background .2s var(--ease), color .2s var(--ease);
  clip-path: polygon(0 0, 100% 0, 100% 68%, 88% 100%, 0 100%);
}
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-deep); }
.btn-ghost { background: transparent; color: var(--on-dark); box-shadow: inset 0 0 0 1.5px var(--line-2); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1.5px var(--on-dark); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #000; }

/* ============================================================
   SECTIONS
   ============================================================ */
.section { padding-block: clamp(64px, 10vw, 130px); }
.section.dark { background: var(--bg); color: var(--on-dark); }
.section.surface { background: var(--surface); color: var(--on-dark); }
.section.paper { background: var(--paper); color: var(--ink); }

.section-head { max-width: 720px; margin-bottom: clamp(40px, 6vw, 70px); }
.section-head .h-section { margin-top: 18px; }
.section-head p { margin-top: 20px; color: var(--ink-soft); }
.section.dark .section-head p, .section.surface .section-head p { color: var(--on-dark-soft); }

/* page header (subpages) */
.page-head { position: relative; padding-top: 150px; padding-bottom: clamp(48px, 7vw, 96px); background: var(--bg); color: var(--on-dark); overflow: hidden; }
.page-head::before {
  content: ""; position: absolute; inset: 0;
  background-image: repeating-linear-gradient(45deg, transparent 0 22px, rgba(255,255,255,0.018) 22px 44px);
}
.page-head::after {
  content: ""; position: absolute; right: -80px; top: -80px; width: 360px; height: 360px;
  background: radial-gradient(circle, var(--accent-glow), transparent 70%);
  pointer-events: none;
}
.page-head .wrap { position: relative; }
.crumbs { font-family: var(--ff-mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--on-dark-mute); display: flex; gap: 10px; align-items: center; }
.crumbs a:hover { color: var(--accent); }
.crumbs .sep { color: var(--steel); }
.page-head h1 { margin-top: 24px; color: var(--on-dark); }
.page-head .lead { color: var(--on-dark-soft); max-width: 60ch; margin-top: 22px; }

/* ---------- Intro split ---------- */
.split { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(36px, 6vw, 90px); align-items: center; }
.split.reverse > :first-child { order: 2; }
.prose p + p { margin-top: 1.1em; }
.prose p { color: var(--ink-soft); }
.section.dark .prose p, .section.surface .prose p { color: var(--on-dark-soft); }

/* ---------- Services grid ---------- */
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.svc {
  background: var(--surface); padding: 38px 34px 44px;
  position: relative; transition: background .25s var(--ease);
  min-height: 240px; display: flex; flex-direction: column;
}
.svc:hover { background: var(--surface-2); }
.svc-num { font-family: var(--ff-mono); font-size: 13px; color: var(--accent); letter-spacing: 0.1em; }
.svc h3 { font-size: 1.45rem; color: var(--on-dark); margin-top: 0; text-transform: uppercase; letter-spacing: -0.01em; }
.svc h3 .initial { color: var(--accent); font-size: 1.22em; }
.svc p { color: var(--on-dark-soft); font-size: 15.5px; margin-top: 14px; }
.svc::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 0; height: 3px; background: var(--accent);
  transition: width .3s var(--ease);
}
.svc:hover::after { width: 100%; }

/* ---------- Gallery ---------- */
.gallery { display: grid; gap: 16px; }
.gallery.cols-3 { grid-template-columns: repeat(3, 1fr); }
.gallery.cols-4 { grid-template-columns: repeat(4, 1fr); }
.tile {
  position: relative; overflow: hidden; background: var(--surface-2); cursor: pointer;
  aspect-ratio: 4/3;
}
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease), filter .4s var(--ease); filter: grayscale(var(--photo-gray)); }
.tile:hover img { transform: scale(1.06); filter: grayscale(0); }
.tile::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(14,17,20,0.55));
  opacity: 0; transition: opacity .3s var(--ease);
}
.tile:hover::after { opacity: 1; }
.tile .zoom {
  position: absolute; right: 14px; bottom: 14px; width: 38px; height: 38px;
  background: var(--accent); display: grid; place-items: center; opacity: 0; transform: translateY(8px);
  transition: .3s var(--ease); z-index: 2;
}
.tile:hover .zoom { opacity: 1; transform: translateY(0); }
.tile .zoom svg { width: 18px; height: 18px; stroke: #fff; }
.tile.span-2 { grid-column: span 2; }
.tile.row-2 { grid-row: span 2; aspect-ratio: auto; }

/* ---------- Product block ---------- */
.prod-block { padding-block: clamp(56px, 8vw, 100px); scroll-margin-top: 92px; }
.prod-block + .prod-block { border-top: 1px solid var(--line); }
.prod-head { display: flex; align-items: baseline; gap: 20px; margin-bottom: 36px; flex-wrap: wrap; }
.prod-head .idx { font-family: var(--ff-mono); color: var(--accent); font-size: 15px; }
.prod-head h2 { font-size: clamp(1.7rem, 3.2vw, 2.6rem); color: var(--on-dark); text-transform: uppercase; }
.prod-head h2 .initial { color: var(--accent); font-size: 1.22em; }
.prod-grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: clamp(28px, 5vw, 64px); align-items: start; }
.prod-grid .prose { padding-top: 6px; }
.tag-list { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.tag { font-family: var(--ff-mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--on-dark-soft); border: 1px solid var(--line-2); padding: 7px 14px; }

/* ---------- WebGL Werkstatt-Banner ---------- */
.banner-viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 7 / 1;
  background: #0e1114;
  border: 1px solid var(--line);
  overflow: hidden;
  margin-bottom: clamp(30px, 4.5vw, 50px);
}
.banner-viewport canvas { position: absolute; inset: 0; display: block; }
/* Konstruktions-Eckmarken */
.banner-viewport .tick { position: absolute; width: 14px; height: 14px; pointer-events: none; z-index: 2; }
.banner-viewport .tick::before, .banner-viewport .tick::after { content: ""; position: absolute; background: var(--steel); opacity: 0.55; }
.banner-viewport .tick::before { width: 14px; height: 1px; }
.banner-viewport .tick::after { width: 1px; height: 14px; }
.banner-viewport .tick.tl { top: 9px; left: 9px; }
.banner-viewport .tick.tr { top: 9px; right: 9px; }
.banner-viewport .tick.bl { bottom: 9px; left: 9px; }
.banner-viewport .tick.br { bottom: 9px; right: 9px; }
.banner-viewport .tick.tr::before, .banner-viewport .tick.tr::after { right: 0; }
.banner-viewport .tick.bl::before, .banner-viewport .tick.bl::after { bottom: 0; }
.banner-viewport .tick.br::before, .banner-viewport .tick.br::after { right: 0; bottom: 0; }
@media (max-width: 760px) {
  .banner-viewport { aspect-ratio: 5 / 2; }
}

/* ---------- Certs / stats band ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border-block: 1px solid var(--line); }
.stat { background: var(--bg); padding: 44px 30px; text-align: left; }
.stat b { font-family: var(--ff-display); font-weight: 900; font-size: clamp(2.2rem, 4vw, 3.2rem); color: var(--on-dark); display: block; letter-spacing: -0.03em; line-height: 1; }
.stat b .accent { color: var(--accent); }
.stat span { font-family: var(--ff-mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--on-dark-mute); display: block; margin-top: 14px; }

/* ---------- Feature list ---------- */
.feature-list { list-style: none; display: grid; gap: 2px; }
.feature-list li {
  display: flex; gap: 18px; align-items: flex-start;
  padding: 20px 0; border-bottom: 1px solid var(--line);
  font-size: 1.05rem;
}
.section.paper .feature-list li { border-color: var(--paper-3); color: var(--ink); }
.feature-list .ico { color: var(--accent); flex: none; margin-top: 3px; font-family: var(--ff-mono); font-weight: 700; font-size: 13px; }

/* ---------- Downloads ---------- */
.downloads { display: grid; gap: 12px; margin-top: 8px; }
.dl {
  display: flex; align-items: center; gap: 16px;
  padding: 18px 22px; background: var(--surface-2);
  border: 1px solid var(--line); transition: .2s var(--ease);
}
.dl:hover { border-color: var(--accent); background: var(--surface-3); }
.dl .pdf { font-family: var(--ff-mono); font-weight: 700; font-size: 11px; letter-spacing: 0.08em; color: var(--accent); border: 1.5px solid var(--accent); padding: 6px 9px; flex: none; }
.dl .name { font-weight: 600; color: var(--on-dark); flex: 1; }
.dl .arr { color: var(--on-dark-mute); transition: .2s var(--ease); }
.dl:hover .arr { color: var(--accent); transform: translateX(4px); }

/* ---------- Kunden / References grid ---------- */
.kunden-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.kunde { display: flex; flex-direction: column; align-items: stretch; gap: 0; padding: 0; background: var(--surface); transition: background .2s var(--ease); position: relative; }
.kunde:hover { background: var(--surface-2); }
.kunde-plate { height: 104px; background: #fff; display: flex; align-items: center; justify-content: center; padding: 20px 26px; overflow: hidden; }
.kunde-plate img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; display: block; }
.kunde-meta { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 18px 22px; }
.kunde-body { flex: 1; min-width: 0; }
.kunde-name { display: block; font-family: var(--ff-display); font-weight: 700; font-size: 1.02rem; color: var(--on-dark); letter-spacing: -0.01em; line-height: 1.15; }
.kunde-desc { display: block; font-size: 13.5px; color: var(--on-dark-soft); margin-top: 4px; }
.kunde-arr { flex: none; color: var(--on-dark-mute); transition: .2s var(--ease); }
.kunde-arr svg { width: 18px; height: 18px; display: block; }
.kunde:hover .kunde-arr { color: var(--accent); transform: translate(2px, -2px); }
.kunde::after { content: ""; position: absolute; left: 0; bottom: 0; width: 0; height: 2px; background: var(--accent); transition: width .3s var(--ease); }
.kunde:hover::after { width: 100%; }
.kunden-more { margin-top: 28px; font-family: var(--ff-mono); font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--on-dark-mute); }
@media (max-width: 900px) { .kunden-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .kunden-grid { grid-template-columns: 1fr; } }

/* ---------- CTA band ---------- */
.cta-band { position: relative; background: var(--accent); color: #fff; overflow: hidden; }
.cta-band::before {
  content: ""; position: absolute; inset: 0;
  background-image: repeating-linear-gradient(45deg, transparent 0 28px, rgba(0,0,0,0.05) 28px 56px);
}
.cta-band .wrap { position: relative; padding-block: clamp(56px, 8vw, 92px); display: flex; align-items: center; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.cta-band h2 { font-size: clamp(1.9rem, 4vw, 3rem); text-transform: uppercase; max-width: 18ch; }
.cta-band p { margin-top: 14px; font-size: 1.1rem; opacity: 0.92; }

/* ---------- Contact / form ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(36px, 6vw, 80px); }
.info-row { display: flex; gap: 18px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.section.paper .info-row { border-color: var(--paper-3); }
.info-row .lbl { font-family: var(--ff-mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-mute); width: 130px; flex: none; padding-top: 3px; }
.info-row .val { font-size: 1.1rem; font-weight: 500; }
.info-row .val a:hover { color: var(--accent); }

.form { display: grid; gap: 18px; }
.field { display: grid; gap: 8px; }
.field.row2 { grid-template-columns: 1fr 1fr; gap: 18px; }
.field label { font-family: var(--ff-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-mute); }
.field input, .field textarea {
  font-family: var(--ff-body); font-size: 16px; color: var(--ink);
  background: #fff; border: 1px solid var(--paper-3); padding: 14px 16px;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field input:focus, .field textarea:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.field textarea { min-height: 130px; resize: vertical; }
.form-note { font-size: 13px; color: var(--ink-mute); }

/* map */
.map-frame { border: 1px solid var(--paper-3); overflow: hidden; }
.map-frame img { width: 100%; height: 100%; object-fit: cover; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { background: #0a0c0e; color: var(--on-dark-soft); padding-top: clamp(56px, 8vw, 90px); }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; padding-bottom: 56px; border-bottom: 1px solid var(--line); }
.footer-brand .brand-text b { color: var(--on-dark); }
.footer-brand p { margin-top: 20px; font-size: 14.5px; max-width: 32ch; line-height: 1.65; }
.foot-col h4 { font-family: var(--ff-mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--on-dark-mute); font-weight: 700; margin-bottom: 18px; }
.foot-col ul { list-style: none; display: grid; gap: 11px; }
.foot-col a, .foot-col li { font-size: 15px; transition: color .2s var(--ease); }
.foot-col a:hover { color: var(--accent); }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding-block: 26px; font-family: var(--ff-mono); font-size: 11.5px; letter-spacing: 0.06em; color: var(--on-dark-mute); text-transform: uppercase; }
.footer-bottom a:hover { color: var(--accent); }

/* ============================================================
   LIGHTBOX
   ============================================================ */
.lightbox { position: fixed; inset: 0; z-index: 1000; background: rgba(8,9,11,0.94); display: none; align-items: center; justify-content: center; padding: 4vw; }
.lightbox.open { display: flex; animation: lbfade .25s var(--ease); }
@keyframes lbfade { from { opacity: 0; } }
.lightbox img { max-width: 92vw; max-height: 88vh; object-fit: contain; box-shadow: 0 30px 90px rgba(0,0,0,0.6); }
.lb-close, .lb-nav { position: absolute; background: rgba(255,255,255,0.08); border: 1px solid var(--line-2); color: #fff; cursor: pointer; display: grid; place-items: center; transition: .2s var(--ease); }
.lb-close { top: 24px; right: 24px; width: 48px; height: 48px; }
.lb-close:hover, .lb-nav:hover { background: var(--accent); border-color: var(--accent); }
.lb-nav { top: 50%; transform: translateY(-50%); width: 54px; height: 54px; }
.lb-nav.prev { left: 24px; }
.lb-nav.next { right: 24px; }
.lb-nav svg, .lb-close svg { width: 22px; height: 22px; stroke: #fff; }
.lb-count { position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%); font-family: var(--ff-mono); font-size: 12px; letter-spacing: 0.1em; color: var(--on-dark-soft); }

/* ============================================================
   REVEAL
   ============================================================ */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-d="1"] { transition-delay: .08s; }
.reveal[data-d="2"] { transition-delay: .16s; }
.reveal[data-d="3"] { transition-delay: .24s; }

/* ---------- Tweak toggles ---------- */
body.tw-normalcase .display,
body.tw-normalcase .h-section,
body.tw-normalcase .svc h3,
body.tw-normalcase .prod-head h2,
body.tw-normalcase .hero h1,
body.tw-normalcase .cta-band h2,
body.tw-normalcase .stat span { text-transform: none; }
body.tw-nobevel .btn,
body.tw-nobevel .brand-mark,
body.tw-nobevel .brand-logo,
body.tw-nobevel .nav-cta { clip-path: none; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .footer-top { grid-template-columns: 1fr 1fr; gap: 36px; }
}
@media (max-width: 880px) {
  .nav {
    position: fixed; top: 0; right: 0; bottom: auto; left: auto;
    width: min(82vw, 360px); height: 100dvh; max-height: 100vh; overflow-y: auto;
    background: var(--surface); flex-direction: column; align-items: stretch;
    padding: 100px 24px 40px; gap: 4px; transform: translateX(100%);
    transition: transform .4s var(--ease); border-left: 1px solid var(--line);
  }
  body.menu-open .nav { transform: none; }
  /* Beim geöffneten Menü darf der Header keinen backdrop-filter haben –
     sonst wird er zum Containing-Block des fixierten Panels (Transparenz-Bug). */
  body.menu-open .site-header {
    background: var(--surface) !important;
    backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
  }
  .nav a { padding: 16px 12px; font-size: 17px; border-bottom: 1px solid var(--line); }
  .nav a.active::after { display: none; }
  .nav-item { flex-direction: column; align-items: stretch; }
  .nav-item > a.has-sub-trigger::before { display: none; }
  .subnav {
    position: static; opacity: 1; visibility: visible; transform: none;
    background: transparent; border: 0; box-shadow: none; padding: 0; min-width: 0;
  }
  .subnav::before { display: none; }
  .subnav a { padding: 13px 12px 13px 26px; font-size: 14.5px; white-space: normal; border-bottom: 1px solid var(--line); }
  .nav-cta { margin: 16px 0 0; text-align: center; justify-content: center; }
  .menu-toggle { display: block; z-index: 101; }
  .split, .prod-grid, .contact-grid { grid-template-columns: 1fr; }
  .split.reverse > :first-child { order: 0; }
  .services { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .services { grid-template-columns: 1fr; }
  .gallery.cols-3, .gallery.cols-4 { grid-template-columns: 1fr 1fr; }
  .tile.span-2 { grid-column: span 2; }
  .field.row2 { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
  .hero-strip .wrap { gap: 8px 24px; }
}
