/* ========== Global Reset ========== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;
  color: #0f172a;
  background: linear-gradient(to bottom, #ffffff 0%, #f8fafc 100%);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ========== Layout Helpers ========== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 3rem;
}

.section {
  padding: 4rem 0;
  position: relative;
}

.section--tight {
  padding: 2.5rem 0;
}

.grid {
  display: grid;
  gap: 2rem;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

/* ========== Navigation ========== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  transition: all 0.3s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.nav-logo {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.nav-logo:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(34, 197, 94, 0.4);
}

.nav-logo img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  border: none;
}

.nav-title {
  font-weight: 700;
  letter-spacing: 0.03em;
  font-size: 1.05rem;
  color: #0f172a;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-size: 0.95rem;
}

.nav-links a {
  text-decoration: none;
  color: #475569;
  font-weight: 500;
  position: relative;
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0.2rem;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  transition: width 0.3s ease;
}

.nav-links a:hover {
  color: #16a34a;
  background: rgba(34, 197, 94, 0.05);
}

.nav-links a:hover::after {
  width: calc(100% - 1.2rem);
}

.nav-links a.active {
  color: #16a34a;
  background: rgba(34, 197, 94, 0.1);
}

.nav-links a.active::after {
  width: calc(100% - 1.2rem);
}

/* ========== Buttons ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  gap: 0.4rem;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #ffffff;
  box-shadow: 0 4px 20px rgba(34, 197, 94, 0.4),
              0 8px 30px rgba(34, 197, 94, 0.2);
}

.btn-primary::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(34, 197, 94, 0.5),
              0 12px 40px rgba(34, 197, 94, 0.3);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-outline {
  background: #ffffff;
  color: #0f172a;
  border: 2px solid #e2e8f0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.btn-outline:hover {
  background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
  border-color: #86efac;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(34, 197, 94, 0.15);
}

.btn-pill {
  font-size: 0.85rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: #e0f2fe;
  color: #0369a1;
  border: none;
}

/* ========== Hero ========== */
.hero {
  padding: 5rem 0 4rem;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 50%, #f1f5f9 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(34, 197, 94, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-layout {
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 768px) {
  .hero-layout {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    align-items: center;
  }
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  border: 1px solid #bbf7d0;
  background: #f0fdf4;
  color: #166534;
  font-weight: 500;
  font-size: 0.8rem;
}

.hero-eyebrow span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #22c55e;
}

.hero-title {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  margin-top: 1.25rem;
  margin-bottom: 1rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  background: linear-gradient(135deg, #0f172a 0%, #334155 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: #64748b;
  max-width: 36rem;
  line-height: 1.7;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.7rem;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-top: 2rem;
  font-size: 0.85rem;
  color: #64748b;
}

.hero-meta span {
  display: inline-flex;
  flex-direction: column;
}

.hero-meta strong {
  font-size: 0.95rem;
  color: #0f172a;
}

/* Hero imagery */
.hero-card {
  background: linear-gradient(135deg, #10b981 0%, #059669 50%, #047857 100%);
  border-radius: 2rem;
  padding: 2rem;
  position: relative;
  overflow: hidden;
  color: white;
  box-shadow: 0 25px 70px rgba(16, 185, 129, 0.4),
              0 10px 30px rgba(5, 150, 105, 0.3);
  min-height: 300px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: float 6s ease-in-out infinite;
}

.hero-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 30px 80px rgba(16, 185, 129, 0.5),
              0 15px 40px rgba(5, 150, 105, 0.4);
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

.hero-card-earth {
  position: absolute;
  bottom: -10%;
  right: -15%;
  width: 280px;
  opacity: 0.25;
  animation: rotate 20s linear infinite;
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.hero-card-content {
  position: relative;
  z-index: 1;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(15, 23, 42, 0.25);
  border-radius: 999px;
  padding: 0.3rem 0.8rem;
  font-size: 0.8rem;
}

.hero-card-metric {
  margin-top: 1.25rem;
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 1rem;
  row-gap: 0.5rem;
  align-items: center;
}

.hero-badge {
  background: white;
  color: #16a34a;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

.hero-badge small {
  font-size: 0.7rem;
  color: #4b5563;
}

.hero-note {
  font-size: 0.8rem;
  opacity: 0.9;
}

.hero-card-foot {
  margin-top: 1.2rem;
  font-size: 0.8rem;
  opacity: 0.9;
}

/* ========== Cards & Sections ========== */
.section-title {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 800;
  margin-bottom: 0.6rem;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.section-kicker {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.8rem;
  color: #22c55e;
  font-weight: 700;
  display: inline-block;
  margin-bottom: 0.5rem;
}

.section-subtitle {
  font-size: 1.05rem;
  color: #64748b;
  max-width: 36rem;
  line-height: 1.7;
}

.card {
  background: #ffffff;
  border-radius: 1.5rem;
  padding: 1.75rem 2rem;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.08),
              0 1px 3px rgba(0, 0, 0, 0.05);
  border: 1px solid #e2e8f0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  margin-top: 1rem;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #22c55e, #10b981, #059669);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.12),
              0 4px 12px rgba(0, 0, 0, 0.08);
  border-color: #cbd5e1;
}

.card:hover::before {
  transform: scaleX(1);
}

.card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.6rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.01em;
}

.card p {
  font-size: 0.95rem;
  color: #64748b;
  line-height: 1.7;
}

.card-tag {
  display: inline-flex;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
  color: #059669;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.card-metric {
  font-size: 0.85rem;
  color: #0f172a;
  margin-top: 0.6rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  background: #fefce8;
  color: #854d0e;
  font-size: 0.75rem;
}

/* Lists */
.list {
  margin-top: 0.8rem;
  padding-left: 1.2rem;
  font-size: 0.9rem;
  color: #4b5563;
}

.list li + li {
  margin-top: 0.35rem;
}

/* ========== Feature sections ========== */
.feature-steps {
  counter-reset: step;
  display: grid;
  gap: 1.2rem;
}

.feature-step {
  position: relative;
  padding-left: 2.4rem;
}

.feature-step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.1rem;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 999px;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

/* ========== Split layouts ========== */
.split {
  display: grid;
  gap: 2rem;
}

@media (min-width: 900px) {
  .split {
    grid-template-columns: 1.3fr 1fr;
  }
}

/* ========== Image wrappers ========== */
.image-frame {
  background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
  border-radius: 1.75rem;
  padding: 1rem;
  box-shadow: 0 10px 40px rgba(15, 23, 42, 0.12),
              0 4px 12px rgba(0, 0, 0, 0.08);
  border: 1px solid #dcfce7;
  transition: all 0.3s ease;
  position: relative;
  overflow: visible;
  display: flex;
  flex-direction: column;
}

.image-frame::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(34, 197, 94, 0.1) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 0;
}

.image-frame:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 50px rgba(15, 23, 42, 0.15),
              0 6px 16px rgba(0, 0, 0, 0.1);
}

.image-frame:hover::before {
  opacity: 1;
}

.image-frame img {
  width: 100%;
  height: auto;
  max-height: 55vh;
  border-radius: 1.25rem;
  display: block;
  position: relative;
  z-index: 1;
  transition: transform 0.3s ease;
  object-fit: contain;
}

.image-frame:hover img {
  transform: scale(1.02);
}

/* Ensure image frame content stays proportional and visible */
.image-frame p {
  flex-shrink: 0;
  margin-top: 0.75rem;
  position: relative;
  z-index: 1;
  padding-top: 0.5rem;
}

/* ========== Tables ========== */
.table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  font-size: 0.9rem;
}

.table th,
.table td {
  padding: 0.55rem 0.6rem;
  border-bottom: 1px solid #e2e8f0;
}

.table th {
  text-align: left;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
}

/* ========== Timeline ========== */
.timeline {
  position: relative;
  padding-left: 1.2rem;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 0.4rem;
  bottom: 0.4rem;
  left: 0.3rem;
  width: 2px;
  background: #e2e8f0;
}

.timeline-item {
  position: relative;
  padding-left: 1.3rem;
  margin-bottom: 1.1rem;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.4rem;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #22c55e;
}

/* ========== Footer ========== */
.site-footer {
  border-top: 1px solid #e2e8f0;
  padding: 2.5rem 1.5rem 3rem;
  font-size: 0.9rem;
  color: #64748b;
  background: linear-gradient(to top, #f8fafc, #ffffff);
  margin-top: 4rem;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
}

.footer-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: #64748b;
  text-decoration: none;
  transition: all 0.2s ease;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
}

.footer-links a:hover {
  color: #22c55e;
  background: rgba(34, 197, 94, 0.1);
  text-decoration: none;
}

/* ========== Utility ========== */
.text-muted {
  color: #64748b;
}

.text-small {
  font-size: 0.8rem;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.7rem;
}

.chip {
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
  font-size: 0.8rem;
  color: #374151;
  font-weight: 500;
  border: 1px solid #d1d5db;
  transition: all 0.2s ease;
}

.chip:hover {
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
  border-color: #86efac;
  color: #059669;
  transform: translateY(-1px);
}

.highlight {
  color: #16a34a;
  font-weight: 700;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(16, 185, 129, 0.1));
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
}

.max-w-2 {
  max-width: 34rem;
}

/* ========== Responsive Improvements ========== */
@media (max-width: 768px) {
  .nav-links {
    gap: 0.75rem;
    font-size: 0.85rem;
  }
  
  .hero {
    padding: 3rem 0 2.5rem;
  }
  
  .section {
    padding: 3rem 0;
  }
  
  .card {
    padding: 1.5rem;
  }
  
  .hero-card {
    min-height: 250px;
  }
  
  .image-frame img {
    max-height: 40vh;
  }
}

/* Ensure image frames in grid layouts are proportional */
.grid-2 .image-frame {
  align-self: start;
}

@media (max-width: 900px) {
  .grid-2 .image-frame img {
    max-height: 40vh;
  }
}

/* ========== Accessibility & Performance ========== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  html {
    scroll-behavior: auto;
  }
}
