/* Fortex Labs - Custom Styles */
/* Built on top of Tailwind CSS CDN */

/* ========================================
   CSS Variables & Design Tokens
   ======================================== */
:root {
  /* Colors */
  --color-primary: #0f172a;
  --color-primary-light: #1e293b;
  --color-accent: #8b5cf6;
  --color-accent-hover: #7c3aed;
  --color-secondary: #06b6d4;
  --color-text: #f8fafc;
  --color-text-muted: #94a3b8;
  --color-border: rgba(148, 163, 184, 0.1);

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #8b5cf6 0%, #06b6d4 100%);
  --gradient-bg: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
  --gradient-glow: radial-gradient(
    600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(139, 92, 246, 0.1),
    transparent 40%
  );

  /* Typography */
  --font-primary: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;

  /* Spacing */
  --section-padding: 6rem;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 300ms ease;
  --transition-slow: 500ms ease;
}

/* ========================================
   Base Styles
   ======================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

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

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

/* ========================================
   Typography
   ======================================== */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
}

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

h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

p {
  color: var(--color-text-muted);
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-secondary);
}

/* ========================================
   Utility Classes
   ======================================== */

/* Glassmorphism */
.glass {
  background: rgba(30, 41, 59, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--color-border);
}

.glass-light {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Gradient Text */
.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

/* Section */
.section {
  padding: var(--section-padding) 0;
}

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

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(139, 92, 246, 0.4);
  color: white;
}

.btn-secondary {
  background: transparent;
  color: var(--color-text);
  border: 2px solid var(--color-border);
}

.btn-secondary:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

/* ========================================
   Navigation
   ======================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1rem 0;
  transition: all var(--transition-normal);
}

.navbar.scrolled {
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--color-border);
}

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

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: var(--gradient-primary);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

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

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

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: width var(--transition-normal);
}

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

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

/* Mobile Menu Button */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 0.5rem;
  background: none;
  border: none;
  cursor: pointer;
}

.menu-toggle span {
  width: 24px;
  height: 2px;
  background: var(--color-text);
  transition: all var(--transition-normal);
}

/* Mobile Navigation */
.mobile-nav {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.98);
  z-index: 999;
  padding: 6rem 2rem;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

.mobile-nav.active {
  opacity: 1;
  visibility: visible;
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  list-style: none;
}

.mobile-nav-links a {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-text);
}

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

.hero::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 800px;
  height: 800px;
  background: radial-gradient(
    circle,
    rgba(139, 92, 246, 0.15) 0%,
    transparent 70%
  );
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(
    circle,
    rgba(6, 182, 212, 0.1) 0%,
    transparent 70%
  );
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 100px;
  font-size: 0.875rem;
  color: var(--color-accent);
  margin-bottom: 1.5rem;
}

.hero-title {
  margin-bottom: 1.5rem;
}

.hero-description {
  font-size: 1.25rem;
  margin-bottom: 2.5rem;
  max-width: 600px;
}

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

/* ========================================
   Products/Portfolio Section
   ======================================== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.product-card {
  border-radius: 20px;
  padding: 2rem;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.product-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gradient-glow);
  opacity: 0;
  transition: opacity var(--transition-normal);
  pointer-events: none;
}

.product-card:hover {
  transform: translateY(-8px);
  border-color: rgba(139, 92, 246, 0.3);
}

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

.product-icon {
  width: 72px;
  height: 72px;
  background: var(--gradient-primary);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 8px 24px rgba(139, 92, 246, 0.3);
}

.product-title {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--color-text);
}

.product-description {
  margin-bottom: 1.5rem;
}

.product-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.product-tag {
  padding: 0.375rem 0.75rem;
  background: rgba(139, 92, 246, 0.1);
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-accent);
}

.product-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--color-accent);
}

.product-link:hover {
  gap: 0.75rem;
}

/* ========================================
   About Section
   ======================================== */
.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-visual {
  position: relative;
}

.about-visual-inner {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 24px;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 6rem;
  position: relative;
  overflow: hidden;
}

.about-visual-inner::before {
  content: "";
  position: absolute;
  inset: 4px;
  background: var(--color-primary-light);
  border-radius: 20px;
}

.about-visual-inner span {
  position: relative;
  z-index: 1;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}

.stat {
  text-align: center;
  padding: 1.5rem;
  border-radius: 16px;
}

.stat-value {
  font-size: 2.5rem;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-top: 0.25rem;
}

/* ========================================
   Contact Section
   ======================================== */
.contact-content {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.contact-methods {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.contact-method {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-radius: 12px;
  color: var(--color-text);
  transition: all var(--transition-normal);
}

.contact-method:hover {
  border-color: var(--color-accent);
  color: var(--color-text);
}

.contact-method-icon {
  width: 40px;
  height: 40px;
  background: rgba(139, 92, 246, 0.1);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-accent);
}

/* ========================================
   Footer
   ======================================== */
.footer {
  padding: 3rem 0;
  border-top: 1px solid var(--color-border);
  margin-top: 2rem;
}

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

.footer-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.footer-links a {
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

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

.footer-copyright {
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

/* ========================================
   Section Headers
   ======================================== */
.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 3rem;
}

.section-badge {
  display: inline-block;
  padding: 0.375rem 1rem;
  background: rgba(139, 92, 246, 0.1);
  border-radius: 100px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-accent);
  margin-bottom: 1rem;
}

.section-title {
  margin-bottom: 1rem;
}

.section-description {
  font-size: 1.125rem;
}

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

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

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease forwards;
}

.animate-float {
  animation: float 4s ease-in-out infinite;
}

/* Staggered animations */
.animate-delay-100 {
  animation-delay: 100ms;
}

.animate-delay-200 {
  animation-delay: 200ms;
}

.animate-delay-300 {
  animation-delay: 300ms;
}

.animate-delay-400 {
  animation-delay: 400ms;
}

.animate-delay-500 {
  animation-delay: 500ms;
}

/* ========================================
   Page Templates - Product Detail
   ======================================== */
.page-hero {
  padding-top: 8rem;
  padding-bottom: 4rem;
}

.product-detail-header {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

.product-detail-icon {
  width: 100px;
  height: 100px;
  background: var(--gradient-primary);
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  flex-shrink: 0;
}

.product-detail-info h1 {
  margin-bottom: 0.5rem;
}

.product-detail-tagline {
  font-size: 1.25rem;
  color: var(--color-text-muted);
}

.store-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  font-weight: 600;
  transition: all var(--transition-normal);
}

.store-btn:hover {
  transform: translateY(-2px);
  color: var(--color-text);
}

/* ========================================
   Page Templates - Blog
   ======================================== */
.blog-article {
  max-width: 800px;
  margin: 0 auto;
}

.blog-header {
  padding-top: 8rem;
  padding-bottom: 2rem;
}

.blog-meta {
  display: flex;
  gap: 1.5rem;
  color: var(--color-text-muted);
  font-size: 0.875rem;
  margin-top: 1rem;
}

.blog-content {
  padding: 2rem 0;
}

.blog-content p {
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--color-text-muted);
}

.blog-content h2 {
  margin-top: 3rem;
  margin-bottom: 1rem;
  color: var(--color-text);
}

.blog-content ul,
.blog-content ol {
  margin: 1.5rem 0;
  padding-left: 1.5rem;
  color: var(--color-text-muted);
}

.blog-content li {
  margin-bottom: 0.5rem;
}

.blog-content a {
  color: var(--color-accent);
  text-decoration: underline;
}

.blog-cta {
  padding: 2rem;
  border-radius: 16px;
  margin: 3rem 0;
  text-align: center;
}

/* ========================================
   Legal Pages
   ======================================== */
.legal-content {
  max-width: 800px;
  margin: 0 auto;
  padding-top: 8rem;
}

.legal-content h1 {
  margin-bottom: 1rem;
}

.legal-content .last-updated {
  color: var(--color-text-muted);
  margin-bottom: 3rem;
}

.legal-content h2 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  font-size: 1.5rem;
  color: var(--color-text);
}

.legal-content p {
  margin-bottom: 1rem;
  line-height: 1.8;
}

.legal-content ul {
  margin: 1rem 0;
  padding-left: 1.5rem;
  color: var(--color-text-muted);
}

.legal-content li {
  margin-bottom: 0.5rem;
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 1024px) {
  .about-content {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .about-visual {
    order: -1;
    max-width: 400px;
    margin: 0 auto;
  }
}

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

  .nav-links {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }

  .mobile-nav {
    display: block;
  }

  .hero-buttons {
    flex-direction: column;
  }

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

  .about-stats {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

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

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

  .product-detail-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .store-buttons {
    justify-content: center;
  }

  /* Hero section mobile fix */
  .hero > .container > div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
    text-align: center;
  }

  .hero .hero-image-container {
    order: -1;
    max-width: 350px;
    margin: 0 auto 2rem;
  }

  .hero-image-container img {
    width: 100%;
    max-width: 100%;
    margin: 0;
  }

  .hero-content {
    max-width: 100%;
  }

  .hero-description {
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 480px) {
  .products-grid {
    grid-template-columns: 1fr;
  }

  .product-card {
    padding: 1.5rem;
  }

  .contact-methods {
    flex-direction: column;
  }
}

/* ========================================
   AI Image Handling
   ======================================== */
/* Wrapper to crop AI watermarks (usually bottom right) */
.ai-image-container {
  overflow: hidden;
  border-radius: 20px;
  position: relative;
  width: 100%;
  margin-bottom: 2rem;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

.ai-image-container img {
  width: 120%;
  max-width: none;
  height: auto;
  margin-left: -10%;
  /* Crop left */
  margin-right: -10%;
  /* Crop right */
  margin-top: -5%;
  /* Crop top */
  margin-bottom: -5%;
  /* Crop bottom (watermark) */
  display: block;
}

/* Hero image specific cropping */
.hero-image-container {
  overflow: hidden;
  border-radius: 20px;
  position: relative;
}

.hero-image-container img {
  width: 120%;
  max-width: none;
  height: auto;
  margin-left: -10%;
  margin-top: -5%;
  margin-bottom: -8%;
  display: block;
}
