/* ══════════════════════════════════════════════════════════════════════════════
   Grãos CRM — Landing Page Styles
   Colors: #1e1e29 (bg), #489f4a (accent), #ffffff (text)
   ══════════════════════════════════════════════════════════════════════════════ */

/* ── Reset & Base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #1e1e29;
  --bg-alt: #25253a;
  --bg-deep: #15151f;
  --green: #489f4a;
  --green-light: #5ab85c;
  --green-dark: #3a8a3c;
  --white: #ffffff;
  --gray: #a0a0b0;
  --gray-dark: #6b6b80;
  --border: rgba(255,255,255,.08);
  --border-green: rgba(72,159,74,.3);
  --radius: 12px;
  --radius-lg: 20px;
  --nav-height: 72px;
  --container: 1200px;
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

h1, h2, h3, h4, h5 { font-family: 'Sora', sans-serif; font-weight: 700; line-height: 1.2; }

/* ── Focus visible ────────────────────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-size: 15px; font-weight: 600;
  transition: all .2s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--green); color: var(--white);
  box-shadow: 0 4px 20px rgba(72,159,74,.3);
}
.btn-primary:hover { background: var(--green-light); transform: translateY(-1px); box-shadow: 0 6px 24px rgba(72,159,74,.4); }
.btn-primary:active { background: var(--green-dark); transform: translateY(0); }

.btn-outline {
  background: transparent; color: var(--white);
  border: 1.5px solid rgba(255,255,255,.25);
}
.btn-outline:hover { border-color: var(--white); background: rgba(255,255,255,.05); }

.btn-lg { padding: 16px 36px; font-size: 16px; border-radius: 14px; }

/* ── Navbar ───────────────────────────────────────────────────────────────── */
.navbar {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-height);
  z-index: 100;
  transition: background .3s ease, box-shadow .3s ease;
  display: flex; align-items: center;
}

.navbar.scrolled {
  background: rgba(30,30,41,.95);
  backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 var(--border);
}

.navbar .container {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
}

.nav-logo img { height: 40px; width: auto; }

.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a { font-size: 14px; color: var(--gray); transition: color .2s; font-weight: 500; }
.nav-links a:hover { color: var(--white); }

.nav-cta { display: flex; align-items: center; gap: 16px; }

.nav-btn-mobile { display: none; width: 40px; height: 40px; align-items: center; justify-content: center; color: var(--white); }
.nav-btn-mobile svg { width: 24px; height: 24px; }

/* Mobile menu */
.mobile-menu {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 280px; background: var(--bg-alt);
  transform: translateX(100%); transition: transform .3s ease;
  z-index: 110; padding: 80px 24px 24px;
  display: flex; flex-direction: column; gap: 8px;
}
.mobile-menu.open { transform: translateX(0); }
.mobile-menu a {
  display: block; padding: 14px 16px; border-radius: var(--radius);
  font-size: 15px; color: var(--gray); font-weight: 500; transition: all .2s;
}
.mobile-menu a:hover { color: var(--white); background: rgba(255,255,255,.05); }
.mobile-menu .btn { margin-top: 16px; width: 100%; }

.menu-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.6);
  opacity: 0; visibility: hidden; transition: all .3s ease;
  z-index: 105;
}
.menu-overlay.open { opacity: 1; visibility: visible; }

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex; align-items: center;
  padding-top: calc(var(--nav-height) + 40px);
  padding-bottom: 60px;
  position: relative; overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 20% 50%, rgba(72,159,74,.06) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(72,159,74,.04) 0%, transparent 40%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
  z-index: 0;
}

/* Grid pattern */
.hero::after {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
  z-index: 0;
}

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

.hero-content { max-width: 720px; }

.hero h1 { font-size: clamp(32px, 5vw, 56px); margin-bottom: 20px; letter-spacing: -.02em; }
.hero h1 span { color: var(--green); }

.hero-sub { font-size: clamp(16px, 2vw, 20px); color: var(--gray); max-width: 540px; margin-bottom: 36px; line-height: 1.7; }

.hero-ctas { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }

.hero-note { font-size: 13px; color: var(--gray-dark); }

.hero-mockup {
  margin-top: 60px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
}

/* Hero animations */
.hero-animate {
  opacity: 0; transform: translateY(20px);
}
.hero-animate.hero-visible {
  animation: heroFadeIn .6s ease forwards;
}
@keyframes heroFadeIn {
  to { opacity: 1; transform: translateY(0); }
}

/* ── KPI Mockup ───────────────────────────────────────────────────────────── */
.mock-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 16px; }

.mock-kpi {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
}
.mock-kpi-label { font-size: 11px; color: var(--gray-dark); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 4px; }
.mock-kpi-value { font-size: 20px; font-weight: 700; font-family: 'Sora', sans-serif; }
.mock-kpi-value.green { color: var(--green); }

.mock-chart {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex; align-items: flex-end; gap: 6px; height: 80px;
}
.mock-bar {
  flex: 1; background: var(--green); border-radius: 4px 4px 0 0;
  opacity: .7; min-height: 8px;
}

/* ── Section base ─────────────────────────────────────────────────────────── */
section { padding: 100px 0; }

.section-header { text-align: center; margin-bottom: 60px; }
.section-header h2 { font-size: clamp(24px, 3.5vw, 40px); margin-bottom: 12px; }
.section-header p { font-size: 16px; color: var(--gray); max-width: 560px; margin: 0 auto; }

/* ── Scroll animations ────────────────────────────────────────────────────── */
.animate-on-scroll {
  opacity: 0; transform: translateY(24px);
  transition: opacity .6s ease, transform .6s ease;
}
.animate-on-scroll.visible { opacity: 1; transform: translateY(0); }

/* Stagger children */
.stagger-children .animate-on-scroll:nth-child(2) { transition-delay: .1s; }
.stagger-children .animate-on-scroll:nth-child(3) { transition-delay: .2s; }
.stagger-children .animate-on-scroll:nth-child(4) { transition-delay: .15s; }
.stagger-children .animate-on-scroll:nth-child(5) { transition-delay: .2s; }
.stagger-children .animate-on-scroll:nth-child(6) { transition-delay: .25s; }
.stagger-children .animate-on-scroll:nth-child(7) { transition-delay: .3s; }
.stagger-children .animate-on-scroll:nth-child(8) { transition-delay: .35s; }
.stagger-children .animate-on-scroll:nth-child(9) { transition-delay: .4s; }

/* ── Pain Points ──────────────────────────────────────────────────────────── */
.pains-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }

.pain-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: border-color .3s ease;
}
.pain-card:hover { border-color: var(--border-green); }

.pain-icon { font-size: 28px; margin-bottom: 16px; display: block; }
.pain-card h3 { font-size: 18px; margin-bottom: 8px; }
.pain-card p { font-size: 14px; color: var(--gray); line-height: 1.7; }

/* ── Features ─────────────────────────────────────────────────────────────── */
.features-section { background: var(--bg-deep); }

.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }

.feature-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: transform .3s ease, border-color .3s ease;
}
.feature-card:hover { transform: translateY(-4px); border-color: var(--border-green); }

.feature-icon {
  width: 44px; height: 44px;
  background: rgba(72,159,74,.1);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
  color: var(--green);
}

.feature-card h3 { font-size: 16px; margin-bottom: 8px; }
.feature-card p { font-size: 14px; color: var(--gray); line-height: 1.6; }

/* ── Preview ──────────────────────────────────────────────────────────────── */
.preview-section { background: var(--bg); }

.preview-tabs {
  display: flex; gap: 8px; justify-content: center;
  margin-bottom: 32px; flex-wrap: wrap;
}

.preview-tab-btn {
  padding: 10px 20px; border-radius: 100px;
  font-size: 14px; font-weight: 500; color: var(--gray);
  border: 1px solid var(--border); transition: all .2s;
}
.preview-tab-btn.active,
.preview-tab-btn:hover { color: var(--white); background: var(--bg-alt); border-color: var(--green); }

.preview-panel { display: none; }
.preview-panel.active { display: block; }

.preview-window {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
}

.preview-topbar {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
}
.preview-dot { width: 10px; height: 10px; border-radius: 50%; }
.dot-red { background: #ff5f57; }
.dot-yellow { background: #ffbd2e; }
.dot-green { background: #28ca41; }

.preview-body { padding: 20px; }

/* Kanban mockup */
.mock-kanban { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.mock-kanban-col h4 {
  font-size: 11px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--gray-dark); margin-bottom: 8px; padding: 0 4px;
}

.mock-deal-card {
  background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
  padding: 10px; font-size: 12px; margin-bottom: 8px;
}
.mock-deal-card strong { font-size: 13px; display: block; margin-bottom: 4px; }
.mock-deal-card span { color: var(--gray-dark); font-size: 11px; }

/* Shipments table mockup */
.mock-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.mock-table th { text-align: left; font-size: 11px; color: var(--gray-dark); text-transform: uppercase; letter-spacing: .05em; padding: 8px 12px; border-bottom: 1px solid var(--border); }
.mock-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); color: var(--gray); }
.mock-table td:first-child { color: var(--white); font-weight: 500; }

.mock-badge {
  display: inline-block; padding: 3px 10px; border-radius: 100px;
  font-size: 11px; font-weight: 600;
}
.badge-green { background: rgba(72,159,74,.15); color: var(--green-light); }
.badge-yellow { background: rgba(255,189,46,.15); color: #ffbd2e; }
.badge-blue { background: rgba(56,152,236,.15); color: #3898ec; }

/* ── Plans ────────────────────────────────────────────────────────────────── */
.plans-section { background: var(--bg-deep); }

.plans-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; max-width: 1000px; margin: 0 auto; }

.plan-card {
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  position: relative;
  transition: transform .3s ease, box-shadow .3s ease;
  display: flex; flex-direction: column;
}
.plan-card:hover { transform: translateY(-4px); }

.plan-card.featured {
  border-color: var(--green);
  box-shadow: 0 0 40px rgba(72,159,74,.15);
}

.plan-badge {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--green); color: var(--white);
  padding: 4px 16px; border-radius: 100px;
  font-size: 12px; font-weight: 600; white-space: nowrap;
}

.plan-name { font-size: 22px; margin-bottom: 4px; font-family: 'Sora', sans-serif; }
.plan-price { font-size: 36px; font-weight: 800; font-family: 'Sora', sans-serif; margin: 12px 0 4px; }
.plan-price span { font-size: 16px; font-weight: 400; color: var(--gray); }
.plan-desc { font-size: 13px; color: var(--gray-dark); margin-bottom: 24px; }

.plan-features { list-style: none; flex: 1; margin-bottom: 24px; }
.plan-features li {
  display: flex; align-items: center; gap: 10px;
  font-size: 14px; padding: 6px 0; color: var(--gray);
}
.plan-features li svg { flex-shrink: 0; }
.plan-features li.disabled { opacity: .4; }

.plan-footer { font-size: 12px; color: var(--gray-dark); text-align: center; margin-top: 12px; }

/* ── Discount timeline ────────────────────────────────────────────────────── */
.discount-section { background: var(--bg); }

.discount-timeline {
  display: flex; justify-content: center; gap: 0;
  max-width: 800px; margin: 0 auto;
  position: relative; flex-wrap: wrap;
}

.discount-step {
  flex: 1; min-width: 160px;
  text-align: center; padding: 20px 16px;
  position: relative;
}

.discount-step::before {
  content: '';
  position: absolute; top: 36px; left: 0; right: 0;
  height: 2px; background: var(--border);
}
.discount-step:first-child::before { left: 50%; }
.discount-step:last-child::before { right: 50%; }

.discount-dot {
  width: 16px; height: 16px;
  background: var(--green); border-radius: 50%;
  margin: 0 auto 12px; position: relative; z-index: 1;
  box-shadow: 0 0 0 4px var(--bg), 0 0 0 6px var(--green);
}

.discount-months { font-size: 12px; color: var(--gray-dark); margin-bottom: 4px; }
.discount-value { font-size: 20px; font-weight: 700; font-family: 'Sora', sans-serif; }
.discount-pct { font-size: 12px; color: var(--green); font-weight: 600; margin-top: 2px; }

/* ── FAQ ──────────────────────────────────────────────────────────────────── */
.faq-section { background: var(--bg-deep); }

.faq-list { max-width: 740px; margin: 0 auto; }

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-question {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: 20px 0; font-size: 16px; font-weight: 600;
  color: var(--white); text-align: left;
  font-family: 'Sora', sans-serif;
  transition: color .2s;
}
.faq-question:hover { color: var(--green); }

.faq-icon {
  width: 24px; height: 24px; flex-shrink: 0;
  position: relative; color: var(--gray);
  transition: transform .3s ease;
}
.faq-item.open .faq-icon { transform: rotate(45deg); color: var(--green); }

.faq-answer {
  max-height: 0; overflow: hidden;
  transition: max-height .3s ease;
}
.faq-answer p { padding-bottom: 20px; font-size: 15px; color: var(--gray); line-height: 1.7; }

/* ── CTA Final ────────────────────────────────────────────────────────────── */
.cta-section {
  padding: 100px 0;
  background: linear-gradient(135deg, rgba(72,159,74,.1) 0%, var(--bg) 50%, rgba(72,159,74,.05) 100%);
  text-align: center;
}

.cta-section h2 { font-size: clamp(24px, 3.5vw, 40px); margin-bottom: 12px; }
.cta-section p { font-size: 16px; color: var(--gray); margin-bottom: 32px; }
.cta-sub { font-size: 14px; color: var(--gray-dark); margin-top: 16px; }

/* ── Footer ───────────────────────────────────────────────────────────────── */
footer {
  padding: 40px 0;
  border-top: 1px solid var(--border);
}
footer .container {
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  text-align: center;
}
.footer-logo img { height: 32px; opacity: .6; }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; justify-content: center; }
.footer-links a { font-size: 13px; color: var(--gray-dark); transition: color .2s; }
.footer-links a:hover { color: var(--white); }
.footer-copy { font-size: 12px; color: var(--gray-dark); }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  :root { --nav-height: 64px; }

  .nav-links, .nav-cta .btn { display: none; }
  .nav-btn-mobile { display: flex; }

  .hero { min-height: auto; padding-top: calc(var(--nav-height) + 24px); padding-bottom: 40px; }
  .hero-ctas { flex-direction: column; }
  .hero-ctas .btn { width: 100%; }

  section { padding: 60px 0; }
  .section-header { margin-bottom: 36px; }

  .pains-grid { grid-template-columns: 1fr; }

  .features-grid { grid-template-columns: 1fr; }

  .mock-kanban { grid-template-columns: repeat(2, 1fr); }

  .plans-grid { grid-template-columns: 1fr; max-width: 400px; }

  .discount-timeline { flex-direction: column; align-items: center; }
  .discount-step::before { display: none; }

  .mock-kpis { grid-template-columns: repeat(2, 1fr); }

  .mock-table { font-size: 11px; }
  .mock-table th, .mock-table td { padding: 6px 8px; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .mock-kanban { grid-template-columns: 1fr; }
}

@media (min-width: 769px) {
  .hero .container { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
  .hero-mockup { margin-top: 0; }
}
