/* montamo München — Haus- & Energietechnik aus München
   Built on Montamo Brand Foundation — reines Designsystem, keine Eigenmarke */

@import url('https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Geist+Mono:wght@400;500&display=swap');

:root {
  /* Montamo foundation — exakte Markenfarben */
  --m-blue: #002B3F;
  --m-blue-deep: #001017;
  --m-yellow: #FDE100;
  --m-light-blue: #CCE4F0;
  --m-bone: #F4F2ED;
  --m-white: #FFFFFF;

  /* Rheinwerk-Kompatibilität → Montamo-Äquivalente
     (Komponenten nutzen weiterhin --rw-* Variablen; hier auf Montamo gemappt) */
  --rw-blue: var(--m-blue);
  --rw-blue-deep: var(--m-blue-deep);
  --rw-green: var(--m-blue);
  --rw-green-deep: var(--m-blue-deep);
  --rw-rhein: var(--m-light-blue);
  --rw-rhein-deep: #99BDD5;

  /* CTA: Montamo Yellow als Primärfarbe (Designsystem-konform) */
  --btn-primary-bg: var(--m-yellow);
  --btn-primary-color: var(--m-blue);
  --btn-primary-hover: #FFE933;

  /* Functional */
  --bg: var(--m-bone);
  --surface: #FFFFFF;
  --ink: var(--m-blue);
  --ink-soft: #2A4A60;
  --ink-mute: #5A7388;
  --line: #DDE6ED;
  --line-strong: #B8CCDA;

  --r-2: 2px;
  --r-4: 4px;
  --r-8: 8px;
  --r-12: 12px;
  --r-16: 16px;
  --r-20: 20px;
  --r-24: 24px;

  --shadow-sm: 0 1px 2px rgba(0,43,63,0.06), 0 0 0 1px rgba(0,43,63,0.04);
  --shadow-md: 0 4px 16px -4px rgba(0,43,63,0.10), 0 0 0 1px rgba(0,43,63,0.05);
  --shadow-lg: 0 24px 48px -16px rgba(0,43,63,0.18);

  --pad: 24px;
  --gap: 16px;
}

[data-density="compact"] {
  --pad: 16px;
  --gap: 12px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Geist', system-ui, -apple-system, Segoe UI, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body { overflow-x: hidden; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

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

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

button { font-family: inherit; cursor: pointer; }

/* TYPOGRAPHY */
.h-xl   { font-size: clamp(38px, 4vw + 22px, 80px); line-height: 1.05; font-weight: 700; letter-spacing: -0.02em; }
.h-l    { font-size: clamp(27px, 2.2vw + 16px, 50px); line-height: 1.1;  font-weight: 700; letter-spacing: -0.015em; }
.h-m    { font-size: clamp(19px, 0.6vw + 13px, 24px); line-height: 1.3; font-weight: 600; letter-spacing: -0.005em; }
.h-s    { font-size: clamp(15px, 0.35vw + 12px, 18px); line-height: 1.3; font-weight: 600; }
.p-l    { font-size: clamp(17px, 0.5vw + 12px, 21px); line-height: 1.5; }
.p-m    { font-size: clamp(15px, 0.35vw + 12px, 18px); line-height: 1.5; }
.p-s    { font-size: clamp(13.5px, 0.3vw + 10.5px, 15.5px); line-height: 1.45; }
.p-xs   { font-size: clamp(11px, 0.25vw + 9px, 13px); line-height: 1.4; letter-spacing: 0.04em; text-transform: uppercase; font-weight: 600; }

.mono   { font-family: 'Geist Mono', ui-monospace, Menlo, monospace; }

/* LAYOUT */
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 32px; }
@media (max-width: 720px) { .wrap { padding: 0 20px; } }

section { position: relative; }
section[id], [id] { scroll-margin-top: 88px; }

/* PILL / BADGE */
.tag {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px;
  background: var(--m-yellow);
  color: var(--m-blue);
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  border-radius: var(--r-4);
}
.tag.ghost { background: transparent; color: var(--ink-mute); border: 1px solid var(--line-strong); }
.tag.dark  { background: var(--m-blue); color: var(--m-yellow); }
.tag.green { background: var(--m-blue); color: var(--m-yellow); }
.tag.dot::before {
  content: ""; width: 6px; height: 6px; background: currentColor; border-radius: 999px; display: inline-block;
}

/* BUTTONS */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px;
  border: none; border-radius: var(--r-8);
  background: var(--m-blue); color: white;
  font-size: clamp(14.5px, 0.35vw + 11px, 17px); font-weight: 600;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); background: var(--m-blue-deep); box-shadow: var(--shadow-md); }
.btn.primary { background: var(--btn-primary-bg); color: var(--btn-primary-color); }
.btn.primary:hover { background: var(--btn-primary-hover); }
.btn.green { background: var(--m-yellow); color: var(--m-blue); }
.btn.green:hover { background: #FFE933; }
.btn.ghost { background: transparent; color: var(--m-blue); box-shadow: inset 0 0 0 1.5px var(--m-blue); }
.btn.ghost:hover { background: var(--m-blue); color: white; }
.btn.lg { padding: 18px 28px; font-size: clamp(15.5px, 0.35vw + 12px, 18px); }
.btn.sm { padding: 10px 16px; font-size: clamp(13.5px, 0.25vw + 11px, 15px); }

/* CARD */
.card {
  background: var(--surface);
  border-radius: var(--r-16);
  border: 1px solid var(--line);
  padding: var(--pad);
}
.card.dark {
  background: var(--m-blue);
  color: var(--m-bone);
  border-color: transparent;
}
.card.tight { padding: 16px; }

/* DIVIDERS */
.hr { height: 1px; background: var(--line); border: none; margin: 0; }

/* ICON BOX */
.icon-box {
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--m-bone);
  color: var(--m-blue);
  border-radius: var(--r-8);
}
.icon-box.green  { background: rgba(253, 225, 0, 0.18); color: var(--m-blue); }
.icon-box.yellow { background: var(--m-yellow); color: var(--m-blue); }
.icon-box.rhein  { background: var(--m-bone); color: var(--m-blue); }
.icon-box.dark   { background: var(--m-blue); color: var(--m-yellow); }

/* SECTION HEADERS */
.sec-head { display: flex; flex-direction: column; gap: 12px; margin-bottom: 32px; }
.sec-head .eyebrow { color: var(--ink-mute); font-size: clamp(11.5px, 0.25vw + 9px, 13.5px); font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; }

/* MARQUEE */
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.marquee { display: flex; overflow: hidden; }
.marquee-track {
  display: flex;
  animation: marquee 70s linear infinite;
  flex-shrink: 0;
}
.marquee-group { display: flex; gap: 48px; padding-right: 48px; flex-shrink: 0; }

/* DOM PATTERN */
.dom-pattern {
  position: absolute; pointer-events: none; opacity: 0.06;
}

/* FORMS */
.input, .textarea, .select {
  width: 100%;
  background: white;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--r-8);
  padding: 14px 16px;
  font-family: inherit; font-size: 16px; color: var(--ink);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.input:focus, .textarea:focus, .select:focus {
  outline: none; border-color: var(--m-blue);
  box-shadow: 0 0 0 4px rgba(0,43,63,0.08);
}
.label { display: block; font-size: clamp(12.5px, 0.2vw + 10.5px, 14px); font-weight: 600; color: var(--ink); margin-bottom: 6px; }

/* LINKS UI */
.link {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--m-blue); font-weight: 600;
  border-bottom: 1.5px solid currentColor;
  padding-bottom: 1px;
}
.link:hover { color: var(--ink-soft); }

/* HEADER */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(244, 242, 237, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

/* HEADER responsive nav */
.show-mobile { display: none !important; }
.mobile-menu { display: none; }
/* Medium: hide Leistungen only */
@media (max-width: 1160px) {
  .nav-leistungen { display: none !important; }
}
/* Small: full hamburger */
@media (max-width: 1000px) {
  .hide-mobile { display: none !important; }
  .show-mobile { display: flex !important; }
  .mobile-menu { display: block; }
  .nav-leistungen { display: block !important; }
}

/* ANIMATIONS */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp .6s ease both; }

/* TICKER */
.ticker-row { display: flex; gap: 14px; flex-wrap: wrap; }
.ticker-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px; font-weight: 500;
  color: var(--ink-soft);
}

/* FOCUS STATES */
:focus-visible {
  outline: 2px solid var(--m-yellow);
  outline-offset: 2px;
}

/* ── Mobile ────────────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  /* Tighter horizontal padding on small phones */
  .wrap { padding: 0 16px; }

  /* Allow button text to wrap so nothing overflows on 320px */
  .btn { white-space: normal; text-align: center; justify-content: center; }

  /* Hero trust bar: Trenner ausblenden auf Mobile */
  .hero-sep { display: none; }

  /* Reduce footer grid gap */
  .footer-grid { gap: 28px; }
}

@media (max-width: 480px) {
  /* Kontakt card less padding */
  .kontakt-card { padding: 20px 16px !important; }
}

@media (max-width: 600px) {
  /* Vertikale Abstände in allen Sektionen reduzieren */
  section { padding-top: 40px !important; padding-bottom: 40px !important; }
  /* Hero-Ausnahme: kein Padding */
  section#top { padding: 0 !important; }
  /* Über-uns Seitenkopf: wenig Abstand nach unten */
  .ue-head-sec { padding-bottom: 20px !important; }
  .ue-foto-sec { padding-top: 0 !important; }
}
