/* DriveSafe landing page. Layout follows the TripCheck landing page; colours
   and type follow the DriveSafe app (light #EEF3F1 background, red primary). */
:root {
  --bg: #eef3f1;
  --bg-2: #e4ebe8;
  --card: #ffffff;
  --border: #d9e2de;
  --text: #13231d;
  --muted: #5b6b65;
  --red: #d32f2f;
  --orange: #ef6c00;
  --purple: #7b1fa2;
  --blue: #1976d2;
  --green: #00a86b;
  --gold: #f5a623;
  --brown: #8d6e63;
  --radius: 24px;
  --shadow: 0 18px 40px -18px rgba(19, 35, 29, 0.25);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1714; --bg-2: #14201b; --card: #18251f; --border: #263731;
    --text: #edf3f0; --muted: #9db0a8; --brown: #bcaaa4;
    --shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.6);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  line-height: 1.55; -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.15; }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .wrap { padding: 0 24px; } }
.narrow { max-width: 860px; }
.center { text-align: center; justify-content: center; }

/* NAV */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 50; border-bottom: 1px solid transparent; transition: background .4s, border-color .4s, backdrop-filter .4s; }
.nav.scrolled { background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(14px); border-bottom-color: var(--border); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-size: 22px; letter-spacing: -.3px; }
.brand img { border-radius: 10px; }
.drive { color: var(--brown); } .safe { color: var(--gold); }
.nav-links { display: flex; gap: 28px; }
.nav-links a { text-decoration: none; color: var(--muted); font-weight: 600; font-size: 15px; }
.nav-links a:hover { color: var(--text); }
.nav-toggle { display: none; background: none; border: 0; width: 44px; height: 44px; cursor: pointer; }
.nav-toggle span { display: block; height: 2px; margin: 6px 10px; background: var(--text); border-radius: 2px; }
@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav-links { position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; gap: 0; background: var(--bg); border-bottom: 1px solid var(--border); padding: 8px 16px 16px; display: none; }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 0; font-size: 17px; }
}

/* HERO */
.hero { position: relative; padding: 112px 0 64px; overflow: hidden; }
@media (min-width: 1024px) { .hero { padding: 160px 0 96px; } }
.glow { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .28; pointer-events: none; }
.glow-red { width: 520px; height: 520px; background: var(--red); top: -160px; right: -120px; }
.glow-orange { width: 420px; height: 420px; background: var(--orange); bottom: -200px; left: -160px; opacity: .18; }
.hero-grid { position: relative; display: grid; gap: 48px; align-items: center; }
@media (min-width: 1024px) { .hero-grid { grid-template-columns: 1.1fr .9fr; } }
.mascot { display: flex; align-items: center; gap: 14px; margin-bottom: 28px; }
.mascot img { width: 88px; height: 88px; border-radius: 26px; box-shadow: var(--shadow); animation: bob 4s ease-in-out infinite; }
.bubble { background: var(--card); border: 1px solid var(--border); border-radius: 16px 16px 16px 4px; padding: 10px 14px; font-weight: 700; box-shadow: var(--shadow); min-width: 200px; }
.caret { display: inline-block; width: 2px; height: 1em; background: var(--red); margin-left: 2px; vertical-align: -2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
@keyframes bob { 50% { transform: translateY(-6px); } }
h1 { font-size: clamp(40px, 7vw, 60px); font-weight: 800; letter-spacing: -1.5px; line-height: 1.02; }
.grad { background: linear-gradient(90deg, var(--red), var(--orange)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: 19px; color: var(--muted); margin: 22px 0 10px; max-width: 600px; }
.fine { font-size: 13px; color: var(--muted); max-width: 600px; margin: 0 0 24px; }
.store-row { display: flex; flex-wrap: wrap; gap: 12px; }
.store-badge { display: inline-flex; align-items: center; gap: 10px; background: var(--text); color: var(--bg); border-radius: 14px; padding: 9px 18px 9px 14px; font-weight: 700; font-size: 17px; line-height: 1.1; opacity: .92; cursor: default; }
.store-badge svg { width: 26px; height: 26px; }
.store-badge small { display: block; font-size: 11px; font-weight: 500; opacity: .8; }
.note { font-size: 14px; color: var(--muted); margin: 18px 0 22px; }
.note a { color: var(--red); font-weight: 600; }
.pills { display: flex; flex-wrap: wrap; gap: 10px; }
.pill { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 10px 14px; font-size: 13px; }
.pill b { display: block; font-size: 14px; }
.pill span { color: var(--muted); }

.hero-phone { position: relative; display: flex; justify-content: center; }
.phone { width: min(330px, 78vw); border-radius: 46px; padding: 10px; background: #0d0d0d; box-shadow: 0 40px 80px -30px rgba(211, 47, 47, .45), var(--shadow); }
.phone img { border-radius: 37px; width: 100%; height: auto; }
.phone.sm { width: min(300px, 72vw); margin: 0 auto; }
.tilt { transform: rotate(3deg); }
.float-card { position: absolute; background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 10px 14px; font-weight: 700; font-size: 14px; box-shadow: var(--shadow); display: flex; align-items: center; gap: 8px; animation: bob 5s ease-in-out infinite; }
.fc-1 { bottom: 22%; left: -2%; } .fc-2 { top: 9%; right: -2%; animation-delay: 1.2s; }
@media (max-width: 640px) { .fc-1 { left: 0; } .fc-2 { right: 0; } }
.dot { width: 10px; height: 10px; border-radius: 50%; } .dot.red { background: var(--red); } .dot.green { background: var(--green); }

/* SECTIONS */
.band { padding: 80px 0; border-top: 1px solid var(--border); position: relative; }
@media (min-width: 640px) { .band { padding: 96px 0; } }
.head { text-align: center; max-width: 760px; margin: 0 auto 48px; }
h2 { font-size: clamp(30px, 4.5vw, 36px); font-weight: 800; letter-spacing: -.8px; }
.head p, .lead-sm { color: var(--muted); font-size: 18px; margin-top: 14px; }
.kicker { display: inline-block; color: var(--red); font-weight: 800; font-size: 13px; letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 10px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 28px; }
.stat { text-align: center; background: var(--card); border: 1px solid var(--border); border-radius: 18px; padding: 18px; }
.stat b { display: block; font-size: 20px; color: var(--red); }
.stat span { color: var(--muted); font-size: 14px; }
.cards-3 { display: grid; gap: 20px; }
@media (min-width: 860px) { .cards-3 { grid-template-columns: repeat(3, 1fr); } }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.card h3 { font-size: 20px; margin: 14px 0 8px; }
.card p { color: var(--muted); margin: 0; }
.step-n { display: inline-flex; width: 40px; height: 40px; border-radius: 12px; align-items: center; justify-content: center; background: var(--red); color: #fff; font-weight: 800; }
.ico { width: 48px; height: 48px; border-radius: 14px; display: flex; align-items: center; justify-content: center; }
.ico svg { width: 24px; height: 24px; fill: currentColor; }
.ico.sm { width: 42px; height: 42px; flex: none; }
.ico.red { background: color-mix(in srgb, var(--red) 14%, transparent); color: var(--red); }
.ico.orange { background: color-mix(in srgb, var(--orange) 14%, transparent); color: var(--orange); }
.ico.purple { background: color-mix(in srgb, var(--purple) 14%, transparent); color: var(--purple); }
.ico.blue { background: color-mix(in srgb, var(--blue) 14%, transparent); color: var(--blue); }
.ico.green { background: color-mix(in srgb, var(--green) 14%, transparent); color: var(--green); }
.chips { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 28px; }
.chips.left { justify-content: flex-start; }
.chips span { background: var(--card); border: 1px solid var(--border); border-radius: 999px; padding: 8px 14px; font-weight: 600; font-size: 14px; }
.fineprint { color: var(--muted); font-size: 13px; text-align: center; max-width: 760px; margin: 24px auto 0; }

.split { display: grid; gap: 48px; align-items: center; }
@media (min-width: 960px) { .split { grid-template-columns: 1.15fr .85fr; } }
.list { display: grid; gap: 18px; margin-top: 28px; }
.li { display: flex; gap: 14px; }
.li h3 { font-size: 18px; margin-bottom: 4px; }
.li p { margin: 0; color: var(--muted); }

/* PRICING */
.plans { display: grid; gap: 20px; max-width: 880px; margin: 0 auto; }
@media (min-width: 760px) { .plans { grid-template-columns: 1fr 1fr; } }
.plan { position: relative; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow); }
.plan.pro { border: 2px solid var(--gold); }
.tag { position: absolute; top: -13px; left: 28px; background: var(--gold); color: #1d1300; font-weight: 800; font-size: 12px; letter-spacing: .8px; border-radius: 999px; padding: 5px 12px; }
.plan h3 { font-size: 22px; }
.plan-sub { color: var(--muted); margin: 6px 0 18px; }
.price { font-size: 44px; font-weight: 800; letter-spacing: -1px; }
.price span { font-size: 16px; font-weight: 600; color: var(--muted); margin-left: 6px; letter-spacing: 0; }
.btn { display: block; text-align: center; margin: 20px 0 22px; padding: 14px; border-radius: 14px; font-weight: 800; text-decoration: none; background: var(--red); color: #fff; letter-spacing: .3px; }
.btn.ghost { background: transparent; color: var(--text); border: 2px solid var(--border); }
.plan ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.plan li { padding-left: 28px; position: relative; }
.plan li::before { content: ""; position: absolute; left: 0; top: 4px; width: 18px; height: 18px; border-radius: 50%; background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='white' stroke-width='3' d='M6 12l4 4 8-8'/%3E%3C/svg%3E") center/12px no-repeat; }

/* FOUNDER */
.founder { display: flex; gap: 22px; align-items: flex-start; max-width: 860px; margin: 0 auto; background: var(--card); border: 1px solid var(--border); border-left: 6px solid var(--red); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow); }
.founder img { border-radius: 20px; flex: none; }
.founder h2 { font-size: 26px; }
.founder p { color: var(--muted); font-size: 17px; }
.placeholder { border: 2px dashed var(--gold); border-radius: 12px; padding: 12px; }
.sign { font-weight: 700; color: var(--text) !important; }
@media (max-width: 560px) { .founder { flex-direction: column; } }

/* FAQ */
.tabs { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 22px; }
.tab { border: 1px solid var(--border); background: var(--card); color: var(--text); border-radius: 999px; padding: 9px 18px; font: inherit; font-weight: 700; cursor: pointer; }
.tab.active { background: var(--red); border-color: var(--red); color: #fff; }
.faq { display: grid; gap: 10px; }
details { background: var(--card); border: 1px solid var(--border); border-radius: 18px; padding: 4px 20px; }
summary { cursor: pointer; font-weight: 700; padding: 14px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--red); font-size: 22px; line-height: 1; }
details[open] summary::after { content: "−"; }
details p { color: var(--muted); margin: 0 0 16px; }

/* INSTALL */
.store-row.center { margin: 26px 0 40px; }
.steps4 { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); text-align: left; }
.steps4 > div { background: var(--card); border: 1px solid var(--border); border-radius: 18px; padding: 20px; }
.steps4 b { display: inline-flex; width: 32px; height: 32px; border-radius: 10px; background: var(--red); color: #fff; align-items: center; justify-content: center; }
.steps4 h3 { font-size: 17px; margin: 12px 0 4px; }
.steps4 p { margin: 0; color: var(--muted); font-size: 14px; }

/* FOOTER */
.footer { border-top: 1px solid var(--border); background: var(--bg-2); padding: 56px 0 28px; }
.foot-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; }
.footer p { color: var(--muted); margin: 8px 0 0; }
.foot-links { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; }
.foot-links a { color: var(--muted); text-decoration: none; font-weight: 600; }
.foot-legal { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--border); font-size: 13px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
