/* ===========================
   Realtime Tracking - Site CSS
   Shares the Realtime Racing design language
   (dark theme, magenta primary, Rajdhani + Open Sans)
   =========================== */

/* Fonts are loaded via <link> in index.html (non-blocking, preconnected) */

:root {
  --primary: #ed2087;
  --primary-dark: #c01870;
  --dark: #0d0d0d;
  --dark-2: #1a1a1a;
  --dark-3: #252525;
  --mid: #333333;
  --light: #f0f0f0;
  --white: #ffffff;
  --accent: #f5a623;
  --track-green: #22c55e;   /* "LIVE" pill colour from the tracker app */
  --track-blue: #1a6bbf;
  --text-muted: #999;
  --card-bg: #1e1e1e;
  --border: rgba(255,255,255,0.08);
  --radius: 8px;
  --transition: 0.25s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Open Sans', sans-serif;
  background: var(--dark);
  color: var(--light);
  line-height: 1.65;
  font-size: 16px;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.5px;
}

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

.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }

/* ===== NAVIGATION ===== */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(13,13,13,0.97);
  border-bottom: 2px solid var(--primary);
  backdrop-filter: blur(8px);
}
.navbar .container { display: flex; align-items: center; justify-content: space-between; height: 68px; }

.nav-logo { display: flex; align-items: center; gap: 10px; }
.logo-mark {
  width: 38px; height: 38px; border-radius: 6px;
  background: var(--primary);
  display: grid; place-items: center;
}
.logo-mark svg { width: 24px; height: 24px; }
.logo-text { font-family: 'Rajdhani', sans-serif; font-weight: 700; font-size: 1.35rem; color: var(--white); letter-spacing: 0.5px; line-height: 1; }
.logo-text b { color: var(--primary); font-weight: inherit; }
.logo-tag { display: block; font-family: 'Open Sans', sans-serif; font-weight: 400; font-size: 0.62rem; color: var(--text-muted); letter-spacing: 0.3px; margin-top: 3px; }

.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; }
.nav-links a {
  color: var(--light); font-family: 'Rajdhani', sans-serif; font-weight: 600; font-size: 1rem;
  letter-spacing: 0.5px; padding: 8px 14px; border-radius: var(--radius); transition: all var(--transition);
}
.nav-links a:hover, .nav-links a.active { color: var(--primary); background: rgba(237,32,135,0.1); }
.nav-cta { background: var(--primary) !important; color: #fff !important; padding: 8px 18px !important; }
.nav-cta:hover { background: var(--primary-dark) !important; }

.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 6px; background: none; border: 0; }
.hamburger span { display: block; width: 24px; height: 2px; background: var(--light); border-radius: 2px; transition: all var(--transition); }

/* ===== HERO ===== */
.hero { position: relative; overflow: hidden; padding: 90px 0 70px; background: var(--dark-2); }
.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 75% 40%, rgba(237,32,135,0.14) 0%, transparent 55%),
    repeating-linear-gradient(-45deg, transparent, transparent 40px, rgba(255,255,255,0.015) 40px, rgba(255,255,255,0.015) 41px);
}
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }

.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.8rem; font-weight: 600; letter-spacing: 2px; text-transform: uppercase;
  color: var(--primary); margin-bottom: 16px;
}
.hero-eyebrow::before { content: ''; display: block; width: 28px; height: 2px; background: var(--primary); }
.hero h1 { font-size: clamp(2.4rem, 5vw, 3.8rem); color: var(--white); margin-bottom: 20px; }
.hero h1 span { color: var(--primary); }
.hero p.lead { font-size: 1.1rem; color: #b0b0b0; margin-bottom: 36px; max-width: 540px; line-height: 1.75; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 56px; }
.stat-num { font-family: 'Rajdhani', sans-serif; font-size: 2.1rem; font-weight: 700; color: var(--primary); line-height: 1; }
.stat-label { font-size: 0.78rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; margin-top: 4px; }

/* Browser-frame product shot */
.device {
  border-radius: 12px; overflow: hidden;
  background: #111; border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 30px 70px rgba(0,0,0,0.55), 0 0 0 1px rgba(237,32,135,0.15);
}
.device-bar { height: 30px; background: #222; display: flex; align-items: center; gap: 6px; padding: 0 12px; }
.device-bar i { width: 10px; height: 10px; border-radius: 50%; background: #444; display: block; }
.device-bar i:nth-child(1) { background: #ff5f57; } .device-bar i:nth-child(2) { background: #febc2e; } .device-bar i:nth-child(3) { background: #28c840; }
.device-bar .url { margin-left: 10px; flex: 1; height: 16px; border-radius: 4px; background: #2e2e2e; font-size: 0.65rem; color: #888; display: flex; align-items: center; padding: 0 8px; font-family: monospace; }
.device img { width: 100%; }
.hero-device { transform: rotate(-1.5deg); }
.hero-device-caption { margin-top: 18px; text-align: center; color: var(--text-muted); font-size: 0.9rem; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 13px 26px; border-radius: var(--radius);
  font-family: 'Rajdhani', sans-serif; font-weight: 700; font-size: 1rem; letter-spacing: 0.5px;
  cursor: pointer; border: none; transition: all var(--transition);
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(237,32,135,0.35); }
.btn-outline { background: transparent; color: var(--light); border: 2px solid rgba(255,255,255,0.25); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-lg { padding: 16px 32px; font-size: 1.1rem; }

/* ===== SECTIONS ===== */
section { padding: 90px 0; }
section.alt { background: var(--dark-2); }
.section-head { max-width: 680px; margin-bottom: 48px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.eyebrow { font-size: 0.8rem; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; color: var(--primary); margin-bottom: 10px; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); color: var(--white); margin-bottom: 14px; }
h2 span { color: var(--primary); }
.section-head p { color: #b0b0b0; font-size: 1.05rem; }

/* Brand strip */
.brand-strip { background: var(--dark); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 28px 0; text-align: center; color: #b0b0b0; font-size: 1rem; }
.brand-strip strong { color: var(--white); font-weight: 600; }

/* Cards */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.card {
  background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px 26px; transition: all var(--transition);
}
.card:hover { border-color: rgba(237,32,135,0.45); transform: translateY(-3px); }
.card .icon { width: 46px; height: 46px; border-radius: 10px; background: rgba(237,32,135,0.12); display: grid; place-items: center; margin-bottom: 18px; }
.card .icon svg { width: 24px; height: 24px; stroke: var(--primary); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { font-size: 1.3rem; color: var(--white); margin-bottom: 8px; }
.card p { color: #b0b0b0; font-size: 0.95rem; }
.card .tag { display: inline-block; font-size: 0.68rem; letter-spacing: 1px; text-transform: uppercase; color: var(--track-green); background: rgba(34,197,94,0.12); padding: 3px 8px; border-radius: 4px; margin-bottom: 12px; font-weight: 600; }

/* Showcase (screenshots) */
.showcase { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.showcase + .showcase { margin-top: 80px; }
.showcase.flip .showcase-text { order: 2; }
.showcase h3 { font-size: 1.8rem; color: var(--white); margin-bottom: 14px; }
.showcase p { color: #b0b0b0; margin-bottom: 18px; }
.showcase ul { list-style: none; display: grid; gap: 10px; }
.showcase li { display: flex; gap: 10px; align-items: flex-start; color: var(--light); font-size: 0.95rem; }
.showcase li::before { content: ''; flex: 0 0 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--primary); margin-top: 8px; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: step; }
.step { position: relative; background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 30px 24px 26px; }
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  font-family: 'Rajdhani', sans-serif; font-weight: 700; font-size: 2.6rem; line-height: 1;
  color: rgba(237,32,135,0.35); display: block; margin-bottom: 12px;
}
.step h3 { font-size: 1.2rem; color: var(--white); margin-bottom: 8px; }
.step p { color: #b0b0b0; font-size: 0.92rem; }

/* Live pill */
.pill-live {
  display: inline-flex; align-items: center; gap: 7px; background: var(--track-green); color: #fff;
  font-family: 'Rajdhani', sans-serif; font-weight: 700; font-size: 0.85rem; letter-spacing: 1px;
  padding: 4px 12px; border-radius: 999px;
}
.pill-live::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: pulse 1.4s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1);} 50% { opacity: 0.4; transform: scale(0.7);} }

/* Pricing */
.pricing { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; align-items: stretch; }
.price-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 34px 30px; display: flex; flex-direction: column; }
.price-card.featured { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary), 0 20px 50px rgba(237,32,135,0.12); }
.price-card h3 { font-size: 1.5rem; color: var(--white); }
.price-card .who { color: var(--text-muted); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 18px; }
.price-card .price { font-family: 'Rajdhani', sans-serif; font-size: 2.4rem; font-weight: 700; color: var(--primary); line-height: 1; }
.price-card .price small { font-size: 1rem; color: var(--text-muted); font-weight: 500; }
.price-card ul { list-style: none; margin: 22px 0 28px; display: grid; gap: 9px; flex: 1; }
.price-card li { display: flex; gap: 10px; font-size: 0.93rem; color: var(--light); }
.price-card li::before { content: '✓'; color: var(--track-green); font-weight: 700; }
.price-note { text-align: center; color: var(--text-muted); font-size: 0.85rem; margin-top: 22px; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 56px; align-items: start; }
.contact-info h3 { font-size: 1.3rem; color: var(--white); margin-bottom: 8px; }
.contact-info p { color: #b0b0b0; margin-bottom: 20px; }
.contact-list { list-style: none; display: grid; gap: 12px; }
.contact-list li { display: flex; gap: 12px; align-items: center; color: var(--light); }
.contact-list svg { width: 20px; height: 20px; stroke: var(--primary); fill: none; stroke-width: 2; }

form.quote { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; display: grid; gap: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
label { display: grid; gap: 6px; font-size: 0.85rem; color: #b0b0b0; font-weight: 600; }
input, select, textarea {
  width: 100%; background: var(--dark); border: 1px solid rgba(255,255,255,0.14); border-radius: 6px;
  color: var(--light); font-family: 'Open Sans', sans-serif; font-size: 0.95rem; padding: 11px 12px;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); }
textarea { min-height: 110px; resize: vertical; }
.form-note { font-size: 0.8rem; color: var(--text-muted); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-alert { border-radius: var(--radius); padding: 14px 18px; font-size: 0.9rem; }
.form-alert[hidden], form.quote[hidden] { display: none; }
.form-alert-error { background: rgba(255,99,71,0.1); border: 1px solid rgba(255,99,71,0.35); color: #ff6347; }
.form-alert-success { background: rgba(34,197,94,0.1); border: 1px solid rgba(34,197,94,0.35); text-align: center; padding: 36px 24px; }
.form-alert-success .tick { font-size: 2rem; color: var(--track-green); margin-bottom: 6px; }
.form-alert-success strong { display: block; font-family: 'Rajdhani', sans-serif; font-size: 1.3rem; color: var(--white); }
.form-alert-success p { color: var(--text-muted); margin-top: 4px; }

/* CTA band */
.cta-band { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); padding: 70px 0; text-align: center; }
.cta-band h2 { color: #fff; margin-bottom: 10px; }
.cta-band p { color: rgba(255,255,255,0.85); margin-bottom: 28px; font-size: 1.05rem; }
.cta-band .btn-outline { color: #fff; border-color: rgba(255,255,255,0.6); }
.cta-band .btn-outline:hover { background: #fff; color: var(--primary); border-color: #fff; }
.cta-band .btn-primary { background: #fff; color: var(--primary); }
.cta-band .btn-primary:hover { background: var(--dark); color: #fff; }

/* Footer */
footer { background: var(--dark); border-top: 1px solid var(--border); padding: 60px 0 30px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 36px; margin-bottom: 44px; }
.footer-grid h4 { color: var(--white); font-size: 1.05rem; margin-bottom: 14px; letter-spacing: 1px; text-transform: uppercase; }
.footer-grid ul { list-style: none; display: grid; gap: 8px; }
.footer-grid a { color: #b0b0b0; font-size: 0.92rem; }
.footer-grid a:hover { color: var(--primary); }
.footer-about p { color: #b0b0b0; font-size: 0.92rem; margin-top: 14px; max-width: 320px; }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 22px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; color: var(--text-muted); font-size: 0.82rem; }
.footer-bottom a { color: var(--text-muted); }

/* FAQ */
.faq { max-width: 760px; }
.faq details { border-bottom: 1px solid var(--border); padding: 6px 0; }
.faq summary { cursor: pointer; list-style: none; padding: 14px 32px 14px 0; position: relative; font-family: 'Rajdhani', sans-serif; font-weight: 700; font-size: 1.15rem; color: var(--white); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); color: var(--primary); font-size: 1.4rem; font-weight: 400; transition: transform var(--transition); }
.faq details[open] summary::after { content: '–'; }
.faq p { color: #b0b0b0; font-size: 0.95rem; padding: 0 0 16px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 960px) {
  .hero-grid, .showcase, .contact-grid { grid-template-columns: 1fr; }
  .showcase.flip .showcase-text { order: 0; }
  .hero-device { transform: none; }
  .grid-3, .pricing { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .hamburger { display: flex; }
  .nav-links {
    position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch;
    background: var(--dark-2); border-bottom: 2px solid var(--primary); padding: 10px 16px 18px; gap: 2px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { display: block; padding: 12px 14px; }
  .nav-cta { text-align: center; margin-top: 8px; }
  .hero { padding: 60px 0 50px; }
  .hero-stats { grid-template-columns: 1fr 1fr; }
  section { padding: 64px 0; }
  .grid-3, .grid-2, .pricing, .steps, .footer-grid, .form-row { grid-template-columns: 1fr; }
}
