/*
 * Tag N Trak It — Landing Page Redesign 2025
 * Professional, modern, high-tech enterprise design
 * RFID & Asset Tracking themed with animated backgrounds
 */

/* ── CSS Variables ─────────────────────────────────────── */
:root {
  --tn-primary: #008aff;
  --tn-primary-dark: #0066cc;
  --tn-primary-light: #4da8ff;
  --tn-secondary: #00c8ff;
  --tn-accent: #64dcb4;
  --tn-dark: #0a0e27;
  --tn-dark-light: #12183a;
  --tn-navy: #171347;
  --tn-text: #2d3748;
  --tn-text-light: #718096;
  --tn-white: #ffffff;
  --tn-glass-bg: rgba(255, 255, 255, 0.08);
  --tn-glass-border: rgba(255, 255, 255, 0.15);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.15);
  --shadow-glow: 0 0 40px rgba(0, 138, 255, 0.15);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* ── Global Overrides ─────────────────────────────────── */
body.landing-page .container {
  max-width: 90%;
  width: 90%;
}

@media (min-width: 1920px) {
  body.landing-page .container {
    max-width: 1680px;
    width: 85%;
  }
}

@media (max-width: 768px) {
  body.landing-page .container {
    max-width: 95%;
    width: 95%;
    padding-left: 12px;
    padding-right: 12px;
  }
}

/* ── Hero Section ─────────────────────────────────────── */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(135deg, var(--tn-dark) 0%, var(--tn-navy) 50%, var(--tn-dark-light) 100%);
}

.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 20%, rgba(0, 138, 255, 0.12) 0%, transparent 50%),
              radial-gradient(ellipse at 70% 80%, rgba(0, 200, 255, 0.08) 0%, transparent 50%);
  z-index: 1;
}

.hero-section::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23008aff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  z-index: 1;
  opacity: 0.5;
}

#hero-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
}

.hero-section .container {
  position: relative;
  z-index: 10;
}

.hero-section .row {
  align-items: center;
}

.hero-content {
  padding: 4rem 2rem;
}

.hero-section h1 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  color: #ffffff !important;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.hero-section h1 .text-primary {
  background: linear-gradient(135deg, var(--tn-primary-light) 0%, var(--tn-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

.hero-section .lead {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.7;
  margin-bottom: 2.5rem;
  max-width: 540px;
}

.hero-section .btn {
  padding: 0.875rem 2rem;
  font-weight: 600;
  font-size: 1rem;
  border-radius: 50px;
  transition: all var(--transition-base);
  text-transform: none;
  letter-spacing: 0.01em;
}

.hero-section .btn-primary {
  background: linear-gradient(135deg, var(--tn-primary) 0%, var(--tn-primary-dark) 100%);
  border: none;
  box-shadow: 0 4px 20px rgba(0, 138, 255, 0.3);
}

.hero-section .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 138, 255, 0.4);
}

.hero-section .btn-outline-primary {
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: var(--tn-white);
  background: transparent;
}

.hero-section .btn-outline-primary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
}

.hero-img-wrapper {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.hero-img-wrapper::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  padding: 2px;
  background: linear-gradient(135deg, var(--tn-primary), var(--tn-secondary));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.hero-img {
  border-radius: var(--radius-lg);
  width: 100%;
  height: auto;
  object-fit: cover;
}

/* Typed cursor styling */
.hero-section .typed-cursor {
  color: var(--tn-secondary) !important;
  font-weight: 300;
}

/* ── Scroll Down Indicator ────────────────────────────── */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  animation: bounce 2s infinite;
}

.scroll-indicator .mouse {
  width: 24px;
  height: 38px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  position: relative;
}

.scroll-indicator .mouse::before {
  content: '';
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 8px;
  background: var(--tn-primary);
  border-radius: 2px;
  animation: scrollWheel 2s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
  40% { transform: translateX(-50%) translateY(-10px); }
  60% { transform: translateX(-50%) translateY(-5px); }
}

@keyframes scrollWheel {
  0% { opacity: 1; transform: translateX(-50%) translateY(0); }
  100% { opacity: 0; transform: translateX(-50%) translateY(12px); }
}

/* ── Services Section ─────────────────────────────────── */
#services {
  padding: 6rem 0;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
  position: relative;
}

#services::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 138, 255, 0.2), transparent);
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-header h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  color: var(--tn-dark);
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.section-header .lead {
  font-size: 1.2rem;
  color: var(--tn-text-light);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

.section-label {
  display: inline-block;
  padding: 0.375rem 1rem;
  background: linear-gradient(135deg, rgba(0, 138, 255, 0.1), rgba(0, 200, 255, 0.1));
  color: var(--tn-primary);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  border-radius: 50px;
  margin-bottom: 1rem;
}

.service-card {
  background: var(--tn-white);
  border: 1px solid rgba(0, 138, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 2.5rem 1.75rem;
  height: 100%;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

/* On XL desktop, cards in a 4-col grid should fill ~80% of their column */
@media (min-width: 1200px) {
  .service-card {
    padding: 2.5rem 2rem;
  }
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--tn-primary), var(--tn-secondary));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-slow);
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  border-color: rgba(0, 138, 255, 0.15);
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-card .service-img {
  height: 100px;
  object-fit: contain;
  margin-bottom: 1.5rem;
  transition: transform var(--transition-base);
}

.service-card:hover .service-img {
  transform: scale(1.05);
}

.service-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--tn-dark);
  margin-bottom: 0.75rem;
}

.service-card p {
  color: var(--tn-text-light);
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

.service-card .service-link {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--tn-primary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: gap var(--transition-fast);
}

.service-card .service-link:hover {
  gap: 0.5rem;
  text-decoration: none;
}

/* ── Stats Bar ────────────────────────────────────────── */
.stats-bar {
  background: linear-gradient(135deg, var(--tn-dark) 0%, var(--tn-navy) 50%, var(--tn-dark-light) 100%);
  padding: 5rem 0;
  position: relative;
  overflow: hidden;
}

.stats-bar::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 50%, rgba(0, 138, 255, 0.08) 0%, transparent 50%),
              radial-gradient(circle at 80% 50%, rgba(0, 200, 255, 0.06) 0%, transparent 50%);
}

.stats-bar .container {
  position: relative;
  z-index: 2;
}

.stat-item {
  text-align: center;
  padding: 1rem;
}

.stat-number {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(135deg, var(--tn-white) 0%, var(--tn-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 600;
}

.stat-divider {
  width: 40px;
  height: 2px;
  background: linear-gradient(90deg, var(--tn-primary), var(--tn-secondary));
  margin: 1rem auto;
  border-radius: 1px;
}

/* ── Why Us Section ───────────────────────────────────── */
.why-us-section {
  padding: 6rem 0;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.why-us-section h2 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  color: var(--tn-dark);
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.why-us-section .lead {
  font-size: 1.15rem;
  color: var(--tn-text-light);
  line-height: 1.8;
  margin-bottom: 2rem;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  padding: 1.25rem;
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
}

.feature-item:hover {
  background: rgba(0, 138, 255, 0.03);
  transform: translateX(4px);
}

.feature-icon {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--tn-white);
}

/* Force Font Awesome icons to pure white inside feature icons */
.feature-icon i,
.feature-icon svg {
  color: #ffffff !important;
  fill: #ffffff !important;
}

.feature-icon.icon-primary {
  background: linear-gradient(135deg, var(--tn-primary), var(--tn-primary-dark));
  box-shadow: 0 4px 15px rgba(0, 138, 255, 0.3);
}

.feature-icon.icon-warning {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.feature-icon.icon-success {
  background: linear-gradient(135deg, #10b981, #059669);
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.feature-icon.icon-info {
  background: linear-gradient(135deg, #06b6d4, #0891b2);
  box-shadow: 0 4px 15px rgba(6, 182, 212, 0.3);
}

.feature-item strong {
  font-size: 1.1rem;
  color: var(--tn-dark);
  display: block;
  margin-bottom: 0.25rem;
}

.feature-item p {
  color: var(--tn-text-light);
  line-height: 1.6;
  margin: 0;
}

.why-us-img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

/* ── Footer ───────────────────────────────────────────── */
/* Top gradient border replaces the light SVG shape divider */
.footer-top-border {
  height: 3px;
  background: linear-gradient(90deg, var(--tn-primary), var(--tn-secondary), var(--tn-accent), var(--tn-primary));
  background-size: 300% 100%;
  animation: footerBorderShimmer 4s ease infinite;
}

@keyframes footerBorderShimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Landing page and service page footer overrides */
body.landing-page #footer-main .footer,
body.service-page #footer-main .footer,
body.dashboard-page #footer-main .footer,
body.finance-page #footer-main .footer {
  background: linear-gradient(135deg, var(--tn-dark) 0%, var(--tn-navy) 50%, var(--tn-dark-light) 100%) !important;
  position: relative;
  overflow: hidden;
}

body.landing-page #footer-main .footer::before,
body.service-page #footer-main .footer::before,
body.dashboard-page #footer-main .footer::before,
body.finance-page #footer-main .footer::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 20% 50%, rgba(0, 138, 255, 0.06) 0%, transparent 50%),
              radial-gradient(ellipse at 80% 50%, rgba(0, 200, 255, 0.04) 0%, transparent 50%);
  pointer-events: none;
}

body.landing-page #footer-main .footer .container,
body.service-page #footer-main .footer .container,
body.dashboard-page #footer-main .footer .container,
body.finance-page #footer-main .footer .container {
  position: relative;
  z-index: 2;
}

/* Footer CTA Section */
.footer-cta-wrapper {
  padding-top: 3rem;
  padding-bottom: 1rem;
}

.footer-cta-heading {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.footer-cta-lead {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.7);
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}

.footer-cta-btn {
  padding: 0.875rem 2rem;
  font-weight: 600;
  font-size: 1rem;
  border-radius: 50px;
  background: linear-gradient(135deg, var(--tn-primary) 0%, var(--tn-primary-dark) 100%);
  border: none;
  box-shadow: 0 4px 20px rgba(0, 138, 255, 0.3);
  transition: all var(--transition-base);
}

.footer-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 138, 255, 0.4);
}

#footer-logo {
  max-width: 220px;
  height: auto;
  object-fit: contain;
}

/* Footer Columns */
.footer-columns .heading {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 1.5rem;
}

.footer-tagline {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.55);
  max-width: 260px;
  line-height: 1.6;
}

/* Social icons */
.footer-social-nav .nav-link {
  padding: 0.5rem 0.75rem;
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.6) !important;
  transition: all var(--transition-base);
}

.footer-social-nav .nav-link:first-child {
  padding-left: 0;
}

.footer-social-nav .nav-link:hover {
  color: #ffffff !important;
  transform: translateY(-2px);
  text-shadow: 0 0 12px rgba(0, 138, 255, 0.5);
}

/* Service links */
.footer-link-list li {
  margin-bottom: 0.5rem;
}

.footer-link-list li a {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.9rem;
  text-decoration: none;
  transition: all var(--transition-fast);
  display: inline-block;
  padding: 0.125rem 0;
  position: relative;
}

.footer-link-list li a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--tn-primary), var(--tn-secondary));
  transition: width var(--transition-base);
}

.footer-link-list li a:hover {
  color: #ffffff;
}

.footer-link-list li a:hover::after {
  width: 100%;
}

/* Contact block */
.footer-contact-block {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}

.contact-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.875rem;
  line-height: 1.6;
}

.contact-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--tn-primary-light);
  margin-top: 2px;
}

.contact-icon svg {
  width: 18px;
  height: 18px;
  stroke: var(--tn-primary-light);
}

/* Footer bottom / copyright */
.footer-bottom .copyright {
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.85rem;
}

.footer-bottom .copyright a {
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-bottom .copyright a:hover {
  color: #ffffff;
}

.footer-legal-links {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.45);
}

.footer-legal-links a {
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  transition: color var(--transition-fast);
  font-size: 0.85rem;
}

.footer-legal-links a:hover {
  color: #ffffff;
}

.footer-legal-links .separator {
  margin: 0 0.75rem;
  opacity: 0.3;
}

/* Footer dividers on landing page and service pages */
body.landing-page #footer-main .divider-dark,
body.service-page #footer-main .divider-dark {
  border-color: rgba(255, 255, 255, 0.06) !important;
}

/* Responsive footer */
@media (max-width: 991px) {
  .footer-cta-wrapper {
    padding-top: 2rem;
  }

  .footer-brand-col,
  .footer-services-col,
  .footer-contact-col {
    text-align: center;
  }

  .footer-brand-col .footer-tagline {
    margin-left: auto;
    margin-right: auto;
  }

  .footer-social-nav {
    justify-content: center;
  }

  .footer-link-list {
    display: inline-block;
    text-align: left;
  }

  .footer-contact-block {
    display: inline-block;
    text-align: left;
  }
}

@media (max-width: 575px) {
  .footer-cta-heading {
    font-size: 1.4rem;
  }

  .footer-cta-lead {
    font-size: 1rem;
  }
}

/* ── Scroll Animations ────────────────────────────────── */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.fade-in-right {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Stagger delays */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }
.delay-6 { transition-delay: 0.6s; }

/* Hero entrance animations */
.hero-fade-up {
  opacity: 0;
  transform: translateY(30px);
  animation: heroFadeUp 0.9s ease forwards;
}

.hero-fade-left {
  opacity: 0;
  transform: translateX(40px);
  animation: heroFadeLeft 1s ease 0.2s forwards;
}

@keyframes heroFadeUp {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes heroFadeLeft {
  to { opacity: 1; transform: translateX(0); }
}

/* ── Safety Reveal ────────────────────────────────────── */
@keyframes safeReveal {
  to { opacity: 1; transform: translateY(0) translateX(0); }
}

.fade-in-up,
.fade-in-left,
.fade-in-right {
  animation: safeReveal 0s ease 3s forwards;
}

.fade-in-up.visible,
.fade-in-left.visible,
.fade-in-right.visible {
  animation: none;
}

/* ── Reduced Motion ───────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .fade-in-up,
  .fade-in-left,
  .fade-in-right,
  .hero-fade-up,
  .hero-fade-left {
    opacity: 1;
    transform: none;
    animation: none;
    transition: none;
  }

  .service-card:hover,
  .feature-item:hover {
    transform: none;
  }

  .scroll-indicator {
    animation: none;
  }

  .footer-top-border {
    animation: none;
  }
}

/* ── Responsive Adjustments ───────────────────────────── */
@media (max-width: 991px) {
  .hero-section {
    min-height: auto;
    padding: 5rem 0 3rem;
  }

  .hero-content {
    padding: 2rem 1rem;
    text-align: center;
  }

  .hero-section .lead {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-img-wrapper {
    margin-top: 2rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
  }

  #services {
    padding: 4rem 0;
  }

  .stats-bar {
    padding: 3rem 0;
  }

  .why-us-section {
    padding: 4rem 0;
  }
}

@media (max-width: 575px) {
  .hero-section h1 {
    font-size: 2.2rem;
  }

  .service-card {
    padding: 1.75rem 1.25rem;
  }

  .stat-number {
    font-size: 2rem;
  }
}
