/* ==========================================================================
   ENVISION TELEMATICS — Brand stylesheet
   The umbrella brand for telematics, asset, video safety, data & AI.
   ========================================================================== */

:root {
  /* Brand palette */
  --midnight: #0B1729;          /* primary dark — backgrounds, nav */
  --midnight-2: #11203A;        /* slightly elevated dark surfaces */
  --midnight-3: #1A2D4D;        /* card borders on dark */
  --teal: #2DD4BF;              /* primary accent — data / vision */
  --teal-dark: #14B8A6;
  --teal-glow: rgba(45, 212, 191, 0.18);
  --amber: #FFC857;             /* secondary accent — warmth, used sparingly */
  --ink: #0F172A;               /* dark text */
  --slate: #475569;             /* body / muted text */
  --slate-2: #64748B;
  --line: #E2E8F0;              /* dividers on light */
  --bg: #FFFFFF;
  --bg-soft: #F5F7FA;
  --bg-fog: #EEF2F7;

  /* Type scale */
  --f-display: clamp(2.6rem, 5vw + 1rem, 4.6rem);
  --f-h1: clamp(2.1rem, 3.5vw + 0.8rem, 3.4rem);
  --f-h2: clamp(1.7rem, 2vw + 0.9rem, 2.4rem);
  --f-h3: clamp(1.2rem, 1vw + 0.9rem, 1.5rem);
  --f-lead: clamp(1.05rem, 0.3vw + 1rem, 1.2rem);
  --f-body: 1rem;
  --f-small: 0.875rem;
  --f-eyebrow: 0.78rem;

  /* Layout */
  --maxw: 1200px;
  --maxw-narrow: 880px;
  --radius: 14px;
  --radius-sm: 8px;
  --radius-lg: 22px;
  --shadow-1: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.06);
  --shadow-2: 0 4px 12px rgba(15, 23, 42, 0.08), 0 20px 48px rgba(15, 23, 42, 0.10);
  --shadow-glow: 0 12px 40px rgba(45, 212, 191, 0.18);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: var(--f-body);
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

h1, h2, h3, h4 { font-family: 'Manrope', 'Inter', system-ui, sans-serif; letter-spacing: -0.02em; line-height: 1.15; margin: 0 0 0.5em; color: var(--ink); }
h1 { font-size: var(--f-h1); font-weight: 800; }
h2 { font-size: var(--f-h2); font-weight: 800; }
h3 { font-size: var(--f-h3); font-weight: 700; }
p  { margin: 0 0 1em; color: var(--slate); }

.eyebrow {
  display: inline-block;
  font-size: var(--f-eyebrow);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--teal-dark);
  margin-bottom: 14px;
}
.eyebrow.on-dark { color: var(--teal); }

.lead { font-size: var(--f-lead); color: var(--slate); }

/* ---------- Layout helpers ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: var(--maxw-narrow); margin: 0 auto; padding: 0 24px; }
.section { padding: 96px 0; }
.section-tight { padding: 64px 0; }
.section-dark { background: var(--midnight); color: #DCE3EE; }
.section-dark h1, .section-dark h2, .section-dark h3 { color: #fff; }
.section-dark p { color: #B8C2D2; }
.section-soft { background: var(--bg-soft); }
.section-fog { background: var(--bg-fog); }

.section-head { max-width: 760px; margin: 0 auto 56px; text-align: center; }
.section-head.left { margin-left: 0; text-align: left; }

@media (max-width: 720px) { .section { padding: 72px 0; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 36px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1.05rem;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  white-space: normal;
  text-align: center;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--teal);
  color: var(--midnight);
  box-shadow: var(--shadow-glow);
}
.btn-primary:hover { background: #4DE0CC; }
.btn-ghost {
  background: transparent;
  color: var(--midnight);
  border-color: rgba(15, 23, 42, 0.18);
}
.btn-ghost:hover { background: rgba(15, 23, 42, 0.04); }
.btn-ghost.on-dark { color: #fff; border-color: rgba(255,255,255,0.28); }
.btn-ghost.on-dark:hover { background: rgba(255,255,255,0.06); }
.btn-arrow::after { content: "→"; transition: transform 0.2s ease; }
.btn-arrow:hover::after { transform: translateX(3px); }

/* ---------- Top nav ---------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 23, 41, 0.92);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.site-nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
}
.brand-mark { width: 30px; height: 30px; flex-shrink: 0; }
.brand-name { line-height: 1; }
.brand-sub  { display: block; font-size: 0.62rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--teal); margin-top: 4px; font-weight: 600; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: #DCE3EE;
  font-size: 0.95rem;
  font-weight: 500;
  position: relative;
  padding: 8px 0;
  transition: color 0.2s ease;
}
.nav-links a:hover, .nav-links a.is-active { color: #fff; }
.nav-links a.is-active::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 2px; background: var(--teal); border-radius: 2px;
}
.nav-cta { margin-left: 8px; }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  color: #fff;
  padding: 6px;
}
.nav-toggle svg { width: 26px; height: 26px; }

@media (max-width: 920px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .site-nav.open .nav-links {
    display: flex;
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--midnight);
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }
  .site-nav.open .nav-links a { display: block; padding: 14px 24px; border-bottom: 1px solid rgba(255,255,255,0.04); }
  .nav-cta { margin: 12px 24px; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: radial-gradient(1200px 600px at 80% -10%, rgba(45,212,191,0.18), transparent 60%),
              radial-gradient(900px 500px at -10% 30%, rgba(45,212,191,0.10), transparent 60%),
              linear-gradient(180deg, #0B1729 0%, #11203A 100%);
  color: #fff;
  padding: 110px 0 100px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 64px;
  align-items: center;
}
.hero h1 { font-size: var(--f-display); color: #fff; margin-bottom: 22px; }
.hero h1 .hl { color: var(--teal); }
.hero .lead { color: #B8C2D2; max-width: 56ch; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 32px; }
.hero-meta {
  display: flex; flex-wrap: wrap; gap: 22px 36px;
  margin-top: 40px; padding-top: 28px;
  border-top: 1px solid rgba(255,255,255,0.10);
}
.hero-meta div { display: flex; align-items: center; gap: 10px; color: #B8C2D2; font-size: 0.9rem; }
.hero-meta div::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--teal);
  box-shadow: 0 0 0 4px rgba(45,212,191,0.18);
}
.hero-art { position: relative; min-height: 420px; }

@media (max-width: 980px) {
  .hero { padding: 80px 0 70px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-art { min-height: 320px; }
}

/* ---------- Headache section (problem-led) ---------- */
.headache-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
  margin-top: 40px;
}
.headache {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
  box-shadow: var(--shadow-1);
  position: relative;
}
.headache-icon {
  width: 44px; height: 44px; border-radius: 10px;
  background: linear-gradient(135deg, #FEE2E2 0%, #FECACA 100%);
  display: grid; place-items: center;
  color: #DC2626;
  margin-bottom: 16px;
}
.headache h3 { font-size: 1.1rem; margin-bottom: 8px; }
.headache p { font-size: 0.95rem; margin: 0; }

/* ---------- Pillar cards (4 solutions) ---------- */
.pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
}
.pillar {
  position: relative;
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-1);
  display: flex; flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  overflow: hidden;
}
.pillar:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-2);
  border-color: rgba(45, 212, 191, 0.4);
}
.pillar-art {
  height: 140px;
  border-radius: var(--radius);
  margin-bottom: 22px;
  background: linear-gradient(135deg, #0B1729 0%, #1A2D4D 100%);
  position: relative;
  overflow: hidden;
}
.pillar-art svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.pillar h3 { font-size: 1.25rem; margin-bottom: 10px; }
.pillar p { flex: 1; font-size: 0.95rem; }
.pillar-link {
  margin-top: 18px;
  color: var(--teal-dark);
  font-weight: 700; font-size: 0.95rem;
}
.pillar-link::after { content: " →"; transition: margin-left 0.15s ease; }
.pillar:hover .pillar-link::after { margin-left: 2px; }

/* ---------- Approach / consult process ---------- */
.approach {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  counter-reset: stepcount;
}
.approach-step {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 28px;
  position: relative;
}
.approach-step::before {
  counter-increment: stepcount;
  content: "0" counter(stepcount);
  display: block;
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  font-size: 2.6rem;
  color: var(--teal);
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 14px;
}
.approach-step h3 { font-size: 1.15rem; margin-bottom: 6px; }
.approach-step p { font-size: 0.95rem; margin: 0; }
@media (max-width: 820px) { .approach { grid-template-columns: 1fr; } }

/* ---------- Why Envision (differentiators) ---------- */
.diffs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px 48px;
}
.diff { display: flex; gap: 18px; }
.diff-icon {
  width: 44px; height: 44px; flex-shrink: 0;
  border-radius: 10px;
  background: rgba(45,212,191,0.14);
  color: var(--teal);
  display: grid; place-items: center;
}
.section-dark .diff-icon { background: rgba(45,212,191,0.16); color: var(--teal); }
.diff h3 { font-size: 1.1rem; margin-bottom: 4px; }
.diff p { margin: 0; font-size: 0.95rem; }
.section-dark .diff p { color: #B8C2D2; }
@media (max-width: 720px) { .diffs { grid-template-columns: 1fr; } }

/* ---------- Stats strip ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}
.stat-num {
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  font-size: clamp(2rem, 3vw, 2.8rem);
  color: var(--teal);
  letter-spacing: -0.02em;
  line-height: 1;
}
.stat-label { color: #B8C2D2; font-size: 0.9rem; margin-top: 8px; }
@media (max-width: 720px) { .stats { grid-template-columns: repeat(2, 1fr); gap: 32px 20px; } }

/* ---------- Industries chip cloud ---------- */
.industries {
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 30px;
}
.chip {
  padding: 10px 18px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 0.92rem;
  color: var(--ink);
  font-weight: 500;
}
.section-dark .chip {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.12);
  color: #fff;
}

/* ---------- Testimonials ---------- */
.testimonials {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}
.quote {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 28px;
  box-shadow: var(--shadow-1);
  display: flex; flex-direction: column;
}
.quote-mark {
  font-family: 'Manrope', sans-serif;
  font-size: 3rem; line-height: 1;
  color: var(--teal); margin-bottom: 8px;
}
.quote p { flex: 1; color: var(--ink); font-size: 0.98rem; line-height: 1.6; }
.quote footer {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--slate); font-size: 0.88rem;
}
.quote footer strong { color: var(--ink); display: block; font-weight: 700; }

/* ---------- CTA strip ---------- */
.cta-band {
  background: linear-gradient(120deg, #0B1729 0%, #14304F 100%);
  color: #fff;
  border-radius: 28px;
  padding: 56px 48px;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  align-items: center;
  gap: 32px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-2);
}
.cta-band::after {
  content: '';
  position: absolute; right: -120px; top: -120px;
  width: 380px; height: 380px;
  background: radial-gradient(circle, rgba(45,212,191,0.32) 0%, transparent 65%);
  pointer-events: none;
}
.cta-band h2 { color: #fff; margin-bottom: 10px; }
.cta-band p { color: #B8C2D2; margin: 0; }
.cta-band .btn-primary { justify-self: end; }
@media (max-width: 780px) {
  .cta-band { grid-template-columns: 1fr; padding: 40px 28px; }
  .cta-band .btn-primary { justify-self: start; }
}

/* ---------- Footer ---------- */
.site-foot {
  background: #06101F;
  color: #97A3B6;
  padding: 72px 0 28px;
  font-size: 0.92rem;
}
.foot-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 42px;
  margin-bottom: 48px;
}
.foot-grid h4 {
  color: #fff;
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 16px;
}
.foot-grid ul { list-style: none; padding: 0; margin: 0; }
.foot-grid li { margin-bottom: 10px; }
.foot-grid a { color: #97A3B6; transition: color 0.2s ease; }
.foot-grid a:hover { color: var(--teal); }
.foot-brand p { color: #97A3B6; margin: 16px 0; max-width: 38ch; line-height: 1.6; }
.foot-contact div { margin-bottom: 6px; }
.foot-contact strong { color: #fff; font-weight: 600; }
.foot-bottom {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap; gap: 12px;
  color: #6E7B92; font-size: 0.85rem;
}
@media (max-width: 820px) {
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 520px) {
  .foot-grid { grid-template-columns: 1fr; }
}

/* ---------- Inner page hero ---------- */
.page-hero {
  background: linear-gradient(180deg, #0B1729 0%, #14283F 100%);
  color: #fff;
  padding: 96px 0 80px;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute; right: -200px; top: -180px;
  width: 520px; height: 520px;
  background: radial-gradient(circle, rgba(45,212,191,0.22) 0%, transparent 65%);
  pointer-events: none;
}
.page-hero h1 { color: #fff; font-size: var(--f-display); margin-bottom: 18px; }
.page-hero .lead { color: #B8C2D2; max-width: 60ch; }

/* ---------- Feature row (used on solution pages) ---------- */
.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  padding: 64px 0;
  border-bottom: 1px solid var(--line);
}
.feature-row:last-child { border-bottom: 0; }
.feature-row.reverse > :first-child { order: 2; }
.feature-row h2 { font-size: 1.8rem; margin-bottom: 14px; }
.feature-row ul { padding: 0; margin: 16px 0 0; list-style: none; }
.feature-row li {
  padding: 8px 0 8px 28px;
  position: relative;
  color: var(--ink);
}
.feature-row li::before {
  content: '✓';
  position: absolute; left: 0; top: 6px;
  width: 20px; height: 20px;
  background: rgba(45,212,191,0.18);
  color: var(--teal-dark);
  font-weight: 800; font-size: 0.78rem;
  border-radius: 50%;
  display: grid; place-items: center;
}
.feature-art {
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #0B1729 0%, #1A2D4D 100%);
  min-height: 300px;
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-2);
}
.feature-art svg { width: 100%; height: 100%; display: block; }
@media (max-width: 860px) {
  .feature-row { grid-template-columns: 1fr; gap: 32px; padding: 48px 0; }
  .feature-row.reverse > :first-child { order: 0; }
}

/* ---------- Solutions hub list (used on /index pillars and inner) ---------- */
.list-tight { padding-left: 0; list-style: none; }
.list-tight li {
  padding: 12px 0 12px 28px; position: relative;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}
.list-tight li:last-child { border-bottom: 0; }
.list-tight li::before {
  content: '+'; position: absolute; left: 0; top: 12px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--teal); color: var(--midnight);
  display: grid; place-items: center; font-weight: 800; font-size: 0.9rem;
}

/* ---------- Contact form ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 56px;
}
.contact-info h3 { font-size: 1rem; text-transform: uppercase; letter-spacing: 0.16em; color: var(--teal-dark); margin: 0 0 10px; }
.contact-info p { margin: 0 0 22px; }
.contact-info a { color: var(--ink); font-weight: 600; }

.form-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow-2);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
.form-row.full { grid-template-columns: 1fr; }
.form-card label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.form-card input, .form-card select, .form-card textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: #fff;
  font: inherit;
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-card textarea { min-height: 120px; resize: vertical; }
.form-card input:focus, .form-card select:focus, .form-card textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 4px var(--teal-glow);
}
.form-card .btn { width: 100%; justify-content: center; padding: 18px 36px; font-size: 1.08rem; }
@media (max-width: 820px) {
  .contact-grid { grid-template-columns: 1fr; gap: 32px; }
  .form-row { grid-template-columns: 1fr; }
}

/* ---------- Utility ---------- */
.center { text-align: center; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }
.muted { color: var(--slate); }
.no-pad-top { padding-top: 0; }
