:root {
  --grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='260' height='260'><filter id='n' x='0' y='0' width='100%25' height='100%25'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  1.4 0 0 0 -0.5'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  --grain-dark: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='260' height='260'><filter id='n' x='0' y='0' width='100%25' height='100%25'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0.2  0 0 0 0 0.1  1.3 0 0 0 -0.45'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

.portfolio-section,
.how-section,
.social-proof-section,
.faq-section,
.socials-section,
.footer-section {
  position: relative;
  isolation: isolate;
}

.portfolio-section::before,
.social-proof-section::before,
.footer-section::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
}

.portfolio-section::after,
.social-proof-section::after,
.footer-section::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.16;
  mix-blend-mode: soft-light;
  background-image: var(--grain);
  background-size: 260px 260px;
}

.how-section::before,
.faq-section::before,
.socials-section::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.2;
  mix-blend-mode: multiply;
  background-image: var(--grain-dark);
  background-size: 260px 260px;
}

/* ---------- Portfolio ---------- */
.portfolio-section {
  background: var(--darker-green);
}

.portfolio-section::before {
  background:
    radial-gradient(50% 40% at 85% 6%, rgba(198, 221, 83, 0.2) 0%, rgba(198, 221, 83, 0) 70%),
    radial-gradient(60% 50% at 10% 55%, rgba(4, 68, 52, 0.95) 0%, rgba(4, 68, 52, 0) 70%),
    radial-gradient(50% 40% at 95% 95%, rgba(4, 68, 52, 0.9) 0%, rgba(4, 68, 52, 0) 70%),
    var(--darker-green);
}

.portfolio-card {
  position: relative;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.02) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s ease, background-color 0.4s ease;
}

.portfolio-card:hover {
  transform: translateY(-6px);
  border-color: rgba(198, 221, 83, 0.55);
}

.portfolio-card-cta {
  background:
    radial-gradient(70% 70% at 50% 120%, rgba(198, 221, 83, 0.55) 0%, rgba(198, 221, 83, 0) 70%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.02) 100%);
  border: 1px solid rgba(198, 221, 83, 0.35);
  color: var(--white);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s ease;
}

.portfolio-card-cta .cta-text {
  color: var(--white);
}

.portfolio-card-cta .cta-arrow-circle {
  background: var(--accent);
  color: var(--darker-green);
}

.portfolio-card-cta:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
}

/* ---------- Como funciona ---------- */
.how-section {
  background:
    radial-gradient(45% 30% at 100% 0%, rgba(198, 221, 83, 0.16) 0%, rgba(198, 221, 83, 0) 70%),
    radial-gradient(50% 35% at 0% 100%, rgba(4, 68, 52, 0.08) 0%, rgba(4, 68, 52, 0) 70%),
    var(--light-gray);
}

.how-card {
  position: relative;
  border: 1px solid rgba(4, 68, 52, 0.07);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.5s ease;
}

.how-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 30px 60px rgba(4, 68, 52, 0.12);
}

.step-badge {
  background: var(--darker-green);
  color: var(--accent);
}

.how-card.full-width {
  position: relative;
  isolation: isolate;
  flex-direction: row;
  align-items: center;
  min-height: 240px;
  background:
    radial-gradient(60% 120% at 100% 100%, rgba(198, 221, 83, 0.28) 0%, rgba(198, 221, 83, 0) 65%),
    radial-gradient(60% 120% at 0% 0%, rgba(4, 68, 52, 0.9) 0%, rgba(4, 68, 52, 0) 70%),
    var(--darker-green);
  color: var(--white);
  border-color: transparent;
}

.how-card.full-width::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  opacity: 0.18;
  mix-blend-mode: soft-light;
  pointer-events: none;
  background-image: var(--grain);
  background-size: 260px 260px;
}

.how-card.full-width .how-card-text {
  color: rgba(255, 255, 255, 0.78);
  max-width: 520px;
}

.how-card.full-width .how-card-title {
  font-size: clamp(30px, 3.4vw, 46px);
}

.how-card.full-width .step-badge {
  background: var(--accent);
  color: var(--darker-green);
}

.how-card.full-width .hero-cta {
  flex-shrink: 0;
  margin-right: 24px;
}

/* ---------- Stats y reviews ---------- */
.social-proof-section {
  background: var(--darker-green);
}

.social-proof-section::before {
  background:
    radial-gradient(45% 30% at 50% 0%, rgba(198, 221, 83, 0.16) 0%, rgba(198, 221, 83, 0) 70%),
    radial-gradient(60% 45% at 0% 100%, rgba(4, 68, 52, 1) 0%, rgba(4, 68, 52, 0) 70%),
    radial-gradient(50% 40% at 100% 60%, rgba(4, 68, 52, 0.9) 0%, rgba(4, 68, 52, 0) 70%),
    var(--darker-green);
}

.stat-card:nth-child(n) {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  color: var(--white);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.stat-card::before {
  content: '';
  position: absolute;
  z-index: -1;
  width: 70%;
  aspect-ratio: 1;
  right: -20%;
  bottom: -50%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(198, 221, 83, 0.5) 0%, rgba(198, 221, 83, 0) 70%);
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.stat-card:hover::before {
  transform: scale(1.5) translate(-10%, -10%);
}

.stat-number {
  font-size: clamp(52px, 5.6vw, 84px);
  letter-spacing: -0.03em;
  background: linear-gradient(180deg, #fff 30%, var(--accent) 140%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.stat-label {
  color: rgba(255, 255, 255, 0.78);
}

.review-card {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.02) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ---------- FAQ ---------- */
.faq-section {
  background:
    radial-gradient(40% 40% at 0% 0%, rgba(198, 221, 83, 0.14) 0%, rgba(198, 221, 83, 0) 70%),
    #fff;
}

.faq-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}

.faq-side {
  position: sticky;
  top: 120px;
}

.faq-layout .faq-header {
  text-align: left;
  margin-bottom: 0;
}

.faq-layout .faq-heading {
  margin: 10px 0 20px;
  font-size: clamp(34px, 4.4vw, 62px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.faq-lead {
  max-width: 380px;
  margin-bottom: 28px;
  font-size: 17px;
  line-height: 1.55;
  color: rgba(1, 12, 5, 0.7);
}

.faq-layout .faq-accordion {
  max-width: none;
  margin: 0;
  gap: 12px;
}

.faq-item {
  background: var(--light-gray);
  box-shadow: none;
  border: 1px solid rgba(4, 68, 52, 0.08);
}

.faq-item:hover {
  border-color: rgba(4, 68, 52, 0.3);
}

.faq-item.active {
  background: var(--darker-green);
  color: var(--white);
  border-color: var(--darker-green);
}

.faq-item.active .faq-answer {
  color: rgba(255, 255, 255, 0.82);
  max-height: 420px;
  white-space: pre-line;
}

.faq-item.active .faq-num {
  color: var(--accent);
}

.faq-num {
  color: var(--dark-green);
  opacity: 0.55;
}

.faq-item.active .faq-num {
  opacity: 1;
}

.faq-toggle-icon {
  background: #fff;
}

.faq-item.active .faq-toggle-icon {
  background: var(--accent);
  color: var(--darker-green);
}

/* ---------- Contacto ---------- */
.socials-section {
  background:
    radial-gradient(45% 50% at 100% 0%, rgba(198, 221, 83, 0.18) 0%, rgba(198, 221, 83, 0) 70%),
    radial-gradient(50% 60% at 0% 100%, rgba(4, 68, 52, 0.1) 0%, rgba(4, 68, 52, 0) 70%),
    var(--light-gray);
}

.social-card {
  border: 1px solid rgba(4, 68, 52, 0.08);
  box-shadow: none;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.35s ease, color 0.35s ease;
}

.social-card:hover {
  transform: translateY(-6px);
  background: var(--darker-green);
  color: var(--white);
}

.social-card:hover .social-card-handle {
  color: rgba(255, 255, 255, 0.7);
}

.social-card.highlight {
  background: var(--dark-green);
  color: var(--white);
  border-color: transparent;
}

.social-card.highlight .social-card-handle {
  color: rgba(255, 255, 255, 0.72);
}

.social-card.highlight .social-card-icon {
  background: var(--accent);
}

.social-card.highlight .social-card-icon img {
  filter: none;
}

.social-card.highlight:hover {
  background: var(--darker-green);
}

/* ---------- Footer ---------- */
.footer-section {
  background: var(--darker-green);
  padding-bottom: 0;
}

.footer-section::before {
  background:
    radial-gradient(55% 60% at 0% 0%, rgba(4, 68, 52, 1) 0%, rgba(4, 68, 52, 0) 70%),
    radial-gradient(40% 40% at 100% 20%, rgba(198, 221, 83, 0.14) 0%, rgba(198, 221, 83, 0) 70%),
    var(--darker-green);
}

.footer-watermark {
  opacity: 0.07;
  left: -120px;
  top: -60px;
}

.footer-cta-title {
  font-weight: 500;
  letter-spacing: -0.02em;
}

.footer-top .hero-cta {
  margin-right: 0;
}

.footer-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px 28px;
}

.footer-word {
  position: relative;
  z-index: 0;
  margin-top: 8px;
  text-align: center;
  font-size: clamp(56px, 13.2vw, 250px);
  font-weight: 600;
  line-height: 0.82;
  letter-spacing: -0.045em;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 1px rgba(198, 221, 83, 0.28);
  background: linear-gradient(180deg, rgba(198, 221, 83, 0.22) 0%, rgba(198, 221, 83, 0) 80%);
  -webkit-background-clip: text;
  background-clip: text;
  pointer-events: none;
  user-select: none;
  overflow: hidden;
  height: 0.62em;
}

.footer-bottom {
  position: relative;
  z-index: 2;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .faq-layout {
    grid-template-columns: 1fr;
  }

  .faq-side {
    position: static;
  }

  .faq-lead {
    max-width: 520px;
  }

  .how-card.full-width {
    flex-direction: column;
    align-items: flex-start;
  }

  .how-card.full-width .hero-cta {
    margin: 12px 0 8px;
  }
}

@media (max-width: 600px) {
  .faq-question {
    font-size: 17px;
  }

  .stat-card {
    min-height: 150px;
  }

  .footer-word {
    font-size: 14.2vw;
  }

  .portfolio-header-icon {
    opacity: 0.45;
  }
}

@media (prefers-reduced-motion: reduce) {
  .portfolio-card, .how-card, .social-card, .stat-card::before { transition: none; }
}

.socials-header .portfolio-header-icon {
  width: 400px;
  height: 400px;
  top: -70px;
  right: 0;
  filter: drop-shadow(0 24px 34px rgba(4, 68, 52, 0.22));
}

@media (max-width: 860px) {
  .socials-header .portfolio-header-icon {
    width: min(52vw, 220px);
    height: auto;
    top: -30px;
    right: -10px;
  }
}

.footer-section .footer-top {
  margin-bottom: 64px;
}
