/* Mechanica marketing site — custom layer on Bootstrap 5 */

:root {
  --brand: #1f3c88;
  --brand-bright: #2a4a9a;
  --brand-soft: #9aabd6;
  --brand-container: #e4e8f4;
  --brand-deep: #142456;
  --ink: #14203a;
  --muted: #5b6a82;
  --bg: #eef0f5;
  --bg-mist: #f6f7fb;
  --surface: #ffffff;
  --line: #d5dae6;
  --line-soft: #e6e9f2;
  --success: #22c55e;
  --success-bg: #dcfce7;
  --success-ink: #14532d;
  --warning: #f59e0b;
  --warning-bg: #fef3c7;
  --warning-ink: #78350f;
  --danger: #ef4444;
  --danger-bg: #ffe4e6;
  --danger-ink: #7f1d1d;
  --info: #6b9fe8;
  --dark: #070910;
  --dark-surface: #111522;
  --radius: 24px;
  --radius-sm: 18px;
  --radius-xs: 12px;
  --shadow: 0 12px 28px rgba(31, 60, 136, 0.1), 0 2px 8px rgba(20, 32, 58, 0.04);
  --nav-h: 76px;
  --font: "Poppins", system-ui, -apple-system, sans-serif;

  --bs-primary: #1f3c88;
  --bs-primary-rgb: 31, 60, 136;
  --bs-body-font-family: var(--font);
  --bs-body-color: var(--ink);
  --bs-body-bg: var(--bg);
  --bs-border-radius: var(--radius-sm);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 12px);
}

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--brand);
  text-decoration: none;
}

a:hover {
  color: var(--brand-bright);
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 2000;
  background: var(--brand);
  color: #fff;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
}

.skip-link:focus {
  top: 12px;
  color: #fff;
}

/* ---------- Navbar ---------- */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 1040;
  height: var(--nav-h);
  background: rgba(238, 240, 245, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.site-nav.is-scrolled {
  background: rgba(255, 255, 255, 0.9);
  border-bottom-color: var(--line-soft);
  box-shadow: 0 8px 24px rgba(20, 32, 58, 0.06);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
  gap: 12px;
}

.nav-end {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -0.4px;
  font-size: 1.15rem;
}

.brand:hover {
  color: var(--ink);
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(31, 60, 136, 0.25);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0 auto 0 8px;
  padding: 0;
  list-style: none;
}

.nav-links a {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.92rem;
  padding: 8px 14px;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-links a:hover,
.nav-links a.is-active {
  color: var(--brand);
  background: var(--brand-container);
}

.btn-nav-cta {
  display: inline-flex;
  align-items: center;
  background: var(--brand);
  color: #fff !important;
  font-weight: 600;
  font-size: 0.88rem;
  padding: 10px 18px !important;
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(31, 60, 136, 0.22);
}

.btn-nav-cta:hover {
  background: var(--brand-bright);
  color: #fff !important;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  padding: 10px;
  border-radius: 12px;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  position: relative;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle span::before {
  top: -6px;
}

.nav-toggle span::after {
  top: 6px;
}

.nav-toggle[aria-expanded="true"] span {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] span::before {
  top: 0;
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span::after {
  top: 0;
  transform: rotate(-45deg);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: 48px 0 72px;
  background: linear-gradient(180deg, #fdfefe 0%, #eef0f5 42%, #d9e0ef 100%);
}

.hero::before {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  right: -80px;
  top: -120px;
  background: radial-gradient(circle, rgba(31, 60, 136, 0.18) 0%, rgba(31, 60, 136, 0) 68%);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  width: 280px;
  height: 280px;
  left: -60px;
  bottom: 40px;
  background: radial-gradient(circle, rgba(107, 159, 232, 0.22) 0%, transparent 70%);
  pointer-events: none;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 6px 12px 6px 8px;
  border-radius: 999px;
  box-shadow: var(--shadow);
}

.eyebrow-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.18);
}

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 700;
  letter-spacing: -0.9px;
  line-height: 1.12;
  margin: 22px 0 16px;
}

.hero-lead {
  font-size: 1.08rem;
  color: var(--muted);
  max-width: 34rem;
  line-height: 1.55;
  margin-bottom: 28px;
}

.store-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.store-badge {
  display: inline-flex;
  line-height: 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.store-badge:hover {
  transform: translateY(-2px);
  opacity: 0.92;
}

.store-badge img {
  height: 48px;
  width: auto;
  display: block;
}

.store-badge.play img {
  height: 70px;
  margin: -11px -8px;
}

.hero-note {
  margin-top: 14px;
  font-size: 0.85rem;
  color: var(--muted);
}

/* Device cluster */

.device-stage {
  position: relative;
  min-height: 560px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 12px 0 24px;
}

.device {
  background: #0c1018;
  padding: 10px;
  box-shadow:
    0 28px 60px rgba(7, 9, 16, 0.28),
    0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}

.device-phone {
  width: 272px;
  border-radius: 40px;
  position: relative;
  z-index: 2;
  animation: floaty 6s ease-in-out infinite;
}

.device-tablet {
  width: min(420px, 86vw);
  border-radius: 28px;
  padding: 14px;
}

.device-screen {
  background: var(--bg);
  border-radius: 32px;
  overflow: hidden;
  height: 540px;
  position: relative;
}

.device-tablet .device-screen {
  height: 300px;
  border-radius: 16px;
}

.device-island {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 88px;
  height: 22px;
  background: #0c1018;
  border-radius: 999px;
  z-index: 3;
}

.device-home {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 96px;
  height: 4px;
  background: rgba(20, 32, 58, 0.28);
  border-radius: 999px;
  z-index: 3;
}

.device-phone.back {
  position: absolute;
  right: 8%;
  top: 36px;
  transform: rotate(8deg) scale(0.88);
  z-index: 1;
  opacity: 0.95;
  animation: none;
  filter: saturate(0.95);
}

@keyframes floaty {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* App mock UI */

.mock {
  height: 100%;
  padding: 38px 14px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 11px;
  color: var(--ink);
  overflow: hidden;
}

.mock-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mock-bar strong {
  font-size: 15px;
  letter-spacing: -0.3px;
}

.bubble {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: var(--brand-container);
  color: var(--brand);
  display: grid;
  place-items: center;
}

.bubble svg {
  width: 14px;
  height: 14px;
}

.mock h3 {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.4px;
  margin: 2px 0 0;
  line-height: 1.2;
}

.mock .sub {
  color: var(--muted);
  margin: 0;
  font-size: 11px;
}

.hero-card {
  background: linear-gradient(135deg, #152c6e 0%, #1b357c 48%, #121a3a 100%);
  color: #fff;
  border-radius: 18px;
  padding: 14px;
  box-shadow: var(--shadow);
}

.hero-card .label {
  font-size: 9px;
  letter-spacing: 0.08em;
  font-weight: 600;
  color: #ffe08a;
  text-transform: uppercase;
}

.hero-card strong {
  display: block;
  font-size: 13px;
  margin: 4px 0 2px;
}

.hero-card p {
  margin: 0;
  color: #f4f7ff;
  opacity: 0.9;
}

.tile-row,
.short-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.tile,
.short {
  background: var(--surface);
  border-radius: 14px;
  padding: 10px 8px;
  box-shadow: var(--shadow);
}

.tile span,
.short span {
  display: block;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: -0.2px;
}

.tile small {
  color: var(--muted);
  font-size: 9px;
}

.section-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 4px 0 0;
}

.vehicle-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border-radius: 14px;
  padding: 8px;
  box-shadow: var(--shadow);
}

.vehicle-avatar {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--brand-container);
  display: grid;
  place-items: center;
  color: var(--brand);
  flex-shrink: 0;
}

.overview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.stat {
  border-radius: 16px;
  padding: 10px;
}

.stat b {
  display: block;
  font-size: 20px;
  line-height: 1.1;
  letter-spacing: -0.5px;
}

.stat.info {
  background: var(--brand-container);
  color: var(--brand-deep);
}

.stat.warn {
  background: var(--warning-bg);
  color: var(--warning-ink);
}

.stat.danger {
  background: var(--danger-bg);
  color: var(--danger-ink);
}

.stat.ok {
  background: var(--success-bg);
  color: var(--success-ink);
}

.list-card {
  background: var(--surface);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.list-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border-top: 1px solid var(--line-soft);
}

.list-row:first-child {
  border-top: 0;
}

.kpi-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
}

.kpi {
  background: var(--surface);
  border-radius: 12px;
  padding: 8px 6px;
  text-align: left;
  box-shadow: var(--shadow);
}

.kpi b {
  display: block;
  font-size: 12px;
}

.bars {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 72px;
  padding: 8px 4px 0;
}

.bars i {
  display: block;
  flex: 1;
  background: linear-gradient(180deg, var(--brand-bright), var(--brand));
  border-radius: 6px 6px 2px 2px;
  opacity: 0.85;
}

.mock-tablet {
  padding: 16px 16px 12px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 12px;
  height: 100%;
}

.mock-tablet .overview-grid {
  height: fit-content;
}

/* ---------- Sections ---------- */

.section {
  padding: 88px 0;
}

.section-head {
  max-width: 640px;
  margin-bottom: 40px;
}

.kicker {
  color: var(--brand);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.section h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.6px;
  line-height: 1.2;
  margin-bottom: 12px;
}

.section-head p {
  color: var(--muted);
  margin: 0;
  font-size: 1.02rem;
}

.feature-card {
  height: 100%;
  background: var(--surface);
  border: 0;
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 36px rgba(31, 60, 136, 0.14);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: var(--brand-container);
  color: var(--brand);
  display: grid;
  place-items: center;
  margin-bottom: 16px;
}

.feature-icon svg {
  width: 22px;
  height: 22px;
}

.feature-card h3 {
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.25px;
  margin-bottom: 8px;
}

.feature-card p {
  color: var(--muted);
  margin: 0;
  font-size: 0.94rem;
}

/* Showcase */

.showcase {
  background: var(--surface);
}

.showcase-wrap {
  position: relative;
}

.showcase-track {
  display: flex;
  gap: 28px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 16px 8px 32px;
  scrollbar-width: none;
}

.showcase-track::-webkit-scrollbar {
  display: none;
}

.showcase-item {
  scroll-snap-align: center;
  flex: 0 0 auto;
  text-align: center;
}

.showcase-item figcaption {
  margin-top: 14px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
}

.showcase-nav {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.showcase-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  display: grid;
  place-items: center;
}

.showcase-btn:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.preview-note {
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 18px;
}

/* How it works */

.steps {
  counter-reset: step;
}

.step-card {
  position: relative;
  height: 100%;
  padding: 28px 24px 24px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.step-card::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  top: -14px;
  left: 24px;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 16px rgba(31, 60, 136, 0.25);
}

.step-card h3 {
  margin-top: 12px;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.step-card p {
  color: var(--muted);
  margin: 0;
}

.split {
  margin-top: 40px;
}

.split-card {
  border-radius: var(--radius);
  padding: 32px;
  height: 100%;
}

.split-card.owners {
  background: var(--brand-container);
}

.split-card.shops {
  background: var(--dark);
  color: #f1f5f9;
}

.split-card h3 {
  font-weight: 700;
  letter-spacing: -0.3px;
  margin-bottom: 14px;
}

.split-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.split-card li {
  padding: 6px 0 6px 22px;
  position: relative;
}

.split-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 13px;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--brand);
}

.split-card.shops li::before {
  background: var(--brand-soft);
}

.split-card.shops p,
.split-card.owners p {
  opacity: 0.85;
  margin-bottom: 12px;
}

/* CTA */

.cta {
  padding: 0 0 88px;
}

.cta-panel {
  background: linear-gradient(135deg, #152c6e 0%, #1f3c88 45%, #121a3a 100%);
  color: #fff;
  border-radius: 32px;
  padding: 56px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 24px 48px rgba(31, 60, 136, 0.28);
}

.cta-panel::after {
  content: "";
  position: absolute;
  width: 320px;
  height: 320px;
  right: -80px;
  top: -80px;
  background: radial-gradient(circle, rgba(154, 171, 214, 0.28), transparent 70%);
  pointer-events: none;
}

.cta-panel h2 {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  letter-spacing: -0.6px;
  margin-bottom: 10px;
}

.cta-panel p {
  color: #d5dcf0;
  margin-bottom: 24px;
}

.cta-panel .store-row {
  justify-content: center;
}

.cta-devices {
  margin-top: 18px;
  font-weight: 500;
  color: #9aabd6;
  font-size: 0.92rem;
}

/* Footer */

.site-footer {
  background: var(--dark);
  color: #c9d2e3;
  padding: 48px 0 28px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 700;
  margin-bottom: 10px;
}

.footer-brand:hover {
  color: #fff;
}

.footer-brand img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

.site-footer a {
  color: #c9d2e3;
}

.site-footer a:hover {
  color: #fff;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
}

.socials {
  display: flex;
  gap: 10px;
}

.socials a {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--dark-surface);
  display: grid;
  place-items: center;
  color: #fff;
}

.copyright {
  border-top: 1px solid #2a3144;
  margin-top: 28px;
  padding-top: 18px;
  font-size: 0.85rem;
  color: #8b95a8;
}

/* Legal pages */

.legal-hero {
  padding: 48px 0 24px;
  background: linear-gradient(180deg, #fdfefe, var(--bg));
}

.legal-body {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 36px 32px 48px;
  margin-bottom: 64px;
}

.legal-body h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-top: 28px;
  margin-bottom: 10px;
}

.legal-body p,
.legal-body li {
  color: var(--muted);
}

/* Reveal */

.js .reveal {
  opacity: 0;
  transform: translateY(18px);
}

.js .reveal.is-in {
  animation: rise 0.7s ease forwards;
}

@keyframes rise {
  to {
    opacity: 1;
    transform: none;
  }
}

/* Legal nav offset for inner pages */
body.legal .site-nav {
  background: rgba(255, 255, 255, 0.92);
  border-bottom-color: var(--line-soft);
}

@media (max-width: 991.98px) {
  .nav-toggle {
    display: grid;
    place-items: center;
  }

  .nav-links {
    position: absolute;
    left: 0;
    right: 0;
    top: var(--nav-h);
    margin: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 12px 20px 20px;
    background: rgba(255, 255, 255, 0.97);
    border-bottom: 1px solid var(--line-soft);
    box-shadow: 0 16px 32px rgba(20, 32, 58, 0.08);
  }

  .nav-links.is-open {
    display: flex;
  }

  .device-phone.back {
    display: none;
  }

  .device-stage {
    min-height: 0;
    margin-top: 40px;
  }

  .section {
    padding: 64px 0;
  }
}

@media (max-width: 575.98px) {
  .btn-nav-cta {
    padding: 8px 14px !important;
    font-size: 0.8rem;
  }

  .hero {
    padding-top: 28px;
  }

  .cta-panel {
    padding: 40px 20px;
    border-radius: 24px;
  }

  .legal-body {
    padding: 24px 18px 36px;
  }

  .device-phone {
    width: 250px;
  }

  .device-screen {
    height: 500px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .device-phone,
  .js .reveal,
  .js .reveal.is-in {
    animation: none;
    opacity: 1;
    transform: none;
  }
}
