/* ===== CSS Variables & Premium Design System ===== */
:root {
  /* Core Colors - Deep Space Theme */
  --bg-dark: #020617;
  --bg-panel: rgba(15, 23, 42, 0.6);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;

  /* Brand Colors - Neon Accents */
  --primary: #06b6d4;
  /* Cyan */
  --primary-glow: rgba(6, 182, 212, 0.5);
  --secondary: #8b5cf6;
  /* Violet */
  --secondary-glow: rgba(139, 92, 246, 0.5);
  --accent: #f59e0b;
  /* Amber */
  --accent-glow: rgba(245, 158, 11, 0.5);

  /* UI Elements */
  --border-color: rgba(255, 255, 255, 0.1);
  --border-hover: rgba(255, 255, 255, 0.2);
  --glass-bg: rgba(15, 23, 42, 0.7);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.36);
  --glass-blur: blur(16px);

  /* Spacing */
  --container-width: 1200px;
  --radius-md: 12px;
  --radius-lg: 24px;
}

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

html,
body {
  height: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--bg-dark);
  background-image:
    radial-gradient(circle at 15% 50%, rgba(139, 92, 246, 0.1), transparent 25%),
    radial-gradient(circle at 85% 30%, rgba(6, 182, 212, 0.1), transparent 25%);
  color: var(--text-main);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Typography */
h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

h1 {
  font-size: clamp(3rem, 5vw, 4.5rem);
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.lead {
  font-size: 1.25rem;
  line-height: 1.6;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Utilities */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

.row {
  display: flex;
  gap: 24px;
}

.row.between {
  justify-content: space-between;
}

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

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

.text-gradient {
  background: linear-gradient(135deg, var(--primary) 0%, #fff 50%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.glass {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 20px 0;
  transition: all 0.3s ease;
}

.site-header.scrolled {
  padding: 12px 0;
  background: rgba(2, 6, 23, 0.8);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-main);
  text-decoration: none;
}

.nav {
  display: flex;
  gap: 32px;
}

.nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav a:hover {
  color: var(--text-main);
}

/* Hero Section */
.hero {
  position: relative;
  padding: 180px 0 100px;
  overflow: hidden;
}

.hero-content {
  position: relative;
  z-index: 10;
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.hero-bg-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 1200px;
  height: 600px;
  background: radial-gradient(ellipse at center, rgba(6, 182, 212, 0.15), transparent 70%);
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-top: 32px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 20px rgba(6, 182, 212, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(6, 182, 212, 0.5);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(4px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-hover);
}

/* Scanner Demo */
.app-demo {
  margin-top: 80px;
  position: relative;
  border-radius: 24px;
  border: 1px solid var(--border-color);
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(20px);
  box-shadow: 0 20px 60px -10px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  transform: perspective(1000px) rotateX(2deg);
  transition: transform 0.5s ease;
}

.app-demo:hover {
  transform: perspective(1000px) rotateX(0deg);
}

.scanner-container {
  position: relative;
  height: 500px;
  background: #0f172a;
  display: flex;
  flex-direction: column;
}

.browser-header {
  height: 40px;
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 16px;
}

.dots {
  display: flex;
  gap: 6px;
}

.dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
}

.url-bar {
  flex: 1;
  height: 24px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 4px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  font-size: 12px;
  color: var(--text-muted);
}

.webpage-content {
  flex: 1;
  padding: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.skeleton-text {
  height: 16px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  margin-bottom: 16px;
}

.w-60 {
  width: 60%;
}

.w-80 {
  width: 80%;
}

.w-70 {
  width: 70%;
}

.qr-section {
  margin: 40px 0;
  position: relative;
  padding: 20px;
  background: white;
  border-radius: 12px;
}

.qr-target {
  width: 160px;
  height: 160px;
  color: #000;
}

/* Scanning Animation */
.scan-overlay {
  position: absolute;
  top: -20px;
  left: -20px;
  right: -20px;
  bottom: -20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scan-box {
  width: 220px;
  height: 220px;
  position: relative;
  border: 2px solid rgba(6, 182, 212, 0.5);
  border-radius: 12px;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.7);
  overflow: hidden;
}

.scan-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary);
  box-shadow: 0 0 20px var(--primary);
  animation: scan 3s ease-in-out infinite;
}

@keyframes scan {

  0%,
  100% {
    top: 10%;
    opacity: 0;
  }

  10% {
    opacity: 1;
  }

  90% {
    opacity: 1;
  }

  50% {
    top: 90%;
  }
}

.corner {
  position: absolute;
  width: 20px;
  height: 20px;
  border: 3px solid var(--primary);
  border-radius: 4px;
}

.tl {
  top: -2px;
  left: -2px;
  border-right: 0;
  border-bottom: 0;
}

.tr {
  top: -2px;
  right: -2px;
  border-left: 0;
  border-bottom: 0;
}

.bl {
  bottom: -2px;
  left: -2px;
  border-right: 0;
  border-top: 0;
}

.br {
  bottom: -2px;
  right: -2px;
  border-left: 0;
  border-top: 0;
}

/* Result Popup */
.result-popup {
  position: absolute;
  bottom: 40px;
  right: 40px;
  width: 300px;
  background: rgba(30, 41, 59, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  animation: slideIn 3s ease-in-out infinite;
  opacity: 0;
}

@keyframes slideIn {

  0%,
  45% {
    transform: translateY(20px);
    opacity: 0;
  }

  50%,
  90% {
    transform: translateY(0);
    opacity: 1;
  }

  100% {
    transform: translateY(20px);
    opacity: 0;
  }
}

.popup-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 12px;
}

.decoded-text {
  background: rgba(0, 0, 0, 0.3);
  padding: 10px;
  border-radius: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--text-main);
  margin-bottom: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.popup-actions {
  display: flex;
  gap: 8px;
}

.action-btn {
  flex: 1;
  padding: 8px;
  border-radius: 8px;
  border: none;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
}

.action-btn.primary {
  background: var(--primary);
  color: #000;
}

/* Features Grid */
.features {
  padding: 120px 0;
  position: relative;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-top: 60px;
}

.feature-card {
  padding: 32px;
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.feature-card:hover {
  border-color: var(--primary);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
  transform: translateY(-4px);
  box-shadow: 0 10px 40px -10px rgba(6, 182, 212, 0.15);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(6, 182, 212, 0.1);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

/* How it works */
.steps {
  padding: 120px 0;
}

.step-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin-top: 60px;
  position: relative;
}

.step-list::before {
  content: '';
  position: absolute;
  top: 24px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  opacity: 0.2;
  z-index: 0;
}

.step-item {
  position: relative;
  z-index: 1;
}

.step-number {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--bg-dark);
  border: 2px solid var(--primary);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.2rem;
  margin-bottom: 24px;
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.3);
}

/* FAQ */
.faq {
  padding: 100px 0;
}

.faq-item {
  margin-bottom: 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.faq-summary {
  padding: 20px 24px;
  cursor: pointer;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  list-style: none;
}

.faq-summary::-webkit-details-marker {
  display: none;
}

.faq-content {
  padding: 0 24px 24px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Footer */
.site-footer {
  padding: 80px 0 40px;
  border-top: 1px solid var(--border-color);
  margin-top: 80px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 60px;
}

.footer-bottom {
  padding-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Animations */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

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

/* Mobile Responsive */
@media (max-width: 768px) {
  h1 {
    font-size: 2.5rem;
  }

  .nav {
    display: none;
  }

  .hero {
    padding: 120px 0 60px;
  }

  .step-list {
    grid-template-columns: 1fr;
  }

  .step-list::before {
    display: none;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

/* Legal & Content Pages */
.legal {
  padding: 120px 0 80px;
}

.box {
  background: var(--glass-bg);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 40px;
  backdrop-filter: blur(12px);
}

.prose {
  max-width: 800px;
  margin: 0 auto;
  color: var(--text-muted);
}

.prose h2 {
  color: var(--text-main);
  margin-top: 40px;
  margin-bottom: 20px;
  font-size: 1.5rem;
}

.prose p {
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

.prose ul {
  margin-bottom: 1.5rem;
  padding-left: 20px;
}

.prose li {
  margin-bottom: 0.5rem;
}

.prose a {
  color: var(--primary);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.prose a:hover {
  border-color: var(--primary);
}