/* ============================================================
   JED-I Marketing Site — mirrors the admin design system
   (tokens lifted from frontend-admin/src/index.css)
   ============================================================ */

:root {
  /* Brand palette */
  --navy:        #0a0f1e;
  --navy-deep:   #060c18;
  --sidebar:     #0f172a;
  --card:        #1e293b;
  --purple:      #7c3aed;
  --purple-2:    #6d28d9;
  --purple-lite: #a78bfa;
  --amber:       #f59e0b;
  --amber-lite:  #fbbf24;
  --success:     #10b981;
  --destructive: #ef4444;

  --fg:          #f8fafc;
  --muted:       #94a3b8;
  --muted-2:     #64748b;
  --border:      #334155;
  --muted-bg:    #172033;

  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;

  --radius: 12px;
  --maxw: 1180px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  background: var(--navy);
  color: var(--fg);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

::selection { background: rgba(124, 58, 237, 0.28); }
:focus-visible { outline: 2px solid rgba(124, 58, 237, 0.65); outline-offset: 2px; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--navy-deep); }
::-webkit-scrollbar-thumb { background: rgba(124, 58, 237, 0.4); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(124, 58, 237, 0.7); }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ── Brand lockup ─────────────────────────────────────────── */
.brand-lockup { display: inline-flex; align-items: center; gap: 10px; }
.brand-logo { display: inline-flex; line-height: 0; }
.brand-word { font-weight: 900; letter-spacing: -0.02em; font-size: 22px; color: var(--fg); }
.brand-word.xl { font-size: 30px; }
.accent-i { color: var(--purple-lite); }

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-sans);
  font-weight: 800; font-size: 13px;
  letter-spacing: 0.04em;
  padding: 13px 26px; border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer; transition: box-shadow .2s ease, transform .15s ease, background .2s, border-color .2s;
  white-space: nowrap;
}
.btn-sm { padding: 9px 18px; font-size: 12.5px; }
.btn-block { width: 100%; }

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
  box-shadow: 0 0 20px rgba(124, 58, 237, 0.3);
}
.btn-primary:hover {
  box-shadow: 0 0 40px rgba(124, 58, 237, 0.65), 0 0 80px rgba(124, 58, 237, 0.2);
  transform: translateY(-1px);
}

.btn-ghost {
  color: var(--fg);
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border);
  backdrop-filter: blur(8px);
}
.btn-ghost:hover { border-color: var(--purple); color: #fff; }

/* ── Eyebrow / section heads ──────────────────────────────── */
.eyebrow {
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.32em; text-transform: uppercase;
  color: rgba(245, 158, 11, 0.85);
}
.eyebrow.center { text-align: center; }

.section-head { max-width: 640px; margin: 0 auto 56px; text-align: center; }
.section-title {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  font-weight: 900; letter-spacing: -0.02em; line-height: 1.1;
  margin-top: 14px;
}
.section-lead { color: var(--muted); font-size: 1.02rem; margin-top: 16px; }

/* ── Header ───────────────────────────────────────────────── */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background .25s ease, border-color .25s ease, backdrop-filter .25s;
}
.site-header.scrolled {
  background: rgba(10, 15, 30, 0.82);
  backdrop-filter: blur(12px);
  border-bottom-color: rgba(255, 255, 255, 0.06);
}
.header-inner { display: flex; align-items: center; gap: 24px; height: 68px; }
.header-nav { display: flex; gap: 28px; margin-left: auto; }
.header-nav a {
  font-size: 13.5px; font-weight: 600; color: var(--muted);
  transition: color .15s;
}
.header-nav a:hover { color: var(--fg); }
.header-cta { margin-left: 8px; }

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex; align-items: center;
  padding: 120px 0 80px;
  overflow: hidden;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(124, 58, 237, 0.10), transparent 70%), var(--navy);
}
.hero-bg { position: absolute; inset: 0; pointer-events: none; }

.grid-overlay {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(124, 58, 237, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124, 58, 237, 0.045) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 70% 70% at 50% 40%, #000 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 40%, #000 40%, transparent 100%);
}

.radar {
  position: absolute; top: 32%; left: 50%;
  width: 0; height: 0;
}
.radar-ring {
  position: absolute; top: 0; left: 0;
  width: 320px; height: 320px; margin: -160px 0 0 -160px;
  border: 1px solid rgba(124, 58, 237, 0.22);
  border-radius: 50%;
  animation: radar-ping 4s ease-out infinite;
}
.radar-ring:nth-child(2) { animation-delay: 1.3s; }
.radar-ring:nth-child(3) { animation-delay: 2.6s; }
.radar-dot {
  position: absolute; top: -3px; left: -3px;
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(124, 58, 237, 0.6);
}
@keyframes radar-ping {
  0%   { transform: scale(0.15); opacity: 0.6; }
  100% { transform: scale(1);    opacity: 0; }
}

.float-box {
  position: absolute; top: -24px;
  width: 20px; height: 20px; border-radius: 4px;
  background: rgba(30, 41, 59, 0.55);
  border: 1px solid rgba(51, 65, 85, 0.5);
  animation: float-box linear infinite;
}
@keyframes float-box {
  0%   { transform: translateY(-20px) rotate(0deg);  opacity: 0; }
  8%   { opacity: 0.45; }
  88%  { opacity: 0.2; }
  100% { transform: translateY(108vh) rotate(35deg); opacity: 0; }
}

.particles { position: absolute; inset: 0; }
.particle {
  position: absolute; bottom: 0; border-radius: 50%;
  background: rgba(124, 58, 237, 0.25);
  animation: particle-float linear infinite;
}
@keyframes particle-float {
  0%   { transform: translateY(0);      opacity: 0; }
  8%   { opacity: 0.4; }
  88%  { opacity: 0.18; }
  100% { transform: translateY(-100vh); opacity: 0; }
}

.hero-inner { position: relative; z-index: 2; text-align: center; max-width: 760px; margin: 0 auto; }
.hero-badge { display: inline-flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.hero-title {
  font-size: clamp(3rem, 9vw, 5.4rem);
  font-weight: 900; letter-spacing: -0.03em; line-height: 0.98;
  margin: 14px 0 22px;
}
.hero-sub {
  color: var(--muted); font-size: 1.12rem; line-height: 1.65;
  max-width: 560px; margin: 0 auto 36px;
}
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.status-strip {
  display: inline-flex; flex-wrap: wrap; gap: 22px;
  margin-top: 52px; padding: 14px 24px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(8px);
  font-family: var(--font-mono); font-size: 12px;
  color: rgba(148, 163, 184, 0.6);
  letter-spacing: 0.06em;
}
.status-strip b { font-weight: 700; }
.status-strip .ok { color: var(--success); }
.status-strip .purple { color: var(--purple-lite); }
.status-strip .amber { color: var(--amber); }
.status-dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  margin-right: 4px; vertical-align: middle;
}
.status-dot.ok { background: var(--success); animation: dot-pulse 2s ease-in-out infinite; }
@keyframes dot-pulse { 0%,100% { opacity: 0.3; } 50% { opacity: 1; } }

.hero-punch {
  max-width: 480px; margin: 22px auto 0;
  font-size: 0.92rem; font-style: italic; line-height: 1.55;
  color: rgba(148, 163, 184, 0.72);
}

/* ── Generic section ──────────────────────────────────────── */
.section { padding: 96px 0; position: relative; }
.section-alt {
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.0), rgba(15, 23, 42, 0.55) 50%, rgba(15, 23, 42, 0.0)),
    var(--navy);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

/* ── Image placeholders ───────────────────────────────────── */
.ph {
  position: relative; overflow: hidden;
  background:
    repeating-linear-gradient(45deg, rgba(124,58,237,0.05) 0 12px, transparent 12px 24px),
    linear-gradient(135deg, #131b2e, #0d1322);
  border: 1px dashed rgba(124, 58, 237, 0.35);
  display: flex; align-items: center; justify-content: center;
}
.ph::after {
  content: attr(data-label);
  position: absolute;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em;
  color: rgba(148, 163, 184, 0.55);
  text-align: center; padding: 12px; max-width: 80%;
}
.ph::before {
  content: ""; position: absolute; top: 12px; left: 12px;
  width: 26px; height: 26px; border-radius: 6px;
  background: rgba(124, 58, 237, 0.18);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M21 5H3a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h18a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1Zm-1 11-4.5-6-3.5 4.5-2.5-3L4 16Z' fill='%237c3aed'/%3E%3Ccircle cx='8' cy='9' r='1.6' fill='%23a78bfa'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center;
}
/* When a real screenshot is dropped in, script.js adds .filled */
.ph.filled { border-style: solid; border-color: rgba(124,58,237,0.25); background: var(--navy-deep); }
.ph.filled::after, .ph.filled::before { content: none; }
.ph img { width: 100%; height: 100%; object-fit: cover; }

/* Wide product screenshots: show the FULL UI, never clip (letterbox on the
   dark navy-deep background reads as intentional). Phones keep cover above. */
.ph-feature img { object-fit: contain; }
.ph-dash img { object-fit: contain; height: auto; }

/* ── Feature grid ─────────────────────────────────────────── */
.feature-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px;
}
.feature-card {
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px; overflow: hidden;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(124, 58, 237, 0.45);
  box-shadow: 0 18px 50px -20px rgba(124, 58, 237, 0.4);
}
.ph-feature { aspect-ratio: 16 / 9; width: 100%; }
.feature-body { padding: 22px 24px 26px; position: relative; }
.feature-num {
  font-family: var(--font-mono); font-size: 12px; font-weight: 500;
  color: var(--purple-lite); letter-spacing: 0.15em;
}
.feature-body h3 { font-size: 1.25rem; font-weight: 800; margin: 8px 0 10px; }
.feature-body p { color: var(--muted); font-size: 0.95rem; line-height: 1.6; }

/* ── Dashboard previews ───────────────────────────────────── */
.preview-stack { display: flex; flex-direction: column; gap: 40px; }
.preview-frame {
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px; overflow: hidden;
  box-shadow: 0 30px 80px -40px rgba(0, 0, 0, 0.8);
}
.frame-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px;
  background: var(--sidebar);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.frame-bar span { width: 11px; height: 11px; border-radius: 50%; background: #334155; }
.frame-bar span:nth-child(1) { background: #ef4444aa; }
.frame-bar span:nth-child(2) { background: #f59e0baa; }
.frame-bar span:nth-child(3) { background: #10b981aa; }
.frame-bar em {
  margin-left: 10px; font-style: normal;
  font-family: var(--font-mono); font-size: 12px; color: var(--muted-2);
}
/* 16/9 only reserves space for the empty placeholder; once a real screenshot
   loads, let the frame grow to the image's natural height so the whole
   dashboard is visible at full width. */
.ph-dash { aspect-ratio: 16 / 9; width: 100%; }
.ph-dash.filled { aspect-ratio: auto; }
.preview-frame figcaption {
  padding: 16px 20px; text-align: center;
  color: var(--muted); font-size: 0.92rem;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

/* ── Driver app ───────────────────────────────────────────── */
.driver-layout {
  display: grid; grid-template-columns: 1fr 1.05fr; gap: 56px; align-items: center;
}
.driver-copy .section-title { text-align: left; }
.check-list { list-style: none; margin-top: 24px; display: grid; gap: 12px; }
.check-list li {
  position: relative; padding-left: 30px;
  color: var(--fg); font-size: 0.98rem;
}
.check-list li::before {
  content: ""; position: absolute; left: 0; top: 2px;
  width: 19px; height: 19px; border-radius: 50%;
  background: rgba(124, 58, 237, 0.18);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M20 6 9 17l-5-5' stroke='%23a78bfa' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center;
}

.phone-row { display: flex; justify-content: center; gap: 18px; }
.phone-frame {
  position: relative;
  width: 188px; aspect-ratio: 9 / 19.5;
  background: #05080f;
  border: 6px solid #1e293b;
  border-radius: 30px; overflow: hidden;
  box-shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.9);
}
.phone-frame.raised { transform: translateY(-22px) scale(1.04); z-index: 2; border-color: #2a3852; }
.phone-notch {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 80px; height: 18px; background: #05080f;
  border-radius: 0 0 12px 12px; z-index: 3;
}
.ph-phone { width: 100%; height: 100%; }
.ph-phone::after { font-size: 10px; }

/* ── Contact ──────────────────────────────────────────────── */
.contact-layout { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 56px; align-items: start; }
.contact-intro .section-title { text-align: left; }
.contact-card {
  margin-top: 28px; padding: 24px;
  background: var(--card);
  border: 1px solid rgba(124, 58, 237, 0.25);
  border-radius: 16px;
}
.contact-card-label {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--muted-2); margin-bottom: 8px;
}
.contact-name { font-size: 1.3rem; font-weight: 800; margin-bottom: 14px; }
.contact-line {
  display: flex; align-items: center; gap: 10px;
  font-size: 1rem; color: var(--fg); padding: 6px 0;
  transition: color .15s;
}
.contact-line:hover { color: var(--purple-lite); }

.contact-form {
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px; padding: 30px;
}
.field { margin-bottom: 18px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field label {
  display: block; font-size: 11px; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 8px;
}
.field input, .field textarea {
  width: 100%; padding: 12px 14px; border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(51, 65, 85, 0.7);
  color: var(--fg); font-family: var(--font-sans); font-size: 0.95rem;
  transition: border-color .15s, box-shadow .15s;
}
.field input::placeholder, .field textarea::placeholder { color: rgba(148, 163, 184, 0.4); }
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.2);
}
.field textarea { resize: vertical; }
.form-note { margin-top: 14px; text-align: center; font-size: 0.85rem; color: var(--muted-2); }
.form-note.ok { color: var(--success); }
.form-note.err { color: var(--destructive); }

/* ── Footer ───────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: var(--navy-deep);
  padding: 40px 0;
}
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-tag { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.3em; color: var(--muted-2); }
.footer-powered { font-size: 0.95rem; color: var(--purple-lite); font-weight: 600; }
.footer-copy { font-size: 0.82rem; color: var(--muted-2); }

/* ── Reveal on scroll ─────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 900px) {
  .header-nav { display: none; }
  .driver-layout, .contact-layout { grid-template-columns: 1fr; gap: 40px; }
  .driver-copy .section-title, .contact-intro .section-title { text-align: center; }
  .driver-copy, .contact-intro { text-align: center; }
  .driver-copy .eyebrow, .contact-intro .eyebrow { text-align: center; }
  .check-list { max-width: 420px; margin-inline: auto; text-align: left; }
}
@media (max-width: 680px) {
  .feature-grid { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .section { padding: 72px 0; }
  .hero { padding: 110px 0 64px; }
  .phone-frame { width: 150px; }
  .phone-frame.raised { transform: translateY(-14px) scale(1.03); }
  .status-strip { gap: 16px; padding: 12px 16px; font-size: 11px; }
}
@media (max-width: 420px) {
  .phone-row { gap: 10px; }
  .phone-frame { width: 128px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
