/* ============================================================
   DataKolekta — Landing Page Styles
   Mobile-first · 8px spacing · DM Sans · Custom palette
   ============================================================ */

/* ----------  Design tokens  ---------- */
:root {
  /* Brand palette */
  --ink: #17211d;
  --muted: #68736d;
  --muted-2: #87928b;
  --line: #dce4dc;
  --line-soft: #edf1ed;
  --paper: #fff;
  --bg: #f4f6f2;
  --green: #1e5b49;
  --green-dark: #154a3b;
  --green-light: #dcefe5;
  --green-pale: #eaf3ec;
  --yellow: #f5c86a;
  --yellow-bg: #fff2d9;
  --red: #bd5d4a;
  --red-bg: #fce8e3;
  --blue: #3b7bb3;
  --blue-bg: #e3eef6;

  /* Aliases for semantic use */
  --text:         var(--ink);
  --text-muted:   var(--muted);
  --text-faint:   var(--muted-2);
  --border:       var(--line);
  --border-soft:  var(--line-soft);
  --primary:      var(--green);
  --primary-dark: var(--green-dark);
  --primary-light: var(--green-light);
  --primary-pale: var(--green-pale);
  --surface:      var(--paper);
  --surface-alt:  var(--bg);
  --accent:       var(--yellow);
  --accent-bg:    var(--yellow-bg);
  --info:         var(--blue);
  --info-bg:      var(--blue-bg);
  --danger:       var(--red);
  --danger-bg:    var(--red-bg);

  /* Typography */
  --font: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --fs-xs:   0.75rem;
  --fs-sm:   0.875rem;
  --fs-base: 1rem;
  --fs-lg:   1.125rem;
  --fs-xl:   1.375rem;
  --fs-2xl:  1.75rem;
  --fs-3xl:  2.25rem;
  --fs-4xl:  3rem;
  --fs-5xl:  3.75rem;

  /* Spacing — 8px system */
  --sp-1: 0.5rem;
  --sp-2: 1rem;
  --sp-3: 1.5rem;
  --sp-4: 2rem;
  --sp-5: 3rem;
  --sp-6: 4rem;
  --sp-7: 6rem;
  --sp-8: 8rem;

  /* Radius */
  --r-sm: var(--radius-sm);
  --r-md: var(--radius);
  --r-lg: 20px;
  --r-xl: 28px;
  --r-full: 9999px;
  --radius: 14px;
  --radius-sm: 9px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(22,52,38,.04);
  --shadow-md: 0 4px 12px rgba(22,52,38,.06);
  --shadow: 0 4px 12px rgba(22,52,38,.06);
  --shadow-lg: 0 16px 28px rgba(22,52,38,.08);
  --shadow-xl: 0 24px 56px rgba(22,52,38,.12);
  --shadow-primary: 0 8px 24px rgba(30,91,73,.20);

  /* Transitions */
  --transition: .2s ease;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast: 180ms var(--ease);
  --t-med: 320ms var(--ease);
  --t-slow: 600ms var(--ease-out);

  /* Layout */
  --container: 1200px;
  --nav-h: 72px;
}

/* ----------  Reset  ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  font-size: var(--fs-base);
  line-height: 1.5;
  color: var(--text);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }
svg { width: 100%; height: 100%; }

/* ----------  Reusable  ---------- */
.eyebrow {
  display: inline-block;
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: var(--sp-2);
}

.gradient-text {
  background: linear-gradient(120deg, var(--green), var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-container {
  max-width: var(--container);
  margin: 0 auto;
  padding: var(--sp-7) var(--sp-2);
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto var(--sp-5);
}
.section-title {
  font-size: var(--fs-2xl);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.02em;
  color: var(--ink);
}
.section-subtitle {
  margin-top: var(--sp-1);
  font-size: var(--fs-lg);
  color: var(--text-muted);
  line-height: 1.6;
}

/* ----------  Buttons  ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-1);
  padding: 0.625rem 1.25rem;
  font-size: var(--fs-sm);
  font-weight: 600;
  border-radius: var(--r-sm);
  transition: transform var(--t-fast), box-shadow var(--t-fast), background var(--t-fast), color var(--t-fast);
  white-space: nowrap;
}
.btn-lg { padding: 0.875rem 1.75rem; font-size: var(--fs-base); }
.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow-primary);
}
.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(30,91,73,.30);
}
.btn-ghost {
  border: 1.5px solid var(--border);
  color: var(--ink);
  background: transparent;
}
.btn-ghost:hover {
  border-color: var(--muted-2);
  background: var(--bg);
  transform: translateY(-2px);
}
.btn-ghost-light {
  border: 1.5px solid rgba(255,255,255,.3);
  color: #fff;
  background: transparent;
}
.btn-ghost-light:hover {
  background: rgba(255,255,255,.1);
  border-color: rgba(255,255,255,.5);
}

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  z-index: 1000;
  transition: background var(--t-med), box-shadow var(--t-med), backdrop-filter var(--t-med);
}
.navbar.scrolled {
  background: rgba(255,255,255,.88);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  box-shadow: var(--shadow-sm);
}
.nav-container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--sp-2);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-weight: 700;
  font-size: var(--fs-lg);
  color: var(--ink);
}
.logo-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: var(--r-sm);
  background: linear-gradient(135deg, var(--green), var(--green-dark));
  color: #fff;
  font-size: var(--fs-lg);
  font-weight: 700;
  box-shadow: var(--shadow-primary);
}
.logo-text { letter-spacing: -.02em; }

.nav-menu {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}
.nav-link {
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--muted);
  transition: color var(--t-fast);
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -6px; left: 0;
  width: 0; height: 2px;
  background: var(--primary);
  border-radius: 2px;
  transition: width var(--t-med);
}
.nav-link:hover { color: var(--ink); }
.nav-link:hover::after { width: 100%; }

.nav-cta-group {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-left: var(--sp-1);
}
.nav-signin { font-weight: 600; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 28px;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform var(--t-med), opacity var(--t-fast);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  padding-top: calc(var(--nav-h) + var(--sp-5));
  padding-bottom: var(--sp-7);
  background: linear-gradient(180deg, var(--green-pale) 0%, var(--surface) 60%);
  overflow: hidden;
}
.hero-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 30%, transparent 70%);
  opacity: .35;
}
.hero-container {
  position: relative;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--sp-2);
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-5);
  align-items: center;
}
.hero-content { max-width: 560px; }
.hero-visual { order: -1; }
.hero-title {
  font-size: var(--fs-3xl);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -.03em;
  color: var(--ink);
  margin-bottom: var(--sp-2);
}
.hero-subtitle {
  font-size: var(--fs-lg);
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: var(--sp-3);
  max-width: 480px;
}
.hero-actions {
  display: flex;
  gap: var(--sp-2);
  margin-bottom: var(--sp-5);
  flex-wrap: wrap;
}

/* Hero stats */
.hero-stats {
  display: flex;
  gap: var(--sp-4);
  flex-wrap: wrap;
}
.stat { display: flex; flex-direction: column; }
.stat-value {
  font-size: var(--fs-2xl);
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -.02em;
}
.stat-label {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  margin-top: 2px;
}

/* Hero visual */
.hero-visual { position: relative; }
.hero-image-wrapper {
  position: relative;
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  aspect-ratio: 4 / 3;
}
.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  transition: transform 8s var(--ease-out);
}
.hero-image-wrapper:hover .hero-image { transform: scale(1.08); }
.hero-image-glow {
  position: absolute;
  inset: -40%;
  background: radial-gradient(circle, rgba(30,91,73,.15), transparent 60%);
  pointer-events: none;
}

/* Floating cards */
.hero-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.75rem 1rem;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(8px);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  animation: floatCard 4s ease-in-out infinite;
}
.hero-card-1 { bottom: 20%; left: 4%; animation-delay: 0s; }
.hero-card-2 { bottom: 6%; right: 4%; animation-delay: 1.5s; }
.card-icon {
  flex-shrink: 0;
  width: 36px; height: 36px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--info-bg);
  color: var(--info);
  padding: 8px;
}
.card-icon-green { background: var(--primary-light); color: var(--primary); }
.card-title { display: block; font-size: var(--fs-sm); font-weight: 600; color: var(--ink); }
.card-meta  { display: block; font-size: var(--fs-xs); color: var(--text-muted); }

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

/* ============================================================
   FEATURES
   ============================================================ */
.features { background: var(--surface-alt); }
.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-2);
}
.feature-card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-3);
  transition: transform var(--t-med), box-shadow var(--t-med), border-color var(--t-med);
}
.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--muted-2);
}
.feature-icon {
  width: 56px; height: 56px;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  margin-bottom: var(--sp-2);
}
.icon-blue  { background: var(--info-bg);    color: var(--info); }
.icon-amber { background: var(--accent-bg);  color: var(--accent); }
.icon-green { background: var(--primary-light); color: var(--primary); }
.feature-card h3 {
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--ink);
  margin-bottom: var(--sp-1);
}
.feature-card p {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  line-height: 1.6;
}

/* ============================================================
   HOW IT WORKS
   ============================================================ */
.how-it-works { background: var(--paper); }
.steps-track { position: relative; }
.step-line {
  display: none;
  position: absolute;
  top: 40px; left: 10%; right: 10%;
  height: 2px;
  background: linear-gradient(90deg, var(--primary-light), var(--info-bg));
}
.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-3);
}
.step {
  text-align: center;
  padding: var(--sp-3);
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  background: var(--surface-alt);
  position: relative;
  transition: transform var(--t-med), box-shadow var(--t-med);
}
.step:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.step-number {
  position: absolute;
  top: -14px; left: 50%;
  transform: translateX(-50%);
  width: 28px; height: 28px;
  border-radius: var(--r-full);
  background: var(--ink);
  color: #fff;
  font-size: var(--fs-xs);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.step-icon {
  width: 48px; height: 48px;
  margin: var(--sp-2) auto var(--sp-1);
  color: var(--primary);
  padding: 10px;
}
.step h3 {
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.5rem;
}
.step p {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  line-height: 1.6;
}

/* ============================================================
   INSIGHT
   ============================================================ */
.insight { background: var(--surface-alt); }
.insight-container {
  max-width: var(--container);
  margin: 0 auto;
  padding: var(--sp-7) var(--sp-2);
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-5);
  align-items: center;
}
.insight-visual { position: relative; }
.insight-image {
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-xl);
  aspect-ratio: 4 / 3;
  object-fit: cover;
  width: 100%;
}
.insight-content h2 { text-align: left; }
.insight-content .section-subtitle { margin-bottom: var(--sp-3); }
.insight-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  margin-bottom: var(--sp-4);
}
.insight-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: var(--fs-base);
  color: var(--ink);
  font-weight: 500;
}
.check {
  flex-shrink: 0;
  width: 24px; height: 24px;
  border-radius: var(--r-full);
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px;
}

/* ============================================================
   CTA BANNER
   ============================================================ */
.cta-banner {
  background: var(--green-dark);
  position: relative;
  overflow: hidden;
}
.cta-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 50%, rgba(30,91,73,.40), transparent 40%),
    radial-gradient(circle at 80% 50%, rgba(245,200,106,.12), transparent 40%);
}
.cta-container {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
  padding: var(--sp-7) var(--sp-2);
  text-align: center;
}
.cta-title {
  font-size: var(--fs-2xl);
  font-weight: 700;
  color: #fff;
  letter-spacing: -.02em;
  margin-bottom: var(--sp-1);
}
.cta-subtitle {
  font-size: var(--fs-lg);
  color: rgba(255,255,255,.7);
  margin-bottom: var(--sp-4);
}
.cta-actions {
  display: flex;
  gap: var(--sp-2);
  justify-content: center;
  flex-wrap: wrap;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--ink);
  padding: var(--sp-5) var(--sp-2) var(--sp-3);
}
.footer-container {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-4);
}
.footer-brand { max-width: 300px; }
.footer-brand .nav-logo { color: #fff; }
.footer-tagline {
  margin-top: var(--sp-1);
  font-size: var(--fs-sm);
  color: var(--muted-2);
}
.footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-3);
}
.footer-col h4 {
  font-size: var(--fs-sm);
  font-weight: 700;
  color: #fff;
  margin-bottom: var(--sp-1);
}
.footer-col a {
  display: block;
  font-size: var(--fs-sm);
  color: var(--muted-2);
  padding: 4px 0;
  transition: color var(--t-fast);
}
.footer-col a:hover { color: #fff; }
.footer-bottom {
  max-width: var(--container);
  margin: var(--sp-4) auto 0;
  padding-top: var(--sp-3);
  border-top: 1px solid rgba(255,255,255,.08);
  text-align: center;
}
.footer-bottom p {
  font-size: var(--fs-xs);
  color: var(--muted);
}

/* ============================================================
   SCROLL REVEAL ANIMATIONS
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 120ms; }
.reveal-delay-2 { transition-delay: 240ms; }
.reveal-delay-3 { transition-delay: 360ms; }

/* ============================================================
   RESPONSIVE — Tablet ≥ 640px
   ============================================================ */
@media (min-width: 640px) {
  .section-title      { font-size: var(--fs-3xl); }
  .hero-title         { font-size: var(--fs-4xl); }
  .features-grid      { grid-template-columns: repeat(3, 1fr); }
  .steps              { grid-template-columns: repeat(2, 1fr); }
  .insight-container  { grid-template-columns: 1fr 1fr; gap: var(--sp-6); }
  .cta-title          { font-size: var(--fs-3xl); }
  .hero-card-1        { left: -4%; }
  .hero-card-2        { right: -4%; }
  .hero-visual        { order: 0; }
}

/* ============================================================
   RESPONSIVE — Desktop ≥ 1024px
   ============================================================ */
@media (min-width: 1024px) {
  .hero-container {
    grid-template-columns: 1.1fr 1fr;
    gap: var(--sp-6);
  }
  .hero-visual        { order: 0; }
  .hero-title       { font-size: var(--fs-5xl); }
  .section-title    { font-size: var(--fs-3xl); }
  .steps            { grid-template-columns: repeat(4, 1fr); }
  .step-line        { display: block; }
  .footer-container { grid-template-columns: 1fr 2fr; }
  .nav-toggle       { display: none; }
  .section-container { padding: var(--sp-8) var(--sp-4); }
  .insight-container { padding: var(--sp-8) var(--sp-4); }
}

/* ============================================================
   RESPONSIVE — Mobile nav (default < 1024px)
   ============================================================ */
@media (max-width: 1023px) {
  .nav-toggle { display: flex; }
  .nav-menu {
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--paper);
    padding: var(--sp-2);
    box-shadow: var(--shadow-lg);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform var(--t-med), opacity var(--t-med);
    border-radius: 0 0 var(--r-md) var(--r-md);
    max-height: calc(100vh - var(--nav-h));
    overflow-y: auto;
  }
  .nav-menu.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .nav-menu li { width: 100%; }
  .nav-link {
    display: block;
    padding: 0.75rem 0;
    font-size: var(--fs-base);
    width: 100%;
  }
  .nav-link::after { display: none; }
  .nav-cta-group {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    margin-top: var(--sp-1);
    gap: 0.5rem;
  }
  .nav-signin { padding: 0.75rem 0; }
  .nav-get-started { width: 100%; margin-top: 0.25rem; }
}

/* ----------  Reduced motion  ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}
