/* ═══════════════════════════════════════════════
   Canadian Tracking Solutions — Shared Stylesheet
   Light Theme
   ═══════════════════════════════════════════════ */

/* ─── Tokens ─────────────────────────────────── */
:root {
  --red:        #D72638;
  --red-dark:   #A81C28;
  --red-glow:   rgba(215,38,56,.22);
  --red-soft:   rgba(215,38,56,.08);
  --red-mid:    rgba(215,38,56,.14);

  --bg:         #FFFFFF;
  --bg-soft:    #F7F7F8;
  --bg-soft2:   #F0F0F2;
  --surface:    #FFFFFF;
  --surface-2:  #F7F7F8;

  --border:     rgba(0,0,0,.08);
  --border-mid: rgba(0,0,0,.12);

  --text:       #0D0D0D;
  --text-2:     #3A3A3A;
  --muted:      #6B6B6B;
  --subtle:     #9A9A9A;

  --dark-bg:    #0D0D0D;
  --dark-surf:  #161616;

  --radius:     12px;
  --nav-h:      134px;
  --max-w:      1160px;
  --transition: .22s ease;

  --shadow-sm:  0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
  --shadow-md:  0 4px 16px rgba(0,0,0,.08), 0 2px 6px rgba(0,0,0,.05);
  --shadow-lg:  0 16px 48px rgba(0,0,0,.1), 0 4px 16px rgba(0,0,0,.06);
  --shadow-red: 0 8px 28px rgba(215,38,56,.22);
}

/* ─── Reset ──────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}
a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }
button { cursor: pointer; border: none; background: none; font-family: inherit; font-size: inherit; }
ul, ol { list-style: none; }

/* ─── Utilities ──────────────────────────────── */
.container { width: 100%; max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.text-red   { color: var(--red); }
.text-muted { color: var(--muted); }

/* ─── Scroll reveal ──────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.d1 { transition-delay: .08s; }
.d2 { transition-delay: .16s; }
.d3 { transition-delay: .24s; }
.d4 { transition-delay: .32s; }
.d5 { transition-delay: .40s; }
.d6 { transition-delay: .48s; }

/* ─── Buttons ────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px; border-radius: 10px;
  font-weight: 700; font-size: .9rem;
  transition: background var(--transition), transform .15s, box-shadow var(--transition), border-color var(--transition), color var(--transition);
  white-space: nowrap; line-height: 1;
}
.btn-primary {
  background: var(--red); color: #fff;
}
.btn-primary:hover {
  background: var(--red-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-red);
}
.btn-outline {
  background: transparent; color: var(--text);
  border: 1.5px solid var(--border-mid);
}
.btn-outline:hover {
  border-color: rgba(0,0,0,.28);
  background: var(--bg-soft);
}
.btn-outline-red {
  background: transparent; color: var(--red);
  border: 1.5px solid rgba(215,38,56,.3);
}
.btn-outline-red:hover {
  background: var(--red-soft);
  border-color: var(--red);
}
.btn-lg { padding: 14px 30px; font-size: .95rem; border-radius: 12px; }
.btn svg { flex-shrink: 0; }

/* ─── Section shared ─────────────────────────── */
section { padding: 96px 0; }
.section-label {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: .7rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--red);
  margin-bottom: 12px;
}
.section-title {
  font-size: clamp(1.9rem, 4vw, 2.75rem);
  font-weight: 900; line-height: 1.1;
  letter-spacing: -.03em; color: var(--text);
}
.section-sub {
  font-size: 1.05rem; color: var(--muted); line-height: 1.75;
  max-width: 560px; margin-top: 14px;
}
.section-head { margin-bottom: 56px; }
.center { text-align: center; }
.center .section-sub { margin: 14px auto 0; }
.center .section-label { justify-content: center; }

/* ─── Divider ────────────────────────────────── */
.divider { height: 1px; background: var(--border); }

/* ─── Red accent bar under nav ──────────────── */
#nav::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--red), #ff6b7a, var(--red));
}

/* ════════════════════════════════════════════════
   NAVIGATION
   ════════════════════════════════════════════════ */
#nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  height: var(--nav-h);
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow .3s;
}
#nav.scrolled {
  box-shadow: 0 2px 20px rgba(0,0,0,.08);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--nav-h); max-width: var(--max-w);
  margin: 0 auto; padding: 0 24px;
  gap: 24px;
}
.nav-logo {
  display: flex; align-items: center;
  flex-shrink: 0; line-height: 1;
}
.nav-logo img {
  height: 122px; width: auto;
  display: block;
  object-fit: contain;
}
/* Fallback mark shown only if logo.png is missing */
.nav-logo-mark {
  width: 38px; height: 38px; border-radius: 9px;
  background: var(--red); display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.nav-logo-mark svg { width: 20px; height: 20px; }
.nav-links {
  display: flex; align-items: center; gap: 2px; flex: 1;
}
.nav-links a {
  padding: 9px 14px; border-radius: 8px;
  font-size: 1rem; font-weight: 600; color: var(--muted);
  transition: color var(--transition), background var(--transition);
}
.nav-links a:hover, .nav-links a.active {
  color: var(--text); background: var(--bg-soft);
}
.nav-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.nav-phone {
  font-size: 1.35rem; font-weight: 800; color: var(--text);
  transition: color var(--transition);
}
.nav-phone:hover { color: var(--red); }
.btn-login {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 18px; border-radius: 8px;
  font-weight: 600; font-size: .82rem;
  background: var(--bg-soft); color: var(--text);
  border: 1.5px solid var(--border-mid);
  transition: background var(--transition), border-color var(--transition);
  white-space: nowrap;
}
.btn-login:hover {
  background: var(--bg-soft2);
  border-color: rgba(0,0,0,.2);
}
.btn-login svg { width: 14px; height: 14px; flex-shrink: 0; }

/* Hamburger */
.hamburger {
  display: none; flex-direction: column; gap: 5px;
  padding: 8px; border-radius: 6px; cursor: pointer;
}
.hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--text); border-radius: 2px;
  transition: transform .3s, opacity .3s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu */
.mobile-nav {
  display: none;
  position: fixed; top: var(--nav-h); left: 0; right: 0;
  max-height: calc(100vh - var(--nav-h));
  overflow-y: auto;
  background: rgba(255,255,255,.99);
  -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
  padding: 14px 18px calc(20px + env(safe-area-inset-bottom));
  flex-direction: column; gap: 4px;
  border-bottom: 1px solid var(--border);
  z-index: 199;
  box-shadow: 0 12px 32px rgba(0,0,0,.12);
  animation: mobileNavDrop .22s ease both;
}
@keyframes mobileNavDrop { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.mobile-nav.open { display: flex; }
.mobile-nav a {
  display: flex; align-items: center;
  padding: 15px 14px; border-radius: 10px;
  font-size: 1.02rem; font-weight: 600; color: var(--text-2);
  transition: background var(--transition), color var(--transition);
}
.mobile-nav a:active { background: var(--bg-soft2); }
.mobile-nav a:hover { background: var(--bg-soft); color: var(--text); }
.mobile-nav a.active { color: var(--red); background: var(--red-soft); }
.mobile-nav hr { border: none; border-top: 1px solid var(--border); margin: 8px 2px; }
.mobile-nav .m-cta {
  margin-top: 8px; background: var(--red); color: #fff;
  padding: 15px 16px; border-radius: 10px; font-weight: 700;
  justify-content: center; font-size: 1rem;
}
.mobile-nav .m-cta:hover, .mobile-nav .m-cta:active { background: var(--red-dark); color: #fff; }
.mobile-nav .m-phone { font-weight: 700; color: var(--text); }

/* ════════════════════════════════════════════════
   PAGE HERO (inner pages)
   ════════════════════════════════════════════════ */
.page-hero {
  padding-top: calc(var(--nav-h) + 64px);
  padding-bottom: 72px;
  background: var(--bg-soft);
  border-bottom: 3px solid var(--red);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute; inset: 0; z-index: 0;
  background: radial-gradient(ellipse 70% 90% at 50% 0%, rgba(215,38,56,.1) 0%, transparent 70%);
}
.page-hero .container { position: relative; z-index: 1; }
.page-hero .section-title { max-width: 700px; margin: 12px auto 0; }
.page-hero .section-sub { margin: 16px auto 0; }
.breadcrumb {
  display: flex; align-items: center; justify-content: center;
  gap: 8px; font-size: .78rem; color: var(--subtle); margin-bottom: 16px;
}
.breadcrumb a { color: var(--subtle); transition: color var(--transition); }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb span { color: var(--bg-soft2); }

/* ════════════════════════════════════════════════
   FOOTER  (stays dark for contrast)
   ════════════════════════════════════════════════ */
footer {
  position: relative;
  background: linear-gradient(180deg, #141416 0%, #0D0D0D 55%, #080808 100%);
  padding: 64px 0 32px;
  border-top: 1px solid rgba(255,255,255,.06);
  overflow: hidden;
}
/* Red accent line across the very top of the footer */
footer::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--red), transparent);
}
/* Soft red glow in the top-right corner for depth */
footer::after {
  content: '';
  position: absolute; top: -180px; right: -120px;
  width: 560px; height: 460px; pointer-events: none;
  background: radial-gradient(circle, rgba(215,38,56,.14) 0%, transparent 70%);
}
footer .container { position: relative; z-index: 1; }
.footer-grid {
  display: grid; grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 48px; padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  margin-bottom: 28px;
}
.footer-logo { color: #fff; }
/* Footer brand logo — white chip so the dark-text logo stays visible on the dark footer */
.footer-logo-link {
  display: inline-block; background: #fff;
  padding: 10px 16px; border-radius: 10px; line-height: 0;
}
.footer-logo-link img { height: 76px; width: auto; display: block; }
.footer-brand-desc {
  font-size: .875rem; color: #888; line-height: 1.75;
  margin: 14px 0 22px;
}
.footer-phone {
  display: flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: .95rem; color: #fff;
  margin-bottom: 20px;
}
.footer-phone svg { color: var(--red); flex-shrink: 0; }
.footer-socials { display: flex; gap: 8px; }
.social-link {
  width: 36px; height: 36px; border-radius: 8px;
  background: rgba(255,255,255,.07); display: flex; align-items: center; justify-content: center;
  transition: background var(--transition);
}
.social-link:hover { background: var(--red-soft); }
.social-link svg { width: 16px; height: 16px; color: #888; }
.footer-col-head {
  font-size: .72rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: #fff;
  margin-bottom: 16px;
}
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a {
  font-size: .875rem; color: #888;
  transition: color var(--transition);
}
.footer-links a:hover { color: #fff; }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px;
}
.footer-copy { font-size: .78rem; color: #555; }
.footer-badges { display: flex; gap: 8px; flex-wrap: wrap; }
.badge {
  font-size: .68rem; font-weight: 600; letter-spacing: .04em;
  padding: 4px 10px; border-radius: 6px;
  background: rgba(255,255,255,.06); color: #777;
  border: 1px solid rgba(255,255,255,.1);
}

/* ─── Responsive ─────────────────────────────── */
/* Switch to mobile nav (hamburger) and shrink the bar together so tablets
   don't get a giant header. */
/* Below ~1100px the full nav (logo + 5 links + phone + buttons) gets tight,
   so switch to the hamburger early and keep it clean. */
@media (max-width: 1100px) {
  :root { --nav-h: 74px; }
  .nav-logo img { height: 56px; }
  .nav-links, .nav-phone { display: none; }
  /* Login + Book a Demo live in the mobile menu — hide the nav buttons so only the hamburger shows */
  .nav-actions .btn-login, .nav-actions .btn-primary { display: none; }
  .hamburger { display: flex; }
}
@media (max-width: 768px) {
  section { padding: 64px 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .container { padding: 0 18px; }
}
