/* ============================================
   XClarity Landing Page — Styles
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
  --primary-dark: #0a0e1a;
  --primary-blue: #1a73e8;
  --accent-cyan: #00d4ff;
  --accent-green: #00c853;
  --text-primary: #ffffff;
  --text-secondary: #a0aec0;
  --card-bg: #111827;
  --card-border: #1e293b;
  --gradient-start: #0f172a;
  --gradient-end: #1e3a5f;
  --navbar-height: 72px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--primary-dark);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* --- Typography --- */
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.2;
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, var(--text-primary), var(--accent-cyan));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto 3rem;
}

/* --- Container --- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* --- Navbar --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--navbar-height);
  display: flex;
  align-items: center;
  z-index: 1000;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.navbar.scrolled {
  background-color: rgba(10, 14, 26, 0.95);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.navbar-brand img {
  height: 40px;
  width: auto;
}

.navbar-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.navbar-brand-name {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
}

.navbar-brand-tagline {
  font-size: 0.7rem;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
}

.navbar-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.navbar-menu a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.25s ease;
  position: relative;
}

.navbar-menu a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-cyan);
  transition: width 0.25s ease;
}

.navbar-menu a:hover,
.navbar-menu a.active {
  color: var(--text-primary);
}

.navbar-menu a:hover::after,
.navbar-menu a.active::after {
  width: 100%;
}

.btn-login {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.5rem;
  border: 1px solid var(--accent-cyan);
  border-radius: 6px;
  color: var(--accent-cyan);
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.25s ease;
  cursor: pointer;
  background: transparent;
}

.btn-login:hover {
  background: var(--accent-cyan);
  color: var(--primary-dark);
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}

/* Hamburger menu */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* --- Hero Section --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('../images/hero-bg.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(10, 14, 26, 0.6) 0%,
    rgba(10, 14, 26, 0.75) 50%,
    rgba(10, 14, 26, 0.95) 100%
  );
}

/* Animated scan line */
.hero-scanline {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
  opacity: 0.6;
  animation: scanline 4s ease-in-out infinite;
  z-index: 1;
}

@keyframes scanline {
  0% { top: 0; opacity: 0; }
  10% { opacity: 0.6; }
  90% { opacity: 0.6; }
  100% { top: 100%; opacity: 0; }
}

/* Grid overlay */
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 212, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 212, 255, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding: 0 1.5rem;
}

.hero-label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent-cyan);
  margin-bottom: 1.5rem;
  padding: 0.35rem 1rem;
  border: 1px solid rgba(0, 212, 255, 0.3);
  border-radius: 20px;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #ffffff 0%, var(--accent-cyan) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.35rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  font-weight: 300;
}

.hero-subtitle strong {
  color: var(--text-primary);
  font-weight: 600;
}

.hero-description {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-top: 1.5rem;
  margin-bottom: 2.5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  background: linear-gradient(135deg, var(--primary-blue), var(--accent-cyan));
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 212, 255, 0.3);
}

.hero-cta svg {
  transition: transform 0.3s ease;
}

.hero-cta:hover svg {
  transform: translateY(3px);
}

/* --- Section Common --- */
.section {
  padding: 6rem 0;
  position: relative;
}

.section--alt {
  background: linear-gradient(180deg, var(--gradient-start), var(--primary-dark));
}

/* Section background image with vignette */
.section--has-bg {
  overflow: hidden;
}

.section-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 0;
}

/* Vignette overlay for section backgrounds */
.section-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at center, rgba(10, 14, 26, 0.7) 0%, rgba(10, 14, 26, 0.92) 70%, rgba(10, 14, 26, 0.98) 100%),
    linear-gradient(180deg, rgba(10, 14, 26, 0.9) 0%, rgba(10, 14, 26, 0.6) 20%, rgba(10, 14, 26, 0.6) 80%, rgba(10, 14, 26, 0.95) 100%);
}

.section--has-bg .container {
  position: relative;
  z-index: 1;
}

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

/* --- Product Section --- */

/* Intro text */
.product-intro {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 3.5rem;
}

.product-intro-title {
  font-size: 1.75rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.product-intro-text {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.7;
}

/* 4-Step Workflow Grid */
.workflow-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  position: relative;
}

.workflow-step {
  background: rgba(17, 24, 39, 0.6);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 2rem 1.5rem;
  text-align: center;
  position: relative;
  transition: all 0.3s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.workflow-step:hover {
  border-color: var(--accent-cyan);
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 212, 255, 0.1);
}

.workflow-step-number {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--primary-blue), var(--accent-cyan));
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0, 212, 255, 0.3);
}

.workflow-step-icon {
  width: 40px;
  height: 40px;
  margin: 0.5rem auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(26, 115, 232, 0.15), rgba(0, 212, 255, 0.15));
}

.workflow-step-icon svg {
  width: 20px;
  height: 20px;
  color: var(--accent-cyan);
}

.workflow-step h4 {
  font-size: 1.05rem;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.workflow-step p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Arrow between steps */
.workflow-arrow {
  display: none;
  position: absolute;
  top: 50%;
  right: -24px;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: var(--accent-cyan);
  opacity: 0.5;
  z-index: 2;
}

.workflow-arrow svg {
  width: 20px;
  height: 20px;
}

@media (min-width: 992px) {
  .workflow-arrow {
    display: block;
  }
}

/* --- Solution Section --- */
.detection-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 4rem;
}

.detection-card {
  background: rgba(17, 24, 39, 0.6);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.detection-card:hover {
  border-color: var(--accent-cyan);
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 212, 255, 0.1);
}

.detection-card-image {
  height: 220px;
  position: relative;
  overflow: hidden;
  background: var(--card-bg);
}

.detection-card-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  display: block;
}

/* Vignette overlay on detection card images */
.detection-card-vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at center, transparent 30%, rgba(10, 14, 26, 0.6) 100%),
    linear-gradient(180deg, rgba(10, 14, 26, 0.15) 0%, transparent 30%, transparent 60%, rgba(10, 14, 26, 0.5) 100%);
  pointer-events: none;
  z-index: 1;
}

/* Color-tinted vignette per card type */
.detection-card-image.cocaine .detection-card-vignette {
  background:
    radial-gradient(ellipse at center, transparent 30%, rgba(22, 33, 62, 0.7) 100%),
    linear-gradient(180deg, rgba(26, 26, 46, 0.3) 0%, transparent 40%, transparent 60%, rgba(10, 14, 26, 0.6) 100%);
}
.detection-card-image.hashish .detection-card-vignette {
  background:
    radial-gradient(ellipse at center, transparent 30%, rgba(22, 46, 22, 0.7) 100%),
    linear-gradient(180deg, rgba(26, 46, 26, 0.3) 0%, transparent 40%, transparent 60%, rgba(10, 14, 26, 0.6) 100%);
}
.detection-card-image.heroin .detection-card-vignette {
  background:
    radial-gradient(ellipse at center, transparent 30%, rgba(46, 26, 26, 0.7) 100%),
    linear-gradient(180deg, rgba(62, 22, 22, 0.3) 0%, transparent 40%, transparent 60%, rgba(10, 14, 26, 0.6) 100%);
}
.detection-card-image.meth .detection-card-vignette {
  background:
    radial-gradient(ellipse at center, transparent 30%, rgba(26, 46, 62, 0.7) 100%),
    linear-gradient(180deg, rgba(26, 26, 46, 0.3) 0%, transparent 40%, transparent 60%, rgba(10, 14, 26, 0.6) 100%);
}
.detection-card-image.pills .detection-card-vignette {
  background:
    radial-gradient(ellipse at center, transparent 30%, rgba(46, 46, 26, 0.7) 100%),
    linear-gradient(180deg, rgba(62, 54, 22, 0.3) 0%, transparent 40%, transparent 60%, rgba(10, 14, 26, 0.6) 100%);
}
.detection-card-image.firearms .detection-card-vignette {
  background:
    radial-gradient(ellipse at center, transparent 30%, rgba(46, 26, 46, 0.7) 100%),
    linear-gradient(180deg, rgba(62, 22, 46, 0.3) 0%, transparent 40%, transparent 60%, rgba(10, 14, 26, 0.6) 100%);
}

/* X-ray scan effect overlay */
.detection-card-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(0, 212, 255, 0.05) 50%,
    transparent 100%
  );
  animation: xray-scan 3s ease-in-out infinite;
  pointer-events: none;
  z-index: 2;
}

@keyframes xray-scan {
  0%, 100% { transform: translateY(-100%); }
  50% { transform: translateY(100%); }
}

.detection-card-body {
  padding: 1.25rem;
}

.detection-card-body h4 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.detection-card-body p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Platform features */
.platform-features {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.5rem;
  margin-bottom: 4rem;
}

.platform-feature {
  text-align: center;
  padding: 1.5rem 1rem;
  background: rgba(17, 24, 39, 0.4);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  transition: border-color 0.25s ease;
}

.platform-feature:hover {
  border-color: rgba(0, 212, 255, 0.3);
}

.platform-feature-icon {
  width: 40px;
  height: 40px;
  margin: 0 auto 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
}

.platform-feature-icon svg {
  width: 24px;
  height: 24px;
}

.platform-feature h4 {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--text-primary);
}

.platform-feature p {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* AI Demo placeholder */
.ai-demo-placeholder {
  background: rgba(17, 24, 39, 0.6);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 3rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.ai-demo-placeholder::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
}

.ai-demo-placeholder h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.ai-demo-placeholder p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Slideshow gallery */
.slideshow {
  position: relative;
  margin: 2rem auto;
  max-width: 700px;
  aspect-ratio: 16/9;
  border-radius: 8px;
  overflow: hidden;
}

/* Vignette overlay on slideshow */
.slideshow::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(10, 14, 26, 0.65) 100%);
  pointer-events: none;
  z-index: 1;
}

.slideshow img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  animation: fade 9s infinite;
}

/* Scan line effect on slideshow */
.slideshow::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent 5%, var(--accent-cyan) 30%, var(--accent-cyan) 70%, transparent 95%);
  opacity: 0.85;
  box-shadow: 0 0 12px 3px rgba(0, 212, 255, 0.4);
  animation: scanline 4s ease-in-out infinite;
  z-index: 2;
}

.slideshow img:nth-child(2) { animation-delay: 3s; }
.slideshow img:nth-child(3) { animation-delay: 6s; }

@keyframes fade {
  0%   { opacity: 0; }
  5%   { opacity: 1; }
  28%  { opacity: 1; }
  33%  { opacity: 0; }
  100% { opacity: 0; }
}

/* --- Footer --- */
.footer {
  padding: 2rem 0;
  border-top: 1px solid var(--card-border);
  background: var(--primary-dark);
}

.footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-left {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.footer-center {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

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

.footer-right a {
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: color 0.25s ease;
}

.footer-right a:hover {
  color: var(--accent-cyan);
}

/* --- Fade-in Animation --- */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }
.fade-in-delay-4 { transition-delay: 0.4s; }
.fade-in-delay-5 { transition-delay: 0.5s; }

/* --- Responsive: Tablet (768px–1199px) --- */
@media (max-width: 1199px) {
  .platform-features {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 991px) {
  .hero h1 {
    font-size: 2.75rem;
  }

  .workflow-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }

  .detection-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .platform-features {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* --- Responsive: Mobile (<768px) --- */
@media (max-width: 767px) {
  :root {
    --navbar-height: 64px;
  }

  .hamburger {
    display: flex;
  }

  .navbar-menu {
    position: fixed;
    top: var(--navbar-height);
    left: 0;
    right: 0;
    bottom: 0;
    flex-direction: column;
    background: rgba(10, 14, 26, 0.98);
    padding: 2rem;
    gap: 1.5rem;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }

  .navbar-menu.open {
    transform: translateX(0);
  }

  .navbar-menu a {
    font-size: 1.1rem;
  }

  .hero {
    min-height: 90vh;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1.1rem;
  }

  .hero-description {
    font-size: 0.95rem;
  }

  .section {
    padding: 4rem 0;
  }

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

  .workflow-grid {
    grid-template-columns: 1fr;
  }

  .detection-grid {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.75rem;
  }

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