/* Rheinwerk — Haus- & Energietechnik aus Köln
   Built on Montamo brand foundation. */

@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');

/* PP Telegraf is proprietary — substitute with closest geometric grotesque for headlines.
   Geist works as a unified family if Telegraf isn't available. */

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

  /* Rheinwerk accents (from logo) */
  --rw-blue: #1E4A81;            /* RheinBlau — Primärmarke */
  --rw-blue-deep: #143356;       /* dunkler Hover/Shade */
  --rw-green: #4B993E;           /* RheinGrün — Akzent */
  --rw-green-deep: #357028;      /* dunkler Hover/Shade */
  --rw-rhein: #40A2D4;           /* RheinHellblau — Akzent */
  --rw-rhein-deep: #2C7AA6;      /* dunkler Hover/Shade */

  /* CTA variables — overridden by ctaStyle tweak */
  --btn-primary-bg: #1E4A81;
  --btn-primary-color: #ffffff;
  --btn-primary-hover: #143356;

  /* 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; }

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

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

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

/* TYPOGRAPHY — per Montamo hierarchy (fluid scale: kompakt auf Mobile, nutzt Platz auf großen Screens) */
.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(--rw-green); color: white; }
.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(--rw-green); color: white; }
.btn.green:hover { background: var(--rw-green-deep); }
.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-light-blue);
  color: var(--m-blue);
  border-radius: var(--r-8);
}
.icon-box.green { background: rgba(79,166,75,0.14); color: var(--rw-green-deep); }
.icon-box.yellow { background: var(--m-yellow); color: var(--m-blue); }
.icon-box.rhein  { background: var(--rw-rhein); color: white; }
.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(--rw-green-deep); }

/* 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; }
@media (max-width: 1000px) {
  .hide-mobile { display: none !important; }
  .show-mobile { display: flex !important; }
  .mobile-menu { display: block; }
}

/* 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(--rw-green);
  outline-offset: 2px;
}
