/* ============================================================================
   Carimpact — Editorial Premium
   Light base with dark signature sections
   ========================================================================= */

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

:root {
  /* Light palette */
  --bg: #fbfbfa;           /* warm off-white */
  --bg-1: #ffffff;         /* cards / surfaces */
  --bg-2: #f4f4f1;         /* subtle alt */
  --bg-3: #ecece8;
  --border: #e6e5e1;
  --border-strong: #d3d2cd;
  --text: #0b0c0f;
  --text-2: #494b52;
  --text-3: #7a7d86;
  --text-dim: #adafb6;

  /* Dark palette (hero, CTA, footer) */
  --dark: #0a0b0f;
  --dark-1: #0f1115;
  --dark-2: #16181e;
  --dark-border: #22242b;
  --dark-border-strong: #2f323a;
  --dark-text: #f5f6f8;
  --dark-text-2: #b6b9c2;
  --dark-text-3: #7a7e89;

  --brand: #1f6fa3;
  --brand-2: #3792c4;
  --brand-3: #5bb3e3;
  --brand-glow: rgba(31, 111, 163, 0.18);
  --brand-dim: rgba(31, 111, 163, 0.06);
  --gold: #b08a4f;

  --font-display: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --container: 1280px;
  --container-narrow: 960px;
  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 20px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

a:hover { color: var(--brand); }

button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--text);
}

::selection { background: var(--brand); color: #fff; }

/* Layout utilities */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

.container--narrow { max-width: var(--container-narrow); }

.section {
  padding: clamp(72px, 10vw, 140px) 0;
  position: relative;
}

.section--alt { background: var(--bg-2); }

.section--dark { background: var(--dark); color: var(--dark-text); }
.section--dark h1, .section--dark h2, .section--dark h3, .section--dark h4 { color: var(--dark-text); }
.section--dark .section-head__lead { color: var(--dark-text-2); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 24px;
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--brand);
}

.section--dark .eyebrow { color: var(--brand-3); }
.section--dark .eyebrow::before { background: var(--brand-3); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  border-radius: 999px;
  transition: all 0.3s var(--ease);
  white-space: nowrap;
}

.btn--primary {
  background: linear-gradient(135deg, var(--brand) 0%, #174c73 100%);
  color: #fff;
  box-shadow: 0 8px 24px -10px rgba(31, 111, 163, 0.5), inset 0 1px 0 rgba(255,255,255,0.12);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px -12px rgba(31, 111, 163, 0.7), inset 0 1px 0 rgba(255,255,255,0.18);
  color: #fff;
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-strong);
}

.btn--ghost:hover {
  border-color: var(--text);
  color: var(--text);
  background: var(--bg-1);
}

.section--dark .btn--ghost {
  color: var(--dark-text);
  border-color: var(--dark-border-strong);
}

.section--dark .btn--ghost:hover {
  background: var(--dark-2);
  color: var(--dark-text);
  border-color: var(--dark-text);
}

.btn--lg { padding: 18px 36px; font-size: 15px; }

.btn .arrow { transition: transform 0.3s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

/* Header ----------------------------------------------------------- */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 16px 0;
  transition: all 0.35s var(--ease);
  background: rgba(251, 251, 250, 0);
}

.header.is-scrolled {
  background: rgba(251, 251, 250, 0.88);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
}

/* Dark header variant for hero page (on dark hero background) */
.header.on-dark {
  background: transparent;
}

.header.on-dark.is-scrolled {
  background: rgba(10, 11, 15, 0.82);
  border-bottom: 1px solid var(--dark-border);
}

.header.on-dark .nav a { color: var(--dark-text-2); }
.header.on-dark .nav a:hover, .header.on-dark .nav a.is-active {
  color: var(--dark-text);
  background: var(--dark-2);
}
.header.on-dark .menu-toggle {
  background: var(--dark-2);
  border-color: var(--dark-border);
}
.header.on-dark .menu-toggle span,
.header.on-dark .menu-toggle span::before,
.header.on-dark .menu-toggle span::after { background: var(--dark-text); }

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.brand {
  display: inline-flex;
  align-items: center;
  color: var(--text);
}

.brand__logo {
  display: block;
  height: 44px;
  width: auto;
  transition: opacity 0.2s var(--ease);
}

/* On light header, show dark variant */
.brand__logo--light { display: none; }
.brand__logo--dark { display: block; }

/* On dark variants, flip */
.header.on-dark .brand__logo--light,
.section--dark .brand__logo--light,
.footer .brand__logo--light { display: block; }
.header.on-dark .brand__logo--dark,
.section--dark .brand__logo--dark,
.footer .brand__logo--dark { display: none; }

.footer .brand__logo { height: 52px; }

.brand:hover { color: var(--text); }
.brand:hover .brand__logo { opacity: 0.85; }

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav a {
  position: relative;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  border-radius: 8px;
  transition: all 0.2s var(--ease);
}

.nav a:hover, .nav a.is-active {
  color: var(--text);
  background: var(--bg-2);
}

.header__cta {
  display: flex;
  align-items: center;
  gap: 14px;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  align-items: center;
  justify-content: center;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  position: relative;
  transition: all 0.3s var(--ease);
}

.menu-toggle span::before,
.menu-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 20px;
  height: 2px;
  background: var(--text);
  transition: all 0.3s var(--ease);
}

.menu-toggle span::before { top: -6px; }
.menu-toggle span::after { top: 6px; }

.menu-toggle.is-open span { background: transparent; }
.menu-toggle.is-open span::before { top: 0; transform: rotate(45deg); }
.menu-toggle.is-open span::after { top: 0; transform: rotate(-45deg); }

/* Hero --------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 140px 0 80px;
  overflow: hidden;
  isolation: isolate;
  background: var(--dark);
  color: var(--dark-text);
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse at 22% 0%, rgba(55, 146, 196, 0.20) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 100%, rgba(55, 146, 196, 0.10) 0%, transparent 60%),
    linear-gradient(180deg, #05060a 0%, #0a0b10 100%);
}

.hero__bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse at center, black 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 0%, transparent 75%);
}

.hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 120%, rgba(55, 146, 196, 0.28) 0%, transparent 50%);
}

.hero__inner {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 48px;
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 8vw, 6rem);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.035em;
  margin: 0 0 24px;
  color: var(--dark-text);
}

.hero__title .gradient {
  background: linear-gradient(135deg, #fff 0%, #fff 40%, var(--brand-3) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.hero__title .italic {
  font-style: italic;
  font-weight: 400;
  color: var(--brand-3);
}

.hero__lead {
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  color: var(--dark-text-2);
  max-width: 620px;
  margin: 0 auto 44px;
  line-height: 1.55;
}

.hero__cta {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 80px;
}

.hero .eyebrow { color: var(--brand-3); }
.hero .eyebrow::before { background: var(--brand-3); }

.hero__meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0;
  max-width: 900px;
  margin: 0 auto;
  padding-top: 40px;
  border-top: 1px solid var(--dark-border);
}

.hero__meta-item {
  padding: 20px;
  text-align: center;
  border-right: 1px solid var(--dark-border);
}

.hero__meta-item:last-child { border-right: none; }

.hero__meta-value {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  color: var(--dark-text);
  margin-bottom: 6px;
}

.hero__meta-value .brand { color: var(--brand-3); }

.hero__meta-label {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--dark-text-3);
}

.hero__scroll {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--dark-text-3);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  pointer-events: none;
}

.hero__scroll::after {
  content: "";
  width: 1px;
  height: 40px;
  background: linear-gradient(180deg, var(--dark-text-3), transparent);
  animation: scroll-pulse 2s var(--ease) infinite;
}

@keyframes scroll-pulse {
  0%, 100% { transform: scaleY(0.4); transform-origin: top; opacity: 0.4; }
  50% { transform: scaleY(1); opacity: 1; }
}

/* Section head */
.section-head {
  max-width: 820px;
  margin: 0 auto 72px;
  text-align: center;
}

.section-head--left {
  text-align: left;
  margin-inline: 0;
}

.section-head__title {
  font-size: clamp(2rem, 5vw, 3.75rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.section-head__lead {
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  color: var(--text-2);
  max-width: 640px;
  margin: 0 auto;
}

.section-head--left .section-head__lead {
  margin-inline: 0;
}

/* Services grid (light bg) */
.services-grid {
  display: grid;
  gap: 0;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-1);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.02), 0 20px 40px -20px rgba(0, 0, 0, 0.05);
}

.service-card {
  padding: 40px 32px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  position: relative;
  transition: background 0.3s var(--ease);
}

.service-card:hover { background: var(--bg); }

.service-card__icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand-dim), transparent);
  border: 1px solid rgba(31, 111, 163, 0.18);
  margin-bottom: 24px;
  color: var(--brand);
  transition: all 0.3s var(--ease);
}

.service-card:hover .service-card__icon {
  transform: scale(1.05);
  background: linear-gradient(135deg, rgba(31,111,163,0.12), rgba(31,111,163,0.04));
  border-color: var(--brand);
}

.service-card__icon svg { width: 24px; height: 24px; }

.service-card__title {
  font-size: 1.35rem;
  font-weight: 500;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.service-card__text { color: var(--text-2); font-size: 0.95rem; line-height: 1.6; }

.service-card__number {
  position: absolute;
  top: 20px;
  right: 28px;
  font-family: var(--font-display);
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.1em;
}

/* Feature cards */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.feature {
  padding: 36px 32px;
  border-radius: var(--radius);
  background: var(--bg-1);
  border: 1px solid var(--border);
  transition: all 0.3s var(--ease);
  position: relative;
  overflow: hidden;
}

.feature:hover {
  border-color: var(--border-strong);
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -16px rgba(0, 0, 0, 0.08);
}

.feature::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 40px;
  height: 2px;
  background: var(--brand);
  transition: width 0.4s var(--ease);
}

.feature:hover::before { width: 100%; }

.feature__num {
  font-family: var(--font-display);
  font-size: 12px;
  color: var(--brand);
  letter-spacing: 0.2em;
  margin-bottom: 20px;
  display: block;
}

.feature__title { font-size: 1.25rem; margin-bottom: 12px; font-weight: 500; }
.feature__text { color: var(--text-2); font-size: 0.95rem; }

/* Section--dark variants for features */
.section--dark .feature {
  background: var(--dark-1);
  border-color: var(--dark-border);
}

.section--dark .feature:hover {
  background: var(--dark-2);
  border-color: var(--dark-border-strong);
}

.section--dark .feature__title { color: var(--dark-text); }
.section--dark .feature__text { color: var(--dark-text-2); }
.section--dark .feature__num { color: var(--brand-3); }

/* Split section */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.split__visual {
  position: relative;
  aspect-ratio: 4/5;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark-1) 100%);
  border: 1px solid var(--dark-border);
}

.split__visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 20%, var(--brand-glow), transparent 50%),
    radial-gradient(ellipse at 70% 80%, rgba(176, 138, 79, 0.1), transparent 50%);
}

.split__stat {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 40px;
}

.split__stat-value {
  font-family: var(--font-display);
  font-size: clamp(5rem, 14vw, 10rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.05em;
  background: linear-gradient(135deg, #fff 0%, var(--brand-3) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  margin-bottom: 16px;
}

.split__stat-label {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--dark-text-2);
  max-width: 260px;
  line-height: 1.5;
}

.split__content h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 24px;
  letter-spacing: -0.03em;
}

.split__content p {
  color: var(--text-2);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 16px;
}

.split__content p:last-of-type { margin-bottom: 32px; }

/* Contact pillars */
.contact-pillars {
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.pillar {
  padding: 40px 32px;
  background: var(--bg-1);
  transition: background 0.3s var(--ease);
}

.pillar:hover { background: var(--bg); }

.pillar__label {
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 16px;
}

.pillar__title {
  font-size: 1.35rem;
  font-weight: 500;
  margin-bottom: 12px;
}

.pillar__text {
  color: var(--text-2);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 20px;
}

.pillar__link {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--brand);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: gap 0.3s var(--ease);
}

.pillar__link:hover { gap: 14px; }

/* CTA — always dark for drama */
.cta {
  padding: clamp(72px, 10vw, 120px) 0;
  position: relative;
  overflow: hidden;
  background: var(--dark);
  color: var(--dark-text);
}

.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 100%, var(--brand-glow), transparent 60%);
  pointer-events: none;
}

.cta::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse at center, black 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 0%, transparent 75%);
  pointer-events: none;
}

.cta__inner {
  position: relative;
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
  z-index: 1;
}

.cta__title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  letter-spacing: -0.03em;
  margin-bottom: 20px;
  color: var(--dark-text);
}

.cta__lead {
  color: var(--dark-text-2);
  font-size: 1.1rem;
  margin-bottom: 36px;
}

.cta .eyebrow { color: var(--brand-3); }
.cta .eyebrow::before { background: var(--brand-3); }

.cta .btn--ghost {
  color: var(--dark-text);
  border-color: var(--dark-border-strong);
}

.cta .btn--ghost:hover {
  border-color: var(--dark-text);
  background: var(--dark-2);
}

/* Footer — dark */
.footer {
  background: var(--dark);
  color: var(--dark-text-2);
  padding: 80px 0 40px;
}

.footer h1, .footer h2, .footer h3, .footer h4 { color: var(--dark-text); }

.footer__top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 60px;
  padding-bottom: 56px;
  border-bottom: 1px solid var(--dark-border);
}

.footer__brand p {
  color: var(--dark-text-2);
  font-size: 0.95rem;
  margin-top: 20px;
  max-width: 340px;
  line-height: 1.6;
}

.footer .brand { color: var(--dark-text); }
.footer .brand:hover { color: var(--dark-text); }

.footer__col h4 {
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--dark-text-3);
  margin-bottom: 20px;
  font-weight: 500;
}

.footer__col ul { list-style: none; display: grid; gap: 10px; }

.footer__col a {
  color: var(--dark-text-2);
  font-size: 0.95rem;
  transition: color 0.2s var(--ease);
}

.footer__col a:hover { color: var(--dark-text); }

.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding-top: 32px;
  color: var(--dark-text-3);
  font-size: 13px;
  flex-wrap: wrap;
}

.footer__legal {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

/* Page hero — light sub-page hero */
.page-hero {
  padding: 180px 0 80px;
  position: relative;
  border-bottom: 1px solid var(--border);
  background: var(--bg-2);
  overflow: hidden;
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 0%, var(--brand-dim) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 0%, var(--brand-dim) 0%, transparent 60%);
  pointer-events: none;
}

.page-hero__inner {
  position: relative;
  text-align: center;
  max-width: 820px;
  margin: 0 auto;
}

.page-hero__title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  margin-bottom: 20px;
  line-height: 1;
}

.page-hero__lead {
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  color: var(--text-2);
  line-height: 1.55;
  max-width: 620px;
  margin: 0 auto;
}

.breadcrumb {
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 24px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.breadcrumb a:hover { color: var(--brand); }
.breadcrumb .sep { color: var(--text-dim); }

/* Prose */
.prose {
  max-width: 780px;
  margin: 0 auto;
  color: var(--text-2);
  font-size: 16px;
  line-height: 1.75;
}

.prose h1, .prose h2, .prose h3 {
  color: var(--text);
  margin-top: 2.5em;
  margin-bottom: 0.75em;
  font-weight: 500;
}

.prose h2 {
  font-size: 1.75rem;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  letter-spacing: -0.02em;
}

.prose h3 { font-size: 1.2rem; }

.prose p { margin-bottom: 1.2em; }

.prose ul, .prose ol { margin: 0 0 1.2em 1.5em; }
.prose li { margin-bottom: 0.4em; }

.prose a {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(31, 111, 163, 0.3);
}

.prose a:hover { text-decoration-color: var(--brand); }

.prose strong { color: var(--text); font-weight: 600; }

.prose em { color: var(--text); font-style: italic; }

/* Fahrzeuge — Fullscreen Iframe */
body.is-iframe-view {
  overflow: hidden;
  height: 100vh;
  height: 100dvh;
}

.iframe-stage {
  position: fixed;
  top: 68px;
  left: 0;
  right: 0;
  bottom: 0;
  background: #fff;
  overflow: hidden;
  overscroll-behavior: contain;
}

.iframe-stage iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* Mobile: iframe rendered at fixed desktop width, scaled via JS to viewport */
@media (max-width: 900px) {
  .iframe-stage {
    touch-action: pan-y;
  }
  .iframe-stage iframe {
    position: absolute;
    top: 0;
    left: 0;
    transform-origin: top left;
    /* width + height + transform set by JS */
  }
}

.iframe-stage__bar {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 8px 16px;
  background: rgba(10, 11, 15, 0.88);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border: 1px solid var(--dark-border);
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dark-text-2);
}

.iframe-stage__bar .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand-3);
  box-shadow: 0 0 10px var(--brand-3);
  animation: pulse-dot 2s var(--ease) infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.85); }
}

.iframe-stage__bar a {
  color: var(--brand-3);
  margin-left: 6px;
}

.iframe-stage__bar a:hover { color: #fff; }

@media (max-width: 900px) {
  .iframe-stage { top: 60px; }
  .iframe-stage__bar { font-size: 10px; padding: 6px 12px; }
}

/* Contact form */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 64px;
  align-items: start;
}

.contact-info h3 {
  font-size: 1.1rem;
  margin-bottom: 16px;
  font-weight: 500;
  color: var(--text);
}

.contact-info__block {
  padding-bottom: 28px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--border);
}

.contact-info__block:last-child {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

.contact-info__block p { color: var(--text-2); line-height: 1.7; }
.contact-info__block a { color: var(--brand); }

.contact-note {
  padding: 20px;
  border: 1px solid rgba(176, 138, 79, 0.35);
  background: rgba(176, 138, 79, 0.07);
  border-radius: var(--radius);
  color: var(--text-2);
  font-size: 0.92rem;
  line-height: 1.6;
  margin-top: 16px;
}

.contact-note strong { color: var(--gold); }

.form {
  display: grid;
  gap: 20px;
  padding: 40px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px -30px rgba(0, 0, 0, 0.1);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.field { display: grid; gap: 8px; }

.field label {
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-3);
}

.field input, .field textarea, .field select {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  transition: all 0.2s var(--ease);
}

.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--brand);
  background: var(--bg-1);
  box-shadow: 0 0 0 3px var(--brand-dim);
}

.field textarea { min-height: 140px; resize: vertical; font-family: inherit; }

.field--full { grid-column: 1 / -1; }

.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.5;
}

.checkbox input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--brand);
}

.checkbox a { color: var(--brand); text-decoration: underline; }

/* WhatsApp floating button */
.wa-float {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  z-index: 80;
  box-shadow: 0 10px 30px -6px rgba(37, 211, 102, 0.45), 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.wa-float:hover {
  transform: translateY(-3px) scale(1.05);
  color: #fff;
  box-shadow: 0 16px 40px -6px rgba(37, 211, 102, 0.6), 0 6px 18px rgba(0, 0, 0, 0.25);
}

.wa-float svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

.wa-float::before {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid #25d366;
  opacity: 0.35;
  animation: wa-pulse 2.4s var(--ease) infinite;
}

@keyframes wa-pulse {
  0% { transform: scale(1); opacity: 0.5; }
  100% { transform: scale(1.5); opacity: 0; }
}

@media (max-width: 600px) {
  .wa-float { right: 16px; bottom: 16px; width: 54px; height: 54px; }
}

/* Reveal */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* Responsive */
@media (max-width: 900px) {
  .nav {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(251, 251, 250, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    padding: 100px 32px 32px;
    gap: 6px;
    transform: translateX(100%);
    transition: transform 0.4s var(--ease);
    z-index: 90;
  }

  .header.on-dark .nav {
    background: rgba(10, 11, 15, 0.98);
  }

  .nav.is-open { transform: translateX(0); }

  .nav a {
    padding: 20px 24px;
    font-size: 24px;
    font-family: var(--font-display);
    letter-spacing: -0.01em;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
  }

  .header.on-dark .nav a { border-bottom-color: var(--dark-border); }

  .nav a:last-child { border-bottom: none; }

  .menu-toggle { display: grid; place-items: center; z-index: 100; }

  .header__cta .btn--ghost { display: none; }

  .split { grid-template-columns: 1fr; gap: 48px; }

  .footer__top { grid-template-columns: 1fr 1fr; gap: 40px; }
  .footer__brand { grid-column: 1 / -1; }

  .contact-grid { grid-template-columns: 1fr; gap: 48px; }

  .form-row { grid-template-columns: 1fr; }
  .form { padding: 28px; }
}

@media (max-width: 600px) {
  .hero__meta-item {
    border-right: none;
    border-bottom: 1px solid var(--dark-border);
    padding: 16px;
  }

  .hero__meta-item:last-child { border-bottom: none; }

  .footer__top { grid-template-columns: 1fr; }

  .footer__bottom { flex-direction: column; align-items: flex-start; }
}

/* ============================================================================
   Mobile Polish — edge-safe spacing, tap targets, stacking
   ========================================================================= */

@media (max-width: 900px) {
  /* Tighter container padding on small screens */
  .container { padding-inline: 20px; }

  /* Header */
  .header { padding: 14px 0; }
  .header.is-scrolled { padding: 10px 0; }
  .brand__logo { height: 48px; }
  .footer .brand__logo { height: 56px; }
  .header__cta { gap: 8px; }
  /* Remove Kontakt CTA on mobile so logo has breathing room */
  .header__cta .btn--primary { display: none; }

  /* Section spacing */
  .section { padding: 72px 0; }

  /* Hero — breathe on phones */
  .hero { padding: 120px 0 60px; min-height: 100vh; min-height: 100svh; }
  .hero__title { margin-bottom: 18px; }
  .hero__lead { margin-bottom: 32px; }
  .hero__cta { margin-bottom: 56px; gap: 10px; }
  .hero__cta .btn { width: 100%; }
  .hero__meta { padding-top: 28px; }
  .hero__scroll { display: none; }

  /* Section heads */
  .section-head { margin-bottom: 48px; }
  .section-head__title { font-size: clamp(1.75rem, 7vw, 2.25rem); }

  /* Services / Features — single column */
  .services-grid { grid-template-columns: 1fr; border-radius: 14px; }
  .service-card { padding: 32px 24px; border-right: none; }
  .service-card__number { top: 16px; right: 20px; }

  .features { grid-template-columns: 1fr; gap: 14px; }
  .feature { padding: 28px 24px; }

  /* Split reverses so visual comes AFTER text on mobile */
  .split { gap: 40px; }
  .split__visual { aspect-ratio: 5/4; max-height: 340px; }
  .split__stat-value { font-size: clamp(4rem, 24vw, 7rem); }

  /* Contact pillars */
  .contact-pillars { grid-template-columns: 1fr; border-radius: 14px; }
  .pillar { padding: 32px 24px; }

  /* Page hero (sub pages) */
  .page-hero { padding: 130px 0 60px; }
  .page-hero__title { font-size: clamp(2rem, 9vw, 3rem); }
  .breadcrumb { margin-bottom: 18px; font-size: 11px; }

  /* Buttons — bigger taps */
  .btn { padding: 14px 24px; }
  .btn--lg { padding: 16px 28px; font-size: 14px; }

  /* Forms */
  .form { padding: 24px 20px; border-radius: 14px; }
  .field input, .field textarea, .field select { font-size: 16px; /* no iOS zoom */ }

  /* Prose */
  .prose { font-size: 15.5px; }
  .prose h2 { font-size: 1.4rem; margin-top: 2em; }
  .prose h3 { font-size: 1.08rem; }

  /* Fahrzeuge iframe — smaller top gap */
  .iframe-stage { top: 58px; }
  .iframe-stage__bar {
    font-size: 10px;
    padding: 6px 10px;
    top: 10px;
    max-width: calc(100% - 24px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* CTA + hero CTA groups — stacked, full-width */
  .cta__lead { font-size: 1rem; }
  .cta .hero__cta, .cta__inner .hero__cta { gap: 10px; }
  .cta .hero__cta .btn,
  .cta__inner .hero__cta .btn { width: 100%; }

  /* Contact info stack */
  .contact-info h3 { font-size: 1rem; }
  .contact-info__block { padding-bottom: 22px; margin-bottom: 22px; }

  .contact-note { padding: 16px; font-size: 0.88rem; }

  /* Footer */
  .footer { padding: 64px 0 32px; }
  .footer__top { padding-bottom: 40px; }
}

@media (max-width: 600px) {
  /* Full-bleed visual */
  .container { padding-inline: 18px; }

  /* Hero meta: 2 cols on phones, not 1 — looks tighter */
  .hero__meta {
    grid-template-columns: 1fr 1fr;
    border-top: 1px solid var(--dark-border);
  }
  .hero__meta-item {
    border-right: 1px solid var(--dark-border);
    border-bottom: 1px solid var(--dark-border);
    padding: 18px 10px;
  }
  .hero__meta-item:nth-child(even) { border-right: none; }
  .hero__meta-item:nth-child(n+3) { border-bottom: none; }
  .hero__meta-value { font-size: 1.5rem; }
  .hero__meta-label { font-size: 10px; letter-spacing: 0.16em; }

  .hero__title {
    font-size: clamp(2.25rem, 11vw, 3rem);
    letter-spacing: -0.04em;
  }
  .hero__lead { font-size: 1rem; }

  .section { padding: 64px 0; }

  /* Bigger, tap-friendly mobile menu items */
  .nav a { padding: 18px 20px; font-size: 22px; }

  /* Smaller section padding inside dense areas */
  .service-card { padding: 28px 22px; }
  .feature { padding: 24px 22px; }
  .pillar { padding: 28px 22px; }

  /* Footer single-column inner lists */
  .footer__top { gap: 32px; }
  .footer__col h4 { margin-bottom: 14px; }

  /* WhatsApp float stays visible */
  .wa-float {
    right: 14px;
    bottom: 14px;
    width: 52px;
    height: 52px;
  }
  .wa-float svg { width: 24px; height: 24px; }

  /* Breadcrumb smaller */
  .breadcrumb { letter-spacing: 0.12em; }

  /* Contact form row */
  .form { padding: 20px 18px; }
  .form-row { gap: 14px; }

  /* Section-head lead */
  .section-head__lead { font-size: 0.98rem; }
}

/* Ultra-small phones (<= 380px) */
@media (max-width: 380px) {
  .container { padding-inline: 16px; }
  .header__cta .btn { padding: 9px 14px; font-size: 12px; }
  .hero__title { font-size: 2rem; }
  .brand__logo { height: 44px; }
  .hero__meta-value { font-size: 1.3rem; }
  .wa-float { width: 48px; height: 48px; }
}

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