/* ============================================================
   DriveTrain Landing Page — style.css
   ============================================================ */

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --bg:        #121212;
  --surface:   #1E1E1E;
  --surface-2: #2D2D2D;
  --primary:   #3498DB;
  --green:     #2ECC71;
  --text:      #E1E1E1;
  --muted:     #7F8C8D;

  --radius:    12px;
  --radius-lg: 20px;
  --gap:       1.5rem;
  --max-w:     1100px;
}

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a   { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Utility ────────────────────────────────────────────────── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--primary);
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: opacity 0.2s, transform 0.2s;
  border: none;
  cursor: pointer;
}
.btn-primary:hover { opacity: 0.88; transform: translateY(-1px); text-decoration: none; }

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--surface-2);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 9999px;
  padding: 0.45rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

/* ── Scroll-reveal ──────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ── Navbar ─────────────────────────────────────────────────── */
#navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0.85rem 0;
  transition: background 0.3s, backdrop-filter 0.3s, box-shadow 0.3s;
}
#navbar.scrolled {
  background: rgba(18,18,18,0.92);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.06);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
  text-decoration: none;
}
.nav-brand:hover { text-decoration: none; }

.nav-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
}
.nav-icon-placeholder {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.nav-badges {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.store-badge-sm {
  height: 32px;
  width: auto;
  transition: opacity 0.2s;
}
.store-badge-sm:hover { opacity: 0.8; }

/* ── Hero ───────────────────────────────────────────────────── */
#hero {
  padding: 5rem 0 4rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero-eyebrow {
  display: inline-block;
  background: rgba(52,152,219,0.15);
  color: var(--primary);
  border: 1px solid rgba(52,152,219,0.3);
  border-radius: 9999px;
  padding: 0.3rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.hero-title {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1.1rem;
  letter-spacing: -0.02em;
}

.hero-title .highlight {
  background: linear-gradient(135deg, var(--primary), #5dade2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 1.05rem;
  color: var(--muted);
  margin-bottom: 2rem;
  max-width: 480px;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.store-badge-lg {
  height: 48px;
  width: auto;
  transition: opacity 0.2s, transform 0.2s;
}
.store-badge-lg:hover { opacity: 0.85; transform: translateY(-2px); }

/* ── iPhone Frame ────────────────────────────────────────────── */
.phone-wrap {
  display: flex;
  justify-content: center;
}

.phone-frame {
  position: relative;
  width: 240px;
  aspect-ratio: 1179 / 2556;
  border: 3px solid rgba(255,255,255,0.15);
  border-radius: 38px;
  background: var(--surface);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.05),
    0 24px 60px rgba(0,0,0,0.6),
    inset 0 0 0 2px rgba(255,255,255,0.04);
  overflow: hidden;
  flex-shrink: 0;
}

/* Dynamic island notch */
.phone-frame::before {
  content: '';
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 70px;
  height: 18px;
  background: var(--bg);
  border-radius: 9999px;
  z-index: 2;
}

.phone-frame img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 35px;
}

.phone-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.8rem;
  text-align: center;
  padding: 1rem;
}
.phone-placeholder svg { opacity: 0.3; }

/* ── Stats Bar ───────────────────────────────────────────────── */
#stats {
  padding: 2.5rem 0;
  border-top: 1px solid rgba(255,255,255,0.06);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.stats-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.stat-pill {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 9999px;
  padding: 0.65rem 1.4rem;
  font-size: 0.95rem;
  font-weight: 600;
}
.stat-pill .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
}

/* ── Features ────────────────────────────────────────────────── */
#features {
  padding: 5rem 0;
}

.section-label {
  text-align: center;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.75rem;
}
.section-title {
  text-align: center;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 3rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--gap);
}

.feature-card {
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: border-color 0.25s, transform 0.25s;
}
.feature-card:hover {
  border-color: rgba(52,152,219,0.3);
  transform: translateY(-3px);
}

.feature-icon {
  width: 46px;
  height: 46px;
  border-radius: var(--radius);
  background: rgba(52,152,219,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 1rem;
}

.feature-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.45rem;
}
.feature-card p {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.55;
}

/* ── Screenshots Gallery ─────────────────────────────────────── */
#gallery {
  padding: 5rem 0;
  background: var(--surface);
}

.gallery-scroll {
  display: flex;
  justify-content: safe center;
  gap: 1.25rem;
  overflow-x: auto;
  padding: 1rem 1.25rem 1.5rem;
  scrollbar-width: thin;
  scrollbar-color: var(--surface-2) transparent;
  -webkit-overflow-scrolling: touch;
}
.gallery-scroll::-webkit-scrollbar { height: 4px; }
.gallery-scroll::-webkit-scrollbar-track { background: transparent; }
.gallery-scroll::-webkit-scrollbar-thumb { background: var(--surface-2); border-radius: 9999px; }

.gallery-frame {
  flex-shrink: 0;
  width: 300px;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 3px 20px rgba(0,0,0,0.35);
}
.gallery-frame img {
  width: 100%;
  height: auto;
  display: block;
}
.gallery-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.75rem;
  text-align: center;
  padding: 1rem;
  flex-direction: column;
  gap: 0.4rem;
}
.gallery-placeholder .num {
  font-size: 1.5rem;
  font-weight: 700;
  opacity: 0.2;
}

/* ── Premium Section ─────────────────────────────────────────── */
#premium {
  padding: 5rem 0;
}

.unlocks-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
  margin-bottom: 3.5rem;
}

.unlock-card {
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
}
.unlock-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}
.unlock-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}
.unlock-card p {
  font-size: 0.82rem;
  color: var(--muted);
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
}

.pricing-card {
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  text-align: center;
  position: relative;
  transition: border-color 0.25s, transform 0.25s;
}
.pricing-card:hover { border-color: rgba(52,152,219,0.35); transform: translateY(-3px); }

.pricing-card.featured {
  border-color: var(--primary);
  background: var(--surface-2);
}

.best-value {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  white-space: nowrap;
}

.pricing-period {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.pricing-price {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.25rem;
}
.pricing-sub {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.pricing-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.pricing-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 600;
  transition: opacity 0.2s;
}
.pricing-link:hover { opacity: 0.8; text-decoration: none; }
.pricing-link.ios  { background: rgba(255,255,255,0.07); color: var(--text); border: 1px solid rgba(255,255,255,0.12); }
.pricing-link.android { background: rgba(52,152,219,0.15); color: var(--primary); border: 1px solid rgba(52,152,219,0.25); }

/* ── Final CTA ───────────────────────────────────────────────── */
#cta {
  padding: 5rem 0;
  background: var(--surface);
  text-align: center;
}

#cta h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}
#cta p {
  color: var(--muted);
  font-size: 1rem;
  margin-bottom: 2.5rem;
}
.cta-badges {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
}

/* ── Footer ──────────────────────────────────────────────────── */
footer {
  padding: 2rem 0;
  border-top: 1px solid rgba(255,255,255,0.06);
  text-align: center;
  font-size: 0.82rem;
  color: var(--muted);
}
footer a { color: var(--muted); }
footer a:hover { color: var(--text); }
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 1.5rem;
}
.footer-sep { opacity: 0.3; }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 768px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-sub { margin-left: auto; margin-right: auto; }
  .hero-badges { justify-content: center; }
  .phone-wrap { order: -1; }

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

  .nav-badges .store-badge-sm:first-of-type { display: none; } /* hide one badge on small screens */

  #hero    { padding: 3rem 0 2.5rem; }
  #features, #premium, #gallery, #cta { padding: 3.5rem 0; }
}
