/* ==========================================================================
   MetMaps B2B — style.css
   Design-Tokens: Petrol/Slate. Schrift: IBM Plex Sans (selbst gehostet).
   Reines CSS, keine Abhaengigkeiten. Mobile-first, WCAG-AA-Kontraste.
   ========================================================================== */

/* --- Fonts (lokal, subsettet, DSGVO-neutral) ----------------------------- */
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2");
}
/* Metrisch angeglichener Fallback (Arial-basiert): verhindert Layout-Shift
   beim Swap. Override-Werte aus den echten Plex-/Arial-Metriken berechnet. */
@font-face {
  font-family: "IBM Plex Sans Fallback";
  src: local("Arial"), local("Helvetica Neue"), local("Liberation Sans");
  size-adjust: 133.44%;
  ascent-override: 76.82%;
  descent-override: 20.61%;
  line-gap-override: 0%;
}

/* --- Design-Tokens ------------------------------------------------------- */
:root {
  /* Akzent (Petrol) */
  --petrol:      #0f766e;
  --petrol-dark: #0c5f58;  /* Text/Links auf hellem Grund (WCAG-fest) */
  --petrol-tint: #e6f2f0;  /* dezente Flaeche (Badge) */

  /* Neutrale (Slate) */
  --ink:    #111827;  /* Headlines */
  --body:   #334155;  /* Fliesstext */
  --muted:  #556070;  /* Sekundaer/Captions */
  --line:   #e5e7eb;  /* Rahmen/Trenner */
  --bg:     #ffffff;
  --bg-alt: #f7f8f8;  /* Datenbasis-Sektion */

  /* CTA */
  --cta-bg:       #111827;
  --cta-bg-hover: #0b1220;

  /* Radien & Layout */
  --radius:    12px;
  --radius-sm: 8px;
  --wrap:      960px;
  --wrap-wide: 1120px;

  --font-sans: "IBM Plex Sans", "IBM Plex Sans Fallback", -apple-system,
               BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
               "Liberation Mono", monospace;
}

/* --- Reset / Basis ------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 78px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

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

img, svg { display: block; max-width: 100%; height: auto; }

a { color: var(--petrol-dark); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--petrol); }

h1, h2, h3, h4 { color: var(--ink); line-height: 1.2; font-weight: 600; }

:focus-visible {
  outline: 2px solid var(--petrol);
  outline-offset: 2px;
  border-radius: 3px;
}

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

/* Skip-Link */
.skip-link {
  position: absolute; left: 8px; top: -48px;
  background: var(--ink); color: #fff; padding: 8px 14px;
  border-radius: var(--radius-sm); text-decoration: none; z-index: 100;
  transition: top .15s ease;
}
.skip-link:focus { top: 8px; color: #fff; }

.eyebrow {
  font-size: 12px; letter-spacing: .09em; text-transform: uppercase;
  color: var(--petrol-dark); font-weight: 600; margin-bottom: .75rem;
}

/* --- Header / Navigation ------------------------------------------------- */
.site-header {
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; background: rgba(255,255,255,.95);
  backdrop-filter: saturate(180%) blur(10px);
  z-index: 50;
}
.site-header .wrap {
  max-width: var(--wrap-wide);
  display: flex; align-items: center; gap: 1.25rem;
  min-height: 64px;
}
.brand {
  font-size: 19px; font-weight: 600; color: var(--ink);
  text-decoration: none; letter-spacing: -.01em; white-space: nowrap;
}
.brand img { display: inline-block; width: 26px; height: 26px; vertical-align: middle; margin-right: .5rem; position: relative; top: -1px; }
.brand span { color: var(--petrol-dark); }  /* akzentuiert nur "Maps" — kein Leerraum zu "Met" */
.nav {
  display: flex; gap: 1.75rem; margin-left: auto;
}
.nav a {
  font-size: 14.5px; color: var(--muted); text-decoration: none; font-weight: 400;
  white-space: nowrap;
}
.nav a:hover { color: var(--ink); }

.header-actions { display: flex; align-items: center; gap: 1rem; margin-left: auto; }
.lang-switch { display: flex; align-items: center; gap: .35rem; font-size: 13px; }
.lang-switch a { color: var(--muted); text-decoration: none; font-weight: 600; }
.lang-switch a[aria-current="true"] { color: var(--ink); }
.lang-switch .sep { color: var(--line); }

.btn {
  display: inline-block; font-family: inherit; font-size: 14.5px; font-weight: 600;
  padding: 9px 18px; border-radius: var(--radius-sm); border: 1px solid transparent;
  cursor: pointer; text-decoration: none; white-space: nowrap; line-height: 1.4;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn-primary { background: var(--cta-bg); color: #fff; border-color: var(--cta-bg); }
.btn-primary:hover { background: var(--cta-bg-hover); color: #fff; }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-secondary:hover { border-color: var(--muted); color: var(--ink); }
.btn-lg { font-size: 16px; padding: 13px 26px; border-radius: var(--radius); }

/* --- Hero ---------------------------------------------------------------- */
.hero { padding: 5rem 0 3.5rem; text-align: center; position: relative; overflow: hidden; }
/* Isohypsen-Motiv (Isolinien synoptischer Wetterkarten) als dezenter Hintergrund */
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: url("../img/isolines.svg") center top / cover no-repeat;
}
.hero .wrap { max-width: 820px; position: relative; z-index: 1; }
.hero h1 {
  font-size: clamp(30px, 5vw, 42px); font-weight: 600; letter-spacing: -.02em;
  margin-bottom: 1.25rem;
}
.hero .lead {
  font-size: clamp(16px, 2.2vw, 18px); color: var(--body);
  max-width: 640px; margin: 0 auto 2rem;
}
.hero-actions { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; }

/* --- Stats-Leiste -------------------------------------------------------- */
.stats {
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.stats .wrap {
  max-width: var(--wrap-wide);
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem; padding-block: 2.25rem; text-align: center;
}
.stat-number { font-size: clamp(24px, 3.4vw, 30px); font-weight: 600; color: var(--ink); }
.stat-label { font-size: 13.5px; color: var(--muted); margin-top: .35rem; line-height: 1.45; }

/* --- Sektionen ----------------------------------------------------------- */
.section { padding: 4.5rem 0; }
.section > .wrap { max-width: var(--wrap); }
.section h2 { font-size: clamp(24px, 3.2vw, 28px); font-weight: 600; letter-spacing: -.01em; }
.section-intro { font-size: 17px; color: var(--body); max-width: 640px; margin-top: .75rem; }
.section-head { margin-bottom: 2.5rem; }

.band { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* --- Karten-Grids -------------------------------------------------------- */
.grid { display: grid; gap: 1rem; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem;
}
.card h3 { font-size: 16.5px; font-weight: 600; margin-bottom: .5rem; }
.card p { font-size: 14.5px; color: var(--body); line-height: 1.6; }

/* Use-Case-Karten */
/* Icon-Slot: vorerst deaktiviert (Emojis rendern je nach OS/Browser unterschiedlich).
   Bei spaeterer Nutzung (z. B. inline-SVG statt Emoji) wieder einkommentieren.
.usecase .icon {
  font-size: 22px; margin-bottom: .9rem; line-height: 1;
}
*/
.usecase .quote {
  font-size: 13.5px; color: var(--muted); font-style: italic;
  margin-bottom: .7rem; border-left: 2px solid var(--line); padding-left: .7rem;
}
.usecase.featured { border-color: var(--petrol); box-shadow: 0 0 0 1px var(--petrol); }
.badge {
  display: inline-block; font-size: 11.5px; font-weight: 600; letter-spacing: .02em;
  background: var(--petrol-tint); color: var(--petrol-dark);
  padding: 3px 10px; border-radius: 999px; margin-bottom: .8rem;
}

/* Datenbasis-Karten */
.data-card h3 { font-size: 12.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; margin-bottom: .4rem; }
.data-card .value { font-size: 19px; font-weight: 600; color: var(--ink); }
.data-card .detail { font-size: 12.5px; color: var(--muted); margin-top: .35rem; line-height: 1.5; }
.data-note { font-size: 13px; color: var(--muted); margin-top: 1.5rem; max-width: 720px; }
.br-mobile { display: none; } /* erzwungener Umbruch nur mobil, s. @media 640px */

/* --- API-Tags ------------------------------------------------------------ */
.tags { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.75rem; list-style: none; }
.tag {
  font-family: var(--font-mono);
  font-size: 13px; color: var(--body); background: var(--bg-alt);
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 6px 12px;
}

/* --- Referenzen (deaktiviert, aber Stil vorbereitet) --------------------- */
.testi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.testi-card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; }
.testi-card blockquote { font-size: 14.5px; color: var(--body); font-style: italic; margin-bottom: 1rem; }
.testi-card cite { font-size: 13.5px; font-weight: 600; color: var(--ink); font-style: normal; }

/* --- CTA ----------------------------------------------------------------- */
.cta { text-align: center; }
.cta h2 { font-size: clamp(24px, 3.2vw, 28px); }
.cta p { color: var(--body); max-width: 560px; margin: .75rem auto 2rem; }
.cta-aside { margin-top: 1.75rem; font-size: 14px; color: var(--muted); }
.cta-aside a { font-weight: 600; }

/* --- Footer -------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--line); padding-block: 2rem; margin-top: 1rem;
  font-size: 13.5px; color: var(--muted);
}
.site-footer .wrap {
  max-width: var(--wrap-wide);
  display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; align-items: center;
  justify-content: space-between;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--ink); }
.footer-social { color: var(--muted); }
.footer-social a { font-weight: 600; }

/* --- Rechtsseiten (Impressum/Datenschutz) -------------------------------- */
.legal { padding: 3.5rem 0 4rem; }
.legal .wrap { max-width: 760px; }
.legal h1 { font-size: clamp(26px, 4vw, 32px); font-weight: 600; margin-bottom: 1.5rem; letter-spacing: -.01em; }
.legal h2 { font-size: 19px; font-weight: 600; margin: 2rem 0 .6rem; }
.legal h3 { font-size: 16px; font-weight: 600; margin: 1.25rem 0 .4rem; }
.legal p, .legal ul { font-size: 15.5px; color: var(--body); margin-bottom: .9rem; }
.legal ul { padding-left: 1.25rem; }
.legal li { margin-bottom: .35rem; }
.legal address { font-style: normal; color: var(--body); }
.legal .todo { background: #fff8e1; border: 1px solid #f0d060; color: #6b5300; padding: .5rem .8rem; border-radius: var(--radius-sm); font-size: 14px; }
.back-link { display: inline-block; margin-top: 2.5rem; font-weight: 600; }

/* --- Politur: dezente Interaktion & Kohäsion ----------------------------- */
.card { transition: border-color .15s ease, box-shadow .2s ease, transform .2s ease; }
.usecase:hover, .data-card:hover {
  border-color: var(--petrol);
  box-shadow: 0 6px 22px rgba(15, 118, 110, .09);
  transform: translateY(-2px);
}
.tag { transition: border-color .15s ease, color .15s ease; }
.tag:hover { border-color: var(--petrol); color: var(--petrol-dark); }

/* CTA: dezentes Isohypsen-Echo (Kohäsion zum Hero) */
.cta { position: relative; overflow: hidden; }
.cta::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: url("../img/isolines.svg") center bottom / cover no-repeat;
  opacity: .7;
}
.cta > .wrap { position: relative; z-index: 1; }

/* --- Druck-Stylesheet (Rechtsseiten sauber ausdruckbar) ------------------ */
@media print {
  .site-header, .hero-actions, .footer-social, .cta-aside, .lang-switch,
  .header-actions .btn, .skip-link { display: none !important; }
  .hero::before, .cta::before { display: none !important; }
  body { color: #000; font-size: 12pt; }
  a { color: #000; text-decoration: underline; }
  .section, .hero, .legal { padding: 1rem 0; }
  .card, .site-footer { break-inside: avoid; }
}

/* --- Responsive ---------------------------------------------------------- */
/* Inline-Navigation nur solange genug Platz ist; darunter One-Pager per Scroll.
   880px hält am Umschaltpunkt noch Luft (Nav passt einzeilig ab ~820px in DE & EN);
   verhindert Umbrechen/Kollision mit Wortmarke & CTA. */
@media (max-width: 880px) {
  .nav { display: none; }
}
@media (max-width: 860px) {
  .stats .wrap { grid-template-columns: repeat(2, 1fr); gap: 1.75rem 1rem; }
  .grid-3, .grid-4, .testi-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .header-actions .btn-primary { display: none; } /* CTA prominent im Hero/CTA-Bereich */
  .hero { padding: 3.5rem 0 2.5rem; }
  .section { padding: 3.25rem 0; }
  .grid-3, .grid-4, .testi-grid { grid-template-columns: 1fr; }
  .br-mobile { display: inline; }
}
@media (max-width: 380px) {
  .stats .wrap { grid-template-columns: 1fr; }
}
