:root {
  --eco-primary: #16a34a;
  --eco-lime: #84cc16;
  --eco-variant: #0284c7;
  --eco-title: #111827;
  --eco-text: #4b5563;
  --eco-white: #ffffff;
  --eco-surface: #ffffff;
  --eco-surface-alt: #f3f4f6;
  --eco-dark: #111827;
  --eco-dark-alt: #1f2937;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  background-color: var(--eco-surface);
}

body.is-ready .hero-kicker,
body.is-ready .hero-title,
body.is-ready .hero-lead,
body.is-ready .hero-cta-primary,
body.is-ready .hero-cta-secondary,
body.is-ready .hero-panel {
  animation-fill-mode: both;
  animation-duration: .9s;
  animation-timing-function: cubic-bezier(.22, 1, .36, 1);
}

body.is-ready .hero-kicker {
  animation-name: fade-up;
  animation-delay: .08s;
}

body.is-ready .hero-title {
  animation-name: fade-up;
  animation-delay: .16s;
}

body.is-ready .hero-lead {
  animation-name: fade-up;
  animation-delay: .26s;
}

body.is-ready .hero-cta-primary,
body.is-ready .hero-cta-secondary {
  animation-name: fade-up;
  animation-delay: .36s;
}

body.is-ready .hero-panel {
  animation-name: fade-in-right;
  animation-delay: .28s;
}

html.theme-light body {
  color: var(--eco-text);
  background: var(--eco-surface);
}

.site-header {
  transition: all 0.3s ease;
}

h1,
h2,
h3,
h4 {
  letter-spacing: -0.04em;
  color: var(--eco-title);
}

.eco-hero {
  background-color: #f8fafc;
}

.eco-hero__scrim {
  background: rgba(0, 0, 0, 0.2);
}

/* Content Panel with 80% opacity */
.glass-panel {
  background: rgba(255, 255, 255, 0.5) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(22, 163, 74, 0.1);
  box-shadow: 0 20px 50px rgba(14, 107, 55, 0.1);
}

.hero-slide {
  opacity: 0;
  filter: brightness(0.4);
  /* Oscuridad constante al 40% */
  transition: opacity 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-slide.is-active {
  opacity: 1;
  /* Mostramos la imagen con opacidad completa */
}

.hero-title {
  text-wrap: balance;
  color: var(--eco-title);
}

.hero-cta-primary {
  background: var(--eco-primary);
  color: white;
  box-shadow: 0 12px 30px rgba(22, 163, 74, 0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-cta-primary:hover {
  transform: translateY(-3px) scale(1.02);
  background: var(--eco-lime);
  box-shadow: 0 15px 35px rgba(132, 204, 22, 0.4);
}

.hero-cta-secondary {
  background: white;
  color: var(--eco-title);
  border: 1px solid rgba(17, 24, 39, 0.05);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-cta-secondary:hover {
  transform: translateY(-3px);
  background: #f8fafc;
  border-color: var(--eco-primary);
  box-shadow: 0 10px 25px rgba(17, 24, 39, 0.08);
}

/* Floating Trust Card */
.trust-card {
  background: white;
  box-shadow: 0 30px 60px -12px rgba(17, 24, 39, 0.15);
}

.trust-item:not(:last-child) {
  border-right: 1px solid rgba(17, 24, 39, 0.08);
}

@media (max-width: 1023px) {
  .trust-item:not(:last-child) {
    border-right: none;
    border-bottom: 1px solid rgba(17, 24, 39, 0.08);
  }
}

.trust-item__accent {
  width: 2px;
  height: 40px;
  background: var(--eco-primary);
}

h1,
h2,
h3,
h4 {
  letter-spacing: -0.03em;
}

.eco-hero,
.eco-page-hero {
  background-color: var(--eco-surface-alt);
}

.eco-hero--home {
  min-height: clamp(640px, 84vh, 860px);
}

.eco-hero__scrim {
  background:
    linear-gradient(90deg, rgba(17, 24, 39, 0.8) 0%, rgba(17, 24, 39, 0.7) 44%, rgba(17, 24, 39, 0.4) 75%, transparent 100%);
}

.hero-slide {
  opacity: 0;
  transition: opacity 1.2s ease;
}

.hero-slide.is-active {
  opacity: 0.52;
}

.hero-kicker {
  color: rgba(224, 227, 51, 0.9);
}

.hero-title {
  color: #f3f5ef;
  text-wrap: balance;
}

.hero-lead {
  color: rgba(237, 244, 237, 0.84);
}

.hero-cta-primary {
  background: var(--eco-primary);
  color: #102414;
  box-shadow: 0 18px 42px rgba(153, 202, 60, 0.2);
}

.hero-cta-secondary {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.04);
  color: #edf4ed;
}

.hero-panel {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(18, 34, 24, 0.78);
  color: #edf4ed;
}

.hero-panel__item {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.trust-rotator {
  box-shadow: 0 18px 40px rgba(153, 202, 60, 0.08);
}

.trust-rotator__text {
  min-height: 2.2em;
  transition: opacity .35s ease, transform .35s ease;
}

.trust-rotator__text.is-changing {
  opacity: 0;
  transform: translateY(8px);
}

.trust-chip {
  background: rgba(255, 255, 255, 0.52);
  transition:
    background-color .25s ease,
    border-color .25s ease,
    color .25s ease,
    transform .25s ease;
}

.trust-chip.is-active {
  background: var(--eco-primary);
  border-color: rgba(153, 202, 60, 0.8);
  color: #102414;
  transform: translateY(-1px);
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity .8s cubic-bezier(.22, 1, .36, 1),
    transform .8s cubic-bezier(.22, 1, .36, 1);
  transition-delay: var(--reveal-delay, 0s);
}

.reveal--left {
  transform: translateX(-28px);
}

.reveal--right {
  transform: translateX(28px);
}

.reveal.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

html.theme-light .eco-hero__scrim {
  background: transparent;
}

html.theme-light .hero-slide.is-active {
  opacity: 1;
  /* Opacidad total */
}

html.theme-light .hero-kicker {
  color: var(--eco-title);
}

html.theme-light .hero-title {
  color: var(--eco-title);
}

html.theme-light .hero-lead {
  color: rgba(51, 58, 54, 0.88);
}

html.theme-light .hero-cta-primary {
  background: var(--eco-primary);
  color: var(--eco-white);
  box-shadow: 0 8px 24px rgba(22, 163, 74, 0.25);
}

html.theme-light .hero-cta-secondary {
  border-color: rgba(14, 107, 55, 0.18);
  background: rgba(255, 255, 255, 0.72);
  color: var(--eco-text);
}

html.theme-light .hero-panel {
  border-color: rgba(14, 107, 55, 0.1);
  background: rgba(255, 255, 255, 0.84);
  color: var(--eco-text);
}

html.theme-light .hero-panel__item {
  border-color: rgba(14, 107, 55, 0.08);
  background: rgba(247, 249, 242, 0.88);
}

html.theme-dark .trust-rotator {
  background: rgba(153, 202, 60, 0.12);
  border-color: rgba(153, 202, 60, 0.22);
}

html.theme-dark .trust-rotator__text {
  color: #eff5db;
}

html.theme-dark .trust-chip {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(153, 202, 60, 0.16);
  color: rgba(237, 244, 237, 0.78);
}

html.theme-dark .trust-chip.is-active {
  background: var(--eco-primary);
  border-color: rgba(153, 202, 60, 0.86);
  color: #0f2213;
}

/* Estrategia claro/oscuro: clases reutilizables para alternar módulos */
.mode-light {
  background: var(--eco-surface);
  color: var(--eco-text);
}

.mode-dark {
  background: var(--eco-dark);
  color: var(--eco-white);
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 3px 0;
  background: var(--eco-title);
  transition: transform .24s ease, opacity .24s ease;
}

.nav-toggle.is-open span:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
}

.nav-toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.is-open span:nth-child(3) {
  transform: translateY(-5px) rotate(-45deg);
}

@media (max-width: 1023px) {
  .site-nav.is-open {
    position: absolute;
    top: 104px;
    left: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    border: 1px solid rgba(14, 107, 55, 0.18);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 24px 45px rgba(16, 40, 27, 0.18);
    padding: 14px;
    z-index: 80;
  }

  .site-nav.is-open a {
    border-radius: 12px;
    padding: 10px 12px;
    color: var(--eco-title);
  }

  .eco-hero--home {
    min-height: auto;
  }
}

.service-card {
  transition: transform .2s ease, border-color .2s ease;
}

.service-card:hover {
  transform: translateY(-2px);
  border-color: rgba(153, 202, 60, 0.45);
}

.service-card[aria-open="true"] {
  border-color: rgba(224, 227, 51, 0.7);
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }

  .reveal,
  .reveal--left,
  .reveal--right {
    opacity: 1 !important;
    transform: none !important;
  }

  .hero-slide,
  .hero-slide.is-active,
  .trust-rotator__text,
  .trust-rotator__text.is-changing {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-in-right {
  from {
    opacity: 0;
    transform: translateX(30px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}