/* Fabric Plexus - Main Stylesheet */
:root {
  /* Common variables */
  --nvidia-green: #76B900;
  --radius-sm: 0.25rem;
  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;
  --radius-xl: 1rem;
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  
  /* Dark theme variables (default) */
  --primary-blue: #1E3A8A;
  --dark-blue: #0F172A;
  --accent-blue: #38BDF8;
  --light-gray: #E5E7EB;
  --dark-gray: #374151;
  --text-light: #F1F5F9;
  --text-dark: #1E293B;
  --gradient-blue: linear-gradient(135deg, #1E3A8A 0%, #0369A1 100%);
  --gradient-glow: linear-gradient(135deg, rgba(56, 189, 248, 0.3) 0%, rgba(14, 165, 233, 0.1) 100%);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);
  
  /* Background and text colors */
  --body-bg: var(--dark-blue);
  --body-color: var(--text-light);
  --header-bg: rgba(15, 23, 42, 0.9);
  --card-bg: rgba(15, 23, 42, 0.7);
  --card-border: rgba(56, 189, 248, 0.1);
  --form-bg: rgba(15, 23, 42, 0.5);
  --form-border: rgba(56, 189, 248, 0.2);
}

/* Light theme variables */
:root.light-theme {
  --primary-blue: #2563EB;
  --dark-blue: #F8FAFC;
  --accent-blue: #0284C7;
  --light-gray: #1E293B;
  --dark-gray: #94A3B8;
  --text-light: #1E293B;
  --text-dark: #F1F5F9;
  --gradient-blue: linear-gradient(135deg, #2563EB 0%, #0EA5E9 100%);
  --gradient-glow: linear-gradient(135deg, rgba(2, 132, 199, 0.2) 0%, rgba(14, 165, 233, 0.1) 100%);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);
  
  /* Background and text colors */
  --body-bg: var(--dark-blue);
  --body-color: var(--text-light);
  --header-bg: rgba(248, 250, 252, 0.9);
  --card-bg: rgba(255, 255, 255, 0.9);
  --card-border: rgba(2, 132, 199, 0.1);
  --form-bg: rgba(255, 255, 255, 0.8);
  --form-border: rgba(2, 132, 199, 0.2);
}

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  background-color: var(--body-bg);
  color: var(--body-color);
  line-height: 1.5;
  font-size: 16px;
  scroll-behavior: smooth;
}

h1, h2, h3, h4, h5, h6 {
  margin-top: 0;
  font-weight: 700;
  line-height: 1.2;
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}

h2 {
  font-size: 2rem;
  margin-bottom: 1.25rem;
}

h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

p {
  margin-top: 0;
  margin-bottom: 1rem;
}

a {
  color: var(--accent-blue);
  text-decoration: none;
  transition: color 0.2s ease-in-out;
}

a:hover {
  color: var(--nvidia-green);
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.section {
  padding: 4rem 0;
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -0.75rem;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: var(--gradient-blue);
  border-radius: var(--radius-sm);
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: var(--gradient-blue);
  color: var(--text-light);
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #1E40AF 0%, #0284C7 100%);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: white;
  text-decoration: none;
}

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

.btn-secondary:hover {
  background-color: rgba(56, 189, 248, 0.1);
  transform: translateY(-2px);
  color: var(--accent-blue);
  text-decoration: none;
}

.btn-nvidia {
  background-color: var(--nvidia-green);
  color: white;
}

.btn-nvidia:hover {
  background-color: #8BD409;
  transform: translateY(-2px);
  color: white;
  text-decoration: none;
}

.text-gradient {
  background: linear-gradient(to right, var(--accent-blue), var(--nvidia-green));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Header & Navigation */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: var(--header-bg);
  backdrop-filter: blur(8px);
  z-index: 1000;
  padding: 1rem 0;
  box-shadow: var(--shadow-md);
}

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

.logo {
  display: flex;
  align-items: center;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--text-light);
}

.logo img {
  height: 40px;
  margin-right: 0.75rem;
}

.nav {
  display: flex;
  gap: 1.5rem;
}

.nav-link {
  color: var(--text-light);
  font-weight: 500;
  transition: color 0.2s ease-in-out;
  position: relative;
}

.nav-link:after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background: var(--accent-blue);
  transition: width 0.2s ease-in-out;
}

.nav-link:hover {
  color: var(--accent-blue);
  text-decoration: none;
}

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

.nav-link.active {
  color: var(--accent-blue);
}

.nav-link.active:after {
  width: 100%;
}

.header-controls {
  display: flex;
  align-items: center;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 1.5rem;
  cursor: pointer;
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.99)), url('/images/quantum-bg.svg');
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
  padding-top: 5rem;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 700px;
}

.hero-title {
  font-size: 3rem;
  margin-bottom: 1.5rem;
  line-height: 1.1;
}

.hero-subtitle {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
}

.nvidia-badge {
  display: flex;
  align-items: center;
  margin-top: 2rem;
  padding: 1rem;
  background-color: rgba(30, 58, 138, 0.3);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(56, 189, 248, 0.2);
}

.nvidia-badge img {
  max-height: 100px;
  margin-right: 1rem;
}

/* Platform Section */
.platform {
  background-color: rgba(30, 58, 138, 0.1);
  position: relative;
}

.platform-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.platform-card {
  background-color: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--card-border);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.platform-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(56, 189, 248, 0.3);
}

.platform-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 1rem;
  color: var(--accent-blue);
}

.platform-title {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: var(--accent-blue);
}

/* Features Section */
.features {
  position: relative;
}

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

.feature-card {
  background-color: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--card-border);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(56, 189, 248, 0.3);
}

.feature-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 1rem;
  color: var(--accent-blue);
}

.feature-title {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: var(--accent-blue);
}

/* Testimonials Section */
.testimonials {
  background-color: rgba(30, 58, 138, 0.1);
  position: relative;
}

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.testimonial-card {
  background-color: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--card-border);
}

.testimonial-text {
  font-style: italic;
  margin-bottom: 1.5rem;
  position: relative;
}

.testimonial-text:before {
  content: "\201C";
  font-size: 4rem;
  position: absolute;
  left: -1.5rem;
  top: -1.5rem;
  opacity: 0.2;
  color: var(--accent-blue);
}

.testimonial-author {
  display: flex;
  align-items: center;
}

.testimonial-author-image {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: var(--primary-blue);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  margin-right: 1rem;
}

.testimonial-author-name {
  font-weight: 700;
}

.testimonial-author-title {
  font-size: 0.875rem;
  opacity: 0.7;
}

/* Contact Section */
.contact {
  position: relative;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.contact-icon {
  width: 24px;
  height: 24px;
  color: var(--accent-blue);
  flex-shrink: 0;
  margin-top: 0.25rem;
}

.contact-form {
  background-color: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--card-border);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--form-border);
  border-radius: var(--radius-md);
  background-color: var(--form-bg);
  color: var(--text-light);
  font-family: var(--font-sans);
  transition: border-color 0.2s ease;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}

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

/* Footer */
.footer {
  background-color: var(--body-bg);
  padding: 4rem 0 2rem;
  border-top: 1px solid var(--card-border);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.footer-brand {
  grid-column: 1 / -1;
  margin-bottom: 2rem;
}

.footer-brand img {
  height: 40px;
  margin-bottom: 1rem;
}

.footer-brand p {
  max-width: 400px;
  opacity: 0.7;
}

.footer-title {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  color: var(--accent-blue);
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-link {
  margin-bottom: 0.75rem;
}

.footer-link a {
  color: var(--text-light);
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.footer-link a:hover {
  opacity: 1;
  color: var(--accent-blue);
  text-decoration: none;
}

.footer-bottom {
  border-top: 1px solid var(--card-border);
  padding-top: 2rem;
  text-align: center;
  opacity: 0.7;
  font-size: 0.875rem;
}

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

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

/* Mobile Styles */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.25rem;
  }
  
  .hero-subtitle {
    font-size: 1.125rem;
  }
  
  .hero-buttons {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .btn {
    width: 100%;
  }
  
  .mobile-menu-btn {
    display: block;
  }
  
  .nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--dark-blue);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    z-index: 1001;
  }
  
  .nav.active {
    transform: translateX(0);
  }
  
  .section {
    padding: 3rem 0;
  }
}

/* Quantum Animation */
.quantum-animation {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.quantum-particle {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-blue);
  opacity: 0.3;
  transform-origin: center center;
  animation: orbitAnimation 20s linear infinite, pulseAnimation 4s ease-in-out infinite alternate;
}

.quantum-particle:nth-child(2n) {
  background-color: var(--nvidia-green);
}

@keyframes orbitAnimation {
  0% {
    transform: rotate(0deg) translateX(150px) rotate(0deg);
  }
  100% {
    transform: rotate(360deg) translateX(150px) rotate(-360deg);
  }
}

@keyframes pulseAnimation {
  0% {
    opacity: 0.1;
    width: 6px;
    height: 6px;
  }
  100% {
    opacity: 0.6;
    width: 10px;
    height: 10px;
  }
}

/* Matrix Effect */
.matrix-animation {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 0;
  opacity: 0.1;
}

.matrix-column {
  position: absolute;
  top: 0;
  font-family: var(--font-mono);
  font-size: 1.5rem;
  color: var(--accent-blue);
  white-space: nowrap;
}

/* Accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.skip-to-content {
  position: absolute;
  z-index: 9999;
  top: 0;
  left: 0;
  color: white;
  background: var(--primary-blue);
  padding: 0.5rem 1rem;
  transform: translateY(-100%);
  transition: transform 0.2s;
}

.skip-to-content:focus {
  transform: translateY(0);
}

/* Theme Toggle */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: transparent;
  border: 2px solid var(--accent-blue);
  color: var(--accent-blue);
  cursor: pointer;
  transition: all 0.2s ease;
  margin-left: 1rem;
  position: relative;
  overflow: hidden;
}

.theme-toggle:hover {
  background-color: rgba(56, 189, 248, 0.1);
  transform: translateY(-2px);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
  stroke-width: 2;
  transition: transform 0.5s ease;
}

.light-theme .dark-icon {
  display: block;
}

.light-theme .light-icon {
  display: none;
}

.dark-icon {
  display: none;
}

.light-icon {
  display: block;
}

@media (max-width: 768px) {
  .theme-toggle {
    position: absolute;
    top: 1rem;
    right: 5rem;
  }
}