/* Applayers - Static Site Styles */
/* Complete CSS with design system, animations, and all component styles */

/* ===== RESET & BASE ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
  background-color: hsl(0, 0%, 3%);
  color: hsl(0, 0%, 98%);
  line-height: 1.5;
  overflow-x: hidden;
}

/* ===== CSS VARIABLES (Design System) ===== */
:root {
  /* Colors */
  --background: hsl(0, 0%, 3%);
  --foreground: hsl(0, 0%, 98%);
  --card: hsl(0, 0%, 8%);
  --card-foreground: hsl(0, 0%, 98%);
  --primary: hsl(280, 100%, 70%);
  --primary-foreground: hsl(0, 0%, 100%);
  --secondary: hsl(180, 100%, 50%);
  --secondary-foreground: hsl(0, 0%, 0%);
  --muted: hsl(0, 0%, 15%);
  --muted-foreground: hsl(0, 0%, 65%);
  --accent: hsl(25, 100%, 60%);
  --accent-foreground: hsl(0, 0%, 100%);
  --border: hsl(0, 0%, 20%);

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, hsl(280, 100%, 70%) 0%, hsl(250, 100%, 65%) 50%, hsl(180, 100%, 60%) 100%);
  --gradient-accent: linear-gradient(135deg, hsl(25, 100%, 60%) 0%, hsl(340, 100%, 65%) 100%);
  --gradient-glow: radial-gradient(circle at center, hsla(280, 100%, 70%, 0.2) 0%, transparent 70%);

  /* Glass Effect */
  --glass-bg: hsla(0, 0%, 100%, 0.05);
  --glass-border: hsla(0, 0%, 100%, 0.1);
  --glass-shadow: 0 8px 32px 0 hsla(0, 0%, 0%, 0.37);

  /* Transitions */
  --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ===== ANIMATIONS ===== */
/* GPU-accelerated float animation with translate3d for smooth performance */
@keyframes float {
  0%, 100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(0, -20px, 0);
  }
}

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

@keyframes slide-up {
  from {
    transform: translate3d(0, 100px, 0);
    opacity: 0;
  }
  to {
    transform: translate3d(0, 0, 0);
    opacity: 1;
  }
}

@keyframes scale-in {
  from {
    transform: scale3d(0.9, 0.9, 1);
    opacity: 0;
  }
  to {
    transform: scale3d(1, 1, 1);
    opacity: 1;
  }
}

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

/* Animation utility classes with GPU acceleration */
.animate-float {
  animation: float 6s ease-in-out infinite;
  will-change: transform;
  backface-visibility: hidden;
  perspective: 1000px;
}

.animate-glow {
  animation: glow 3s ease-in-out infinite;
  will-change: opacity;
}

.animate-slide-up {
  animation: slide-up 0.6s ease-out;
  will-change: transform, opacity;
  backface-visibility: hidden;
}

.animate-scale-in {
  animation: scale-in 0.4s ease-out;
  will-change: transform, opacity;
  backface-visibility: hidden;
}

.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  will-change: opacity;
}

/* ===== UTILITY CLASSES ===== */
/* Optimized glass effect - uses simpler blur on mobile */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(10px); /* Reduced from 20px for performance */
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  will-change: auto; /* Don't promote to GPU layer unless animating */
}

/* Desktop gets higher quality glass effect */
@media (min-width: 1024px) and (prefers-reduced-motion: no-preference) {
  .glass {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
  }
}

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

.gradient-border {
  position: relative;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.gradient-border::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: var(--gradient-primary);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

.bg-gradient-primary {
  background-image: var(--gradient-primary);
}

.bg-gradient-accent {
  background-image: var(--gradient-accent);
}

.bg-gradient-glow {
  background-image: var(--gradient-glow);
}

/* ===== NAVIGATION ===== */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  transition: all 0.3s ease;
  padding: 1.5rem 0;
}

nav.scrolled {
  padding: 1rem 0;
}

.nav-container {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.nav-menu {
  display: none;
  align-items: center;
  gap: 2rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.nav-menu a {
  color: var(--foreground);
  text-decoration: none;
  transition: color 0.3s ease;
}

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

.nav-button {
  display: inline-block;
  padding: 0.5rem 1.5rem;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s ease;
  color: var(--foreground);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
}

.nav-button:hover {
  background-color: hsla(280, 100%, 70%, 0.2);
}

.mobile-menu-button {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  padding: 0.5rem;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  background-color: transparent;
}

.mobile-menu-button .line {
  width: 1.5rem;
  height: 2px;
  background-color: var(--foreground);
}

.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 1rem;
  margin: 1rem 1.5rem 0;
  padding: 1.5rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
}

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

.mobile-menu a {
  color: var(--foreground);
  text-decoration: none;
  padding: 0.5rem 0;
  transition: color 0.3s ease;
}

.mobile-menu a:hover {
  color: var(--primary);
}

.mobile-menu .nav-button {
  padding: 0.75rem 1.5rem;
  text-align: center;
}

@media (min-width: 768px) {
  .nav-menu {
    display: flex;
  }

  .mobile-menu-button {
    display: none;
  }
}

/* ===== HERO SECTION ===== */
.hero {
  position: relative;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 5rem 0 0;
}

.hero-background {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 80rem;
  margin: 0 auto;
  text-align: center;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2rem 1.5rem;
}

.hero-title {
  font-size: clamp(2.5rem, 8vw, 12rem);
  line-height: 0.95;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-title .line {
  display: block;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 3rem);
  color: var(--muted-foreground);
  max-width: 48rem;
  margin: 2rem auto 0;
  font-weight: 300;
  line-height: 1.6;
}

/* Hero footer */
.hero-footer {
  position: relative;
  z-index: 10;
  width: 100%;
  padding: 2rem 0;
}

.hero-footer-content {
  max-width: 80rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 0 1.5rem;
}

.copyright {
  font-size: 0.75rem;
  color: hsla(0, 0%, 65%, 0.7);
  order: 2; /* On mobile: copyright at bottom */
}

.company-info {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  text-align: center;
  line-height: 1.6;
  order: 1; /* On mobile: company info first */
}

.company-name {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.company-address {
  font-size: 0.75rem;
}

@media (min-width: 768px) {
  .hero {
    overflow: hidden;
    padding-top: 5rem;
  }

  .hero-footer-content {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-end;
  }

  .company-info {
    text-align: right;
    order: 0; /* Desktop: use natural HTML order */
  }

  .copyright {
    font-size: 0.875rem;
    order: 0; /* Desktop: use natural HTML order */
  }

  .company-address {
    font-size: 0.875rem;
  }
}

/* Hero background effects - Optimized for performance */
.bg-layer {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px); /* Reduced from 150px for mobile performance */
  will-change: transform;
  transform: translate3d(0, 0, 0); /* Force GPU layer */
  contain: layout style paint; /* CSS containment for better performance */
}

.bg-layer-small {
  position: absolute;
  border-radius: 50%;
  filter: blur(30px); /* Reduced from 80px for mobile performance */
  will-change: transform;
  transform: translate3d(0, 0, 0);
  contain: layout style paint;
}

.gradient-line {
  position: absolute;
  top: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(to bottom, transparent, hsla(280, 100%, 70%, 0.1), transparent);
  will-change: opacity;
  contain: strict;
}

.particle-dot {
  position: absolute;
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  filter: blur(1px);
  will-change: transform;
  transform: translate3d(0, 0, 0);
  contain: layout style paint;
}

.glow-circle {
  position: absolute;
  border-radius: 50%;
  will-change: opacity;
  transform: translate3d(0, 0, 0);
  contain: layout style paint;
}

.abstract-line {
  position: absolute;
  height: 1px;
  will-change: transform;
  transform: translate3d(0, 0, 0);
  contain: strict;
}

.ring-shape {
  position: absolute;
  border-radius: 50%;
  border: 1px solid;
  will-change: transform;
  transform: translate3d(0, 0, 0);
  contain: layout style paint;
}

.code-snippet {
  position: absolute;
  font-size: 0.75rem;
  font-family: 'Courier New', monospace;
  opacity: 0.2;
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
  will-change: transform;
  transform: translate3d(0, 0, 0);
  contain: strict;
}

.grid-overlay {
  position: absolute;
  inset: 0;
  opacity: 0.02;
  background-image:
    linear-gradient(to right, var(--primary) 1px, transparent 1px),
    linear-gradient(to bottom, var(--primary) 1px, transparent 1px);
  background-size: 100px 100px;
  will-change: auto;
  contain: strict;
  pointer-events: none;
}

/* ===== LEGAL PAGES ===== */
.legal-page {
  min-height: 100vh;
  background-color: var(--background);
  display: flex;
  flex-direction: column;
}

.legal-main {
  padding: 4rem 1.5rem 3rem;
  flex: 1;
}

.legal-container {
  max-width: 56rem;
  margin: 0 auto;
}

.legal-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  margin-bottom: 2rem;
  letter-spacing: -0.02em;
  color: var(--foreground);
}

.legal-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.legal-section h2 {
  font-size: 1.875rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--foreground);
}

.legal-section h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--foreground);
}

.legal-section p {
  color: var(--muted-foreground);
  line-height: 1.8;
  margin-bottom: 1rem;
}

.legal-section strong,
.legal-section b {
  color: var(--foreground);
  font-weight: 600;
}

.legal-section ul {
  list-style-type: disc;
  margin-left: 2rem;
  color: var(--muted-foreground);
}

.legal-section li {
  margin: 0.5rem 0;
}

.legal-section li strong,
.legal-section li b {
  color: var(--foreground);
  font-weight: 600;
}

.legal-section a,
.legal-content a {
  color: var(--foreground);
  text-decoration: underline;
  text-decoration-color: hsla(0, 0%, 100%, 0.3);
  text-underline-offset: 0.2em;
  transition: all 0.3s ease;
}

.legal-section a:hover,
.legal-content a:hover {
  color: var(--primary);
  text-decoration-color: var(--primary);
}

.contact-box {
  padding: 1.5rem;
  border-radius: 1rem;
  margin-top: 1rem;
}

.contact-box p {
  margin: 0.25rem 0;
  color: var(--muted-foreground);
}

.contact-box a {
  color: var(--foreground);
  text-decoration: underline;
  text-decoration-color: hsla(0, 0%, 100%, 0.3);
  text-underline-offset: 0.2em;
  transition: all 0.3s ease;
}

.contact-box a:hover {
  color: var(--primary);
  text-decoration-color: var(--primary);
}

.contact-box .company-name {
  font-weight: 700;
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
  color: var(--foreground);
}

/* Legal page footer */
.legal-footer {
  padding: 2rem 1.5rem;
  border-top: 1px solid hsla(0, 0%, 100%, 0.1);
  margin-top: 4rem;
}

.legal-footer-content {
  max-width: 56rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.legal-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
}

.legal-footer-links a {
  color: var(--muted-foreground);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.3s ease;
}

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

.legal-copyright {
  font-size: 0.75rem;
  color: hsla(0, 0%, 65%, 0.7);
  text-align: center;
}

@media (min-width: 768px) {
  .legal-footer-content {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .legal-copyright {
    font-size: 0.875rem;
  }
}

/* ===== RESPONSIVE UTILITIES ===== */
.hidden-mobile {
  display: none;
}

@media (min-width: 768px) {
  .hidden-mobile {
    display: block;
  }

  .hidden-desktop {
    display: none;
  }

  .hero {
    padding: 5rem 0 0;
  }
}

/* ===== SCROLL BEHAVIOR ===== */
html {
  scroll-behavior: smooth;
}

/* ===== FOCUS STYLES ===== */
a:focus,
button:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ===== LOADING STATE ===== */
.page-loaded {
  animation: fadeIn 0.3s ease-in;
}

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

/* ===== PERFORMANCE OPTIMIZATIONS ===== */
/* Mobile: Disable ALL background animations, use static gradient instead */
@media (max-width: 768px) {
  /* HIDE ALL animated background elements on mobile */
  .bg-layer,
  .bg-layer-small,
  .particle-dot,
  .glow-circle,
  .code-snippet,
  .abstract-line,
  .ring-shape,
  .gradient-line,
  .bg-gradient-glow {
    display: none !important;
  }

  /* Replace with beautiful static gradient background */
  .hero-background::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
      radial-gradient(ellipse 120% 80% at 20% 30%, hsla(280, 100%, 70%, 0.25) 0%, transparent 50%),
      radial-gradient(ellipse 100% 70% at 80% 70%, hsla(180, 100%, 50%, 0.2) 0%, transparent 50%),
      radial-gradient(ellipse 80% 60% at 50% 50%, hsla(25, 100%, 60%, 0.15) 0%, transparent 60%),
      radial-gradient(ellipse 90% 70% at 30% 80%, hsla(280, 100%, 70%, 0.18) 0%, transparent 55%),
      radial-gradient(ellipse 85% 65% at 70% 40%, hsla(180, 100%, 50%, 0.15) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
  }

  /* Keep grid overlay static */
  .grid-overlay {
    display: block !important;
    opacity: 0.015;
  }

  /* Disable all animations on mobile */
  .animate-float,
  .animate-glow,
  .animate-pulse {
    animation: none !important;
  }

  /* Ensure hero content is above static background */
  .hero-content {
    position: relative;
    z-index: 10;
  }

  .hero-footer {
    position: relative;
    z-index: 10;
  }
}

/* Small mobile screens - enhanced static gradient */
@media (max-width: 480px) {
  /* Enhance static gradient for smaller screens */
  .hero-background::before {
    background:
      radial-gradient(ellipse 140% 90% at 25% 25%, hsla(280, 100%, 70%, 0.3) 0%, transparent 55%),
      radial-gradient(ellipse 120% 80% at 75% 75%, hsla(180, 100%, 50%, 0.25) 0%, transparent 55%),
      radial-gradient(ellipse 100% 70% at 50% 50%, hsla(25, 100%, 60%, 0.18) 0%, transparent 60%);
  }
}

/* Tablet/Desktop: Keep beautiful animations (769px and up) */
@media (min-width: 769px) {
  /* Show all animated elements on larger screens */
  .bg-layer,
  .bg-layer-small,
  .particle-dot,
  .glow-circle,
  .code-snippet,
  .abstract-line,
  .ring-shape,
  .gradient-line {
    display: block !important;
  }

  /* Hide the static gradient - we use animated elements instead */
  .hero-background::before {
    display: none;
  }

  /* Optimized blur for tablets */
  .bg-layer {
    filter: blur(60px);
  }

  .bg-layer-small {
    filter: blur(40px);
  }

  .glow-circle {
    filter: blur(45px);
  }
}

/* High-performance mode for large desktop screens */
@media (min-width: 1200px) and (prefers-reduced-motion: no-preference) {
  /* Beautiful high-quality effects on desktop */
  .bg-layer {
    filter: blur(80px); /* Full quality desktop experience */
  }

  .bg-layer-small {
    filter: blur(50px);
  }

  .glow-circle {
    filter: blur(50px);
  }
}
