/* 
 * CLEAN CODE - Global Environment Configuration
 * Design Tokens & Reset
 */

:root {
  /* 
   * COLOR PALETTE - Caribbean Biophilic
   */
  --color-background: #E0F7FA;
  /* Caribbean Blue Light */
  --color-white: #FFFFFF;
  /* Cloud White */
  --color-gold: #D4AF37;
  /* Radiant Gold */
  --color-forest-green: #4F7942;
  /* Identity: Forest Green */

  --color-text-main: #4F7942;
  /* Titles in Green */
  --color-text-body: #333333;
  --color-text-muted: #555555;

  /* Gradients */
  --gradient-premium: linear-gradient(135deg, #4F7942 0%, #D4AF37 100%);

  /* 
   * TYPOGRAPHY 
   */
  --font-primary: 'Inter', 'Roboto', sans-serif;

  --text-base: 1rem;
  --text-h6: 1.25rem;
  --text-h5: 1.563rem;
  --text-h4: 1.953rem;
  --text-h3: 2.441rem;
  --text-h2: 3.052rem;
  --text-h1: 3.815rem;

  /* 
   * SPACING SYSTEM 
   */
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 40px;
  --space-6: 48px;
  --space-8: 64px;
  --nav-height: 80px;

  /* 
   * EFFECTS 
   */
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-pill: 50px;

  --shadow-subtle: 0 4px 6px rgba(79, 121, 66, 0.1);
  --shadow-floating: 0 10px 30px -10px rgba(79, 121, 66, 0.2);
  --transition-base: all 0.3s ease;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

/* 
 * ANIMATIONS
 */
@keyframes float {
  0% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-5px);
  }

  100% {
    transform: translateY(0px);
  }
}

/* 
 * RESET & BASE 
 */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-primary);
  background-color: var(--color-white);
  color: var(--color-text-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  padding-top: var(--nav-height);
}

/* 
 * TYPOGRAPHY UTILITIES 
 */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--space-2);
  color: var(--color-text-main);
  /* Deep Grey / Serious */
}

h1 {
  font-size: var(--text-h1);
  letter-spacing: -2px;
}

h2 {
  font-size: var(--text-h2);
  letter-spacing: -1px;
}

h3 {
  font-size: var(--text-h3);
}

h4 {
  font-size: var(--text-h4);
}

h5 {
  font-size: var(--text-h5);
}

h6 {
  font-size: var(--text-h6);
}

p {
  margin-bottom: var(--space-2);
  color: var(--color-text-body);
}

/* 
 * LAYOUT UTILITIES 
 */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-3);
}

.section {
  padding: var(--space-8) 0;
  background-color: var(--color-white);
  /* Ensure pure white everywhere */
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-4);
}

/* 
 * COMPONENT UTILITIES 
 */
.card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  box-shadow: var(--shadow-subtle);
  border: 1px solid rgba(0, 0, 0, 0.05);
  transition: var(--transition-base);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-floating);
  border-color: var(--color-gold);
}

.btn {
  display: inline-block;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition-base);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background-color: var(--color-text-main);
  color: var(--color-white);
}

.btn-primary:hover {
  background-color: var(--color-gold);
  color: var(--color-text-main);
}

/* Replaces old gradient text */
.text-gradient {
  background: var(--gradient-premium);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* 
 * HERO SECTION 
 */
#hero {
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  /* background-color: var(--color-white); */
  /* Replaced by video */
  padding: var(--space-8) var(--space-3);
}

.hero-video-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0.8) 50%, var(--color-white) 100%);
  z-index: 1;
}

/* Ensure content stays above video */
#hero>*:not(.hero-video-container) {
  position: relative;
  z-index: 2;
}

.hero-logo {
  width: 200px;
  height: auto;
  margin-bottom: var(--space-4);
  animation: float 4s ease-in-out infinite;
}

.hero-title {
  font-size: var(--text-h1);
  font-weight: 800;
  margin-bottom: var(--space-3);
  max-width: 800px;
  color: var(--color-metallic-green);
  /* Scientific Green */
}

.hero-subtitle {
  font-size: var(--text-h4);
  color: var(--color-text-muted);
  /* Neutral Gray */
  max-width: 600px;
  margin-bottom: var(--space-6);
  font-weight: 400;
}

/* 
 * BUTTONS (Enhanced for Premium)
 */
.btn-cta {
  background: var(--gradient-premium);
  background-size: 200% auto;
  /* Larger size for gradient shift */
  color: #FFFFFF;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-pill);
  font-size: var(--text-h5);
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all 0.4s ease;
  /* Smoother transition */
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
  /* Subtle gold depth */
}

.btn-cta:hover {
  background-position: right center;
  /* Gradient flow effect */
  transform: translateY(-3px);
  box-shadow: 0 15px 35px rgba(212, 175, 55, 0.5);
  /* Expanded shadow */
}

/* 
 * RESPONSIVENESS 
 */
@media (max-width: 768px) {
  :root {
    --text-h1: 2.5rem;
    --text-h4: 1.25rem;
  }

  #hero {
    min-height: 70vh;
    padding: var(--space-6) var(--space-3);
  }
}

/*
 * MANIFESTO SECTION
 */
#manifesto {
  padding: 80px 0;
  background-color: var(--color-white);
}

.manifesto-title {
  color: var(--color-metallic-green);
  /* Scientific Green */
  margin-bottom: var(--space-2);
  font-size: var(--text-h3);
}

.icon-manifesto {
  width: 40px;
  height: 40px;
  stroke: url(#premium-gradient);
  /* Fluid Cable Gradient */
  margin-bottom: var(--space-3);
  stroke-width: 1.5;
  fill: none;
}

/*
 * SCIENCE & ABOUT SECTIONS (Caribbean Blue)
 */
#science,
#about {
  background-color: #F4F7F6;
  /* Metallic Ice Grey */
}

#science h2,
#about h2 {
  color: var(--color-forest-green);
}

/*
 * PRODUCTS SECTION
 */
#products,
#solutions {
  background-color: var(--color-white);
  /* Pure white, removed gray */
  padding: 80px 0;
  position: relative;
  /* Removed overflow/background decorations for cleaner look */
}

.glass-card {
  background: var(--color-white);
  border: 1px solid #B2EBF2;
  /* Soft Caribbean Blue Border matching theme */
  box-shadow: 0 4px 15px rgba(224, 247, 250, 0.6);
  /* Subtle blue-tinted pop shadow */
  border-radius: 16px;
  padding: var(--space-4);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  position: relative;
  z-index: 1;
}

.glass-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(79, 121, 66, 0.15);
  /* Slightly stronger shadow on hover */
  border-color: var(--color-gold);
}

.badge-dev {
  display: inline-block;
  background: #F0F0F0;
  color: var(--color-text-muted);
  border: 1px solid #DDD;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 4px;
  margin-bottom: var(--space-2);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.mockup-placeholder {
  width: 100%;
  aspect-ratio: 9/16;
  background: #FAFAFA;
  border-radius: 12px;
  border: 1px solid #EEE;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.02);
  margin: var(--space-3) 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  font-size: 0.9rem;
  max-width: 200px;
  margin-left: auto;
  margin-right: auto;
}

.store-buttons {
  display: flex;
  gap: var(--space-2);
  justify-content: center;
  margin-top: var(--space-3);
  flex-wrap: wrap;
}

.btn-store {
  background: var(--color-white);
  color: var(--color-gold);
  padding: 10px 16px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--color-gold);
  transition: all 0.2s ease;
}

.btn-store:hover {
  background: var(--color-gold);
  color: var(--color-white);
  opacity: 1;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(212, 175, 55, 0.2);
}

/*
 * ECOSYSTEM SECTION
 */
#ecosystem {
  padding: var(--space-8) 0;
  background-color: var(--color-white);
}

.social-card {
  background: var(--color-white);
  padding: var(--space-4);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: var(--radius-md);
  text-align: center;
  transition: box-shadow 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
  cursor: pointer;
  box-shadow: var(--shadow-subtle);
}

.social-card:hover {
  box-shadow: var(--shadow-floating);
  border-color: var(--color-gold);
  transform: translateY(-5px);
  /* Enhanced anti-gravity */
}

.social-icon {
  width: 48px;
  height: 48px;
  margin-bottom: var(--space-2);
  color: var(--color-text-body);
  transition: color 0.3s ease;
}

.social-card:hover .social-icon {
  color: var(--color-metallic-green);
}

/*
 * FOOTER
 */
footer {
  background-color: var(--color-white);
  padding: 60px 0 20px;
  border-top: 1px solid #eee;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.footer-col {
  display: flex;
  flex-direction: column;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.footer-nav a {
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.3s ease;
}

.footer-nav a:hover {
  color: var(--color-metallic-green);
  padding-left: 4px;
}

.footer-social-icons {
  display: flex;
  gap: var(--space-3);
}

.footer-social-icon {
  width: 24px;
  height: 24px;
  color: #999;
  transition: color 0.3s ease, transform 0.3s ease;
}

.footer-social-icon:hover {
  color: var(--color-gold);
  transform: scale(1.1);
}

.copyright {
  text-align: center;
  font-size: 0.8rem;
  color: #999;
  padding-top: var(--space-4);
  border-top: 1px solid #f5f5f5;
  margin-top: var(--space-4);
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: var(--space-6);
  }

  .footer-col {
    align-items: center;
  }

  .footer-nav {
    align-items: center;
  }
}

/* 
 * NAVIGATION 
 */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-4);
  z-index: 1000;
  box-shadow: var(--shadow-subtle);
  transition: var(--transition-base);
}

.nav-logo-container {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
}

.nav-logo-img {
  height: 40px;
  width: auto;
}

.nav-logo-text {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--color-forest-green);
}

.nav-links {
  display: flex;
  gap: var(--space-4);
  list-style: none;
}

.nav-link {
  text-decoration: none;
  color: var(--color-text-body);
  font-weight: 600;
  font-size: 1rem;
  transition: color 0.3s ease;
  position: relative;
}

.nav-link:hover {
  color: var(--color-gold);
}

.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--color-gold);
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

.lang-switcher {
  display: flex;
  gap: var(--space-1);
  margin-left: var(--space-4);
  align-items: center;
}

.lang-btn {
  background: none;
  border: none;
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.lang-btn:hover {
  color: var(--color-gold);
}

.lang-btn.active {
  color: var(--color-forest-green);
  background-color: rgba(79, 121, 66, 0.1);
}

.divider {
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    /* Mobile handling details would go here, simple hide for now per task scope focus */
  }
}