/* ============================================
   The Fox Den Solutions - Main Stylesheet
   ============================================ */

/* CSS Variables */
:root {
  /* Atlantis Color Palette */
  --color-bg-deep: #03080F;
  --color-bg-mid: #0A1628;
  --color-bg-card: rgba(0, 180, 216, 0.08);
  --color-bg-card-solid: #0D2137;
  --color-bg-card-hover: rgba(0, 180, 216, 0.15);

  /* Atlantis Blues - Ancient Tech Glow */
  --color-atlantis-primary: #00B4D8;
  --color-atlantis-light: #90E0EF;
  --color-atlantis-deep: #0077B6;
  --color-atlantis-glow: #CAF0F8;

  /* Supporting Colors */
  --color-text-primary: #E0F7FA;
  --color-text-secondary: #81D4E8;
  --color-text-muted: #4A8BA8;
  --color-border: rgba(0, 180, 216, 0.2);
  --color-border-glow: rgba(0, 180, 216, 0.4);
  --color-success: #00E676;
  --color-error: #FF5252;

  /* Typography */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 350ms ease;

  /* Atlantis Shadows & Glows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.6);
  --glow-soft: 0 0 20px rgba(0, 180, 216, 0.3);
  --glow-medium: 0 0 30px rgba(0, 180, 216, 0.4);
  --glow-strong: 0 0 40px rgba(0, 180, 216, 0.5), 0 0 80px rgba(0, 180, 216, 0.2);
  --glow-text: 0 0 10px rgba(0, 180, 216, 0.5);

  /* Glassmorphism */
  --glass-bg: rgba(10, 22, 40, 0.7);
  --glass-border: rgba(0, 180, 216, 0.15);
  --glass-blur: blur(12px);

  /* Layout */
  --container-max: 1200px;
  --header-height: 72px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-primary);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text-primary);
  background-color: var(--color-bg-deep);
  min-height: 100vh;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--space-md);
}

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

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

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

h4 {
  font-size: 1.25rem;
}

p {
  margin-bottom: var(--space-md);
  color: var(--color-text-secondary);
}

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

a:hover {
  color: var(--color-blue-glow);
}

/* Utility Classes */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.text-gradient {
  background: linear-gradient(135deg, var(--color-atlantis-primary), var(--color-atlantis-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(var(--glow-text));
}

.text-gradient-blue {
  background: linear-gradient(135deg, var(--color-atlantis-deep), var(--color-atlantis-primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-glow {
  text-shadow: var(--glow-text);
}

.text-center { text-align: center; }
.text-muted { color: var(--color-text-muted); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-xl);
  font-family: var(--font-primary);
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-atlantis-primary), var(--color-atlantis-deep));
  color: var(--color-bg-deep);
  box-shadow: var(--glow-soft);
  border: 1px solid rgba(144, 224, 239, 0.3);
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--glow-strong);
  color: var(--color-bg-deep);
}

.btn-secondary {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  color: var(--color-atlantis-light);
  border: 1px solid var(--color-border);
  position: relative;
}

.btn-secondary:hover {
  border-color: var(--color-atlantis-primary);
  color: var(--color-atlantis-primary);
  box-shadow: var(--glow-soft);
}

.btn-app-store {
  background: var(--color-text-primary);
  color: var(--color-bg-deep);
  padding: var(--space-md) var(--space-lg);
}

.btn-app-store:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: var(--color-bg-deep);
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--glass-border);
  z-index: 1000;
}

.header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-atlantis-primary), transparent);
  opacity: 0.5;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text-primary);
  transition: all var(--transition-base);
}

.logo:hover {
  color: var(--color-text-primary);
  filter: drop-shadow(var(--glow-text));
}

.logo-icon {
  width: 40px;
  height: 40px;
  filter: drop-shadow(0 0 8px rgba(0, 180, 216, 0.4));
}

.logo-text span {
  color: var(--color-atlantis-primary);
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}

.nav a {
  color: var(--color-text-secondary);
  font-weight: 500;
  transition: color var(--transition-fast);
}

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

.nav a.active {
  color: var(--color-atlantis-primary);
  text-shadow: var(--glow-text);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-sm);
}

.mobile-menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text-primary);
  transition: var(--transition-base);
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--header-height);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse at 20% 30%, rgba(0, 180, 216, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 70%, rgba(0, 119, 182, 0.1) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(144, 224, 239, 0.05) 0%, transparent 70%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-atlantis-primary), transparent);
  opacity: 0.3;
}

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

.hero-tagline {
  display: inline-block;
  padding: var(--space-sm) var(--space-md);
  background: rgba(0, 180, 216, 0.1);
  border: 1px solid rgba(0, 180, 216, 0.3);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-atlantis-light);
  margin-bottom: var(--space-lg);
  box-shadow: var(--glow-soft);
}

.hero h1 {
  margin-bottom: var(--space-lg);
}

.hero-description {
  font-size: 1.25rem;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-2xl);
  max-width: 600px;
}

.hero-buttons {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
}

/* Apps Grid */
.apps-section {
  padding: var(--space-3xl) 0;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.section-header p {
  font-size: 1.125rem;
  max-width: 600px;
  margin: 0 auto;
}

.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--space-xl);
}

.app-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  border: 1px solid var(--glass-border);
  transition: all var(--transition-base);
  text-decoration: none;
  display: block;
  position: relative;
  overflow: hidden;
}

.app-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-atlantis-primary), transparent);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.app-card:hover {
  transform: translateY(-4px);
  border-color: var(--color-border-glow);
  box-shadow: var(--glow-medium);
  background: var(--color-bg-card-hover);
}

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

.app-card-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-lg);
  object-fit: cover;
  box-shadow: var(--glow-soft);
}

.app-card h3 {
  color: var(--color-text-primary);
  margin-bottom: var(--space-sm);
}

.app-card-tagline {
  color: var(--color-atlantis-primary);
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: var(--space-md);
}

.app-card p {
  color: var(--color-text-secondary);
  margin-bottom: var(--space-lg);
}

.app-card-platforms {
  display: flex;
  gap: var(--space-sm);
}

.platform-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-sm);
  background: rgba(0, 180, 216, 0.15);
  border: 1px solid rgba(0, 180, 216, 0.3);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  color: var(--color-atlantis-light);
}

/* App Detail Page */
.app-hero {
  padding: calc(var(--header-height) + var(--space-3xl)) 0 var(--space-3xl);
  position: relative;
}

.app-hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl);
  align-items: center;
}

.app-hero-content {
  max-width: 500px;
}

.app-icon-large {
  width: 96px;
  height: 96px;
  border-radius: var(--radius-xl);
  margin-bottom: var(--space-lg);
  box-shadow: var(--shadow-lg);
}

.app-hero h1 {
  margin-bottom: var(--space-sm);
}

.app-subtitle {
  color: var(--color-atlantis-primary);
  font-size: 1.25rem;
  font-weight: 500;
  margin-bottom: var(--space-lg);
}

.app-description {
  font-size: 1.125rem;
  margin-bottom: var(--space-xl);
}

.app-meta {
  display: flex;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
  flex-wrap: wrap;
}

.app-meta-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.app-meta-label {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.app-meta-value {
  font-weight: 600;
  color: var(--color-text-primary);
}

.app-hero-visual {
  display: flex;
  justify-content: center;
}

.app-screenshot {
  max-width: 280px;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}

/* Phone Frame */
.phone-frame {
  position: relative;
  width: 280px;
  height: 572px;
  background: #1a1a1a;
  border-radius: 40px;
  padding: 12px;
  box-shadow:
    0 0 0 2px #333,
    0 20px 50px rgba(0, 0, 0, 0.5),
    inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.phone-frame::before {
  /* Dynamic Island */
  content: '';
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: 90px;
  height: 28px;
  background: #000;
  border-radius: 20px;
  z-index: 10;
}

.phone-screen {
  width: 100%;
  height: 100%;
  border-radius: 30px;
  object-fit: cover;
  object-position: top;
}

/* Features Section */
.features-section {
  padding: var(--space-3xl) 0;
  background: linear-gradient(180deg, transparent, rgba(0, 180, 216, 0.05), transparent);
  position: relative;
}

.features-section::before,
.features-section::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-atlantis-primary), transparent);
  opacity: 0.2;
}

.features-section::before { top: 0; }
.features-section::after { bottom: 0; }

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-xl);
}

.feature-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  border: 1px solid var(--glass-border);
  transition: all var(--transition-base);
}

.feature-card:hover {
  border-color: var(--color-border-glow);
  box-shadow: var(--glow-soft);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: var(--space-md);
}

.feature-icon.green { background: rgba(16, 185, 129, 0.2); }
.feature-icon.teal { background: rgba(0, 255, 200, 0.2); }
.feature-icon.cyan { background: rgba(0, 217, 255, 0.2); }
.feature-icon.orange { background: rgba(249, 115, 22, 0.2); }

.feature-card h4 {
  color: var(--color-text-primary);
  margin-bottom: var(--space-sm);
}

.feature-card p {
  color: var(--color-text-secondary);
  font-size: 0.9375rem;
  margin-bottom: 0;
}

/* FAQ Section */
.faq-section {
  padding: var(--space-3xl) 0;
}

.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--color-border);
}

.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-lg) 0;
  background: none;
  border: none;
  color: var(--color-text-primary);
  font-size: 1.125rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.faq-question:hover {
  color: var(--color-orange-fox);
}

.faq-icon {
  font-size: 1.5rem;
  color: var(--color-text-muted);
  transition: transform var(--transition-base);
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-base);
}

.faq-item.active .faq-answer {
  max-height: 500px;
}

.faq-answer p {
  padding-bottom: var(--space-lg);
}

/* Contact Section */
.contact-section {
  padding: var(--space-3xl) 0;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl);
  max-width: 900px;
  margin: 0 auto;
}

.contact-info h3 {
  margin-bottom: var(--space-md);
}

.contact-info p {
  margin-bottom: var(--space-xl);
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.contact-link {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  color: var(--color-text-secondary);
}

.contact-link:hover {
  color: var(--color-blue-electric);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.form-group label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-secondary);
}

.form-group input,
.form-group textarea,
.form-group select {
  padding: var(--space-md);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  color: var(--color-text-primary);
  font-family: var(--font-primary);
  font-size: 1rem;
  transition: all var(--transition-base);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--color-atlantis-primary);
  box-shadow: var(--glow-soft);
}

.form-group textarea {
  min-height: 150px;
  resize: vertical;
}

/* Footer */
.footer {
  padding: var(--space-2xl) 0;
  border-top: 1px solid var(--glass-border);
  margin-top: var(--space-3xl);
  position: relative;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-atlantis-primary), transparent);
  opacity: 0.3;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-lg);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

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

.footer-links {
  display: flex;
  gap: var(--space-xl);
}

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

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

.footer-copyright {
  width: 100%;
  text-align: center;
  padding-top: var(--space-xl);
  margin-top: var(--space-lg);
  border-top: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

/* Legal Pages */
.legal-page {
  padding: calc(var(--header-height) + var(--space-3xl)) 0 var(--space-3xl);
}

.legal-content {
  max-width: 800px;
  margin: 0 auto;
}

.legal-content h1 {
  margin-bottom: var(--space-sm);
}

.legal-meta {
  color: var(--color-text-muted);
  font-size: 0.875rem;
  margin-bottom: var(--space-2xl);
}

.legal-content h2 {
  font-size: 1.5rem;
  margin-top: var(--space-2xl);
  margin-bottom: var(--space-md);
  color: var(--color-text-primary);
}

.legal-content h3 {
  font-size: 1.125rem;
  margin-top: var(--space-xl);
  margin-bottom: var(--space-sm);
  color: var(--color-text-primary);
}

.legal-content p,
.legal-content li {
  color: var(--color-text-secondary);
  line-height: 1.7;
}

.legal-content ul,
.legal-content ol {
  margin-bottom: var(--space-md);
  padding-left: var(--space-xl);
}

.legal-content li {
  margin-bottom: var(--space-sm);
}

.legal-content a {
  color: var(--color-atlantis-primary);
}

/* Responsive */
@media (max-width: 768px) {
  .nav {
    display: none;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .nav.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--color-bg-deep);
    padding: var(--space-lg);
    border-bottom: 1px solid var(--color-border);
  }

  .hero {
    padding-top: calc(var(--header-height) + var(--space-xl));
    min-height: auto;
    padding-bottom: var(--space-3xl);
  }

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

  .app-hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

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

  .app-meta {
    justify-content: center;
  }

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

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

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

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.6; }
}

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

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

.animate-in {
  animation: fadeIn 0.6s ease forwards;
}

.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }

/* Atlantis-style glowing border effect */
.glow-border {
  position: relative;
}

.glow-border::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--color-atlantis-primary), var(--color-atlantis-light), var(--color-atlantis-primary));
  background-size: 200% 200%;
  animation: shimmer 3s linear infinite;
  z-index: -1;
  opacity: 0.5;
}

/* Subtle ambient glow for the page */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse at 10% 20%, rgba(0, 180, 216, 0.03) 0%, transparent 40%),
    radial-gradient(ellipse at 90% 80%, rgba(0, 119, 182, 0.03) 0%, transparent 40%);
  pointer-events: none;
  z-index: -1;
}

/* Link glow on hover */
a {
  color: var(--color-atlantis-primary);
  transition: all var(--transition-base);
}

a:hover {
  color: var(--color-atlantis-light);
  text-shadow: var(--glow-text);
}
