/* ============================================================
   Reciclajes Ecológicos — estilos globales
   Paleta: verdes (sostenibilidad) + marrones (madera) + neutros.
   ============================================================ */

:root {
  /* Marca */
  --color-primary: #2f6b3c;       /* Verde bosque */
  --color-primary-dark: #1f4e29;
  --color-primary-light: #4f8c5a;
  --color-accent: #c08552;        /* Marrón madera cálido */
  --color-accent-dark: #8a5a35;

  /* Neutros */
  --color-bg: #fafaf7;
  --color-surface: #ffffff;
  --color-text: #1f2a23;
  --color-muted: #5a6b5e;
  --color-border: #e2e6df;
  --color-soft: #f1f4ec;

  /* Tipografía */
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Plus Jakarta Sans', var(--font-sans);

  /* Forma */
  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 3px rgba(31, 78, 41, .06), 0 1px 2px rgba(31, 78, 41, .04);
  --shadow: 0 8px 30px rgba(31, 78, 41, .08);
  --shadow-lg: 0 24px 60px rgba(31, 78, 41, .12);

  /* Layout */
  --container: 1200px;
  --header-height: 80px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--color-primary); }

ul { list-style: none; }

button { font-family: inherit; cursor: pointer; border: 0; }

/* Utilidades de layout */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 96px 0;
}

.section-sm {
  padding: 64px 0;
}

@media (max-width: 768px) {
  .section { padding: 64px 0; }
  .section-sm { padding: 40px 0; }
}

/* Tipografía */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-text);
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.25rem, 5vw, 3.75rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }

p { color: var(--color-muted); }

.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-primary);
  background: var(--color-soft);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
}

.section-header { text-align: center; max-width: 720px; margin: 0 auto 56px; }
.section-header p { font-size: 1.0625rem; margin-top: 12px; }

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: 0.01em;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
  background: var(--color-primary-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 12px 30px rgba(31, 78, 41, .25);
}

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  box-shadow: inset 0 0 0 2px var(--color-primary);
}
.btn-outline:hover {
  background: var(--color-primary);
  color: #fff;
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--color-text);
}
.btn-ghost:hover { color: var(--color-primary); }

/* ============================================================
   HEADER + NAV
   ============================================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 250, 247, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.0625rem;
  color: var(--color-text);
  letter-spacing: -0.01em;
}
.logo .logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
  display: grid;
  place-items: center;
  color: #fff;
}
/* Cuando el logo es una imagen (PNG), evitamos el fondo verde y la
   caja redondeada — la propia imagen ya tiene su diseño completo.
   Tamaño grande (56px) para que el logo nuevo se aprecie bien. */
.logo .logo-mark-img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  display: block;
}
/* En el footer (fondo oscuro), un poco más grande aún. */
.footer-brand .logo .logo-mark-img {
  width: 64px;
  height: 64px;
}
.logo span { line-height: 1.1; }
.logo small {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--color-muted);
  letter-spacing: 0.04em;
}

.nav-list {
  display: flex;
  gap: 4px;
  align-items: center;
}
.nav-list a {
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-muted);
  transition: background .2s ease, color .2s ease;
}
.nav-list a:hover { color: var(--color-text); background: var(--color-soft); }
.nav-list a.is-active { color: var(--color-primary); background: var(--color-soft); }

.nav-cta {
  margin-left: 12px;
}

/* `.nav-list a` ponía color muted que ganaba en especificidad al .btn-primary
   y dejaba el texto del botón "Pide presupuesto" invisible sobre el verde.
   Forzamos los colores correctos con la misma especificidad. */
.nav-list a.btn-primary,
.nav-list a.btn-primary:hover {
  background: var(--color-primary);
  color: #fff;
}
.nav-list a.btn-primary:hover {
  background: var(--color-primary-dark);
}
.nav-list a.btn-outline {
  color: var(--color-primary);
  background: transparent;
}
.nav-list a.btn-outline:hover { color: #fff; }

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: transparent;
  align-items: center;
  justify-content: center;
}
.nav-toggle:hover { background: var(--color-soft); }
.nav-toggle .bars {
  width: 22px;
  height: 2px;
  background: var(--color-text);
  position: relative;
}
.nav-toggle .bars::before,
.nav-toggle .bars::after {
  content: ''; position: absolute; left: 0; width: 22px; height: 2px; background: var(--color-text);
  transition: transform .25s ease;
}
.nav-toggle .bars::before { top: -7px; }
.nav-toggle .bars::after { top: 7px; }

@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; }
  .nav-list {
    position: fixed;
    inset: var(--header-height) 0 0 0;
    background: var(--color-bg);
    flex-direction: column;
    padding: 32px 24px;
    gap: 10px;
    transform: translateX(100%);
    transition: transform .3s ease;
    z-index: 95;
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.08);
    overflow-y: auto;
  }
  .nav-list a {
    width: 100%;
    padding: 16px 20px;
    font-size: 1.0625rem;
  }
  /* El item activo en móvil tiene su propio espacio gracias al gap.
     El CTA "Pide presupuesto" tiene un poco más de margen arriba. */
  .nav-list .nav-cta {
    margin-top: 8px;
  }
  body.menu-open .nav-list { transform: translateX(0); }

  /* IMPORTANTE: el `backdrop-filter` del header crea un containing block que
     atrapa al .nav-list con position:fixed (lo trata como absolute). Cuando
     el menú está abierto desactivamos el filter y damos fondo sólido al header
     para que el menú pueda salir y cubrir toda la pantalla. */
  body.menu-open .site-header {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: var(--color-bg);
  }
}

/* ============================================================
   HERO
   ============================================================ */

.hero {
  position: relative;
  padding: 120px 0 96px;
  overflow: hidden;
  background:
    radial-gradient(1100px 500px at 20% -10%, rgba(79, 140, 90, .12), transparent 60%),
    radial-gradient(900px 500px at 110% 0%, rgba(192, 133, 82, .12), transparent 60%),
    var(--color-bg);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 64px;
  align-items: center;
}
.hero-content h1 { margin-bottom: 20px; }
.hero-content h1 .accent { color: var(--color-primary); }
.hero-content p { font-size: 1.125rem; max-width: 540px; margin-bottom: 32px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-stats {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 540px;
}
.hero-stats .stat {
  padding: 18px 20px;
  border-radius: var(--radius);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
}
.hero-stats .stat strong {
  display: block;
  font-size: 1.5rem;
  color: var(--color-primary);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.hero-stats .stat span { font-size: 0.8125rem; color: var(--color-muted); }

.hero-visual {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-visual::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(31, 42, 35, .4));
}
.hero-badge {
  position: absolute;
  bottom: 24px;
  left: 24px;
  right: 24px;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(8px);
  padding: 16px 18px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 14px;
  z-index: 1;
}
.hero-badge .icon {
  flex: 0 0 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--color-soft);
  color: var(--color-primary);
  display: grid;
  place-items: center;
}
.hero-badge strong { display: block; font-size: 0.9375rem; }
.hero-badge span { display: block; font-size: 0.8125rem; color: var(--color-muted); }

@media (max-width: 960px) {
  .hero { padding: 64px 0 48px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { aspect-ratio: 4 / 3; }
  .hero-stats { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 520px) {
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .hero-stats .stat:last-child { grid-column: 1 / -1; }
}

/* ============================================================
   FEATURES (servicios)
   ============================================================ */

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

.feature {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: transform .25s ease, box-shadow .25s ease, border-color .2s ease;
}
.feature:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: transparent;
}
.feature .feature-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--color-soft);
  color: var(--color-primary);
  display: grid;
  place-items: center;
  margin-bottom: 20px;
}
.feature h3 { margin-bottom: 10px; font-size: 1.25rem; }
.feature p { font-size: 0.9375rem; }

/* ============================================================
   PRODUCT GRID (galería de productos)
   ============================================================ */

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

.product {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border);
  transition: transform .25s ease, box-shadow .25s ease;
  display: flex;
  flex-direction: column;
}
.product:hover { transform: translateY(-4px); box-shadow: var(--shadow); }

.product-image {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--color-soft);
}
.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.product:hover .product-image img { transform: scale(1.04); }

.product-body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.product-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent-dark);
  margin-bottom: 8px;
}
.product h3 { margin-bottom: 8px; font-size: 1.125rem; }
.product p { font-size: 0.9375rem; flex: 1; }
.product-link {
  margin-top: 16px;
  font-weight: 600;
  color: var(--color-primary);
  font-size: 0.9375rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ============================================================
   SPLIT (sección imagen + texto)
   ============================================================ */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.split.reverse .split-image { order: 2; }

.split-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  box-shadow: var(--shadow);
}
.split-image img { width: 100%; height: 100%; object-fit: cover; }

.split-content h2 { margin-bottom: 20px; }
.split-content p { font-size: 1.0625rem; margin-bottom: 16px; }

.bullet-list { margin: 24px 0; display: grid; gap: 12px; }
.bullet-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.9375rem;
  color: var(--color-text);
}
.bullet-list li::before {
  content: '';
  width: 22px;
  height: 22px;
  background: var(--color-soft) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%232f6b3c' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>") center / 14px no-repeat;
  border-radius: 50%;
  flex: 0 0 22px;
  margin-top: 1px;
}

@media (max-width: 960px) {
  .split { grid-template-columns: 1fr; gap: 32px; }
  .split.reverse .split-image { order: 0; }
  .split-image { aspect-ratio: 4 / 3; }
}

/* ============================================================
   CTA banner
   ============================================================ */

.cta-banner {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: #fff;
  padding: 64px 48px;
  border-radius: var(--radius-lg);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.cta-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(600px 300px at 100% 0%, rgba(255,255,255,.12), transparent 60%);
  pointer-events: none;
}
.cta-banner h2 { color: #fff; margin-bottom: 8px; }
.cta-banner p { color: rgba(255,255,255,.85); font-size: 1.0625rem; }
.cta-banner .btn-primary { background: #fff; color: var(--color-primary); }
.cta-banner .btn-primary:hover { background: rgba(255,255,255,.92); color: var(--color-primary-dark); }

@media (max-width: 760px) {
  .cta-banner { grid-template-columns: 1fr; padding: 40px 28px; }
}

/* ============================================================
   CONTACTO (formulario + datos)
   ============================================================ */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}

.contact-form {
  display: grid;
  gap: 16px;
}
.contact-form label {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 6px;
  display: block;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 0.9375rem;
  font-family: inherit;
  background: var(--color-surface);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(47, 107, 60, .12);
}
.contact-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.contact-form button { margin-top: 8px; justify-self: start; }
.contact-form .check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.8125rem;
  color: var(--color-muted);
}
.contact-form .check input { width: auto; margin-top: 3px; }
.contact-form .check a { color: var(--color-primary); text-decoration: underline; }

.contact-info {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 32px;
}
.contact-info h3 { margin-bottom: 20px; }
.contact-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 0;
  border-bottom: 1px solid var(--color-border);
}
.contact-item:last-child { border-bottom: 0; }
.contact-item .icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--color-soft);
  color: var(--color-primary);
  display: grid;
  place-items: center;
  flex: 0 0 40px;
}
.contact-item strong { display: block; font-size: 0.875rem; margin-bottom: 2px; }
.contact-item span, .contact-item a { color: var(--color-muted); font-size: 0.9375rem; }

.map-wrap {
  margin-top: 24px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--color-border);
  aspect-ratio: 16 / 9;
}
.map-wrap iframe { width: 100%; height: 100%; border: 0; }

.form-status {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 0.875rem;
  display: none;
}
.form-status.success {
  display: block;
  background: var(--color-soft);
  color: var(--color-primary-dark);
  border: 1px solid rgba(47, 107, 60, .2);
}

@media (max-width: 960px) {
  .contact-grid { grid-template-columns: 1fr; }
  .contact-form .form-row { grid-template-columns: 1fr; }
}

/* ============================================================
   PAGE HEADER (cabeceras de páginas internas)
   ============================================================ */

.page-header {
  padding: 96px 0 48px;
  background:
    radial-gradient(900px 400px at 50% -20%, rgba(79, 140, 90, .14), transparent 70%),
    var(--color-bg);
  text-align: center;
}
.page-header h1 { margin-bottom: 12px; }
.page-header p { font-size: 1.0625rem; max-width: 640px; margin: 0 auto; }

/* ============================================================
   LEGAL (páginas de texto largo)
   ============================================================ */

.legal-content {
  max-width: 800px;
  margin: 0 auto;
}
.legal-content h2 { margin-top: 40px; margin-bottom: 16px; font-size: 1.375rem; }
.legal-content h2:first-child { margin-top: 0; }
.legal-content p { margin-bottom: 14px; color: var(--color-text); }
.legal-content ul { padding-left: 24px; margin-bottom: 14px; list-style: disc; color: var(--color-text); }
.legal-content ul li { margin-bottom: 6px; padding-left: 4px; }
.legal-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 0.9375rem;
}
.legal-content table th, .legal-content table td {
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  text-align: left;
}
.legal-content table th { background: var(--color-soft); font-weight: 600; }

/* ============================================================
   FOOTER
   ============================================================ */

.site-footer {
  background: #0f1a13;
  color: #c8d3cb;
  padding: 64px 0 24px;
  margin-top: 0;
}
.site-footer h4 {
  color: #fff;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 18px;
}
.site-footer .footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.site-footer p { color: #9bab9f; font-size: 0.9375rem; }
.site-footer ul { display: grid; gap: 10px; }
.site-footer ul a { font-size: 0.9375rem; color: #c8d3cb; }
.site-footer ul a:hover { color: #fff; }
.footer-brand .logo { color: #fff; margin-bottom: 14px; }
.footer-brand .logo small { color: #9bab9f; }
.footer-meta {
  margin-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8125rem;
  color: #7a897e;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-meta a { color: #9bab9f; }
.footer-meta a:hover { color: #fff; }

@media (max-width: 760px) {
  .site-footer .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-brand { grid-column: 1 / -1; }
}

/* ============================================================
   COOKIE BANNER
   ============================================================ */

.cookie-banner {
  position: fixed;
  bottom: 16px;
  left: 16px;
  right: 16px;
  max-width: 720px;
  margin: 0 auto;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 20px 24px;
  display: none;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  box-shadow: var(--shadow-lg);
  z-index: 200;
  animation: slide-up .35s ease;
}
.cookie-banner.show { display: flex; }
.cookie-banner p { font-size: 0.875rem; flex: 1; min-width: 240px; color: var(--color-text); }
.cookie-banner p a { color: var(--color-primary); text-decoration: underline; }
.cookie-banner .actions { display: flex; gap: 8px; }
.cookie-banner button {
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
}
.cookie-banner .btn-accept { background: var(--color-primary); color: #fff; }
.cookie-banner .btn-decline { background: var(--color-soft); color: var(--color-text); }

@keyframes slide-up { from { transform: translateY(100%); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ============================================================
   SCROLL REVEAL
   ============================================================ */

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.visible { opacity: 1; transform: none; }

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0s !important; transition-duration: 0s !important; }
  .reveal { opacity: 1; transform: none; }
}
