/* Forestal Collicura — hoja de estilos única. Sin dependencias externas. */

@font-face {
  font-family: "Bitter";
  src: url("fonts/bitter-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Hanken Grotesk";
  src: url("fonts/hanken-grotesk-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}

:root {
  --rojo: #e31516;        /* rojo del logo: marca y acentos */
  --rojo-osc: #b80f12;    /* botones y enlaces con texto blanco (AA) */
  --carbon: #1d2120;      /* texto, pie */
  --grafito: #4a514e;     /* texto secundario */
  --piedra: #f0f1ef;      /* fondo alterno */
  --linea: #d8dbd8;
  --papel: #ffffff;

  --slab: "Bitter", "Rockwell", Georgia, serif;
  --sans: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --medida: 64ch;
  --ancho: 1200px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0; font-family: var(--sans); font-size: 1.0625rem; line-height: 1.6;
  color: var(--carbon); background: var(--papel);
}
img, svg { max-width: 100%; height: auto; display: block; }

h1, h2, h3 { font-family: var(--slab); line-height: 1.12; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(2.4rem, 5.4vw, 4.2rem); font-weight: 700; letter-spacing: -.015em; }
h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); font-weight: 700; letter-spacing: -.01em; }
h3 { font-size: 1.3rem; font-weight: 650; line-height: 1.25; }
p { margin: 0 0 1em; max-width: var(--medida); }

a { color: var(--rojo-osc); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--carbon); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--rojo); outline-offset: 3px; border-radius: 2px; }

.wrap { max-width: var(--ancho); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; top: 0; z-index: 10; background: var(--carbon); color: #fff; padding: .6rem 1rem; }
.skip:focus { left: 1rem; top: 1rem; }

/* Encabezado */
.site-header { background: var(--papel); border-bottom: 1px solid var(--linea); position: relative; z-index: 2; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem 2rem; flex-wrap: wrap; padding-top: .8rem; padding-bottom: .8rem; }
.brand img { height: 58px; width: auto; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .25rem 1.5rem; flex-wrap: wrap; }
.nav a { display: inline-block; padding: .35rem 0; font-weight: 500; color: var(--carbon); text-decoration: none; border-bottom: 2px solid transparent; }
.nav a:hover { border-bottom-color: var(--linea); }
.nav a[aria-current="page"] { border-bottom-color: var(--rojo); }

/* Portada con fotografía */
.hero { position: relative; color: #fff; background: var(--carbon); min-height: min(82vh, 760px); display: grid; align-items: end; overflow: hidden; }
.hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,24,23,0) 30%, rgba(20,24,23,.78) 100%), linear-gradient(90deg, rgba(20,24,23,.55) 0%, rgba(20,24,23,0) 60%); }
.hero .wrap { position: relative; z-index: 1; width: 100%; padding-top: 6rem; padding-bottom: clamp(2.5rem, 6vw, 4.5rem); }
.hero h1 { max-width: 14em; }
.hero .lead { font-size: clamp(1.1rem, 1.6vw, 1.3rem); max-width: 36em; color: #e9ecea; }
.hero .credit { position: absolute; right: var(--gutter); bottom: 1rem; z-index: 1; font-size: .8rem; color: #cfd5d2; margin: 0; }
.actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.6rem; }

.btn { display: inline-block; padding: .8rem 1.4rem; border-radius: 4px; font-weight: 650; font-size: 1rem; line-height: 1.2; text-decoration: none; border: 2px solid transparent; }
.btn--rojo { background: var(--rojo-osc); color: #fff; }
.btn--rojo:hover { background: var(--carbon); color: #fff; }
.btn--claro { border-color: #fff; color: #fff; }
.btn--claro:hover { background: #fff; color: var(--carbon); }
.btn--linea { border-color: var(--carbon); color: var(--carbon); }
.btn--linea:hover { background: var(--carbon); color: #fff; }

/* Cifras: fila simple, datos para compradores y bancos */
.figures { background: var(--carbon); color: #fff; }
.figures dl { margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.figures dl > div { padding: 1.6rem 1.5rem 1.6rem 0; border-right: 1px solid rgba(255,255,255,.16); }
.figures dl > div + div { padding-left: 1.5rem; }
.figures dl > div:last-child { border-right: 0; }
.figures dt { font-size: .92rem; color: #c4cbc8; }
.figures dd { margin: 0 0 .2rem; font-family: var(--slab); font-size: clamp(1.5rem, 2.6vw, 2.1rem); font-weight: 700; line-height: 1.1; }
.figures dl > div { display: flex; flex-direction: column-reverse; justify-content: flex-end; }

/* Secciones */
.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section--piedra { background: var(--piedra); }
.section-head { max-width: 42rem; margin-bottom: 2.75rem; }
.section-head p { color: var(--grafito); font-size: 1.1rem; }

/* Líneas de negocio: filas foto/texto alternadas */
.line { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 2rem 4rem; align-items: center; padding: 2.5rem 0; border-top: 1px solid var(--linea); }
.line:nth-of-type(even) .line-img { order: 2; }
.line-img img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 3px; }
.line h3 { font-size: 1.6rem; }
.specs { margin: 1.2rem 0 0; display: grid; grid-template-columns: max-content 1fr; gap: .45rem 1.25rem; }
.specs dt { color: var(--grafito); }
.specs dd { margin: 0; font-weight: 600; }
.line-plain { display: grid; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); gap: 2rem 4rem; padding: 2.5rem 0 0; border-top: 1px solid var(--linea); }

/* Personas */
.people { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 1rem; margin-top: 2.5rem; }
.people figure { margin: 0; }
.people img { width: 100%; height: 100%; object-fit: cover; border-radius: 3px; }
.people .tall { grid-row: span 2; }
.people .tall img { aspect-ratio: auto; }
.people figure:not(.tall) img { aspect-ratio: 16 / 10; }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2.5rem 4rem; align-items: start; }
.checks { list-style: none; margin: 0; padding: 0; max-width: var(--medida); }
.checks li { padding: .75rem 0 .75rem 1.6rem; border-bottom: 1px solid var(--linea); position: relative; }
.checks li::before { content: ""; position: absolute; left: 0; top: 1.2rem; width: .6rem; height: .6rem; background: var(--rojo); border-radius: 50%; }
.photo-wide img { width: 100%; aspect-ratio: 21 / 9; object-fit: cover; border-radius: 3px; margin-bottom: 2.5rem; }

/* Llamado ética */
.notice { background: var(--carbon); color: #e6eae8; border-radius: 4px; padding: clamp(1.5rem, 4vw, 2.75rem); display: grid; grid-template-columns: 1fr auto; gap: 1.5rem 2.5rem; align-items: center; }
.notice h2 { color: #fff; font-size: 1.7rem; }
.notice p { margin: 0; color: #c4cbc8; }

/* Contacto */
.contact { display: grid; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); gap: 2.5rem 4rem; }
.contact address { font-style: normal; margin-bottom: 1rem; }
.contact dl { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1.2rem; }
.contact dt { color: var(--grafito); }
.contact dd { margin: 0; }

/* Páginas interiores */
.page-head { padding: clamp(2.5rem, 6vw, 4.5rem) 0 1rem; }
.page-head p { font-size: 1.2rem; color: var(--grafito); }
.page-banner img { width: 100%; height: clamp(180px, 28vw, 340px); object-fit: cover; }

.timeline { list-style: none; margin: 0; padding: 0; max-width: 50rem; }
.timeline li { display: grid; grid-template-columns: 6.5rem 1fr; gap: 1.5rem; padding: 0 0 2.2rem; position: relative; }
.timeline li::before { content: ""; position: absolute; left: calc(7.875rem - .5px); top: 1.2rem; bottom: 0; width: 1px; background: var(--linea); }
.timeline li:last-child::before { display: none; }
.timeline time { font-family: var(--slab); font-size: 1.6rem; font-weight: 700; line-height: 1.1; text-align: right; }
.timeline .entry { padding-left: 1.5rem; position: relative; }
.timeline .entry::before { content: ""; position: absolute; left: -.5rem; top: .45rem; width: .75rem; height: .75rem; border-radius: 50%; border: 2px solid var(--rojo); background: var(--papel); }
.timeline h3 { margin-bottom: .25rem; }
.timeline p { margin: 0; color: var(--grafito); }

.prose h2 { margin-top: 2.5rem; }
.prose ul { padding-left: 1.2rem; max-width: var(--medida); }
.prose li { margin-bottom: .35rem; }

.facts { list-style: none; margin: 0 0 2rem; padding: 0; }
.facts li { padding: 1rem 0; border-bottom: 1px solid var(--linea); display: grid; grid-template-columns: 8rem 1fr; gap: 1rem; align-items: baseline; }
.facts li:first-child { border-top: 1px solid var(--linea); }
.facts strong { font-family: var(--slab); font-size: 1.5rem; line-height: 1; }

.doc-list { list-style: none; margin: 0 0 2.5rem; padding: 0; max-width: 46rem; }
.doc-list li { border-bottom: 1px solid var(--linea); }
.doc-list a, .doc-list .pending { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; padding: .85rem 0; text-decoration: none; color: var(--carbon); }
.doc-list a:hover .doc-name { text-decoration: underline; text-underline-offset: .18em; }
.doc-meta { flex: none; font-size: .85rem; color: var(--grafito); }
.pending { color: var(--grafito); }

/* Formulario de denuncias */
.form { max-width: 44rem; }
.field { margin-bottom: 1.25rem; }
.field label, .field legend { display: block; font-weight: 600; margin-bottom: .35rem; }
.field .opt { font-weight: 400; color: var(--grafito); }
.field input[type="text"], .field input[type="email"], .field input[type="tel"], .field input[type="date"], .field select, .field textarea {
  width: 100%; font: inherit; color: var(--carbon); padding: .7rem .8rem; border: 1.5px solid #b9bfbc; border-radius: 4px; background: #fff;
}
.field textarea { min-height: 10rem; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid var(--rojo); outline-offset: 1px; border-color: var(--carbon); }
.field .err { color: var(--rojo-osc); font-size: .92rem; margin-top: .3rem; }
.field [aria-invalid="true"] { border-color: var(--rojo-osc); }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.25rem; }
.check { display: flex; gap: .7rem; align-items: flex-start; padding: 1rem; background: var(--piedra); border-radius: 4px; margin-bottom: 1.5rem; cursor: pointer; }
.check input { width: 1.15rem; height: 1.15rem; margin-top: .2rem; accent-color: var(--rojo-osc); }
.personal { border: 0; padding: 0; margin: 0 0 .5rem; }
.form:has(#anonimo:checked) .personal { display: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.alert { padding: 1rem 1.2rem; border-radius: 4px; margin-bottom: 1.5rem; border-left: 4px solid; }
.alert--ok { background: #eef5ef; border-color: #2e6b3a; }
.alert--err { background: #fbeeee; border-color: var(--rojo-osc); }
.folio { font-family: var(--slab); font-size: 1.6rem; font-weight: 700; letter-spacing: .02em; }
.fineprint { font-size: .92rem; color: var(--grafito); }
button.btn { cursor: pointer; font-family: inherit; }

/* Pie */
.site-footer { background: var(--carbon); color: #c4cbc8; padding: 3rem 0 2.5rem; font-size: .95rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 1.5rem 3rem; }
.site-footer img { height: 64px; width: auto; margin-bottom: 1rem; }
.site-footer a { color: #fff; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; }
.site-footer p { margin: 0; }

@media (max-width: 860px) {
  .line, .split, .notice, .people { grid-template-columns: 1fr; }
  .line:nth-of-type(even) .line-img { order: 0; }
  .people .tall { grid-row: auto; }
  .people .tall img { aspect-ratio: 4 / 3; }
  .figures dl { grid-template-columns: 1fr 1fr; }
  .figures dl > div, .figures dl > div + div { padding: 1.2rem 1rem 1.2rem 0; border-right: 0; border-bottom: 1px solid rgba(255,255,255,.16); }
  .timeline li { grid-template-columns: 4.2rem 1fr; gap: 1rem; }
  .timeline li::before { left: calc(5.075rem - .5px); }
  .timeline time { font-size: 1.25rem; }
  .facts li { grid-template-columns: 6rem 1fr; }
  .row-2 { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .brand img { height: 48px; }
  .nav ul { gap: .1rem 1rem; }
  .nav a { font-size: .95rem; }
  .hero { min-height: 78vh; }
}
@media print {
  .site-header .nav, .actions, .skip, .hero::after { display: none; }
  .hero { color: var(--carbon); background: #fff; }
}
.notice--gap { margin-bottom: 3rem; }
.section--tight { padding-top: 1rem; }
/* Historia: fotografía del fundador junto a la línea de tiempo */
.history-grid { display: grid; grid-template-columns: minmax(0, 1fr) 15rem; gap: 2.5rem 4rem; align-items: start; }
.history-grid .timeline { grid-column: 1; grid-row: 1; }
.founder { grid-column: 2; grid-row: 1; margin: 0; position: sticky; top: 1.5rem; }
.founder img { width: 100%; border-radius: 3px; }
.founder figcaption { margin-top: .6rem; font-size: .95rem; color: var(--grafito); }
@media (max-width: 860px) {
  .history-grid { grid-template-columns: 1fr; }
  .founder, .history-grid .timeline { grid-column: 1; grid-row: auto; position: static; }
  .founder { max-width: 15rem; }
}
/* Botón Cotizar: despliega los datos del encargado sin JavaScript */
.quote { margin-top: 1.5rem; }
.quote summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: .55rem; }
.quote summary::-webkit-details-marker { display: none; }
.quote summary::after { content: ""; width: .45rem; height: .45rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform .15s; }
.quote[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.quote-card { margin-top: .8rem; padding: 1.1rem 1.25rem; background: var(--papel); border: 1px solid var(--linea); border-left: 3px solid var(--rojo); border-radius: 3px; max-width: 26rem; }
.section--piedra .quote-card { background: var(--papel); }
.quote-name { font-family: var(--slab); font-size: 1.15rem; font-weight: 700; margin: 0; }
.quote-role { color: var(--grafito); margin: 0 0 .7rem; }
.quote-card dl { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: .3rem 1rem; }
.quote-card dt { color: var(--grafito); }
.quote-card dd { margin: 0; overflow-wrap: anywhere; }
@media (prefers-reduced-motion: reduce) { .quote summary::after { transition: none; } }
.quote-card .btn { margin-top: .5rem; padding: .6rem 1.1rem; font-size: .95rem; }
aside.prose h2:first-child { margin-top: 0; }
aside.prose h3 { font-size: 1.05rem; margin: 1.4rem 0 .25rem; }

/* Contacto: muestra el encargado según el motivo elegido (sin JavaScript) */
.form .nota { display: none; }
.form:has(#motivo option[value="astillas"]:checked) .nota-astillas,
.form:has(#motivo option[value="aserrada"]:checked) .nota-aserrada,
.form:has(#motivo option[value="cosecha"]:checked) .nota-cosecha,
.form:has(#motivo option[value="bosques"]:checked) .nota-bosques,
.form:has(#motivo option[value="abastecimiento"]:checked) .nota-abastecimiento,
.form:has(#motivo option[value="servicios"]:checked) .nota-servicios,
.form:has(#motivo option[value="general"]:checked) .nota-general { display: block; }
