:root {
  /* Colors */
  --color-true-black: #121212;
  --color-gunmetal: #1E1F25;
  --color-carbon-gray: #2C2F36;
  --color-shadow-blue-gray: #3A3F47;
  --color-soft-iron: #6E7582;
  
  /* Nature-inspired accent colors */
  --color-leaf-green: #4CAF50;
  --color-moss: #8BC34A;
  --color-soil: #795548;
  --color-terracotta: #E57373;
  --color-sky: #03A9F4;
  
  /* Text colors */
  --color-text-primary: rgba(255, 255, 255, 0.95);
  --color-text-secondary: rgba(255, 255, 255, 0.75);
  --color-text-tertiary: rgba(255, 255, 255, 0.55);
  
  /* Spacing */
  --space-xxs: 0.25rem;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 3rem;
  --space-xl: 4rem;
  --space-xxl: 6rem;
  
  /* Typography */
  --font-primary: 'Space Grotesk', sans-serif;
  --font-secondary: 'Outfit', sans-serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-md: 1rem;
  --font-size-lg: 1.25rem;
  --font-size-xl: 1.5rem;
  --font-size-xxl: 2rem;
  --font-size-xxxl: 2.5rem;
  
  /* Effects */
  --transition-fast: 0.2s ease;
  --transition-medium: 0.3s ease;
  --transition-slow: 0.5s ease;
  --border-radius-sm: 4px;
  --border-radius-md: 8px;
  --border-radius-lg: 16px;
  --border-radius-xl: 24px;
  --shadow-small: 0 2px 8px rgba(0, 0, 0, 0.15);
  --shadow-medium: 0 4px 16px rgba(0, 0, 0, 0.1);
  --shadow-large: 0 8px 30px rgba(0, 0, 0, 0.2);
  
  /* Z-index layers */
  --z-below: -1;
  --z-normal: 1;
  --z-above: 10;
  --z-modal: 100;
  --z-highest: 1000;
}

/* BASE RESET */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  background: var(--color-true-black);
  color: var(--color-text-primary);
  font-family: var(--font-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-secondary);
  line-height: 1.2;
  margin-bottom: var(--space-sm);
  font-weight: 600;
}

h1 {
  font-size: var(--font-size-xxxl);
}

h2 {
  font-size: var(--font-size-xxl);
}

h3 {
  font-size: var(--font-size-xl);
}

h4 {
  font-size: var(--font-size-lg);
}

h5, h6 {
  font-size: var(--font-size-md);
}

p, li, a {
  margin-bottom: var(--space-sm);
}

a {
  color: var(--color-leaf-green);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-moss);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button, .button {
  background: var(--color-leaf-green);
  color: var(--color-text-primary);
  border: none;
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--border-radius-md);
  font-family: var(--font-primary);
  font-size: var(--font-size-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: inline-block;
  text-align: center;
}

button:hover, .button:hover {
  background: var(--color-moss);
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

ul, ol {
  margin-left: var(--space-md);
  margin-bottom: var(--space-md);
}

/* LAYOUT */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.section {
  padding: var(--space-lg) 0;
  position: relative;
}

/* HEADER */
.site-header {
  padding: var(--space-sm) 0;
  position: relative;
  z-index: var(--z-above);
  background: var(--color-carbon-gray);
  transition: transform var(--transition-medium);
}

.header-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-logo {
  font-family: var(--font-secondary);
  font-weight: 700;
  color: var(--color-text-primary);
  text-decoration: none;
}

.site-logo:hover {
  color: var(--color-text-primary);
}

/* NAVIGATION */
.main-nav {
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  list-style: none;
  margin: 0;
}

.nav-item {
  margin: 0 var(--space-sm);
}

.nav-link {
  color: var(--color-text-secondary);
  text-decoration: none;
  font-size: var(--font-size-md);
  position: relative;
  transition: color var(--transition-fast);
}

.nav-link:hover, .nav-link.active {
  color: var(--color-text-primary);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-leaf-green);
  transition: width var(--transition-medium);
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

/* MOBILE MENU */
.mobile-nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--color-text-primary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: var(--space-xs);
  z-index: var(--z-highest);
}

/* HERO SECTION */
.hero {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: var(--color-gunmetal);
}

.hero-content {
  text-align: center;
  position: relative;
  z-index: var(--z-normal);
  max-width: 800px;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: var(--space-md);
  line-height: 1.1;
}

.hero-subtitle {
  font-size: clamp(1rem, 3vw, 1.5rem);
  margin-bottom: var(--space-lg);
  color: var(--color-text-secondary);
  max-width: 80%;
  margin-left: auto;
  margin-right: auto;
}

.hero-buttons {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

/* CARDS */
.card {
  background: var(--color-carbon-gray);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  transition: transform var(--transition-medium), box-shadow var(--transition-medium);
  height: 100%;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-large);
}

.card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.card-content {
  padding: var(--space-md);
}

.card-title {
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-xs);
}

.card-text {
  color: var(--color-text-secondary);
  margin-bottom: var(--space-sm);
}

.card-price {
  font-size: var(--font-size-lg);
  font-weight: bold;
  color: var(--color-leaf-green);
  margin-bottom: var(--space-sm);
}

.card-button {
  width: 100%;
}

/* FEATURES */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.feature {
  text-align: center;
  padding: var(--space-md);
}

.feature-icon {
  font-size: 3rem;
  color: var(--color-leaf-green);
  margin-bottom: var(--space-sm);
}

.feature-title {
  margin-bottom: var(--space-xs);
}

.feature-text {
  color: var(--color-text-secondary);
}

/* ABOUT SECTION */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  align-items: center;
}

.about-image {
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-medium);
}

.about-content h2 {
  margin-bottom: var(--space-md);
}

.about-text {
  margin-bottom: var(--space-md);
}

/* PRODUCTS GRID */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-md);
  margin-top: var(--space-md);
}

/* CONTACT FORM */
.contact-form {
  background: var(--color-carbon-gray);
  padding: var(--space-lg);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-medium);
  max-width: 600px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: var(--space-md);
}

.form-label {
  display: block;
  margin-bottom: var(--space-xs);
  color: var(--color-text-secondary);
}

.form-control {
  width: 100%;
  padding: var(--space-sm);
  border: 1px solid var(--color-shadow-blue-gray);
  border-radius: var(--border-radius-md);
  background: var(--color-gunmetal);
  color: var(--color-text-primary);
  font-family: var(--font-primary);
  transition: border-color var(--transition-fast);
}

.form-control:focus {
  outline: none;
  border-color: var(--color-leaf-green);
}

.form-check {
  display: flex;
  align-items: flex-start;
  margin-bottom: var(--space-md);
}

.form-check-input {
  margin-right: var(--space-xs);
  margin-top: 0.25rem;
}

.form-check-label {
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
}

/* FOOTER */
.site-footer {
  background: var(--color-carbon-gray);
  padding: var(--space-lg) 0;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-lg);
}

.footer-links h4 {
  margin-bottom: var(--space-md);
  color: var(--color-text-primary);
}

.footer-links ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links li {
  margin-bottom: var(--space-xs);
}

.footer-links a {
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--color-leaf-green);
}

.footer-bottom {
  margin-top: var(--space-lg);
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-shadow-blue-gray);
  text-align: center;
  color: var(--color-text-tertiary);
  font-size: var(--font-size-sm);
}

/* THANK YOU PAGE */
.thank-you {
  text-align: center;
  padding: var(--space-xxl) var(--space-md);
}

.thank-you-icon {
  font-size: 5rem;
  color: var(--color-leaf-green);
  margin-bottom: var(--space-lg);
}

.thank-you-title {
  margin-bottom: var(--space-md);
}

.thank-you-text {
  margin-bottom: var(--space-lg);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* 404 PAGE */
.error-404 {
  text-align: center;
  padding: var(--space-xxl) var(--space-md);
}

.error-code {
  font-size: 8rem;
  font-weight: bold;
  color: var(--color-leaf-green);
  line-height: 1;
  margin-bottom: var(--space-md);
}

.error-title {
  margin-bottom: var(--space-md);
}

.error-text {
  margin-bottom: var(--space-lg);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* PRIVACY/TERMS PAGES */
.legal-content {
  max-width: 800px;
  margin: 0 auto;
  padding: var(--space-lg) 0;
}

.legal-content h2 {
  margin-top: var(--space-lg);
  margin-bottom: var(--space-sm);
}

.legal-content p, .legal-content ul {
  margin-bottom: var(--space-md);
}

.legal-content ul {
  margin-left: var(--space-lg);
}

/* COOKIE BANNER */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--color-carbon-gray);
  padding: var(--space-md);
  z-index: var(--z-modal);
  box-shadow: var(--shadow-large);
  display: none;
}

.cookie-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.cookie-text {
  flex: 1;
  min-width: 280px;
  margin-bottom: 0;
}

.cookie-buttons {
  display: flex;
  gap: var(--space-xs);
}

/* 3D ELEMENTS AND ANIMATIONS */
.quantum-membrane {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  z-index: var(--z-below);
  opacity: 0.5;
}

/* RESPONSIVE STYLES */
@media (max-width: 992px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }
  
  .about-image {
    order: -1;
  }
}

@media (max-width: 768px) {
  .nav-list {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--color-carbon-gray);
    flex-direction: column;
    padding: var(--space-md);
    box-shadow: var(--shadow-medium);
  }
  
  .nav-list.active {
    display: flex;
  }
  
  .nav-item {
    margin: var(--space-xs) 0;
  }
  
  .mobile-nav-toggle {
    display: block;
    margin-right: 40px;
  }
  
  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .hero-buttons .button {
    width: 100%;
    margin-bottom: var(--space-xs);
  }
}

@media (max-width: 576px) {
  html {
    font-size: 14px;
  }
  
  .section {
    padding: var(--space-md) 0;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
  }
  
  .cookie-buttons {
    flex-direction: column;
    width: 100%;
  }
  
  .cookie-buttons button {
    width: 100%;
  }
  
  .products-grid {
    grid-template-columns: 1fr;
  }
}

/* Dynamic 3D Elements - Reduced for mobile */
@media (max-width: 768px) {
  .quantum-membrane {
    opacity: 0.3;
  }
}

@media (max-width: 576px) {
  .quantum-membrane {
    display: none;
  }
}
@media (max-width: 320px) {
  /* Core Typography Refinement */
  html {
    font-size: 13px; /* Slightly increased from 12px for better readability */
  }
  
  /* Spatial Compression Strategy */
  .container {
    padding: 0 var(--space-xs);
  }
  
  .section {
    padding: var(--space-sm) 0;
    margin-bottom: var(--space-sm); /* Added to create breathing room */
  }
  
  /* Header Density Reduction */
  .site-header {
    padding: var(--space-xs) 0;
  }
  
  .site-logo {
    font-size: var(--font-size-md);
    max-width: 180px; /* Prevent overflow */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .mobile-nav-toggle {
    margin-right: 0; /* Remove unnecessary space */
    padding: var(--space-xxs);
    font-size: 1.25rem; /* Smaller icon */
  }
  
  /* Hero Content Compression */
  .hero {
    min-height: 60vh; /* Reduced from 70vh */
  }
  
  .hero-title {
    font-size: 1.5rem;
    margin-bottom: var(--space-xs);
    line-height: 1.2;
  }
  
  .hero-subtitle {
    font-size: 0.95rem;
    margin-bottom: var(--space-sm);
    max-width: 100%;
    line-height: 1.4;
  }
  
  /* Card Ecosystem Adaptation */
  .products-grid {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
  }
  
  .card {
    border-radius: var(--border-radius-md); /* Reduced radius */
  }
  
  .card-content {
    padding: var(--space-sm) var(--space-xs);
  }
  
  .card-image {
    height: 130px; /* Reduced height */
  }
  
  .card-title {
    font-size: var(--font-size-md);
    margin-bottom: var(--space-xxs);
  }
  
  .card-text {
    font-size: var(--font-size-sm);
    margin-bottom: var(--space-xs);
  }
  
  .card-price {
    font-size: var(--font-size-md);
  }
  
  /* Touch Interface Enhancement */
  button, .button, .nav-link, .form-control {
    min-height: 44px; /* Ensure minimum touch target size */
  }
  
  button, .button {
    padding: 0 var(--space-sm); /* Horizontal padding only */
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    font-size: var(--font-size-sm);
  }
  
  /* Form Simplification */
  .contact-form {
    padding: var(--space-sm);
    border-radius: var(--border-radius-md);
  }
  
  .form-group {
    margin-bottom: var(--space-sm);
  }
  
  .form-label {
    margin-bottom: var(--space-xxs);
    font-size: var(--font-size-sm);
  }
  
  .form-control {
    padding: var(--space-xs);
    font-size: var(--font-size-md); /* Larger for better input */
  }
  
  /* Footer Density Reduction */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
    text-align: center;
  }
  
  .site-footer {
    padding: var(--space-md) 0 var(--space-sm);
  }
  
  .footer-links h4 {
    margin-bottom: var(--space-xs);
  }
  
  /* Feature Presentation */
  .features-grid {
    gap: var(--space-sm);
  }
  
  .feature {
    padding: var(--space-xs);
  }
  
  .feature-icon {
    font-size: 2rem;
    margin-bottom: var(--space-xxs);
  }
  
  /* Visual Decluttering */
  .about-grid img {
    max-height: 200px;
    object-fit: cover;
  }
  
  /* Performance Optimization */
  .quantum-membrane,
  .cookie-banner {
    display: none; /* Remove high-compute visuals */
  }
  
  /* Special Pages Compression */
  .error-code {
    font-size: 4rem;
  }
  
  .thank-you-icon {
    font-size: 2.5rem;
  }
  
  /* Animation Reduction */
  * {
    animation-duration: 0.2s !important; /* Speed up any animations */
    transition-duration: 0.2s !important; /* Speed up transitions */
  }
}