/* ==========================================================================
   SafeDrive — website styles
   Dark, speedometer-inspired palette. Mobile-first, no frameworks.
   ========================================================================== */

:root {
  --bg: #0a0e1a;
  --bg-soft: #10162a;
  --card: rgba(255, 255, 255, 0.04);
  --card-border: rgba(255, 255, 255, 0.09);
  --text: #eef1f8;
  --text-dim: #9aa3b8;
  --accent: #ffb340;
  --accent-2: #ff7a2f;
  --accent-soft: rgba(255, 179, 64, 0.14);
  --green: #34d399;
  --radius: 20px;
  --maxw: 1080px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI",
    Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Ambient background glows */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(255, 122, 47, 0.16), transparent 60%),
    radial-gradient(800px 500px at 0% 30%, rgba(52, 211, 153, 0.07), transparent 60%),
    radial-gradient(700px 700px at 50% 120%, rgba(255, 179, 64, 0.08), transparent 60%);
  pointer-events: none;
}

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

/* ---------- Nav ---------- */
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.01em;
}

.brand img {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 999px;
  transition: color 0.2s, background 0.2s;
}

.nav-links a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.nav-cta {
  background: linear-gradient(135deg, var(--accent), var(--accent-2)) !important;
  color: #1a1206 !important;
  font-weight: 700 !important;
}

.nav-cta:hover {
  filter: brightness(1.08);
  background: linear-gradient(135deg, var(--accent), var(--accent-2)) !important;
}

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
  padding: 72px 0 64px;
}

.hero-copy .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(255, 179, 64, 0.25);
  padding: 7px 16px;
  border-radius: 999px;
  margin-bottom: 22px;
}

.hero h1 {
  font-size: clamp(2.4rem, 5.4vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin-bottom: 18px;
}

.hero h1 .grad {
  background: linear-gradient(120deg, var(--accent) 10%, var(--accent-2) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p.lede {
  color: var(--text-dim);
  font-size: 1.13rem;
  max-width: 46ch;
  margin-bottom: 30px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  margin-bottom: 36px;
}

.store-badge {
  display: inline-block;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.store-badge:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

.store-badge svg {
  height: 56px;
  width: auto;
  display: block;
}

.hero-stats {
  display: flex;
  gap: 34px;
  flex-wrap: wrap;
}

.hero-stats .stat b {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.hero-stats .stat span {
  color: var(--text-dim);
  font-size: 0.85rem;
}

/* Hero phone mockups */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  min-height: 420px;
}

.phone {
  position: relative;
  background: #000;
  border-radius: 42px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    0 40px 80px rgba(0, 0, 0, 0.55),
    0 0 0 9px rgba(255, 255, 255, 0.035);
  overflow: hidden;
  width: 252px;
}

.phone img {
  display: block;
  width: 100%;
  height: auto;
}

.phone .notch {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 118px;
  height: 26px;
  background: #000;
  border-radius: 14px;
  z-index: 2;
}

.phone.front {
  z-index: 2;
  margin-right: -54px;
  transform: rotate(-3deg);
}

.phone.back {
  z-index: 1;
  opacity: 0.82;
  transform: rotate(4deg) translateY(26px);
  margin-left: -54px;
}

.glow-orb {
  position: absolute;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 179, 64, 0.22), transparent 65%);
  filter: blur(10px);
  z-index: 0;
}

/* ---------- Sections ---------- */
section {
  padding: 84px 0;
}

.sec-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 54px;
}

.sec-head h2 {
  font-size: clamp(1.8rem, 3.6vw, 2.5rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 14px;
}

.sec-head p {
  color: var(--text-dim);
  font-size: 1.05rem;
}

/* ---------- Features ---------- */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 28px 26px;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.feature:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 179, 64, 0.35);
  background: rgba(255, 255, 255, 0.055);
}

.feature .icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  border: 1px solid rgba(255, 179, 64, 0.25);
  margin-bottom: 18px;
}

.feature .icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--accent);
}

.feature h3 {
  font-size: 1.12rem;
  margin-bottom: 8px;
}

.feature p {
  color: var(--text-dim);
  font-size: 0.94rem;
}

/* ---------- Screenshots ---------- */
.shots {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.shots figure {
  position: relative;
  border-radius: 26px;
  overflow: hidden;
  border: 1px solid var(--card-border);
  background: #000;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.shots figure:hover {
  transform: translateY(-6px) scale(1.015);
  box-shadow: 0 34px 64px rgba(0, 0, 0, 0.6);
}

.shots img {
  display: block;
  width: 100%;
  height: auto;
}

/* ---------- Privacy / support bands ---------- */
.band {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.band .card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 38px 34px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.band .card h3 {
  font-size: 1.35rem;
}

.band .card p {
  color: var(--text-dim);
  font-size: 0.98rem;
  flex: 1;
}

.band .card .shield {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.3);
  margin-bottom: 6px;
}

.band .card .shield svg {
  width: 23px;
  height: 23px;
  stroke: var(--green);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font);
  font-size: 0.98rem;
  font-weight: 700;
  text-decoration: none;
  color: #1a1206;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  padding: 13px 24px;
  border-radius: 14px;
  border: none;
  cursor: pointer;
  transition: filter 0.2s, transform 0.2s;
}

.btn:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.btn.ghost {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  border: 1px solid var(--card-border);
}

.btn.ghost:hover {
  background: rgba(255, 255, 255, 0.12);
}

.btn svg {
  width: 18px;
  height: 18px;
}

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding: 44px 0 52px;
  margin-top: 40px;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  flex-wrap: wrap;
}

.footer-brand p {
  color: var(--text-dim);
  font-size: 0.9rem;
  max-width: 34ch;
  margin-top: 10px;
}

.footer-links {
  display: flex;
  gap: 54px;
  flex-wrap: wrap;
}

.footer-links h4 {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-bottom: 12px;
}

.footer-links a {
  display: block;
  color: var(--text);
  text-decoration: none;
  font-size: 0.94rem;
  padding: 4px 0;
  opacity: 0.85;
  transition: opacity 0.2s;
}

.footer-links a:hover {
  opacity: 1;
}

.copyright {
  margin-top: 36px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-dim);
  font-size: 0.83rem;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

/* ---------- Sub pages (privacy / support) ---------- */
.page-head {
  padding: 64px 0 30px;
  text-align: center;
}

.page-head h1 {
  font-size: clamp(2rem, 4.4vw, 2.9rem);
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.page-head p {
  color: var(--text-dim);
  font-size: 1.05rem;
}

.prose {
  max-width: 760px;
  margin: 0 auto;
  padding-bottom: 60px;
}

.prose .block {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 30px 32px;
  margin-bottom: 20px;
}

.prose h2 {
  font-size: 1.28rem;
  margin-bottom: 10px;
}

.prose p,
.prose li {
  color: var(--text-dim);
  font-size: 0.97rem;
}

.prose p + p {
  margin-top: 10px;
}

.prose ul {
  padding-left: 22px;
  margin-top: 8px;
  display: grid;
  gap: 6px;
}

.prose .updated {
  color: var(--text-dim);
  font-size: 0.85rem;
  text-align: center;
  margin-top: 26px;
}

.support-panel {
  max-width: 640px;
  margin: 0 auto 60px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 46px 40px;
  text-align: center;
}

.support-panel h2 {
  font-size: 1.6rem;
  margin-bottom: 10px;
}

.support-panel p {
  color: var(--text-dim);
  margin-bottom: 26px;
}

.support-panel .btn {
  font-size: 1.05rem;
  padding: 16px 30px;
}

.support-faq {
  max-width: 760px;
  margin: 0 auto 70px;
}

.support-faq details {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 20px 24px;
  margin-bottom: 14px;
  cursor: pointer;
}

.support-faq summary {
  font-weight: 650;
  font-size: 1.02rem;
  list-style: none;
  position: relative;
  padding-right: 28px;
}

.support-faq summary::-webkit-details-marker {
  display: none;
}

.support-faq summary::after {
  content: "+";
  position: absolute;
  right: 2px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--accent);
  font-size: 1.4rem;
  font-weight: 600;
}

.support-faq details[open] summary::after {
  content: "–";
}

.support-faq details p {
  color: var(--text-dim);
  font-size: 0.95rem;
  margin-top: 12px;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    padding: 44px 0 40px;
    text-align: center;
  }

  .hero p.lede {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions,
  .hero-stats {
    justify-content: center;
  }

  .hero-visual {
    min-height: 360px;
  }

  .features {
    grid-template-columns: 1fr 1fr;
  }

  .shots {
    grid-template-columns: 1fr 1fr;
  }

  .band {
    grid-template-columns: 1fr;
  }

  .nav-links a:not(.nav-cta) {
    display: none;
  }
}

@media (max-width: 560px) {
  .features,
  .shots {
    grid-template-columns: 1fr;
  }

  .phone {
    width: 208px;
    border-radius: 34px;
  }

  .hero-visual {
    min-height: 320px;
  }

  .footer-grid {
    flex-direction: column;
  }
}
