/* ═══════════════════════════════════════════════════════════
   main.css — RedAgraria
   Paleta: verde oscuro #042b10 · medio #16a34a · claro #4ade80
   Tipografía: Playfair Display (títulos) + Source Sans 3 (cuerpo)
═══════════════════════════════════════════════════════════ */

/* ─── TOKENS ─────────────────────────────────────────── */
:root {
  --green-900: #042b10;
  --green-800: #065f2e;
  --green-700: #166534;
  --green-600: #16a34a;
  --green-500: #22c55e;
  --green-400: #4ade80;
  --green-300: #86efac;
  --green-100: #dcfce7;
  --green-50:  #f0fdf4;

  --gray-900: #111827;
  --gray-800: #1f2937;
  --gray-600: #4b5563;
  --gray-400: #9ca3af;
  --gray-200: #e5e7eb;
  --gray-50:  #f9fafb;
  --white:    #ffffff;

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Source Sans 3', system-ui, sans-serif;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,.10), 0 2px 6px rgba(0,0,0,.06);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.14), 0 4px 12px rgba(0,0,0,.08);
  --shadow-green: 0 8px 32px rgba(34,197,94,.25);

  --transition: 0.22s cubic-bezier(.4,0,.2,1);
  --max-w: 1180px;
}

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

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

body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--gray-900);
  background: var(--white);
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }

/* ─── CONTAINER ───────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2.5rem);
}

/* ─── BUTTONS ─────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--font-body);
  font-weight: 600;
  border-radius: 50px;
  border: 2px solid transparent;
  transition: background var(--transition), color var(--transition),
              transform var(--transition), box-shadow var(--transition);
  white-space: nowrap;
  cursor: pointer;
}
.btn:active { transform: scale(.97); }

.btn--sm  { font-size: .875rem; padding: .45rem 1.1rem; }
.btn--md  { font-size: 1rem;    padding: .65rem 1.5rem; }
.btn--lg  { font-size: 1.05rem; padding: .75rem 1.8rem; }
.btn--xl  { font-size: 1.15rem; padding: .9rem 2.2rem;  }

.btn--primary {
  background: var(--green-600);
  color: var(--white);
  box-shadow: var(--shadow-green);
}
.btn--primary:hover {
  background: var(--green-700);
  box-shadow: 0 10px 36px rgba(34,197,94,.35);
  transform: translateY(-2px);
}

.btn--ghost {
  background: transparent;
  color: var(--green-800);
  border-color: var(--green-500);
}
.btn--ghost:hover {
  background: var(--green-50);
  border-color: var(--green-600);
}

.btn--whatsapp {
  background: #25d366;
  color: var(--white);
  box-shadow: 0 8px 28px rgba(37,211,102,.35);
  font-size: 1.1rem;
  padding: .85rem 2rem;
}
.btn--whatsapp:hover {
  background: #1ebe5a;
  box-shadow: 0 12px 40px rgba(37,211,102,.45);
  transform: translateY(-2px);
}

/* ─── BADGE ───────────────────────────────────────────── */
.badge {
  display: inline-block;
  background: var(--green-100);
  color: var(--green-700);
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .04em;
  padding: .3rem .9rem;
  border-radius: 50px;
  border: 1px solid var(--green-300);
}

/* ─── NAVBAR ──────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-200);
  transition: box-shadow var(--transition);
}
.navbar.scrolled { box-shadow: var(--shadow-md); }

.navbar__inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  height: 68px;
}

.navbar__logo img { height: 44px; width: auto; }

.navbar__links {
  display: flex;
  gap: 1.75rem;
  margin-left: auto;
}
.navbar__links a {
  font-size: .9375rem;
  font-weight: 500;
  color: var(--gray-600);
  transition: color var(--transition);
}
.navbar__links a:hover { color: var(--green-600); }

.navbar__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: .4rem;
  margin-left: auto;
}
.navbar__burger span {
  display: block;
  width: 24px; height: 2px;
  background: var(--gray-800);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.navbar__burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.navbar__burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.navbar__burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.navbar__mobile {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  padding: 1rem 1.25rem 1.5rem;
  border-top: 1px solid var(--gray-200);
  background: var(--white);
}
.navbar__mobile a {
  font-size: 1rem;
  font-weight: 500;
  color: var(--gray-800);
  padding: .6rem .5rem;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}
.navbar__mobile a:hover { background: var(--green-50); color: var(--green-700); }

/* ─── HERO ────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  padding: calc(68px + 5rem) 0 5rem;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(160deg, var(--green-50) 0%, var(--white) 55%, #f8fff9 100%);
}
.hero__blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(72px);
  opacity: .55;
}
.hero__blob--1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, var(--green-300) 0%, transparent 70%);
  top: -150px; right: -100px;
}
.hero__blob--2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, var(--green-400) 0%, transparent 70%);
  bottom: -80px; left: -80px;
  opacity: .3;
}
.hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--green-100) 1px, transparent 1px),
    linear-gradient(90deg, var(--green-100) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: .5;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 0%, transparent 100%);
}

.hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero__content { display: flex; flex-direction: column; gap: 1.5rem; }

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4.5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--green-900);
  letter-spacing: -.02em;
}
.hero__title em {
  font-style: italic;
  color: var(--green-600);
}

.hero__sub {
  font-size: 1.125rem;
  color: var(--gray-600);
  max-width: 480px;
  line-height: 1.7;
}

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

.hero__trust {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin-top: .5rem;
}
.hero__trust span {
  font-size: .8125rem;
  font-weight: 500;
  color: var(--green-700);
  background: var(--green-50);
  border: 1px solid var(--green-200, #bbf7d0);
  padding: .3rem .75rem;
  border-radius: 50px;
}

/* WhatsApp Mockup */
.hero__visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.wamock {
  width: 320px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(0,0,0,.06);
  background: #ece5dd;
  animation: floatUp 3.5s ease-in-out infinite alternate;
}
@keyframes floatUp {
  from { transform: translateY(0); }
  to   { transform: translateY(-10px); }
}

.wamock__bar {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .85rem 1rem;
  background: #075e54;
  color: var(--white);
}
.wamock__avatar {
  font-size: 1.5rem;
  width: 40px; height: 40px;
  background: rgba(255,255,255,.15);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.wamock__name { font-size: .9375rem; font-weight: 600; }
.wamock__status { font-size: .75rem; opacity: .8; }

.wamock__chat {
  padding: .75rem .85rem;
  display: flex;
  flex-direction: column;
  gap: .6rem;
  min-height: 220px;
}

.wamock__msg {
  max-width: 85%;
  padding: .55rem .85rem;
  border-radius: 12px;
  font-size: .875rem;
  line-height: 1.5;
  position: relative;
}
.wamock__msg--in {
  background: var(--white);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  box-shadow: var(--shadow-sm);
}
.wamock__msg--out {
  background: #d9fdd3;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
  box-shadow: var(--shadow-sm);
}
.wamock__time {
  display: block;
  font-size: .6875rem;
  color: var(--gray-400);
  text-align: right;
  margin-top: .25rem;
}

.wamock__typing {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: .5rem .85rem;
  background: var(--white);
  border-radius: 12px;
  width: fit-content;
  box-shadow: var(--shadow-sm);
}
.wamock__typing span {
  width: 7px; height: 7px;
  background: var(--gray-400);
  border-radius: 50%;
  animation: typing .9s ease-in-out infinite;
}
.wamock__typing span:nth-child(2) { animation-delay: .15s; }
.wamock__typing span:nth-child(3) { animation-delay: .30s; }
@keyframes typing {
  0%, 100% { transform: translateY(0); opacity: .5; }
  50% { transform: translateY(-4px); opacity: 1; }
}

/* Flecha scroll */
.hero__scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--green-600);
  animation: bounce 2s ease-in-out infinite;
  z-index: 1;
}
@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(6px); }
}

/* ─── SECTIONS ────────────────────────────────────────── */
.section { padding: 5rem 0; }
.section--light { background: var(--green-50); }
.section--dark  { background: var(--green-900); }

.section__header {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 3.5rem;
}
.section__eyebrow {
  display: inline-block;
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--green-600);
  margin-bottom: .75rem;
}
.section__eyebrow--light { color: var(--green-400); }

.section__title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.75rem);
  font-weight: 700;
  color: var(--green-900);
  line-height: 1.2;
  margin-bottom: 1rem;
}
.section__title--light { color: var(--white); }

.section__sub { font-size: 1.0625rem; color: var(--gray-600); }
.section__sub--light { color: var(--green-300); }

/* ─── STEPS ───────────────────────────────────────────── */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  counter-reset: step;
}

.step {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  position: relative;
  transition: box-shadow var(--transition), transform var(--transition);
}
.step:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.step__num {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 800;
  color: #a3c9a8;
  line-height: 1;
  margin-bottom: .5rem;
}
.step__icon { font-size: 2rem; margin-bottom: .75rem; }
.step__title {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--green-900);
  margin-bottom: .5rem;
}
.step__text { font-size: .9375rem; color: var(--gray-600); }

/* ─── PROFILES ────────────────────────────────────────── */
.profiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.profile-card {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem;
  position: relative;
  transition: background var(--transition), transform var(--transition);
}
.profile-card:hover {
  background: rgba(255,255,255,.1);
  transform: translateY(-4px);
}
.profile-card--featured {
  background: rgba(34,197,94,.12);
  border-color: var(--green-500);
  box-shadow: 0 0 0 1px rgba(34,197,94,.3);
}

.profile-card__badge {
  position: absolute;
  top: -12px; left: 50%;
  transform: translateX(-50%);
  background: var(--green-500);
  color: var(--green-900);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: .25rem .9rem;
  border-radius: 50px;
  white-space: nowrap;
}

.profile-card__icon { font-size: 2.5rem; margin-bottom: 1rem; }
.profile-card__title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: .75rem;
}
.profile-card__text {
  font-size: .9375rem;
  color: var(--green-300);
  line-height: 1.6;
  margin-bottom: 1.25rem;
}
.profile-card__list { display: flex; flex-direction: column; gap: .4rem; }
.profile-card__list li {
  font-size: .875rem;
  color: var(--green-400);
  padding-left: 1.1rem;
  position: relative;
}
.profile-card__list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--green-500);
  font-weight: 700;
}

/* ─── TESTIMONIALS ────────────────────────────────────── */
.testimonials {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.testimonial {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  transition: box-shadow var(--transition), transform var(--transition);
}
.testimonial:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}
.testimonial--featured {
  border-color: var(--green-400);
  box-shadow: var(--shadow-green);
}

.testimonial__text {
  font-size: 1rem;
  font-style: italic;
  color: var(--gray-800);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}
.testimonial__footer {
  display: flex;
  align-items: center;
  gap: .75rem;
}
.testimonial__avatar { font-size: 2rem; }
.testimonial__name {
  display: block;
  font-style: normal;
  font-weight: 600;
  color: var(--green-900);
  font-size: .9375rem;
}
.testimonial__role {
  font-size: .8125rem;
  color: var(--gray-400);
}

/* ─── CTA SECTION ─────────────────────────────────────── */
.cta-section {
  background: linear-gradient(135deg, var(--green-800) 0%, var(--green-900) 100%);
  padding: 5rem 0;
  position: relative;
  overflow: hidden;
}
.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(74,222,128,.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(74,222,128,.07) 1px, transparent 1px);
  background-size: 40px 40px;
}

.cta-section__inner {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 680px;
}
.cta-section__title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.75rem);
  font-weight: 800;
  color: var(--white);
  margin-bottom: 1rem;
  line-height: 1.2;
}
.cta-section__sub {
  font-size: 1.125rem;
  color: var(--green-300);
  margin-bottom: 2rem;
}
.cta-section__note {
  margin-top: 1rem;
  font-size: .875rem;
  color: var(--green-400);
  opacity: .8;
}

.cta-section__deco {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.cta-deco {
  position: absolute;
  font-size: 4rem;
  opacity: .08;
  animation: spin 20s linear infinite;
}
.cta-deco--2 { top: 20%; right: 8%; font-size: 3rem; animation-direction: reverse; animation-duration: 15s; }
.cta-deco--3 { bottom: 15%; left: 5%; font-size: 5rem; animation-duration: 25s; }
@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ─── FOOTER ──────────────────────────────────────────── */
.footer {
  background: var(--gray-900);
  color: var(--gray-400);
  padding: 4rem 0 0;
}

.footer__inner {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 2.5rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.footer__brand img { margin-bottom: 1rem; }
.footer__tagline {
  font-size: .9375rem;
  line-height: 1.7;
  color: var(--gray-400);
}

.footer__nav {
  display: contents;
}
.footer__col {
  display: flex;
  flex-direction: column;
  gap: .6rem;
}
.footer__col h4 {
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--green-400);
  margin-bottom: .5rem;
}
.footer__col a {
  font-size: .9375rem;
  color: var(--gray-400);
  transition: color var(--transition);
}
.footer__col a:hover { color: var(--green-400); }

.footer__bottom {
  padding: 1.25rem 0;
}
.footer__bottom .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
}
.footer__bottom p {
  font-size: .875rem;
  color: rgba(255,255,255,.3);
}

/* ─── RESPONSIVE ──────────────────────────────────────── */
@media (max-width: 1024px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
  .profiles { grid-template-columns: repeat(2, 1fr); }
  .testimonials { grid-template-columns: repeat(2, 1fr); }
  .footer__inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .navbar__links { display: none; }
  .navbar__inner > .btn { display: none; }
  .navbar__burger { display: flex; }

  .hero__inner { grid-template-columns: 1fr; text-align: center; }
  .hero__content { align-items: center; }
  .hero__sub { text-align: center; }
  .hero__visual { display: none; }
  .hero__trust { justify-content: center; }

  .steps { grid-template-columns: 1fr; }
  .profiles { grid-template-columns: 1fr; }
  .testimonials { grid-template-columns: 1fr; }

  .footer__inner { grid-template-columns: 1fr 1fr; }
  .footer__bottom .container { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .footer__inner { grid-template-columns: 1fr; }
  .hero__actions { flex-direction: column; width: 100%; }
  .hero__actions .btn { justify-content: center; }
}
