:root {
  --verde-oscuro: #1f4a12;   /* "E3" del logo */
  --verde: #5f9a2e;          /* "SUSTAINABLE FORESTRY" del logo */
  --verde-claro: #eef4e6;
  --crema: #faf8f3;
  --texto: #1c2418;
  --texto-suave: #55604f;
  --borde: #dde4d4;
  --radio: 14px;
  --sombra: 0 6px 24px rgba(31, 74, 18, .08);
}

* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { font-family: "Inter", system-ui, sans-serif; color: var(--texto); background: var(--crema); line-height: 1.6; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.6rem); font-weight: 900; }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.5rem); font-weight: 800; margin-bottom: 1rem; color: var(--verde-oscuro); }
h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: .4rem; }

.container { width: min(1140px, 100% - 32px); margin-inline: auto; }
.section { padding: clamp(64px, 9vw, 110px) 0; }
.section--alt { background: var(--verde-claro); }
.section--dark { background: var(--verde-oscuro); color: #fff; }
.section--dark h2 { color: #fff; }
.section__lead { color: var(--texto-suave); max-width: 60ch; margin-bottom: 2rem; }
.eyebrow { text-transform: uppercase; letter-spacing: .18em; font-size: .78rem; font-weight: 600; color: var(--verde); margin-bottom: .6rem; }
.eyebrow--light { color: #a9d37f; }

/* Logo (réplica en texto del logo de E3) */
.logo { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; }
.logo__mark { font-weight: 900; font-size: 2rem; color: var(--verde-oscuro); letter-spacing: -.04em; line-height: 1; }
.logo__text { font-size: .62rem; font-weight: 600; text-transform: uppercase; letter-spacing: .22em; color: var(--verde); line-height: 1.25; }
.logo--small .logo__mark { font-size: 1.5rem; color: #fff; }
.logo--small .logo__text { color: #a9d37f; }

/* Botones */
.btn { display: inline-block; background: var(--verde); color: #fff; text-decoration: none; font-weight: 600; padding: .85rem 1.5rem; border-radius: 999px; border: 2px solid var(--verde); cursor: pointer; font: inherit; font-weight: 600; transition: background .2s, transform .2s; }
.btn:hover { background: var(--verde-oscuro); border-color: var(--verde-oscuro); transform: translateY(-1px); }
.btn--ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.7); }
.btn--ghost:hover { background: #fff; color: var(--verde-oscuro); border-color: #fff; }
.btn--small { padding: .55rem 1.2rem; }

/* Header */
.header { position: sticky; top: 0; z-index: 10; background: rgba(250, 248, 243, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--borde); }
.header__inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.nav { display: flex; align-items: center; gap: 1.8rem; }
.nav a:not(.btn) { text-decoration: none; font-weight: 500; color: var(--texto-suave); }
.nav a:not(.btn):hover { color: var(--verde-oscuro); }
.nav .btn { color: #fff; }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--verde-oscuro); margin: 5px 0; transition: .2s; }

/* Hero */
.hero { position: relative; color: #fff; background: #14300b; padding: clamp(90px, 14vw, 180px) 0; overflow: hidden; isolation: isolate; }
.hero__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(100deg, rgba(14, 34, 8, .88) 0%, rgba(20, 48, 11, .7) 50%, rgba(20, 48, 11, .25) 100%); }
.hero__inner { max-width: 780px; }
.hero .eyebrow { color: #a9d37f; }
.hero__lead { font-size: 1.15rem; opacity: .9; margin: 1.2rem 0 2rem; max-width: 56ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .8rem; }

/* Nosotros */
.split { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.split p { color: var(--texto-suave); }
.section--dark .split p { color: rgba(255,255,255,.82); }
.pillars { list-style: none; padding: 0; display: grid; gap: 1rem; }
.pillars li { background: #fff; border: 1px solid var(--borde); border-left: 4px solid var(--verde); border-radius: var(--radio); padding: 1.1rem 1.3rem; display: grid; gap: .2rem; }
.pillars span { color: var(--texto-suave); font-size: .95rem; }

/* Productos */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 1.25rem; margin-top: 2rem; }
.grid--3 { margin-top: 0; }
.card { background: #fff; border: 1px solid var(--borde); border-radius: var(--radio); padding: 1.6rem; display: flex; flex-direction: column; box-shadow: var(--sombra); transition: transform .2s, box-shadow .2s; }
.card:hover { transform: translateY(-3px); box-shadow: 0 12px 32px rgba(31, 74, 18, .14); }
.card p { color: var(--texto-suave); font-size: .95rem; flex: 1; }
.card--flat { box-shadow: none; border-top: 4px solid var(--verde-oscuro); }
.card__icon { width: 56px; height: 56px; border-radius: 12px; background: var(--verde-claro); display: grid; place-items: center; margin-bottom: 1rem; }
.card__icon svg { width: 34px; height: 34px; fill: var(--verde); stroke: var(--verde-oscuro); stroke-width: 1.5; }
.card__icon svg .thin { fill: none; stroke-width: 2; }
.card__link { margin-top: 1rem; font-weight: 600; color: var(--verde); text-decoration: none; }
.card__link::after { content: " →"; }
.card__link:hover { color: var(--verde-oscuro); }

/* Fotos de bosque en "Nosotros" */
.foto-apilada { position: relative; margin: 0; min-height: 420px; }
.foto-apilada img { position: absolute; object-fit: cover; border-radius: var(--radio); box-shadow: 0 18px 40px rgba(20, 48, 11, .22); }
.foto-apilada img:first-child { inset: 0 22% 14% 0; width: 78%; height: 86%; }
.foto-apilada img:last-child { right: 0; bottom: 0; width: 52%; height: 56%; border: 6px solid var(--crema); }

/* Tablas cepilladas / muebles */
.split--imagen { grid-template-columns: 1fr 1.05fr; }
.checks { list-style: none; padding: 0; margin: 1.2rem 0; display: grid; gap: .55rem; }
.checks li { padding-left: 1.8rem; position: relative; color: var(--texto-suave); }
.checks li::before { content: ""; position: absolute; left: 0; top: .35em; width: 1.05rem; height: 1.05rem; border-radius: 50%;
  background: var(--verde) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='white' stroke-width='2'/%3E%3C/svg%3E") center / 80% no-repeat; }
.usos { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: 1.6rem; }
.usos span { background: var(--verde-claro); color: var(--verde-oscuro); font-size: .82rem; font-weight: 600; padding: .35rem .8rem; border-radius: 999px; }
.mosaico { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1.25fr 1fr; gap: 1rem; aspect-ratio: 1 / 1; }
.mosaico img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radio); }
.mosaico img:first-child { grid-column: 1 / -1; }
.mosaico__dato { background: var(--verde-oscuro); color: #fff; border-radius: var(--radio); padding: 1.4rem; display: flex; flex-direction: column; justify-content: flex-end; gap: .3rem; }
.mosaico__dato strong { font-size: 1.6rem; font-weight: 800; line-height: 1.1; }
.mosaico__dato span { color: #c9e4ad; font-size: .95rem; }

/* Subproductos en burbujas */
.subproductos { background: radial-gradient(circle at 15% 20%, var(--verde-claro) 0, transparent 45%), radial-gradient(circle at 85% 80%, #f1ece0 0, transparent 40%), var(--crema); }
.burbujas { list-style: none; padding: 0; margin-top: 2.5rem; display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(1.5rem, 4vw, 3rem) clamp(1rem, 3vw, 2.5rem); }
.burbuja { width: 190px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.burbuja img { width: 170px; height: 170px; border-radius: 50%; object-fit: cover; border: 6px solid #fff;
  box-shadow: 0 12px 30px rgba(20, 48, 11, .18), 0 0 0 2px var(--verde-claro); margin-bottom: 1rem;
  animation: flotar 6s ease-in-out infinite; transition: transform .3s; }
.burbuja:nth-child(2) img { animation-delay: -1.2s; width: 150px; height: 150px; margin-top: 20px; }
.burbuja:nth-child(3) img { animation-delay: -2.4s; }
.burbuja:nth-child(4) img { animation-delay: -3.6s; width: 150px; height: 150px; margin-top: 20px; }
.burbuja:nth-child(5) img { animation-delay: -4.8s; }
.burbuja:hover img { transform: scale(1.06); }
.burbuja p { color: var(--texto-suave); font-size: .9rem; flex: 1; }
.burbuja .card__link { margin-top: .5rem; }
@keyframes flotar { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
@media (prefers-reduced-motion: reduce) { .burbuja img { animation: none; } }

/* Franja de bosque */
.franja-bosque { position: relative; isolation: isolate; color: #fff; padding: clamp(80px, 12vw, 150px) 0; text-align: center; overflow: hidden; }
.franja-bosque img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.franja-bosque::before { content: ""; position: absolute; inset: 0; background: rgba(14, 34, 8, .55); z-index: -1; }
.franja-bosque__frase { font-size: clamp(1.4rem, 3.2vw, 2.3rem); font-weight: 800; max-width: 26ch; margin: 0 auto; line-height: 1.25; letter-spacing: -.01em; }

/* Precios madera inmunizada */
.precios__controles { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: space-between; margin-bottom: 1rem; }
.segmentado { display: inline-flex; background: var(--verde-claro); border-radius: 999px; padding: 4px; }
.segmentado button { font: inherit; font-size: .88rem; font-weight: 600; border: 0; background: transparent; color: var(--texto-suave); padding: .45rem 1rem; border-radius: 999px; cursor: pointer; }
.segmentado button[aria-pressed="true"] { background: #fff; color: var(--verde-oscuro); box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.tabla-wrap { background: #fff; border: 1px solid var(--borde); border-radius: var(--radio); overflow: hidden; box-shadow: var(--sombra); }
.tabla-precios { width: 100%; border-collapse: collapse; font-size: .95rem; }
.tabla-precios thead th { background: var(--verde-oscuro); color: #fff; font-weight: 600; text-align: left; padding: .9rem 1rem; font-size: .85rem; }
.tabla-precios td, .tabla-precios tbody th { padding: .85rem 1rem; border-top: 1px solid var(--borde); text-align: left; }
.tabla-precios tbody th { font-weight: 600; }
.tabla-precios tbody tr:hover { background: var(--crema); }
.tabla-precios .codigo { color: var(--texto-suave); font-size: .85rem; font-variant-numeric: tabular-nums; }
.tabla-precios td:last-child { text-align: right; }
.tabla-precios .card__link { margin: 0; white-space: nowrap; }
.precios__nota { font-size: .85rem; color: var(--texto-suave); margin-top: .9rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Contacto */
.contact-list { list-style: none; padding: 0; margin-top: 1.5rem; }
.contact-list a { color: #fff; font-weight: 600; }
.form { background: #fff; color: var(--texto); border-radius: var(--radio); padding: clamp(1.3rem, 3vw, 2rem); display: grid; gap: 1rem; }
.form label { display: grid; gap: .35rem; font-weight: 600; font-size: .9rem; }
.form input, .form select, .form textarea { font: inherit; font-weight: 400; padding: .7rem .85rem; border: 1px solid var(--borde); border-radius: 10px; background: var(--crema); width: 100%; }
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid var(--verde); outline-offset: 1px; border-color: transparent; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form__status { font-size: .9rem; min-height: 1.2em; }
.form__status.ok { color: var(--verde); }
.form__status.error { color: #b3261e; }
.hp { position: absolute; left: -9999px; }

/* Footer */
.footer { background: #14300b; color: rgba(255,255,255,.7); padding: 2rem 0; font-size: .9rem; }
.footer__inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }

/* Móvil */
@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav { position: absolute; top: 72px; left: 0; right: 0; background: var(--crema); flex-direction: column; align-items: stretch; gap: 0; padding: .5rem 16px 1rem; border-bottom: 1px solid var(--borde); display: none; }
  .nav.abierto { display: flex; }
  .nav a { padding: .8rem 0; }
  .nav .btn { text-align: center; margin-top: .5rem; }
  .split, .split--imagen { grid-template-columns: 1fr; }
  .foto-apilada { min-height: 320px; }
  .burbuja { width: 150px; }
  .burbuja img, .burbuja:nth-child(n) img { width: 130px; height: 130px; margin-top: 0; }
  .form__row { grid-template-columns: 1fr; }
}

/* Tabla de precios como tarjetas en celular */
@media (max-width: 700px) {
  .tabla-wrap { background: transparent; border: 0; box-shadow: none; }
  .tabla-precios thead { display: none; }
  .tabla-precios, .tabla-precios tbody, .tabla-precios tr, .tabla-precios td, .tabla-precios tbody th { display: block; }
  .tabla-precios tr { background: #fff; border: 1px solid var(--borde); border-radius: var(--radio); padding: .9rem 1rem; margin-bottom: .75rem; display: grid; grid-template-columns: 1fr auto; gap: .2rem .75rem; }
  .tabla-precios tbody th, .tabla-precios td { border: 0; padding: .15rem 0; }
  .tabla-precios tbody th { grid-column: 1; grid-row: 1; }
  .tabla-precios td:nth-child(2) { grid-column: 1; grid-row: 2; font-weight: 600; color: var(--verde); }
  .tabla-precios td.codigo { grid-column: 2; grid-row: 1; text-align: right; }
  .tabla-precios td:last-child { grid-column: 2; grid-row: 2; }
}
