/* ============================================
   Tracker365 - Modern SaaS Blue Theme
   Wide layout • Blue gradient • Glassmorphism
   ============================================ */

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #3b82f6;
  --secondary: #0ea5e9;
  --accent: #38bdf8;
  --bg: #f0f9ff;
  --bg-gradient: linear-gradient(180deg, #ffffff 0%, #f0f9ff 50%, #e0f2fe 100%);
  --bg-card: rgba(255, 255, 255, 0.85);
  --bg-glass: rgba(255, 255, 255, 0.82);
  --text: #0f172a;
  --text-muted: #475569;
  --border: rgba(59, 130, 246, 0.15);
  --shadow: 0 4px 24px rgba(37, 99, 235, 0.08);
  --shadow-hover: 0 12px 40px rgba(37, 99, 235, 0.18);
  --shadow-glow: 0 0 40px rgba(37, 99, 235, 0.25);
  --radius: 16px;
  --radius-sm: 12px;
  --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --gradient-btn: linear-gradient(135deg, #2563eb 0%, #0ea5e9 100%);
  --gradient-hero: linear-gradient(135deg, #2563eb 0%, #3b82f6 50%, #0ea5e9 100%);
  --gradient-card: linear-gradient(145deg, rgba(255,255,255,0.92) 0%, rgba(240,249,255,0.95) 100%);
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --container-max: 1520px;
  --container-padding: 2rem;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  background: var(--bg-gradient);
  min-height: 100vh;
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ----- Layout: wide container ----- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.container-narrow {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

/* ----- Floating background shapes ----- */
.bg-shapes {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.35;
  animation: float 22s ease-in-out infinite;
}

.shape-1 { width: 450px; height: 450px; background: linear-gradient(135deg, #93c5fd, #60a5fa); top: -120px; right: -100px; animation-delay: 0s; }
.shape-2 { width: 320px; height: 320px; background: linear-gradient(135deg, #bae6fd, #38bdf8); bottom: 25%; left: -100px; animation-delay: -6s; }
.shape-3 { width: 280px; height: 280px; background: linear-gradient(135deg, #7dd3fc, #0ea5e9); top: 55%; right: 5%; animation-delay: -12s; }
.shape-4 { width: 220px; height: 220px; background: linear-gradient(135deg, #e0f2fe, #bae6fd); bottom: -40px; right: 25%; animation-delay: -3s; }
.shape-5 { width: 380px; height: 380px; background: linear-gradient(135deg, #bfdbfe, #93c5fd); top: 35%; left: -120px; animation-delay: -8s; }
.shape-6 { width: 200px; height: 200px; background: linear-gradient(135deg, #cffafe, #a5f3fc); bottom: 35%; right: -50px; animation-delay: -14s; }

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(25px, -25px) scale(1.04); }
  66% { transform: translate(-15px, 20px) scale(0.96); }
}

/* ----- Navbar ----- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0.875rem 0;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

.navbar.scrolled {
  box-shadow: var(--shadow);
}

.nav-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 1.5rem;
  font-weight: 800;
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
  letter-spacing: -0.02em;
  transition: var(--transition);
}

.nav-logo:hover {
  opacity: 0.9;
  transform: scale(1.02);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-link {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.nav-link:hover {
  color: var(--primary);
  background: rgba(37, 99, 235, 0.06);
}

/* Dropdown */
.nav-item-dropdown {
  position: relative;
}

.nav-item-dropdown .nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-item-dropdown .nav-link::after {
  content: '';
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  margin-left: 2px;
  transition: transform var(--transition);
}

.nav-item-dropdown:hover .nav-link::after {
  transform: rotate(180deg);
}

.dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 240px;
  padding: 0.5rem 0;
  margin-top: 0.25rem;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hover);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
  z-index: 1001;
}

.nav-item-dropdown:hover .dropdown,
.nav-item-dropdown.focus-visible .dropdown,
.dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown a {
  display: block;
  padding: 0.6rem 1.25rem;
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
  border-left: 3px solid transparent;
}

.dropdown a:hover {
  background: rgba(37, 99, 235, 0.08);
  color: var(--primary);
  border-left-color: var(--primary);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ----- Buttons ----- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 1.75rem;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--gradient-btn);
  color: white;
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(37, 99, 235, 0.45);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--primary);
  border: 2px solid rgba(37, 99, 235, 0.4);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: rgba(37, 99, 235, 0.08);
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(37, 99, 235, 0.2);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}

.btn-ghost:hover {
  color: var(--primary);
  background: rgba(37, 99, 235, 0.06);
}

/* ----- Reveal animation ----- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ----- Hero ----- */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6rem var(--container-padding) 4rem;
  position: relative;
  text-align: center;
}

.hero-content {
  max-width: 900px;
}

.hero-title {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--text);
  margin-bottom: 1.25rem;
  letter-spacing: -0.03em;
}

.hero-title .gradient-text {
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

/* ----- Feature cards grid (home) ----- */
.feature-cards-section {
  padding: 4rem 0 5rem;
}

.section-title {
  font-size: 2rem;
  font-weight: 800;
  text-align: center;
  color: var(--text);
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 560px;
  margin: 0 auto 2.5rem;
}

.feature-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.feature-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.feature-card {
  background: var(--gradient-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  height: 100%;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(37, 99, 235, 0.25);
}

.feature-card-icon {
  font-size: 2.25rem;
  margin-bottom: 1rem;
  line-height: 1;
}

.feature-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ----- How It Works ----- */
.how-section {
  padding: 4rem 0 5rem;
  background: rgba(255,255,255,0.5);
}

.timeline {
  max-width: 720px;
  margin: 0 auto;
  position: relative;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 24px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--gradient-btn);
  border-radius: 3px;
  opacity: 0.6;
}

.timeline-item {
  display: flex;
  gap: 1.75rem;
  margin-bottom: 1.75rem;
  align-items: flex-start;
}

.timeline-item:last-child { margin-bottom: 0; }

.timeline-marker {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--gradient-btn);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.35);
  position: relative;
  z-index: 1;
  transition: var(--transition);
}

.timeline-item:hover .timeline-marker {
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(37, 99, 235, 0.45);
}

.timeline-content {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  flex: 1;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.timeline-content:hover {
  box-shadow: var(--shadow-hover);
}

.timeline-content h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.timeline-content p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ----- Contact ----- */
.contact-section {
  padding: 4rem 0 5rem;
}

.contact-box {
  max-width: 520px;
  margin: 0 auto;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  text-align: center;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.contact-box:hover {
  box-shadow: var(--shadow-hover);
}

.contact-text {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.contact-tech {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

/* ----- Footer ----- */
.footer {
  background: linear-gradient(180deg, #0f172a 0%, #020617 100%);
  color: #94a3b8;
  padding: 3rem 0 1.5rem;
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

.footer-logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: white;
  display: block;
  margin-bottom: 0.25rem;
}

.footer-brand p {
  font-size: 0.9rem;
  margin: 0;
}

.footer-built {
  color: var(--accent);
  margin-top: 0.25rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-links a {
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.95rem;
  transition: var(--transition);
}

.footer-links a:hover {
  color: white;
}

.footer-bottom {
  text-align: center;
}

.footer-bottom p {
  font-size: 0.85rem;
  margin: 0;
  color: #64748b;
}

/* ----- Feature page layout ----- */
.feature-page {
  padding-top: 5rem;
  padding-bottom: 4rem;
  min-height: 100vh;
}

.feature-page .container {
  max-width: var(--container-max);
}

.back-bar {
  margin-bottom: 2rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition);
}

.back-link:hover {
  color: var(--primary);
}

.feature-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.feature-page-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  color: var(--text);
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.feature-page-desc {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 2rem;
}

.feature-steps {
  list-style: none;
}

.feature-steps li {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.25rem;
  align-items: flex-start;
}

.feature-steps .step-num {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gradient-btn);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
}

.feature-steps .step-text {
  color: var(--text);
  font-size: 0.98rem;
  line-height: 1.6;
}

.highlight-box {
  background: rgba(37, 99, 235, 0.06);
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: var(--radius-sm);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}

.highlight-box p {
  margin: 0;
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ----- Image slider (feature pages) ----- */
.feature-gallery-wrap {
  position: sticky;
  top: 6rem;
}

.slider-container {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.slider-main {
  position: relative;
  aspect-ratio: 16/10;
  background: #f1f5f9;
  cursor: pointer;
}

.slider-main img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  padding: 0.5rem;
  transition: opacity 0.3s ease;
}

.slider-main img[data-placeholder="true"] {
  object-fit: contain;
  background: #e0f2fe;
}

.img-placeholder-fallback {
  min-height: 200px;
  background: #e0f2fe;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  font-size: 1rem;
  padding: 1rem;
  text-align: center;
  border: 2px dashed rgba(37, 99, 235, 0.3);
  border-radius: var(--radius-sm);
}

.slider-caption {
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  text-align: center;
  border-top: 1px solid var(--border);
}

.slider-thumbs {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem;
  overflow-x: auto;
  border-top: 1px solid var(--border);
}

.slider-thumb {
  flex-shrink: 0;
  width: 72px;
  height: 48px;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  opacity: 0.7;
  transition: var(--transition);
}

.slider-thumb:hover,
.slider-thumb.active {
  opacity: 1;
  border-color: var(--primary);
}

.slider-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slider-arrows {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  transition: var(--transition);
  z-index: 2;
}

.slider-arrows:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.slider-prev { left: 0.5rem; }
.slider-next { right: 0.5rem; }

/* ----- Modal (image zoom) ----- */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  padding: 2rem;
  animation: modalFadeIn 0.25s ease;
}

.modal.active {
  display: flex;
  flex-direction: column;
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  font-size: 2.25rem;
  color: white;
  cursor: pointer;
  line-height: 1;
  transition: var(--transition);
  z-index: 2001;
}

.modal-close:hover {
  color: var(--accent);
}

.modal-content {
  max-width: 92%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
  animation: modalZoomIn 0.3s ease;
}

@keyframes modalZoomIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.modal-caption {
  color: white;
  font-size: 1rem;
  font-weight: 600;
  margin-top: 1rem;
  text-align: center;
}

/* ----- Responsive ----- */
@media (max-width: 1200px) {
  :root {
    --container-padding: 1.5rem;
  }
}

@media (max-width: 992px) {
  .feature-two-col {
    grid-template-columns: 1fr;
  }

  .feature-gallery-wrap {
    position: static;
  }
}

@media (max-width: 768px) {
  :root {
    --container-padding: 1.25rem;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 1rem;
    gap: 0;
    border-bottom: 1px solid var(--border);
    transform: translateY(-150%);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    max-height: calc(100vh - 56px);
    overflow-y: auto;
  }

  .nav-menu.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-menu .nav-link {
    display: block;
    padding: 0.75rem 1rem;
  }

  .nav-item-dropdown .dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    max-height: 0;
    overflow: hidden;
    margin-top: 0;
    margin-left: 1rem;
    box-shadow: none;
    border: none;
    border-radius: 0;
    padding: 0;
    transition: max-height 0.3s ease;
  }

  .nav-item-dropdown.dropdown-open .dropdown {
    max-height: 400px;
    padding: 0.5rem 0;
  }

  .nav-item-dropdown .nav-link::after {
    transform: rotate(0deg);
  }

  .nav-item-dropdown.dropdown-open .nav-link::after {
    transform: rotate(180deg);
  }

  .hero {
    padding: 5rem 1.25rem 3rem;
  }

  .hero-title {
    font-size: 1.85rem;
  }

  .section-title {
    font-size: 1.65rem;
  }

  .feature-cards-grid {
    grid-template-columns: 1fr;
  }

  .timeline::before {
    left: 18px;
  }

  .timeline-marker {
    width: 36px;
    height: 36px;
    font-size: 0.9rem;
  }

  .timeline-item {
    gap: 1.25rem;
  }
}

@media (max-width: 480px) {
  .hero-buttons {
    flex-direction: column;
    width: 100%;
  }

  .hero-buttons .btn {
    width: 100%;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
  }

  .footer-links {
    justify-content: center;
  }
}
