/* ============================================================
   FLYNC — Industry 4.0 Operations Suite
   Production CSS — Premium Dark Theme with Glassmorphism
   ============================================================ */

/* ── Design Tokens ─────────────────────────────────────────── */
:root {
  --bg-primary: #000000;
  --bg-secondary: #080808;
  --bg-card: rgba(15, 15, 15, 0.7);
  --accent-blue: #ffffff;
  --accent-cyan: #e5e5e5;
  --accent-gradient: linear-gradient(135deg, #ffffff, #888888);
  --text-primary: #ffffff;
  --text-secondary: #a3a3a3;
  --border: rgba(255, 255, 255, 0.08);
  --glow-blue: 0 0 40px rgba(255, 255, 255, 0.04);
  --glow-cyan: 0 0 40px rgba(255, 255, 255, 0.04);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.4s ease;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

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

img, video, canvas, svg {
  display: block;
  max-width: 100%;
}

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

button {
  font-family: inherit;
}

ul, ol {
  list-style: none;
}

/* ── Scrollbar ─────────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--accent-blue);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-cyan);
}

/* ── Container ─────────────────────────────────────────────── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Navbar ────────────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(10, 14, 26, 0.85);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition-base), box-shadow var(--transition-base);
}

.navbar.scrolled {
  background: rgba(10, 14, 26, 0.95);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  transition: transform var(--transition-fast);
}

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

.logo-img {
  height: 32px;
  width: auto;
  display: block;
}

.nav-logo span {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--text-primary);
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-gradient);
  border-radius: 1px;
  transition: width var(--transition-base);
}

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

.nav-links a:hover::after {
  width: 100%;
}

.nav-cta {
  font-size: 0.85rem;
  padding: 10px 24px !important;
}

/* ── Mobile Menu Toggle ────────────────────────────────────── */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 1001;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform var(--transition-base), opacity var(--transition-base);
}

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

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

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

/* ── Buttons ───────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  color: #000000;
  padding: 14px 32px;
  border-radius: 40px; /* Pill shape like Google */
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all var(--transition-base);
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.1);
  text-decoration: none;
}

.btn-primary:hover {
  transform: translateY(-2px);
  background: #f5f5f5;
  box-shadow: 0 8px 25px rgba(255, 255, 255, 0.2);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  padding: 14px 32px;
  border-radius: 40px; /* Pill shape */
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
}

.btn-secondary:hover {
  border-color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
}

.btn-secondary:active {
  transform: translateY(0);
}

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

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

.hero-content {
  position: relative;
  z-index: 1;
  padding-top: 72px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent-cyan);
  margin-bottom: 28px;
  animation: fadeInUp 0.8s ease forwards;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 900;
  letter-spacing: -2px;
  line-height: 1.1;
  margin-bottom: 24px;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: fadeInUp 0.8s ease 0.15s forwards;
  opacity: 0;
}

.hero .hero-tagline {
  font-size: clamp(1.2rem, 3.5vw, 1.8rem);
  font-weight: 800;
  background: linear-gradient(180deg, #ffffff 40%, #888888 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
  letter-spacing: 4px;
  margin-top: -12px;
  margin-bottom: 24px;
  animation: fadeInUp 0.8s ease 0.22s forwards;
  opacity: 0;
  letter-spacing: -0.5px;
}

.hero .subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 650px;
  line-height: 1.6;
  margin-bottom: 36px;
  animation: fadeInUp 0.8s ease 0.3s forwards;
  opacity: 0;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 48px;
  animation: fadeInUp 0.8s ease 0.45s forwards;
  opacity: 0;
}

.hero-tags {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  animation: fadeInUp 0.8s ease 0.6s forwards;
  opacity: 0;
}

.hero-tags span {
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
}

/* ── Stats Bar ─────────────────────────────────────────────── */
.stats-section {
  position: relative;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-secondary);
}

.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding: 60px 0;
  text-align: center;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 8px;
  font-weight: 500;
}

/* ── Section Common ────────────────────────────────────────── */
section {
  padding: 100px 0;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 16px;
  letter-spacing: -1px;
  line-height: 1.2;
}

.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 60px;
  font-size: 1.05rem;
  line-height: 1.6;
}

/* ── Product Cards ─────────────────────────────────────────── */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 24px;
}

.product-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: all var(--transition-slow) ease;
  position: relative;
  overflow: hidden;
}

.product-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--accent-gradient);
  opacity: 0;
  transition: opacity var(--transition-base);
}

  transform: translateY(-8px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: var(--glow-blue);

.product-card:hover::before {
  opacity: 1;
}

.card-3d-canvas {
  width: 100%;
  height: 180px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  background: rgba(10, 14, 26, 0.5);
  overflow: hidden;
}

.product-card h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.product-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-top: 12px;
}

/* ── Tags ──────────────────────────────────────────────────── */
.tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.tag-live {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.tag-development {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.tag-roadmap {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* ── How It Works ──────────────────────────────────────────── */
.how-section {
  background: var(--bg-secondary);
}

.steps {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  position: relative;
}

.step-card {
  text-align: center;
  position: relative;
  flex: 1;
  max-width: 300px;
  padding: 0 20px;
}

.step-number {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 800;
  margin: 0 auto 20px;
  color: #ffffff;
  box-shadow: 0 0 30px rgba(0, 102, 255, 0.25);
  position: relative;
  z-index: 1;
}

.step-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.step-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.step-connector {
  flex: 0 0 60px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-cyan));
  margin-top: 30px;
  border-radius: 1px;
  opacity: 0.4;
}

/* ── Features Grid ─────────────────────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  transition: all var(--transition-base);
}

.feature-card:hover {
  border-color: rgba(0, 212, 170, 0.3);
  transform: translateY(-4px);
  box-shadow: var(--glow-cyan);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.feature-icon svg {
  color: #000000;
  width: 22px;
  height: 22px;
  display: block;
}

.feature-card h4 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
}

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

/* ── Contact Section ───────────────────────────────────────── */
.contact-section {
  background: var(--bg-secondary);
  border-radius: var(--radius-xl);
  padding: 60px;
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.contact-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(0, 102, 255, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.contact-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  position: relative;
  z-index: 1;
}

.contact-form input,
.contact-form textarea {
  background: rgba(10, 14, 26, 0.6);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 18px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: var(--text-secondary);
  opacity: 0.6;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--accent-blue);
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
}

.contact-form textarea {
  grid-column: span 2;
  min-height: 120px;
  resize: vertical;
}

/* ── Footer ────────────────────────────────────────────────── */
.footer {
  padding: 40px 0;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.footer a {
  color: var(--accent-cyan);
  transition: opacity var(--transition-fast);
}

.footer a:hover {
  opacity: 0.8;
}

.footer-content p {
  margin: 0;
}

.footer-tagline {
  margin-top: 10px !important;
  font-weight: 600;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
}

/* ── Animations ────────────────────────────────────────────── */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* Intersection Observer Animations */
.animate-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* Staggered animation delays for grid children */
.products-grid .animate-in:nth-child(1) { transition-delay: 0s; }
.products-grid .animate-in:nth-child(2) { transition-delay: 0.1s; }
.products-grid .animate-in:nth-child(3) { transition-delay: 0.2s; }
.products-grid .animate-in:nth-child(4) { transition-delay: 0.3s; }
.products-grid .animate-in:nth-child(5) { transition-delay: 0.4s; }

.features-grid .animate-in:nth-child(1) { transition-delay: 0s; }
.features-grid .animate-in:nth-child(2) { transition-delay: 0.08s; }
.features-grid .animate-in:nth-child(3) { transition-delay: 0.16s; }
.features-grid .animate-in:nth-child(4) { transition-delay: 0.24s; }
.features-grid .animate-in:nth-child(5) { transition-delay: 0.32s; }
.features-grid .animate-in:nth-child(6) { transition-delay: 0.4s; }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-section {
    padding: 40px 32px;
  }
}

@media (max-width: 768px) {
  .navbar .nav-links {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 14, 26, 0.98);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 32px;
    z-index: 999;
  }

  .navbar .nav-links.mobile-open {
    display: flex;
  }

  .navbar .nav-links a {
    font-size: 1.2rem;
    color: var(--text-primary);
  }

  .menu-toggle {
    display: flex;
  }

  .nav-cta {
    display: none;
  }

  .hero h1 {
    font-size: 2.2rem;
    letter-spacing: -1px;
  }

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

  .hero-buttons {
    flex-direction: column;
    gap: 12px;
  }

  .hero-buttons .btn-primary,
  .hero-buttons .btn-secondary {
    width: 100%;
    text-align: center;
  }

  .stats-bar {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    padding: 40px 0;
  }

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

  section {
    padding: 60px 0;
  }

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

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

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

  .steps {
    flex-direction: column;
    align-items: center;
    gap: 24px;
  }

  .step-connector {
    width: 2px;
    height: 40px;
    flex: 0 0 40px;
    background: linear-gradient(180deg, var(--accent-blue), var(--accent-cyan));
    margin-top: 0;
  }

  .step-card {
    max-width: 100%;
  }

  .contact-section {
    padding: 32px 20px;
    border-radius: 16px;
  }

  .contact-form {
    grid-template-columns: 1fr;
  }

  .contact-form textarea {
    grid-column: span 1;
  }

  .contact-form .btn-primary {
    grid-column: span 1 !important;
    width: 100%;
  }

  #infinity-container {
    height: 200px !important;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

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

  .stats-bar {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

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

  .product-card {
    padding: 24px;
  }

  .card-3d-canvas {
    height: 140px;
  }
}

/* ── Print Styles ──────────────────────────────────────────── */
@media print {
  .navbar,
  #hero-canvas,
  .card-3d-canvas,
  #infinity-container,
  .menu-toggle {
    display: none !important;
  }

  body {
    background: #ffffff;
    color: #000000;
  }

  .hero h1 {
    -webkit-text-fill-color: #000000;
    color: #000000;
  }
}
