/* ==========================================================================
   DE Motor — Design System (main.css)
   Premium / European / corporate / dark-metallic-blue
   Plain CSS, no build tools.
   ========================================================================== */

:root {
  /* Brand & surfaces */
  --bg:        #0a0e16;   /* deep near-black blue */
  --bg-2:      #0f1521;   /* section alt */
  --surface:   #141c2b;   /* cards/panels */
  --surface-2: #1b2435;   /* inputs / raised */
  --line:      rgba(150, 170, 200, 0.14);
  --line-soft: rgba(150, 170, 200, 0.08);

  /* Text */
  --text:    #e8edf5;
  --muted:   #9fb0c8;
  --muted-2: #6f8099;

  /* Accents (metallic blue / steel) */
  --brand:    #2f6fed;   /* primary blue */
  --brand-2:  #4f93ff;   /* lighter blue */
  --steel:    #8ea7c8;   /* metallic steel */
  --accent-grad: linear-gradient(135deg, #2f6fed 0%, #4f93ff 60%, #7fb0ff 100%);

  /* Metrics */
  --maxw: 1180px;
  --radius: 14px;
  --radius-sm: 10px;
  --gap: 24px;
  --shadow: 0 18px 40px -20px rgba(0, 0, 0, 0.7);

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ----- Reset-ish ----- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  /* Subtle site-wide colour glow over the dark base (kept low-intensity
     so text stays readable and the corporate tone is preserved). */
  background:
    radial-gradient(900px 600px at 12% 0%, rgba(47,111,237,.30), transparent 60%),
    radial-gradient(1000px 700px at 90% 8%, rgba(64,196,196,.22), transparent 60%),
    radial-gradient(1100px 800px at 70% 100%, rgba(124,92,255,.22), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: var(--brand-2); text-decoration: none; }
a:hover { color: #9cc2ff; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0 0 1em; color: var(--muted); }
ul { color: var(--muted); }

/* ----- Layout helpers ----- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: 84px 0; }
.section--alt { background: var(--bg-2); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.section__head { max-width: 760px; margin: 0 0 40px; }
.eyebrow {
  display: inline-block; text-transform: uppercase; letter-spacing: .18em;
  font-size: .72rem; font-weight: 600; color: var(--steel);
  margin-bottom: 14px;
}
.section h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
.lead { font-size: 1.12rem; color: var(--muted); }

/* ----- Buttons ----- */
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  padding: .8em 1.4em; border-radius: var(--radius-sm);
  font-weight: 600; font-size: .95rem; cursor: pointer;
  border: 1px solid transparent; transition: transform .15s ease, background .2s ease, border-color .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-2); color: #fff; }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--steel); color: #fff; }

/* ----- Header / Nav (injected by nav.js) ----- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 14, 22, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.nav { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: .04em; color: #fff; }
.brand__mark {
  font-size: 1.05rem; padding: 4px 9px; border-radius: 7px;
  background: var(--accent-grad); color: #fff;
}
.brand__text { font-size: 1rem; color: #fff; }
.brand img { height: 42px; width: auto; display: block; }
.site-footer .brand img { height: 48px; }

.nav__links { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.nav__links a {
  color: var(--muted); font-size: .9rem; font-weight: 500;
  padding: 8px 11px; border-radius: 8px; transition: color .2s, background .2s;
}
.nav__links a:hover { color: #fff; background: rgba(255,255,255,.05); }
.nav__links a.is-active { color: #fff; background: rgba(47,111,237,.16); }

.nav__toggle {
  display: none; margin-left: auto; background: none; border: 1px solid var(--line);
  color: var(--text); width: 42px; height: 38px; border-radius: 9px; cursor: pointer; font-size: 1.2rem;
}

/* Mobile nav */
@media (max-width: 940px) {
  .nav__toggle { display: inline-flex; align-items: center; justify-content: center; }
  .nav__links {
    position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; gap: 2px; margin: 0; padding: 12px 24px 18px;
    background: var(--bg-2); border-bottom: 1px solid var(--line);
    display: none;
  }
  .nav__links.is-open { display: flex; }
  .nav__links a { padding: 12px 10px; }
  .lang-select { order: 3; }
}

/* ----- Hero ----- */
.hero {
  position: relative; overflow: hidden;
  padding: 96px 0 84px;
  background:
    radial-gradient(1100px 500px at 75% -10%, rgba(47,111,237,.38), transparent 60%),
    radial-gradient(900px 460px at 8% 120%, rgba(64,196,196,.24), transparent 60%),
    radial-gradient(800px 500px at 50% 120%, rgba(124,92,255,.22), transparent 60%),
    var(--bg);
  border-bottom: 1px solid var(--line-soft);
}
/* Hero background image as a real <img> element (reliable rendering) */
.hero__bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: right center;
  opacity: .9; z-index: 0;
}
/* Left-side scrim so headline text stays readable over the image */
.hero--image::after {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(90deg, var(--bg) 0%, rgba(10,14,22,.55) 45%, rgba(10,14,22,0) 100%);
}
.hero .container { position: relative; z-index: 1; }
.hero h1 { font-size: clamp(2rem, 4.6vw, 3.3rem); max-width: 16ch; }
.hero .lead { max-width: 60ch; font-size: 1.18rem; }
.hero__cta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }
.hero__stats { display: flex; gap: 36px; flex-wrap: wrap; margin-top: 44px; }
.hero__stat .num { font-size: 1.7rem; font-weight: 800; color: #fff; }
.hero__stat .lbl { font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; color: var(--steel); }

/* Page header (non-home) */
.page-hero {
  padding: 72px 0 40px;
  background:
    radial-gradient(900px 420px at 82% -25%, rgba(47,111,237,.40), transparent 62%),
    radial-gradient(760px 380px at 12% 130%, rgba(64,196,196,.26), transparent 62%),
    radial-gradient(700px 400px at 55% 140%, rgba(124,92,255,.22), transparent 62%),
    var(--bg);
  border-bottom: 1px solid var(--line-soft);
}
.page-hero h1 { font-size: clamp(1.8rem, 4vw, 2.7rem); }
.page-hero .lead { max-width: 64ch; }

/* ----- Cards & grids ----- */
.grid { display: grid; gap: var(--gap); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 880px) { .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
}
.card h3 { font-size: 1.12rem; }
.card p { margin-bottom: 0; font-size: .96rem; }
.card__icon {
  width: 42px; height: 42px; border-radius: 10px; margin-bottom: 16px;
  background: rgba(47,111,237,.16); border: 1px solid rgba(79,147,255,.3);
  display: flex; align-items: center; justify-content: center; color: var(--brand-2);
  font-size: 1.2rem; font-weight: 700;
}
/* Brand / OEM logo inside a card */
.brand-logo {
  height: 56px;
  display: flex; align-items: center; justify-content: flex-start;
  margin-bottom: 16px;
}
.brand-logo img {
  max-height: 100%; max-width: 160px; width: auto; object-fit: contain;
}

/* ----- Pathway (phase chain) ----- */
.pathway { display: flex; flex-wrap: wrap; gap: 12px; align-items: stretch; }
.pathway__step {
  flex: 1 1 150px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 18px 16px; position: relative;
}
.pathway__step .step-n { font-size: .72rem; letter-spacing: .14em; color: var(--steel); text-transform: uppercase; }
.pathway__step strong { display: block; color: #fff; margin-top: 6px; font-size: .98rem; }

/* ----- Phases ----- */
.phase { border-left: 2px solid rgba(79,147,255,.4); padding: 6px 0 6px 22px; margin-bottom: 26px; }
.phase .tag { color: var(--brand-2); font-weight: 700; font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; }
.phase h3 { margin: 6px 0 8px; }

/* ----- Markets / stat blocks ----- */
.market { text-align: left; }
.market .flag {
  width: 40px; height: 30px; margin-bottom: 12px;
  border-radius: 3px; border: 1px solid var(--line);
  object-fit: cover; display: block;
}
.market .figure { font-size: 1.9rem; font-weight: 800; color: #fff; }
.market .country { font-weight: 600; color: #fff; margin-top: 4px; }
.market .sub { font-size: .8rem; color: var(--muted-2); text-transform: uppercase; letter-spacing: .1em; }
.total-band {
  margin-top: 28px; padding: 22px 26px; border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(47,111,237,.16), rgba(47,111,237,.04));
  border: 1px solid rgba(79,147,255,.28);
  display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap;
}
.total-band .num { font-size: 2rem; font-weight: 800; color: #fff; }

/* ----- Publications (article cards) ----- */
.pub {
  display: block; color: inherit; text-decoration: none;
  transition: transform .15s ease, border-color .2s ease;
}
.pub:hover { transform: translateY(-2px); border-color: var(--brand-2); }
.pub .sub {
  font-size: .8rem; color: var(--muted-2);
  text-transform: uppercase; letter-spacing: .1em;
}
.pub h3 { color: #fff; margin: 6px 0 8px; }
.pub p { margin-bottom: 0; }

/* ----- Article (single publication) ----- */
.back-link {
  display: inline-block; margin-bottom: 18px; font-size: .9rem;
  color: var(--brand-2); text-decoration: none;
}
.back-link:hover { text-decoration: underline; }
.article-body { margin-top: 22px; }
.article-body h2 {
  font-size: 1.35rem; margin: 34px 0 12px; color: #fff;
}
.article-body p { margin: 0 0 16px; line-height: 1.7; }
.article-body ul { margin: 0 0 16px; padding-left: 22px; }
.article-body li { margin-bottom: 8px; line-height: 1.6; }
.article-body blockquote {
  margin: 22px 0; padding: 14px 20px; font-size: 1.1rem;
  border-left: 3px solid var(--brand-2); color: #fff;
  background: rgba(47,111,237,.08); border-radius: 0 8px 8px 0;
}

/* ----- Regulatory resources ----- */
.reg-section + .reg-section { margin-top: 36px; }
.reg-section > h2 { font-size: 1.25rem; margin-bottom: 16px; }
.resource {
  position: relative; display: flex; flex-direction: column;
  color: inherit; text-decoration: none;
  transition: transform .15s ease, border-color .2s ease;
}
.resource:hover { transform: translateY(-2px); border-color: var(--brand-2); }
.resource h3 { font-size: 1.02rem; color: #fff; margin: 0 30px 8px 0; }
.resource p { font-size: .9rem; margin: 0 0 14px; }
.resource__open { margin-top: auto; color: var(--brand-2); font-size: .85rem; font-weight: 600; }
.resource::after {
  content: "↗"; position: absolute; top: 16px; right: 18px;
  color: var(--muted-2); font-size: 1.05rem;
}

/* Clickable brand cards */
a.card--brand { color: inherit; text-decoration: none; display: block;
  transition: transform .15s ease, border-color .2s ease; }
a.card--brand:hover { transform: translateY(-2px); border-color: var(--brand-2); }

/* ----- Notes / disclaimers ----- */
.note {
  font-size: .82rem; color: var(--muted-2); border-top: 1px solid var(--line-soft);
  padding-top: 14px; margin-top: 18px;
}
.media {
  width: 100%; height: auto; display: block;
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.media--wide { max-width: 100%; }
/* Uniform-height images for rows/grids */
.media--cover { aspect-ratio: 16 / 10; object-fit: cover; }
/* Image + text side-by-side block (stacks on mobile) */
.media-split {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 36px; align-items: center;
}
.media-split .media { margin: 0; }
.media-split--reverse .media-split__text { order: 2; }
@media (max-width: 760px) {
  .media-split, .media-split--reverse { grid-template-columns: 1fr; gap: 22px; }
  .media-split--reverse .media-split__text { order: 0; }
}
/* Slim banner image under a page hero */
.media-band { margin-top: 6px; }
.media-band .media { aspect-ratio: 21 / 7; object-fit: cover; }

.placeholder {
  border: 1px dashed rgba(150,170,200,.35); border-radius: var(--radius);
  padding: 30px; text-align: center; color: var(--muted-2);
  background: repeating-linear-gradient(45deg, rgba(255,255,255,.015) 0 12px, transparent 12px 24px);
  font-size: .85rem;
}

/* ----- Contact ----- */
.form-grid { display: grid; gap: 16px; max-width: 620px; }
.field label { display: block; font-size: .85rem; color: var(--muted); margin-bottom: 6px; }
.field input, .field textarea, .field select {
  width: 100%; padding: 12px 14px; border-radius: var(--radius-sm);
  background: var(--surface-2); border: 1px solid var(--line); color: var(--text); font: inherit;
}
.field textarea { min-height: 130px; resize: vertical; }

/* ----- CTA band ----- */
.cta-band { text-align: center; }
.cta-band .inner {
  background: linear-gradient(135deg, rgba(47,111,237,.18), rgba(15,21,33,.4));
  border: 1px solid rgba(79,147,255,.26); border-radius: var(--radius);
  padding: 50px 28px;
}
.cta-band h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }

/* ----- Footer ----- */
.site-footer { background: #070a11; border-top: 1px solid var(--line-soft); padding: 54px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: 24px; } }
.site-footer h4 { font-size: .78rem; text-transform: uppercase; letter-spacing: .14em; color: var(--steel); }
.site-footer a { color: var(--muted); font-size: .92rem; display: block; padding: 4px 0; }
.site-footer a:hover { color: #fff; }
.footer-bottom {
  margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line-soft);
  display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  font-size: .82rem; color: var(--muted-2);
}

/* ----- Utilities ----- */
.mt-0 { margin-top: 0; }
.center { text-align: center; }
.muted { color: var(--muted); }
.maxw-720 { max-width: 720px; }
.flow > * + * { margin-top: 14px; }
