/* Universal box-sizing for consistent sizing */
*, *::before, *::after {
  box-sizing: border-box;
}

/* Base styles */
body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: #050814;
  color: #e5e9f0;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Responsive container */
.container {
  width: min(1120px, 100% - 2rem);
  margin: 0 auto;
  padding: 0 1rem;
}

/* Section spacing */
.section {
  padding: 3.5rem 0;
}

/* Alternate section background */
.section-alt {
  background: radial-gradient(circle at top, #111827 0%, #020617 55%, #000 100%);
}

/* Dark section background */
.section-dark {
  background-color: #020617;
}

/* Sticky header with translucent blur */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(2, 6, 23, 0.9);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
  transition: background-color 0.3s ease;
}

/* Header flex layout */
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
  gap: 1.5rem;
}

/* Logo image */
.logo img {
  height: 40px;
  width: auto;
}

/* Navigation */
.main-nav ul {
  list-style: none;
  display: flex;
  gap: 1.25rem;
  margin: 0;
  padding: 0;
}

.nav-link {
  color: #cbd5f5;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  border-bottom: 2px solid transparent;
  padding-bottom: 0.25rem;
  transition: color 0.3s ease, border-color 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #22c55e;
  border-color: #22c55e;
  outline-offset: 2px;
}

/* Header button */
.btn-header {
  font-size: 0.95rem;
}

/* Button styles base */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.6rem 1.4rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
  user-select: none;
}

/* Primary button with fresh green gradient */
.btn-primary {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #020617;
  box-shadow: 0 10px 25px rgba(34, 197, 94, 0.35);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 14px 32px rgba(34, 197, 94, 0.45);
  outline: none;
}

/* Large button */
.btn-lg {
  padding: 0.9rem 1.8rem;
  font-size: 1rem;
}

/* Transparent ghost button */
.btn-ghost {
  background: transparent;
  border: 1px solid rgba(148, 163, 184, 0.4);
  color: #e5e9f0;
  padding: 0.6rem 1.2rem;
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  border-color: #22c55e;
  color: #22c55e;
  outline: none;
}

/* Outline button */
.btn-outline {
  background: transparent;
  border: 1px solid rgba(148, 163, 184, 0.45);
  color: #e5e9f0;
  padding: 0.75rem 1.5rem;
}

.btn-outline:hover,
.btn-outline:focus-visible {
  border-color: #22c55e;
  color: #22c55e;
  outline: none;
}

/* Hero section with layered radial gradients */
.hero {
  padding: 3.5rem 0 2.5rem;
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.35), transparent 55%),
    radial-gradient(circle at top right, rgba(34, 197, 94, 0.35), transparent 55%),
    #020617;
}

/* Hero grid layout */
.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  align-items: center;
  gap: 2.5rem;
}

/* Responsive hero heading */
.hero h1 {
  font-size: clamp(2.1rem, 3.2vw, 2.7rem);
  margin-bottom: 0.6rem;
  line-height: 1.2;
}

/* Hero paragraph */
.hero p {
  color: #cbd5f5;
  max-width: 34rem;
  margin-bottom: 1.25rem;
}

/* Hero buttons container */
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

/* Hero highlights list */
.hero-highlights {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.25rem;
  font-size: 0.9rem;
  color: #9ca3af;
}

/* Carousel container */
.hero-media {
  position: relative;
}

/* Carousel styling with translucent background */
.carousel {
  background: rgba(15, 23, 42, 0.9);
  border-radius: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.3);
  padding: 1rem 1rem 1.5rem;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.85);
}

/* Carousel title */
.carousel-title {
  text-align: center;
  margin-bottom: 0.75rem;
  font-size: 1rem;
  color: #e5e9f0;
  font-weight: 600;
}

/* Carousel viewport hides overflow */
.carousel-viewport {
  overflow: hidden;
  border-radius: 0.75rem;
}

/* Carousel track */
.carousel-track {
  display: flex;
  transition: transform 0.35s ease;
}

/* Carousel images */
.carousel-track img {
  width: 100%;
  flex-shrink: 0;
  border-radius: 0.5rem;
  user-select: none;
  pointer-events: none;
}

/* Carousel control buttons */
.carousel-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.6);
  color: #e5e9f0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 1.2rem;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.carousel-control.prev {
  left: -0.4rem;
}

.carousel-control.next {
  right: -0.4rem;
}

.carousel-control:hover,
.carousel-control:focus-visible {
  background-color: #22c55e;
  border-color: #22c55e;
  color: #020617;
  outline: none;
}

/* Section header styling */
.section-header {
  text-align: center;
  margin-bottom: 2rem;
}

.section-header h2 {
  font-size: 1.6rem;
  margin-bottom: 0.4rem;
  font-weight: 700;
}

.section-header p {
  color: #9ca3af;
  max-width: 32rem;
  margin: 0 auto;
  font-size: 1rem;
  line-height: 1.4;
}

/* Features grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

/* Feature cards */
.feature-card {
  background: rgba(15, 23, 42, 0.8);
  border-radius: 0.9rem;
  padding: 1.25rem 1.4rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.feature-card h3 {
  margin-top: 0;
  margin-bottom: 0.4rem;
  font-size: 1.05rem;
  font-weight: 600;
}

.feature-card:hover,
.feature-card:focus-within {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(34, 197, 94, 0.5);
  outline: none;
}

/* Social & video grid */
.social-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 1.5rem;
}

/* Cards */
.card {
  background: rgba(15, 23, 42, 0.9);
  border-radius: 1rem;
  padding: 1.2rem 1.4rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

/* Links inside cards */
.card a {
  color: inherit;
  text-decoration: none;
  font-weight: 600;
}

.card a:hover,
.card a:focus-visible {
  color: #22c55e;
  outline: none;
}

/* Card images */
.card-image {
  border-radius: 0.75rem;
  margin: 0.75rem 0;
  width: 100%;
  height: auto;
  object-fit: cover;
}

/* Meta text */
.meta {
  font-size: 0.8rem;
  color: #9ca3af;
}

/* Responsive video wrapper */
.video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  border-radius: 0.75rem;
  overflow: hidden;
}

.video-wrapper iframe,
.video-wrapper video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 0.75rem;
}

/* Guides grid */
.article-previews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.2rem;
}

/* Article previews */
.article-preview {
  background: rgba(15, 23, 42, 0.98);
  border-radius: 0.9rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  overflow: hidden;
  color: inherit;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.article-preview img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.article-preview h3 {
  margin: 0.9rem 0 0.45rem;
  padding: 0 0.9rem;
  font-size: 1rem;
}

.article-preview p {
  padding: 0 0.9rem 0.9rem;
  margin: 0;
  font-size: 0.9rem;
  color: #9ca3af;
}

.article-preview:hover,
.article-preview:focus-within {
  border-color: #22c55e;
  transform: translateY(-1px);
  outline: none;
}

/* Articles layout */
.articles-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 1.75rem;
  align-items: flex-start;
}

/* Footer */
.site-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.25);
  background-color: #020617;
  padding: 1.5rem 0 2rem;
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: #9ca3af;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  align-items: center;
  justify-content: space-between;
}

.footer-links {
  list-style: none;
  display: flex;
  gap: 1.25rem;
  margin: 0;
  padding: 0;
}

.footer-links a {
  color: #cbd5f5;
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.3s ease;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: #22c55e;
  outline: none;
}

/* Responsive adjustments */

/* Medium screens below 960px */
@media (max-width: 960px) {
  .hero-inner,
  .social-grid,
  .articles-layout {
    grid-template-columns: 1fr;
  }
  .hero-media {
    order: -1;
  }
  .header-inner {
    flex-wrap: wrap;
  }
  .carousel-control.prev {
    left: 0;
  }
  .carousel-control.next {
    right: 0;
  }
}

/* Small screens below 640px */
@media (max-width: 640px) {
  .header-inner {
    justify-content: space-between;
    padding: 0 1rem;
  }

  .main-nav {
    display: none;
  }

  .hero {
    padding-top: 2.5rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .promo-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}
