/* =================================================================
   Kasper Marketplace — GPS & Telematics Stylesheet
   Design tokens from styles.css:
   --ink, --yellow, --yellow-dark, --canvas, --surface, --slate, --line,
   --green, --green-tint, --font-heading, --font-body, --font-mono
   ================================================================= */

/* --- Telematics Hero --- */
.telematics-hero {
  position: relative;
  overflow: hidden;
  background-color: var(--inverse-bg);
  color: var(--on-inverse);
  padding: clamp(64px, 9vw, 104px) 0 clamp(52px, 7vw, 80px);
}
.telematics-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(180deg, rgba(var(--ink-rgb), 0.78) 0%, rgba(var(--ink-rgb), 0.92) 100%), /* taste-skill-ignore: neutral scrim over photo */
    linear-gradient(90deg, rgba(var(--ink-rgb), 0.88) 0%, rgba(var(--ink-rgb), 0.6) 60%, rgba(var(--ink-rgb), 0.88) 100%), /* taste-skill-ignore: neutral scrim over photo */
    url('../assets/about-mission-fleet.webp?v=20261113');
  background-size: cover;
  background-position: center 35%;
  pointer-events: none;
}
.telematics-hero .container {
  position: relative;
  z-index: 1;
}
.telematics-hero .hero-eyebrow {
  margin-bottom: 16px;
  color: #B5B7BC;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.telematics-hero .hero-eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: var(--radius-pill);
  background: var(--yellow);
}
.telematics-hero h1 {
  font-size: clamp(34px, 5.2vw, 60px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--on-inverse);
  max-width: 860px;
  margin-bottom: 22px;
}
.telematics-hero .lead-p {
  font-size: clamp(16px, 1.3vw, 19px);
  line-height: 1.6;
  color: rgba(var(--on-inverse-rgb), 0.84);
  max-width: 740px;
  margin: 0 0 32px;
}
.hero-cta-group {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.hero-badge-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}
.tele-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  border-radius: var(--radius-pill);
  background: rgba(var(--on-inverse-rgb), 0.08);
  border: 1px solid rgba(var(--on-inverse-rgb), 0.18);
  color: var(--on-inverse);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
}
.tele-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #22C55E;
  box-shadow: 0 0 8px #22C55E;
  position: relative;
}
.tele-live-dot::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1.5px solid #22C55E;
  animation: radarPulse 2s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}
@keyframes radarPulse {
  0% { transform: scale(0.8); opacity: 1; }
  100% { transform: scale(2.4); opacity: 0; }
}

/* --- Section 2: Framework Cards --- */
.telematics-framework-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
  padding: var(--space-3);
  transition: transform 120ms ease, border-color 140ms ease, box-shadow 140ms ease;
}
.telematics-framework-card:hover {
  border-color: var(--ink);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(var(--ink-rgb), 0.06);
}
.tele-card-image {
  width: 100%;
  height: 160px;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 16px;
  background: var(--canvas);
  border: 1px solid var(--line);
}
.tele-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 300ms ease;
}
.telematics-framework-card:hover .tele-card-image img {
  transform: scale(1.04);
}
.tele-icon-box {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--canvas);
  border: 1px solid var(--line);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.tele-icon-box svg {
  width: 22px;
  height: 22px;
}
.telematics-framework-card h3 {
  font-size: 20px;
  margin-bottom: 10px;
  color: var(--ink);
}
.telematics-framework-card p {
  color: var(--slate);
  font-size: 15px;
  line-height: 1.6;
  margin: 0 0 20px;
  flex: 1;
}
.tele-metric-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  background: var(--canvas);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.02em;
  width: fit-content;
}
.tele-metric-tag strong {
  color: var(--slate);
  font-weight: 500;
}

/* --- Section 3: Interactive Live Telemetry HUD Cockpit --- */
.telemetry-cockpit-section {
  padding-top: var(--space-4);
  padding-bottom: var(--space-6);
}
.telemetry-hud-card {
  background: #141518;
  color: var(--on-inverse);
  border: 1px solid #2B2E36;
  border-radius: 24px;
  padding: clamp(24px, 4vw, 40px);
  position: relative;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(var(--ink-rgb), 0.28);
}
.telemetry-hud-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(circle at 92% 15%, rgba(255, 255, 255, 0.04) 0%, transparent 40%), /* taste-skill-ignore: neutral scrim over photo */
    linear-gradient(rgba(20, 21, 24, 0.94), rgba(20, 21, 24, 0.96)), /* taste-skill-ignore: neutral scrim over photo */
    url('../assets/map-texture.webp');
  background-size: cover;
  pointer-events: none;
}
.hud-inner {
  position: relative;
  z-index: 1;
}
.hud-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 18px;
  padding-bottom: 24px;
  border-bottom: 1px solid #2B2E36;
  margin-bottom: 28px;
}
.hud-title-block .hud-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: #B5B7BC;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.hud-title-block h3 {
  font-family: var(--font-heading);
  font-size: clamp(20px, 2.5vw, 26px);
  color: var(--on-inverse);
  margin-bottom: 6px;
}
.hud-title-block .hud-location {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #9A9CA1;
}
.hud-title-block .hud-location svg {
  color: #9A9CA1;
  flex-shrink: 0;
}
.hud-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  background: rgba(23, 128, 90, 0.22);
  border: 1px solid rgba(23, 128, 90, 0.6);
  color: #3DD693;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.hud-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}
.hud-cell {
  background: #1B1D22;
  border: 1px solid #2B2E36;
  border-radius: 14px;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.hud-cell-label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #8E9198;
  margin-bottom: 10px;
}
.hud-cell-val {
  font-family: var(--font-mono);
  font-size: clamp(16px, 1.8vw, 20px);
  font-weight: 700;
  color: var(--on-inverse);
  line-height: 1.25;
}
.hud-cell-val.highlight {
  color: var(--on-inverse);
}
.hud-cell-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  color: #9A9CA1;
  margin-top: 8px;
}
.hud-tele-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 16px 20px;
  background: #1A1C20;
  border: 1px solid #2B2E36;
  border-radius: 12px;
  font-size: 13px;
}
.hud-tele-item {
  display: flex;
  align-items: center;
  gap: 10px;
}
.hud-tele-item strong {
  color: var(--on-inverse);
  font-family: var(--font-heading);
}
.hud-tele-item span {
  color: #9A9CA1;
  font-family: var(--font-mono);
  font-size: 12px;
}
.hud-epod-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(23, 128, 90, 0.22);
  border: 1px solid rgba(23, 128, 90, 0.6);
  color: #3DD693;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
}

/* --- Section 4: CAN-Bus vs. Key Switch Billing Matrix --- */
.comparison-section {
  padding-top: var(--space-4);
  padding-bottom: var(--space-6);
}
.matrix-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 28px;
}
.matrix-col {
  border-radius: 20px;
  overflow: hidden;
  border: 1.5px solid var(--line);
  background: var(--surface);
  display: flex;
  flex-direction: column;
}
.matrix-col--legacy {
  border-color: var(--border);
  background: var(--surface-2);
}
.matrix-col--kasper {
  border-color: var(--border-strong);
  background: var(--surface);
  box-shadow: 0 12px 36px rgba(var(--scrim-rgb), 0.12);
  position: relative;
}
.matrix-header {
  padding: 24px 28px;
  border-bottom: 1px solid var(--border);
}
.matrix-col--legacy .matrix-header {
  background: var(--surface-muted);
}
.matrix-col--kasper .matrix-header {
  background: var(--inverse-bg);
  color: var(--on-inverse);
}
.matrix-header .matrix-column-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.matrix-col--legacy .matrix-column-tag { color: var(--text-muted); }
.matrix-col--kasper .matrix-column-tag { color: #B5B7BC; }
.matrix-header h3 {
  font-size: 22px;
  margin: 0;
  color: var(--text);
}
.matrix-col--kasper .matrix-header h3 {
  color: var(--on-inverse);
}
.matrix-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
}
.matrix-item {
  padding: 20px 28px;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.matrix-item:last-child {
  border-bottom: none;
}
.matrix-item-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  margin-top: 2px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.matrix-col--legacy .matrix-item-icon {
  color: #C23B3B;
  background: #FBEAEA;
}
.matrix-col--kasper .matrix-item-icon {
  color: #17805A;
  background: #E8F5E9;
}
.matrix-item-content strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 15px;
  color: var(--text);
  margin-bottom: 4px;
}
.matrix-item-content p {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* --- Section 5: Safeguards & Geofencing --- */
.safeguards-section {
  padding-top: var(--space-4);
  padding-bottom: var(--space-6);
}
.safeguards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 28px;
}
.safeguard-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: var(--space-3);
  display: flex;
  flex-direction: column;
}
.safeguard-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 4px 8px;
  border-radius: 4px;
  background: var(--canvas);
  color: var(--slate);
  margin-bottom: 16px;
  width: fit-content;
}
.safeguard-card h3 {
  font-size: 20px;
  margin-bottom: 10px;
}
.safeguard-card p {
  color: var(--slate);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 18px;
}
.safeguard-card .coil-bullets {
  margin-top: auto;
}
.safeguard-card .coil-bullets > li {
  font-size: 14px;
}

/* Simulated WhatsApp alert box */
.simulated-alert-box {
  background: #EFEAE2;
  border-radius: 12px;
  padding: 12px;
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 1px solid #D5CEBE;
}
.sim-msg {
  background: #FFFFFF;
  border-radius: 8px 8px 8px 2px;
  padding: 8px 10px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
  font-size: 12px;
  line-height: 1.4;
  color: #111B21;
}
.sim-msg-time {
  font-family: var(--font-mono);
  font-size: 9px;
  color: #667781;
  text-align: right;
  margin-top: 3px;
}

/* --- Section 6: Technical Specification Sheet --- */
.specs-section {
  padding-top: var(--space-4);
  padding-bottom: var(--space-6);
}
.specs-table-container {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(var(--ink-rgb), 0.04);
  margin-top: 24px;
}
.specs-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
.specs-table th,
.specs-table td {
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.specs-table tr:last-child td {
  border-bottom: none;
}
.specs-table th {
  background: var(--canvas);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--slate);
  width: 32%;
}
.specs-table td {
  font-family: var(--font-mono);
  color: var(--ink);
  line-height: 1.5;
}
.specs-table td strong {
  font-family: var(--font-heading);
  font-size: 15px;
  color: var(--ink);
  display: block;
  margin-bottom: 2px;
}
.specs-table td span {
  font-family: var(--font-body);
  color: var(--slate);
  font-size: 13px;
}

/* --- Section 7: CTA Band --- */
.cta-band {
  background: var(--inverse-bg);
  color: var(--on-inverse);
  border-radius: 20px;
  padding: clamp(28px, 5vw, 48px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}
.cta-band h2 {
  color: var(--on-inverse);
  font-size: clamp(24px, 3.2vw, 36px);
  line-height: 1.15;
  margin-bottom: 12px;
}
.cta-band p {
  color: rgba(var(--on-inverse-rgb), 0.8);
  font-size: 16px;
  line-height: 1.55;
  max-width: 620px;
  margin: 0;
}

/* --- Responsive Media Queries --- */
@media (max-width: 980px) {
  .hud-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .safeguards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 768px) {
  .matrix-container {
    grid-template-columns: 1fr;
  }
  .safeguards-grid {
    grid-template-columns: 1fr;
  }
  .specs-table th {
    width: 38%;
  }
  .specs-table th,
  .specs-table td {
    padding: 14px 16px;
  }
  .hud-tele-strip {
    flex-direction: column;
    align-items: flex-start;
  }
}
@media (max-width: 540px) {
  .hud-grid {
    grid-template-columns: 1fr;
  }
  .specs-table {
    display: block;
  }
  .specs-table thead, .specs-table tbody, .specs-table tr, .specs-table th, .specs-table td {
    display: block;
    width: 100%;
  }
  .specs-table tr {
    border-bottom: 1px solid var(--line);
    padding: 14px 16px;
  }
  .specs-table th {
    background: transparent;
    padding: 0 0 6px 0;
    border-bottom: none;
    color: var(--slate);
  }
  .specs-table td {
    padding: 0;
    border-bottom: none;
  }
}
@media (max-width: 480px) {
  .telematics-hero {
    padding: 44px 0 36px;
  }
  .hero-cta-group {
    flex-direction: column;
    align-items: stretch;
  }
  .hero-cta-group .btn {
    width: 100%;
  }
  .matrix-header {
    padding: 18px 20px;
  }
  .matrix-item {
    padding: 16px 20px;
  }
  .cta-band > div:last-child {
    width: 100%;
    flex-direction: column;
  }
  .cta-band .btn {
    width: 100%;
  }
}


/* Contrast-safe legacy comparison column in both color modes. */
.matrix-col--legacy {
  color: var(--text);
  background: var(--surface);
}
.matrix-col--legacy .matrix-header { background: var(--surface-2); }
.matrix-col--legacy .matrix-header h3,
.matrix-col--legacy .matrix-item-content strong { color: var(--text); }
.matrix-col--legacy .matrix-item-content p { color: var(--text-muted); }
[data-theme="dark"] .matrix-col--legacy {
  color: #F3F4F6;
  background: #18191D;
  border-color: #3A3D46;
}
[data-theme="dark"] .matrix-col--legacy .matrix-header { background: #202126; }
[data-theme="dark"] .matrix-col--legacy .matrix-header h3,
[data-theme="dark"] .matrix-col--legacy .matrix-item-content strong { color: #F3F4F6; }
[data-theme="dark"] .matrix-col--legacy .matrix-column-tag,
[data-theme="dark"] .matrix-col--legacy .matrix-item-content p { color: #B5B7BC; }

.cta-band .btn-on-dark {
  background: #27292E;
  color: #FFFFFF;
  border: 1.5px solid rgba(255, 255, 255, 0.38);
}
.cta-band .btn-on-dark:hover {
  background: #34373E;
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.62);
}
.cta-band .btn-on-dark:focus-visible {
  outline: 3px solid var(--brand-yellow);
  outline-offset: 3px;
}

/* Desktop scale (2 Nov audit). */
@media (min-width: 861px) {
  .telematics-hero h1 { font-size: clamp(32px, 4.4vw, 50px); }
  .telematics-hero .lead-p { font-size: clamp(15px, 1.1vw, 17px); }
}
