:root {
  --bg: #ffffff;
  --bg-dark: #0c0e12;
  --ink: #0c0e12;
  --ink-soft: #4a4e57;
  --ink-muted: #9aa0ab;
  --line: #ececef;
  --accent: #1b69d4;        /* Fleettag blue — matches the dashboard UI */
  --accent-ink: #1450a8;
  --text-on-dark: #f4f2ef;
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
}

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

html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body { overflow-x: hidden; }

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

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

/* ---------- Loader ---------- */
#loader {
  position: fixed; inset: 0; z-index: 1000;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.7s ease;
}
#loader.hidden { opacity: 0; pointer-events: none; }
.loader-inner {
  display: flex; flex-direction: column; align-items: center; gap: 1.4rem;
  width: min(320px, 70vw);
}
.loader-brand {
  font-family: var(--font-display); font-weight: 700;
  font-size: 1.6rem; letter-spacing: -0.02em;
}
.loader-track {
  width: 100%; height: 2px; background: var(--line); overflow: hidden; border-radius: 2px;
}
#loader-bar { width: 0%; height: 100%; background: var(--accent); transition: width 0.2s ease; }
#loader-percent {
  font-size: 0.78rem; letter-spacing: 0.08em; color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}

/* ---------- Header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background 0.4s ease, border-color 0.4s ease, backdrop-filter 0.4s ease;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(255,255,255,0.82);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.35rem clamp(1.2rem, 5vw, 3.5rem);
}
.logo { display: flex; align-items: center; }
.logo img { height: 38px; width: auto; display: block; }
.logo .logo-on-dark { display: none; }
.nav-links { display: flex; gap: 2.4rem; }
.nav-links a {
  font-size: 0.92rem; font-weight: 500; color: var(--ink-soft);
  transition: color 0.25s ease;
}
.nav-links a:hover { color: var(--ink); }
.nav-cta {
  font-size: 0.9rem; font-weight: 600; color: #fff;
  background: var(--ink); padding: 0.6rem 1.2rem; border-radius: 100px;
  transition: background 0.25s ease, transform 0.25s ease;
}
.nav-cta:hover { background: var(--accent-ink); transform: translateY(-1px); }

/* Header inverts over the dark stats section */
.site-header.on-dark {
  background: transparent; backdrop-filter: none; border-bottom-color: transparent;
}
.site-header.on-dark .nav-links a { color: var(--text-on-dark); }
.site-header.on-dark .logo .logo-on-light { display: none; }
.site-header.on-dark .logo .logo-on-dark { display: block; }
.site-header.on-dark .nav-cta { background: #fff; color: var(--ink); }

/* ---------- Shared text ---------- */
.section-label {
  display: block; font-family: var(--font-display); font-weight: 500;
  font-size: 0.82rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 1.4rem;
}
.section-heading {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(2.4rem, 4.6vw, 4.2rem); line-height: 1.02;
  letter-spacing: -0.03em; color: var(--ink); margin-bottom: 1.5rem;
}
.section-body {
  font-size: clamp(1.05rem, 1.35vw, 1.3rem); line-height: 1.6;
  color: var(--ink-soft); max-width: 30ch;
}

/* ---------- Hero ---------- */
.hero-standalone {
  position: relative; z-index: 20;
  height: 100vh; width: 100%;
  background: var(--bg);
  display: flex; flex-direction: column; justify-content: center;
  padding: 0 clamp(1.4rem, 6vw, 5rem);
  overflow: hidden;
}
.hero-bg {
  position: absolute; top: 0; bottom: 0; left: -18%;
  width: 136%; z-index: 0; pointer-events: none;
  background: url('../bg.png') center center / cover no-repeat;
  will-change: transform;
}
.hero-inner { position: relative; z-index: 2; max-width: 52vw; }
.hero-visual {
  position: absolute; z-index: 1; top: 50%; right: -3vw;
  transform: translateY(-50%);
  width: 70vw; max-width: 1120px; height: auto;
  pointer-events: none; user-select: none;
}
.hero-heading {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(2.4rem, 4.8vw, 4.7rem); line-height: 1.05;
  letter-spacing: -0.03em; color: var(--ink);
}
.hero-heading .word { display: inline-block; margin-right: 0.22em; }
.hero-heading .hero-line { display: block; }
.hero-heading .accent-word { color: var(--accent); }
.hero-tagline {
  margin-top: 2rem; max-width: 44ch;
  font-size: clamp(1.1rem, 1.6vw, 1.5rem); line-height: 1.55; color: var(--ink-soft);
}
.scroll-indicator {
  position: absolute; z-index: 1; bottom: 2.4rem; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 0.6rem;
  font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-muted);
}
.scroll-arrow {
  width: 1px; height: 38px; background: var(--ink-muted); position: relative; overflow: hidden;
}
.scroll-arrow::after {
  content: ''; position: absolute; top: -100%; left: 0; width: 100%; height: 100%;
  background: var(--accent); animation: scrollPulse 1.8s ease-in-out infinite;
}
@keyframes scrollPulse { 0% { top: -100%; } 60%,100% { top: 100%; } }

/* ---------- Canvas ---------- */
.canvas-wrap {
  position: fixed; inset: 0; z-index: 5;
  clip-path: circle(0% at 50% 50%);
  will-change: clip-path;
}
#canvas { width: 100%; height: 100%; display: block; }

/* Controller canvas — fixed on the left, text sits on the right (no left/right travel) */
.canvas-wrap2 {
  position: fixed; inset: 0; z-index: 3;
  opacity: 0; transform: translateX(17%);
  will-change: opacity;
}
#canvas2 { width: 100%; height: 100%; display: block; }

/* ---------- Dark overlay ---------- */
#dark-overlay {
  position: fixed; inset: 0; z-index: 6;
  background: var(--bg-dark); opacity: 0; pointer-events: none;
}

/* ---------- Marquee ---------- */
.marquee-wrap {
  position: fixed; top: 50%; left: 0; z-index: 7;
  transform: translateY(-50%); width: 100%;
  opacity: 0; pointer-events: none; white-space: nowrap;
  will-change: opacity;
}
.marquee-text {
  font-family: var(--font-display); font-weight: 700;
  font-size: 13vw; letter-spacing: -0.02em; line-height: 1;
  color: rgba(12,14,18,0.05); white-space: nowrap; will-change: transform;
}

/* ---------- Scroll container & sections ---------- */
#scroll-a, #scroll-b { position: relative; z-index: 10; }
#scroll-a { height: 750vh; }
#scroll-b { height: 800vh; }

.scroll-section {
  position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
  display: flex; flex-direction: column; justify-content: center;
  pointer-events: none; opacity: 0; visibility: hidden;
}
.scroll-section .section-inner,
.scroll-section .stats-grid { pointer-events: auto; }

.align-left {
  padding-left: clamp(1.4rem, 6vw, 5rem); padding-right: 52vw;
  text-align: left;
}
.align-right {
  padding-left: 52vw; padding-right: clamp(1.4rem, 6vw, 5rem);
  text-align: left;
}
.section-content .section-inner { max-width: 42vw; }

/* Denser text variant (sections with multiple paragraphs) */
.section-dense .section-heading {
  font-size: clamp(1.5rem, 2.3vw, 2.4rem); line-height: 1.18; margin-bottom: 1.3rem;
}
.section-dense .section-body {
  font-size: clamp(0.95rem, 1.05vw, 1.1rem); line-height: 1.55;
  max-width: 40vw; margin-bottom: 0.9rem;
}
.section-dense .section-body:last-child { margin-bottom: 0; }
.section-dense .section-list {
  list-style: none; display: flex; flex-direction: column; gap: 0.5rem;
  margin-top: 1rem; max-width: 40vw;
}
.section-dense .section-list li {
  position: relative; padding-left: 1.4rem;
  font-size: clamp(0.92rem, 1vw, 1.05rem); line-height: 1.45; color: var(--ink-soft);
}
.section-dense .section-list li::before {
  content: ""; position: absolute; left: 0; top: 0.5em;
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
}

/* ---------- Stats ---------- */
.section-stats {
  z-index: 11;
  display: flex; align-items: center; justify-content: center;
  padding: 0 clamp(1.4rem, 6vw, 5rem);
}
.stats-chart {
  position: absolute; inset: 0; width: 100%; height: 100%;
  z-index: 0; pointer-events: none; clip-path: inset(0 100% 0 0);
}
.stats-grid {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: clamp(1.5rem, 4vw, 4rem); width: 100%; max-width: 1100px;
}
.stat { display: block; }
.stat-number, .stat-suffix, .stat-prefix {
  display: inline; font-family: var(--font-display); font-weight: 700;
  font-size: clamp(2.8rem, 6vw, 5.2rem); line-height: 1;
  color: var(--text-on-dark); letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.stat-suffix { color: var(--accent); margin-left: 0.04em; }
.stat-prefix { color: var(--accent); margin-right: 0.02em; }
.stat-label {
  display: block; margin-top: 1rem; font-size: 0.92rem; letter-spacing: 0.04em;
  color: rgba(244,242,239,0.6);
}

/* ---------- CTA ---------- */
.section-cta .section-inner { max-width: 46vw; }
.cta-button {
  display: inline-block; margin-top: 2.2rem;
  font-family: var(--font-display); font-weight: 600; font-size: 1.05rem;
  color: #fff; background: var(--ink); padding: 1rem 2.2rem; border-radius: 100px;
  transition: background 0.3s ease, transform 0.3s ease;
}
.cta-button:hover { background: var(--accent-ink); transform: translateY(-2px); }
.cta-note { margin-top: 1rem; font-size: 0.85rem; font-style: italic; color: var(--ink-muted); }

/* ---------- How it works (steps, tabbed) ---------- */
.steps-section {
  position: relative; z-index: 40;
  background: var(--bg-dark); color: var(--text-on-dark);
  padding: clamp(7rem, 15vh, 11rem) clamp(1.4rem, 6vw, 5rem) clamp(5rem, 12vh, 9rem);
}
.steps-inner { max-width: 1200px; margin: 0 auto; }
.steps-head {
  display: flex; flex-direction: column; align-items: center; gap: 1.1rem;
  text-align: center; max-width: 760px; margin: 0 auto clamp(2.4rem, 5vw, 3.5rem);
}
.steps-badge {
  font-family: var(--font-display); font-weight: 500; font-size: 0.8rem;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent);
  border: 1px solid rgba(255,255,255,0.16); padding: 0.4rem 0.9rem; border-radius: 100px;
}
.steps-heading {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(2rem, 4vw, 3.4rem); line-height: 1.05; letter-spacing: -0.03em;
}
.steps-sub {
  font-size: clamp(1rem, 1.2vw, 1.2rem); line-height: 1.55;
  color: rgba(244,242,239,0.6); max-width: 48ch;
}

.steps-tabs {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 0.8rem;
  margin-bottom: clamp(1.8rem, 4vw, 2.8rem);
}
.step-tab {
  display: flex; align-items: center; gap: 0.6rem;
  background: transparent; border: 1px solid rgba(255,255,255,0.12);
  color: rgba(244,242,239,0.65); font-family: var(--font-display); font-weight: 600;
  font-size: 0.95rem; padding: 0.8rem 1.2rem; border-radius: 100px; cursor: pointer;
  transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}
.step-tab:hover { color: var(--text-on-dark); border-color: rgba(255,255,255,0.32); }
.step-tab.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }
.step-ico { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.steps-stage {
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 24px; padding: clamp(1.6rem, 4vw, 3.5rem);
}
.step-panel {
  display: none; grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem); align-items: center;
}
.step-panel.is-active { display: grid; animation: stepIn 0.5s ease; }
@keyframes stepIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.step-text { display: flex; flex-direction: column; gap: 1.2rem; }
.step-pill {
  width: fit-content; font-family: var(--font-display); font-size: 0.8rem;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent);
  border: 1px solid rgba(27,105,212,0.45); padding: 0.32rem 0.75rem; border-radius: 100px;
}
.step-text h3 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.8rem, 3vw, 2.8rem); line-height: 1.08; letter-spacing: -0.02em;
}
.step-text p { color: rgba(244,242,239,0.72); font-size: clamp(1rem, 1.15vw, 1.15rem); line-height: 1.62; }
.step-visual {
  position: relative; aspect-ratio: 4 / 3; border-radius: 18px; overflow: hidden;
  background: radial-gradient(circle at 50% 38%, rgba(27,105,212,0.28), rgba(255,255,255,0.02) 70%);
  border: 1px solid rgba(255,255,255,0.08); display: grid; place-items: center;
}
.step-bigico { width: clamp(64px, 10vw, 120px); height: auto; stroke: var(--text-on-dark); fill: none; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.step-num {
  position: absolute; right: 1.4rem; bottom: 0.4rem; font-family: var(--font-display);
  font-weight: 700; font-size: clamp(4rem, 9vw, 8rem); line-height: 1; color: rgba(255,255,255,0.06);
}

/* ---------- What you do with it (blue feature list) ---------- */
.uses-section {
  position: relative; z-index: 40; color: #fff;
  padding: clamp(7rem, 15vh, 11rem) clamp(1.4rem, 6vw, 5rem) clamp(5rem, 12vh, 9rem);
  background: linear-gradient(160deg, #2076ea 0%, #204e8d 45%, #0c0e12 100%);
}
.uses-section::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: url(../bg.png) center center / cover no-repeat;
  opacity: 0.25;
}
.uses-inner { position: relative; z-index: 1; max-width: 820px; margin: 0 auto; }
.uses-head { text-align: center; max-width: 680px; margin: 0 auto clamp(2.6rem, 5vw, 4rem); }
.uses-badge {
  display: inline-block; font-family: var(--font-display); font-weight: 600;
  font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent); background: #fff; padding: 0.4rem 0.9rem; border-radius: 100px;
}
.uses-heading {
  margin-top: 1.3rem; font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.9rem, 3.6vw, 3rem); line-height: 1.1; letter-spacing: -0.025em;
}
.uses-list { display: flex; flex-direction: column; gap: clamp(1.6rem, 3vw, 2.3rem); }
.uses-item { display: flex; gap: 1.2rem; align-items: flex-start; }
.uses-num {
  flex-shrink: 0; width: 2rem; height: 2rem; display: grid; place-items: center;
  border-radius: 8px; background: rgba(255,255,255,0.16);
  font-family: var(--font-display); font-weight: 600; font-size: 0.9rem; color: #fff;
}
.uses-body h3 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.15rem, 1.6vw, 1.4rem); line-height: 1.2; margin-bottom: 0.5rem;
  display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap;
}
.uses-body p { color: rgba(255,255,255,0.82); font-size: clamp(0.98rem, 1.1vw, 1.1rem); line-height: 1.6; }
.uses-opt {
  font-family: var(--font-body); font-weight: 500; font-size: 0.68rem;
  letter-spacing: 0.05em; text-transform: uppercase; color: #fff;
  border: 1px solid rgba(255,255,255,0.4); padding: 0.2rem 0.55rem; border-radius: 100px;
}

/* ---------- FAQ + footer (black) ---------- */
.faq-section {
  position: relative; z-index: 40; background: var(--bg-dark); color: #fff;
  padding: clamp(6rem, 12vh, 9rem) clamp(1.4rem, 6vw, 5rem) 0;
}
.faq-inner { max-width: 820px; margin: 0 auto; }
.faq-head { text-align: center; margin: 0 auto clamp(2.4rem, 5vw, 3.5rem); }
.faq-badge {
  display: inline-block; font-family: var(--font-display); font-weight: 500;
  font-size: 0.8rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent);
  border: 1px solid rgba(255,255,255,0.16); padding: 0.4rem 0.9rem; border-radius: 100px;
}
.faq-heading {
  margin-top: 1.2rem; font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.9rem, 3.6vw, 3rem); line-height: 1.1; letter-spacing: -0.025em;
}
.faq-list { border-top: 1px solid rgba(255,255,255,0.1); }
.faq-item { border-bottom: 1px solid rgba(255,255,255,0.1); }
.faq-q {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1.2rem;
  background: transparent; border: 0; cursor: pointer; padding: 1.35rem 0.2rem; color: #fff;
  font-family: var(--font-display); font-weight: 600; font-size: clamp(1.05rem, 1.4vw, 1.25rem);
  text-align: left; transition: color 0.25s ease;
}
.faq-q:hover { color: #9cc4ff; }
.faq-icon { position: relative; width: 16px; height: 16px; flex-shrink: 0; }
.faq-icon::before, .faq-icon::after {
  content: ""; position: absolute; background: currentColor; transition: opacity 0.3s ease, transform 0.3s ease;
}
.faq-icon::before { top: 50%; left: 0; width: 100%; height: 2px; transform: translateY(-50%); }
.faq-icon::after { left: 50%; top: 0; width: 2px; height: 100%; transform: translateX(-50%); }
.faq-item.open .faq-icon::after { opacity: 0; }
.faq-a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.35s ease; }
.faq-item.open .faq-a { grid-template-rows: 1fr; }
.faq-a > div { overflow: hidden; }
.faq-a p {
  padding: 0 0 1.35rem; color: rgba(255,255,255,0.68);
  font-size: clamp(0.98rem, 1.1vw, 1.1rem); line-height: 1.62; max-width: 68ch;
}

.site-footer { width: 100%; max-width: none; margin: clamp(4rem, 8vh, 6rem) auto 0; }
.footer-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap;
  padding: 2.4rem 0 3rem; border-top: 1px solid rgba(255,255,255,0.1);
}
.footer-logo { height: 32px; width: auto; display: block; }
.footer-nav { display: flex; gap: 1.6rem; flex-wrap: wrap; }
.footer-nav a { color: rgba(255,255,255,0.6); font-size: 0.92rem; font-weight: 500; transition: color 0.25s ease; }
.footer-nav a:hover { color: #fff; }
.footer-copy { color: rgba(255,255,255,0.45); font-size: 0.85rem; }

/* ---------- Mobile ---------- */
@media (max-width: 860px) {
  .hero-inner { max-width: 100%; }
  .hero-visual { opacity: 0.12; right: -20vw; width: 110vw; max-width: none; }
  #scroll-a { height: 620vh; }
  #scroll-b { height: 780vh; }
  .canvas-wrap2 { transform: translateX(0); }

  /* Scroll-driven content sits in a readable card over the product */
  .align-left, .align-right { padding: 0 1.1rem; text-align: center; }
  .section-content .section-inner,
  .section-cta .section-inner {
    max-width: 100%; margin: 0 auto;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(1px);
    padding: 1.5rem 1.3rem; border-radius: 16px;
  }
  .scroll-section { display: flex; align-items: center; justify-content: center; }
  .section-heading { font-size: 1.7rem; }
  .section-body { max-width: 100%; margin: 0 auto; }

  /* Dense (multi-paragraph) sections: full width, left-aligned, compact */
  .section-dense .section-inner { text-align: left; }
  .section-dense .section-heading { font-size: 1.35rem; line-height: 1.22; margin-bottom: 0.85rem; }
  .section-dense .section-body { max-width: 100%; font-size: 0.9rem; line-height: 1.5; margin-bottom: 0.7rem; }
  .section-dense .section-list { max-width: 100%; margin-top: 0.7rem; gap: 0.4rem; }
  .section-dense .section-list li { font-size: 0.85rem; line-height: 1.4; padding-left: 1.2rem; }
  .section-label { margin-bottom: 0.9rem; }

  /* Stats */
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 1.6rem 1.2rem; }
  .stat { align-items: center; text-align: center; }
  .stat-number, .stat-suffix, .stat-prefix { font-size: 2.6rem; }
  .marquee-text { font-size: 22vw; }

  /* Steps */
  .steps-stage { padding: 1.4rem 1.2rem; }
  .step-panel.is-active { grid-template-columns: 1fr; gap: 1.5rem; }
  .step-visual { order: -1; aspect-ratio: 16 / 10; }
  .step-tab { width: 100%; justify-content: center; }
  .step-text h3 { font-size: 1.5rem; }

  .footer-inner { flex-direction: column; align-items: flex-start; gap: 1.2rem; }
}
