/* Ecokira, dirección "Materia": orgánica y táctil. Una sola página clara (crema) con tramos verde bosque. */
:root {
  --forest: #0F3D2E;
  --forest-2: #14513D;
  --lime: #8DC63F;
  --cream: #F5F1E6;
  --cream-2: #ECE6D3;
  --ink: #1A2B22;
  --muted: #475A4E;
  --line: rgba(26, 43, 34, .16);
  --moss: #2D6A4C;

  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Instrument Sans", system-ui, "Segoe UI", sans-serif;

  --r-card: 18px;
  --r-field: 10px;
  --ease: cubic-bezier(.23, 1, .32, 1);
  --gutter: clamp(20px, 4vw, 48px);
  --head-h: 72px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--cream); color: var(--ink);
  font: 400 1.0625rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--forest); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--forest); color: var(--cream); padding: 10px 14px; border-radius: 8px; z-index: 100; transition: top .15s; }
.skip:focus { top: 10px; }
.wrap { width: min(1280px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.mono { font-variant-numeric: tabular-nums; letter-spacing: .04em; }

/* ---------- Tipografía ---------- */
h1, h2, h3, .tile-name, .step h3, .wordmark-txt { font-family: var(--serif); font-variation-settings: "SOFT" 0, "WONK" 0; font-optical-sizing: auto; }
h1, h2 { font-variation-settings: "opsz" 144, "SOFT" 0, "WONK" 0; }
h1 { font-weight: 420; font-size: clamp(2.6rem, 7.2vw, 6.2rem); line-height: 1.04; letter-spacing: -.012em; max-width: 12.5em; }
h1 em { font-style: italic; font-weight: 380; color: var(--moss); }
h2 { font-weight: 440; font-size: clamp(1.9rem, 4.2vw, 3.3rem); line-height: 1.1; letter-spacing: -.004em; max-width: 20em; text-wrap: balance; }
h3 { font-weight: 480; font-size: 1.5rem; line-height: 1.15; letter-spacing: -.01em; }
.sec-lede { margin-top: 16px; max-width: 52ch; color: var(--muted); }
.lede { font-size: clamp(1.0625rem, 1.5vw, 1.25rem); max-width: 38ch; color: var(--ink); }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 24px; border-radius: 999px; border: 2px solid transparent;
  font-weight: 600; font-size: 1rem; text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: transform .16s var(--ease), background-color .2s ease, color .2s ease, border-color .2s ease;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--lime); color: var(--ink); border-color: var(--forest); }
.btn-call { background: transparent; color: var(--forest); border-color: var(--forest); min-height: 44px; padding: 0 18px; font-size: .9375rem; }
.link-arrow { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; text-decoration: none; border-bottom: 2px solid var(--lime); padding-block: 2px; transition: color .2s ease; }
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover { background: var(--forest); color: var(--cream); border-color: var(--forest); }
  .btn-call:hover { background: var(--forest); color: var(--cream); }
  .link-arrow:hover { color: var(--moss); }
}

/* ---------- Encabezado ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--cream); border-bottom: 1px solid var(--line); }
.bar { width: min(1280px, 100% - 2 * var(--gutter)); margin-inline: auto; height: var(--head-h); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: block; line-height: 0; border-radius: 6px; }
.brand img { height: 50px; width: auto; }
.menu { display: flex; align-items: center; gap: clamp(16px, 2.4vw, 32px); }
.menu a:not(.btn) { text-decoration: none; font-weight: 500; font-size: .9375rem; padding: 10px 2px; position: relative; }
.menu a:not(.btn)::after { content: ""; position: absolute; left: 0; right: 0; bottom: 4px; height: 2px; background: var(--lime); transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease); }
@media (hover: hover) and (pointer: fine) { .menu a:not(.btn):hover::after { transform: scaleX(1); } }
.menu-toggle { display: none; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px; background: transparent; border: 1.5px solid var(--forest); border-radius: 999px; cursor: pointer; font-weight: 600; color: var(--forest); transition: transform .16s var(--ease); }
.menu-toggle:active { transform: scale(.97); }
.menu-icon { position: relative; width: 18px; height: 12px; }
.menu-icon i { position: absolute; left: 0; width: 18px; height: 2px; background: currentColor; border-radius: 2px; transition: transform .25s var(--ease); }
.menu-icon i:first-child { top: 1px; } .menu-icon i:last-child { top: 9px; }
.menu-toggle[aria-expanded="true"] .menu-icon i:first-child { transform: translateY(4px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-icon i:last-child { transform: translateY(-4px) rotate(-45deg); }

@media (max-width: 899px) {
  .menu-toggle { display: inline-flex; }
  .menu {
    position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--cream); padding: 8px var(--gutter) 24px; border-bottom: 1px solid var(--line);
    opacity: 0; transform: translateY(-8px); visibility: hidden;
    transition: opacity .2s ease, transform .22s var(--ease), visibility 0s linear .22s;
  }
  .menu.open { opacity: 1; transform: none; visibility: visible; transition-delay: 0s; }
  .menu a:not(.btn) { padding: 14px 2px; min-height: 48px; font-size: 1.125rem; border-bottom: 1px solid var(--line); }
  .menu a:not(.btn)::after { display: none; }
  .menu .btn-call { margin-top: 16px; min-height: 52px; }
}

/* ---------- Hero: corte de suelo ---------- */
.hero { min-height: calc(100dvh - var(--head-h)); display: flex; flex-direction: column; overflow: hidden; }
.hero-copy { padding-top: clamp(28px, 4.5vw, 64px); padding-bottom: clamp(28px, 3.6vw, 48px); }
.hero-sub { margin-top: clamp(20px, 2.6vw, 36px); display: grid; gap: 22px; }
@media (min-width: 900px) { .hero-sub { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: center; gap: 40px; } }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; }

.strata { flex: 1 1 auto; min-height: 300px; overflow: hidden; display: flex; flex-direction: column; padding-left: max(var(--gutter), calc((100vw - 1280px) / 2)); }
.strata::after { content: ""; flex: 0 0 6px; margin-left: clamp(84px, 11.6vw, 140px); background: var(--forest); }
.strata { margin-bottom: 24px; }
.band { position: relative; flex: 1 1 0; margin-top: -14px; display: flex; align-items: center; }
.band:first-child { margin-top: 0; }
.band-label {
  position: relative; z-index: 2; flex: 0 0 auto; width: clamp(76px, 11vw, 132px); padding-bottom: 6px;
  font-weight: 600; font-size: .875rem; color: var(--ink); display: flex; align-items: center; gap: 8px;
}
.band-label::after { content: ""; flex: 1 1 auto; height: 1px; background: var(--ink); opacity: .45; }
.band .tex { position: absolute; top: 0; bottom: 0; left: clamp(84px, 11.6vw, 140px); right: 0; width: calc(100% - clamp(84px, 11.6vw, 140px)); height: 100%; }
/* Los bordes ondulados los pone main.js con clip-path */

@media (max-width: 520px) {
  .cta-row { flex-wrap: nowrap; gap: 10px 14px; }
  .cta-row .btn { padding: 0 18px; font-size: .9375rem; }
  .link-arrow { font-size: .9375rem; white-space: nowrap; }
}

/* ---------- Secciones ---------- */
.sec { padding-block: clamp(72px, 9vw, 128px); scroll-margin-top: var(--head-h); }
#contacto, #empresa, #como-surtimos, #muestrario { scroll-margin-top: var(--head-h); }

/* Muestrario */
.board { margin-top: clamp(32px, 4vw, 52px); display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tile { position: relative; display: flex; flex-direction: column; padding: 0; text-align: left; background: var(--cream-2); border: 0; border-radius: var(--r-card); overflow: hidden; cursor: pointer; transition: transform .2s var(--ease), box-shadow .2s ease; outline-offset: 4px; }
.tile:active { transform: scale(.985); }
.tile-tex { position: relative; flex: 1 1 auto; min-height: 92px; overflow: hidden; display: block; }
.tile-tex .tex { position: absolute; inset: 0; width: 100%; height: 100%; transition: transform .5s var(--ease); }
.tile-cap { display: block; padding: 14px 16px 16px; background: var(--cream-2); transition: background-color .2s ease, color .2s ease; }
.tile-name { display: block; font-size: 1.2rem; font-weight: 480; line-height: 1.15; }
.tile-sub { display: block; margin-top: 4px; font-size: .875rem; line-height: 1.35; color: var(--muted); transition: color .2s ease; }
.tile[aria-selected="true"] { outline: 3px solid var(--lime); }
.tile[aria-selected="true"] .tile-cap { background: var(--forest); color: var(--cream); }
.tile[aria-selected="true"] .tile-sub { color: #C9DDC4; }
.t-obra { grid-column: 1 / -1; min-height: 210px; }
@media (hover: hover) and (pointer: fine) { .tile:hover .tex { transform: scale(1.05); } }
@media (min-width: 900px) {
  .board { grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-rows: 190px 190px 170px; gap: 16px; }
  .t-obra { grid-column: 1 / 7; grid-row: 1 / 3; min-height: 0; }
  .t-acero { grid-column: 7 / 13; grid-row: 1; }
  .t-acab { grid-column: 7 / 10; grid-row: 2; }
  .t-vidrio { grid-column: 10 / 13; grid-row: 2; }
  .t-maq { grid-column: 1 / 13; grid-row: 3; flex-direction: row; }
  .t-maq .tile-tex { flex: 0 0 46%; }
  .t-maq .tile-cap { flex: 1 1 auto; display: flex; flex-direction: column; justify-content: center; }
  .t-maq .tile-name { font-size: 1.75rem; }
  .t-obra .tile-name { font-size: 1.75rem; }
  .tile-cap { padding: 16px 20px 18px; }
}
@media (min-width: 900px) and (max-width: 1100px) { .tile-sub { display: none; } }

.panel { margin-top: 20px; display: grid; gap: 0; background: var(--cream-2); border-radius: var(--r-card); overflow: hidden; scroll-margin-top: calc(var(--head-h) + 12px); }
.panel-sw { position: relative; min-height: 180px; }
.panel-sw .tex { position: absolute; inset: 0; width: 100%; height: 100%; }
.panel-body { padding: clamp(22px, 3vw, 40px); display: grid; gap: 16px; align-content: start; }
.panel-title { font-size: clamp(1.75rem, 3vw, 2.5rem); }
.panel-desc { color: var(--muted); max-width: 56ch; }
.mats { display: grid; gap: 10px 24px; margin-block: 4px 8px; }
.mats li { display: flex; align-items: center; gap: 14px; line-height: 1.3; font-weight: 500; }
.mats .chip { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 10px; overflow: hidden; position: relative; }
.mats .chip .tex { position: absolute; inset: 0; width: 100%; height: 100%; }
.quote { justify-self: start; margin-top: 4px; }
@media (min-width: 900px) {
  .panel { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); min-height: 420px; }
  .mats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Empresa */
.empresa { background: var(--cream-2); }
.empresa-grid { display: grid; gap: 40px; align-items: center; }
.empresa-text { display: grid; gap: 20px; max-width: 60ch; }
.empresa-text h2 { margin-bottom: 4px; }
.empresa-text p { color: var(--muted); }
.wordmark { width: 100%; }
.wordmark svg { width: 100%; height: auto; overflow: visible; }
.wordmark-txt { font-size: 170px; font-weight: 900; letter-spacing: -.01em; paint-order: stroke; stroke: var(--forest); stroke-width: 3px; }
@media (min-width: 900px) { .empresa-grid { grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: 72px; } }

/* Proceso */
.proceso { background: var(--forest); color: var(--cream); }
.proceso h2 { max-width: 14em; }
.path { position: relative; }
.path svg { width: 100%; height: 100%; overflow: visible; }
.path-ghost { fill: none; stroke: rgba(245, 241, 230, .18); stroke-width: 2; stroke-dasharray: 2 7; stroke-linecap: round; }
.path-draw { fill: none; stroke: var(--lime); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.node { position: absolute; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; background: var(--forest); border: 3px solid rgba(245, 241, 230, .35); transition: background-color .3s ease, border-color .3s ease, box-shadow .3s ease; }
.node.on { background: var(--lime); border-color: var(--lime); box-shadow: 0 0 0 7px rgba(141, 198, 63, .22); }
.path-h { display: none; margin-top: 32px; aspect-ratio: 1200 / 200; }
.path-v { position: absolute; left: 0; top: 0; width: 64px; height: 640px; margin: 0; }
.steps-wrap { position: relative; margin-top: 40px; }
.steps { padding-left: 88px; }
.step { height: 160px; display: flex; flex-direction: column; justify-content: center; gap: 6px; }
.step h3 { color: var(--cream); font-size: 1.6rem; }
.step p { color: var(--cream); max-width: 34ch; }
@media (min-width: 900px) {
  .path-h { display: block; }
  .path-v { display: none; }
  .steps-wrap { margin-top: 20px; }
  .steps { padding-left: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; }
  .step { height: auto; padding: 0 20px; justify-content: flex-start; align-items: center; text-align: center; }
  .step p { margin-inline: auto; }
}
@media (min-width: 900px) and (max-width: 1099px) { .step { padding: 0 8px; } .step p { font-size: 1rem; } }

/* Contacto */
.contacto-grid { display: grid; gap: 48px; }
@media (min-width: 960px) { .contacto-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 80px; align-items: start; } }
form { margin-top: 32px; display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { form { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 24px; } .field.wide { grid-column: 1 / -1; } }
.field { display: grid; gap: 8px; align-content: start; }
.field label { font-weight: 600; font-size: .9375rem; }
input[type="text"], input[type="tel"], select, textarea {
  width: 100%; min-height: 52px; padding: 12px 14px; background: #FBF9F2; border: 1.5px solid #5C6E62; border-radius: var(--r-field);
  transition: border-color .2s ease, box-shadow .2s ease;
}
textarea { resize: vertical; min-height: 130px; line-height: 1.5; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--forest) 50%), linear-gradient(135deg, var(--forest) 50%, transparent 50%); background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 40px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; border-color: var(--forest); box-shadow: 0 0 0 3px rgba(141, 198, 63, .7); }
.err { color: #9B2B1E; font-size: .9375rem; min-height: 0; }
.err:empty { display: none; }
[aria-invalid="true"] { border-color: #9B2B1E !important; }
.check { grid-template-columns: 24px 1fr; column-gap: 12px; align-items: start; }
.check input { width: 22px; height: 22px; margin: 3px 0 0; accent-color: var(--forest); }
.check label { font-weight: 400; font-size: .9375rem; line-height: 1.5; color: var(--ink); }
.check label a { font-weight: 600; }
.check .err { grid-column: 2; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; }
.form-status { color: var(--moss); font-weight: 500; max-width: 46ch; }

.label-tag {
  position: relative; background: #FBF9F2; border: 1.5px dashed #5C6E62; border-radius: var(--r-card);
  padding: 56px clamp(22px, 3vw, 36px) 32px; display: grid; gap: 20px;
}
.label-tag::before { content: ""; position: absolute; left: 50%; top: -18px; width: 2px; height: 34px; background: #5C6E62; transform: translateX(-1px); }
.hole { position: absolute; left: 50%; top: 14px; width: 22px; height: 22px; margin-left: -11px; border-radius: 50%; background: var(--cream); border: 1.5px solid #5C6E62; }
.label-tag h3 { font-size: 1.6rem; }
.label-tag dl { display: grid; gap: 0; }
.label-tag dl > div { padding: 12px 0; border-top: 1px solid var(--line); display: grid; gap: 2px; }
.label-tag dt { font-size: .875rem; color: var(--muted); font-weight: 600; letter-spacing: .02em; }
.label-tag dd { font-weight: 500; overflow-wrap: anywhere; }
.label-tag dd a { display: inline-block; padding: 12px 0; margin: -12px 0; }
.label-tag a { text-decoration-thickness: 2px; text-decoration-color: var(--lime); text-underline-offset: 4px; }

/* Pie */
.site-footer { background: var(--forest); color: var(--cream); padding-top: clamp(48px, 6vw, 80px); }
.foot { display: grid; gap: 32px; }
.foot-logo { height: 64px; width: auto; }
.foot-id p { color: #D3E1CD; }
.foot-id .foot-name { color: var(--cream); font-weight: 600; margin-bottom: 4px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 4px 24px; }
.foot-links a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; color: var(--cream); }
.foot-links a:hover { text-decoration: underline; text-decoration-color: var(--lime); text-underline-offset: 5px; }
.foot-base { margin-top: 36px; padding-block: 22px; border-top: 1px solid rgba(245, 241, 230, .2); color: #B9CDB3; font-size: .9375rem; }
.site-footer :focus-visible { outline-color: var(--lime); }
.proceso :focus-visible { outline-color: var(--lime); }
@media (min-width: 900px) { .foot { grid-template-columns: auto 1fr auto; align-items: center; gap: 56px; } }

/* Página de aviso */
.doc { padding-block: clamp(48px, 7vw, 96px); max-width: 760px; }
.doc h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); margin-bottom: 24px; }
.doc p { margin-bottom: 16px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
