img { max-width: 100%; height: auto; display: block; }

/* === CSS RESET & BASE === */
* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #0a0a14;
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --accent: #10b981; /* Emerald green for Ecology theme */
  --accent-dark: #065f46;
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.1);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --shadow-glass: 0 8px 32px 0 rgba(0,0,0,0.3);
  --font-heading: 'Fraunces', serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  --container-width: 1200px;
}

body, html {
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  font-size: 16px;
}

/* === BACKGROUND ANIMATION === */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, #0a0a14, #111827, #064e3b, #0a0a14);
  background-size: 400% 400%;
  z-index: -1;
  animation: gradientBG 15s linear infinite;
}

@keyframes gradientBG {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* === TYPOGRAPHY === */
h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 700; line-height: 1.2; }
h1 { font-size: clamp(3rem, 8vw, 5rem); }
h2 { font-size: clamp(2rem, 5vw, 3.5rem); margin-bottom: 2rem; }
h3 { font-size: 1.75rem; margin-bottom: 1rem; }
p { margin-bottom: 1.5rem; color: var(--text-muted); }

/* === STRUCTURAL BASELINES === */
.container { max-width: var(--container-width); margin: 0 auto; padding: 0 5%; width: 100%; }
section { padding: 120px 0; position: relative; }

/* Section width rhythm */
section.full-bleed { width: 100%; max-width: 100%; padding-left: 0; padding-right: 0; }
section.contained { max-width: var(--container-width); margin: 0 auto; }

/* Alternating Sections */
section:nth-child(odd) { background: transparent; }
section:nth-child(even) { background: rgba(255,255,255,0.02); }

/* === MEGA HEADER === */
.mega-header {
  height: 300px;
  display: grid;
  grid-template-areas:
    "contact social search"
    "logo nav nav"
    "tagline tagline tagline";
  align-items: center;
  padding: 2rem 5%;
  background: rgba(10, 10, 20, 0.8);
  border-bottom: 1px solid var(--glass-border);
}

.header-contact { grid-area: contact; font-size: 0.9rem; }
.header-social { grid-area: social; display: flex; gap: 1rem; justify-content: center; }
.header-search { grid-area: search; display: flex; justify-content: flex-end; }
.header-logo { grid-area: logo; font-family: var(--font-heading); font-size: 2rem; color: var(--accent); }
.header-nav { grid-area: nav; display: flex; justify-content: center; }
.header-tagline { grid-area: tagline; text-align: center; font-style: italic; opacity: 0.7; }

.search-bar {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  color: white;
  width: 200px;
}

/* === FLOATING PILL NAV === */
.pill-nav {
  display: flex;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  padding: 0.5rem 1.5rem;
  border-radius: 50px;
  border: 1px solid var(--glass-border);
  gap: 2rem;
}

.pill-nav a {
  color: var(--text-muted);
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
}

.pill-nav a:hover, .pill-nav a.active { color: var(--text); }
.pill-nav a.active::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
}

/* === HERO STYLE === */
.hero {
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0 5%;
}

.hero h1 { max-width: 900px; margin-bottom: 1.5rem; }
.hero p { font-size: 1.25rem; max-width: 600px; margin-bottom: 2.5rem; }

/* === BUTTONS === */
.btn-primary {
  background: var(--accent);
  color: #fff;
  padding: 1.25rem 3rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px -10px var(--accent);
  filter: brightness(1.1);
}

.btn-full { width: 100%; margin-top: 2rem; }

/* === SPLIT SCREEN ARCHETYPE === */
.split-section {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 4rem;
}

@media (min-width: 768px) {
  .split-section { grid-template-columns: 1fr 1fr; }
  .split-section.reverse .content-side { order: 2; }
  .split-section.reverse .media-side { order: 1; }
}

.media-side img {
  width: 100%;
  height: 100%;
  min-height: 400px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-glass);
}

/* === GLASSMORPHISM CARDS === */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-glass);
  transition: all 0.3s ease;
}

.glass-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.05);
}

/* === GRID SYSTEM === */
.grid-3 { display: grid; grid-template-columns: 1fr; gap: 2.5rem; }
@media (min-width: 768px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }

/* === COMPARISON TABLE === */
.comparison-container { overflow-x: auto; margin-top: 4rem; }
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--glass-border);
}

.comparison-table th, .comparison-table td {
  padding: 1.5rem;
  text-align: center;
  border-bottom: 1px solid var(--glass-border);
}

.comparison-table th { background: rgba(255,255,255,0.05); font-family: var(--font-heading); }
.comparison-table tr:hover td { background: rgba(255,255,255,0.02); }
.comparison-table .feature-name { text-align: left; font-weight: 600; padding-left: 2.5rem; }
.recommended { background: var(--accent) !important; color: white; position: relative; }
.recommended-badge {
  position: absolute;
  top: -10px;
  right: 10px;
  background: #fbbf24;
  color: #000;
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 700;
}

/* === VIDEO SECTION === */
.video-block {
  position: relative;
  width: 100%;
  height: 500px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
}

.video-overlay {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.4);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: background 0.3s ease;
}

.video-block:hover .video-overlay { background: rgba(0,0,0,0.2); }
.play-btn {
  width: 80px; height: 80px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 2rem;
  color: white;
  margin-bottom: 1rem;
  box-shadow: 0 0 30px var(--accent);
}

/* === AWARDS BAR === */
.awards-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 3rem;
  padding: 3rem 0;
  border-top: 1px dashed var(--glass-border);
  border-bottom: 1px dashed var(--glass-border);
}

.award-item { text-align: center; opacity: 0.6; transition: opacity 0.3s; }
.award-item:hover { opacity: 1; }
.award-item i { font-size: 2.5rem; color: var(--accent); margin-bottom: 0.5rem; }
.award-year { display: block; font-size: 0.8rem; font-weight: 700; }

/* === TESTIMONIALS === */
.video-testimonial { margin-bottom: 3rem; }
.testimonial-transcript {
  margin-top: 1.5rem;
  font-style: italic;
  color: var(--text-muted);
  border-left: 3px solid var(--accent);
  padding-left: 1.5rem;
}

/* === SECTION DIVIDERS === */
.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  margin: 4rem 0;
}

.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  border-top: 2px dotted var(--glass-border);
}

.divider i { color: var(--accent); font-size: 1.5rem; }

/* === BRUTALIST FOOTER === */
.brutalist-footer {
  background: #000;
  border-top: 10px solid var(--accent);
  padding: 5rem 5% 2rem;
  font-family: 'Space Mono', monospace; /* Monospaced for brutalist feel */
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4rem;
  border-bottom: 2px solid var(--text);
  padding-bottom: 4rem;
  margin-bottom: 2rem;
}

@media (min-width: 1024px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
}

.footer-column h4 {
  font-family: 'Space Mono', monospace;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 2rem;
  border-bottom: 4px solid var(--accent);
  display: inline-block;
}

.footer-links { list-style: none; }
.footer-links li { margin-bottom: 1rem; }
.footer-links a { transition: color 0.3s; }
.footer-links a:hover { color: var(--accent); }

.newsletter-form { display: flex; gap: 0; border: 3px solid var(--text); }
.newsletter-form input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 1rem;
  color: white;
  outline: none;
}
.newsletter-form button {
  background: var(--text);
  color: black;
  border: none;
  padding: 0 1.5rem;
  font-weight: 900;
  cursor: pointer;
  text-transform: uppercase;
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  font-size: 0.8rem;
  opacity: 0.7;
}

@media (min-width: 768px) {
  .footer-bottom { flex-direction: row; justify-content: space-between; }
}

/* === MOBILE NAV === */
.mobile-toggle { display: none; font-size: 2rem; cursor: pointer; color: var(--accent); }

@media (max-width: 768px) {
  .mega-header {
    height: auto;
    grid-template-areas:
      "logo mobile-toggle"
      "contact contact"
      "search search";
    padding: 1rem 5%;
  }
  .header-nav, .header-social, .header-tagline { display: none; }
  .mobile-toggle { display: block; grid-area: mobile-toggle; justify-self: end; }

  .mobile-menu {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100vh;
    background: var(--bg);
    z-index: 1000;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    font-size: 1.5rem;
  }
  .mobile-menu.active { display: flex; }
  .mobile-close { position: absolute; top: 2rem; right: 2rem; font-size: 2.5rem; }
}

/* === INNER PAGE ELEMENTS === */
.breadcrumb { margin-bottom: 2rem; font-size: 0.9rem; opacity: 0.7; }
.breadcrumb a:hover { color: var(--accent); }

.sidebar { position: sticky; top: 2rem; }
.sidebar-widget {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.sidebar-widget h4 { margin-bottom: 1rem; border-left: 4px solid var(--accent); padding-left: 1rem; }

/* === ANIMATIONS === */
.reveal { opacity: 0; transform: translateY(30px); transition: all 0.8s ease-out; }
.reveal.active { opacity: 1; transform: translateY(0); }

/* Auto-fix: prevent default blue/purple browser links */
a { color: inherit; text-decoration: none; transition: color 0.3s ease; }
a:hover { color: currentColor; }
