/* AVC Ingeniería y Construcción
   Palette drawn from the logo and from galvanized steel; one family (Archivo) used across its width axis. */

:root {
  --zinc: #E6E8E7;
  --paper: #F3F4F3;
  --graphite: #1D2124;
  --graphite-2: #272C30;
  --steel: #6A6D71;
  --steel-ink: #55585C;
  --rule: #C3C6C8;
  --avc: #E10F21;
  --avc-ink: #B80C1B;
  --on-dark: #E9EBEA;
  --on-dark-2: #B3B8BB;

  --f: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1360px;
  --header: 76px;
  --ease: cubic-bezier(.2, .7, .1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: var(--header); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--zinc);
  color: var(--graphite);
  font-family: var(--f);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; }
ul, ol { padding: 0; }

:focus-visible { outline: 2px solid var(--avc); outline-offset: 3px; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 200; background: var(--graphite); color: #fff; padding: .6em 1em; }

.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }

h2 {
  font-size: clamp(2.1rem, 4.2vw, 3.9rem);
  font-stretch: 112%;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.02em;
  text-wrap: balance;
}
h3 { font-stretch: 106%; font-weight: 700; line-height: 1.15; }

/* ---------- Buttons ---------- */
.btn {
  --fg: var(--graphite);
  --fill: var(--graphite);
  --fill-fg: #fff;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6em;
  padding: .95em 1.45em;
  font-weight: 600;
  font-size: .95rem;
  line-height: 1.1;
  text-decoration: none;
  white-space: nowrap;
  color: var(--fg);
  background: transparent;
  border: 1.5px solid currentColor;
  border-radius: 2px;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  transition: color .4s var(--ease), border-color .4s var(--ease), transform .15s;
}
.btn::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: -1;
  background: var(--fill);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .5s var(--ease);
}
.btn:hover::before { transform: scaleX(1); transform-origin: left; }
.btn:hover { color: var(--fill-fg); }
.btn:active { transform: translateY(1px); }

.btn--primary { --fg: #fff; background: var(--avc); border-color: var(--avc); }
.btn--primary:hover { border-color: var(--graphite); }

.on-dark .btn--ghost, .process .btn--ghost { --fg: var(--on-dark); --fill: var(--on-dark); --fill-fg: var(--graphite); }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 60;
  height: var(--header);
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.5rem);
  padding-inline: var(--gutter);
  transition: transform .5s var(--ease), background-color .35s, box-shadow .35s;
}
.site-header.is-scrolled {
  background: color-mix(in srgb, var(--zinc) 86%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: 0 1px 0 var(--rule);
}
.site-header.is-hidden { transform: translateY(-100%); }

.brand img { height: 46px; width: auto; }

.nav { display: flex; gap: clamp(1rem, 2.2vw, 2rem); margin-left: auto; }
.nav a {
  position: relative;
  padding: .45em 0;
  font-size: .95rem;
  font-weight: 500;
  text-decoration: none;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--avc);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .4s var(--ease);
}
.nav a:hover::after, .nav a.is-current::after { transform: scaleX(1); transform-origin: left; }

.header-cta { padding: .8em 1.2em; }

.menu-toggle {
  display: none;
  margin-left: auto;
  align-items: center;
  gap: .6rem;
  padding: .6rem .2rem;
  background: none;
  border: 0;
  color: var(--graphite);
  font-weight: 600;
  cursor: pointer;
}
.menu-toggle__bars { position: relative; width: 22px; height: 12px; }
.menu-toggle__bars i {
  position: absolute; left: 0; right: 0; height: 2px; background: currentColor;
  transition: transform .4s var(--ease), top .4s var(--ease);
}
.menu-toggle__bars i:first-child { top: 0; }
.menu-toggle__bars i:last-child { top: 10px; }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars i:first-child { top: 5px; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars i:last-child { top: 5px; transform: rotate(-45deg); }

.mobile-nav {
  position: fixed;
  inset: var(--header) 0 0;
  z-index: 55;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding: 2rem var(--gutter) 3rem;
  background: var(--zinc);
  overflow-y: auto;
}
.mobile-nav[hidden] { display: none; }
.mobile-nav nav { display: flex; flex-direction: column; border-top: 1px solid var(--rule); }
.mobile-nav nav a {
  padding: 1rem 0;
  border-bottom: 1px solid var(--rule);
  font-size: 1.9rem;
  font-weight: 800;
  font-stretch: 112%;
  text-decoration: none;
}
.mobile-nav .btn { align-self: flex-start; }
.mobile-nav__tel { font-weight: 600; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  grid-template-rows: 1fr auto;
  padding-top: var(--header);
}

.hero__copy {
  position: relative;
  z-index: 2;
  align-self: center;
  padding: 3rem 0 3rem var(--gutter);
}
.hero__title {
  font-size: clamp(2.5rem, 4.7vw, 5.25rem);
  font-stretch: 116%;
  font-weight: 800;
  line-height: .93;
  letter-spacing: -.028em;
}
.hero__title { text-wrap: balance; }
.hero__title .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
.hero__title .w > span { display: inline-block; }

.hero__lede {
  max-width: 36ch;
  margin-top: 1.75rem;
  font-size: clamp(1.05rem, 1.3vw, 1.2rem);
  color: var(--steel-ink);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2.25rem; }

.hero__model { position: relative; margin: 0; min-height: 540px; }
.hero__model canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
  touch-action: pan-y;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 9%), linear-gradient(to top, transparent 0, #000 14%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent 0, #000 9%), linear-gradient(to top, transparent 0, #000 14%);
  mask-composite: intersect;
}
.hero__model canvas:active { cursor: grabbing; }
.hero__model.no-webgl {
  background: url("assets/blob-a738.png") center / cover no-repeat;
}
.hero__model.no-webgl canvas, .hero__model.no-webgl .model-hint, .hero__model.no-webgl .build { display: none; }

.model-hint {
  position: absolute;
  top: 1.5rem;
  right: var(--gutter);
  font-size: .85rem;
  font-stretch: 88%;
  color: var(--steel-ink);
  display: flex;
  align-items: center;
  gap: .5rem;
  transition: opacity .6s;
  pointer-events: none;
}
.model-hint.is-gone { opacity: 0; }
@media (hover: none) { .model-hint { display: none; } }

.model-ui {
  position: absolute;
  left: 1rem;
  right: var(--gutter);
  bottom: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem;
}

.switcher {
  position: relative;
  display: inline-flex;
  padding: 4px;
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  border: 1px solid var(--rule);
  border-radius: 3px;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.switcher button {
  position: relative;
  z-index: 1;
  padding: .62em 1.05em;
  background: none;
  border: 0;
  border-radius: 2px;
  font-size: .9rem;
  font-weight: 600;
  color: var(--steel-ink);
  cursor: pointer;
  transition: color .35s var(--ease);
}
.switcher button:hover { color: var(--graphite); }
.switcher button[aria-checked="true"] { color: #fff; }
.switcher__thumb {
  position: absolute;
  top: 4px; bottom: 4px; left: 0;
  width: 0;
  background: var(--graphite);
  border-radius: 2px;
  transition: transform .55s var(--ease), width .55s var(--ease);
}

.build { display: flex; align-items: flex-end; gap: 1.25rem; }
.stages { display: flex; gap: .75rem; list-style: none; font-size: .82rem; font-stretch: 90%; }
.stages li {
  position: relative;
  min-width: 5.6rem;
  padding-top: 10px;
  color: var(--steel-ink);
  transition: color .3s;
}
.stages li::before, .stages li::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--rule);
}
.stages li::after {
  background: var(--avc);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .8s var(--ease);
}
.stages li.is-active { color: var(--graphite); font-weight: 600; }
.stages li.is-done { color: var(--graphite); }
.stages li.is-active::after, .stages li.is-done::after { transform: scaleX(1); }

.replay {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .4rem 0;
  background: none;
  border: 0;
  font-size: .85rem;
  font-weight: 600;
  color: var(--graphite);
  cursor: pointer;
}
.replay svg { transition: transform .6s var(--ease); }
.replay:hover svg { transform: rotate(-300deg); }
.replay:hover span { text-decoration: underline; text-underline-offset: 3px; }

/* drawing title block */
.titleblock {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr 1.6fr 1fr;
  margin: 0 var(--gutter);
  border-top: 2px solid var(--graphite);
}
.titleblock > div { padding: 1rem 1.25rem 1.4rem; border-left: 1px solid var(--rule); }
.titleblock > div:first-child { padding-left: 0; border-left: 0; }
.titleblock dt { font-size: .8rem; font-stretch: 88%; color: var(--steel-ink); }
.titleblock dd { margin-top: .25rem; font-size: 1.08rem; font-weight: 700; font-stretch: 106%; line-height: 1.25; }

/* ---------- Sections ---------- */
.section { padding-block: clamp(5rem, 10vw, 9rem); }

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: 2rem 4rem;
  align-items: end;
  margin-bottom: clamp(2.5rem, 5vw, 4.5rem);
}
.section-head p { max-width: 42ch; color: var(--steel-ink); }

/* ---------- Services ---------- */
.services__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2rem, 4vw, 4.5rem);
  align-items: start;
}
.services__index { display: flex; flex-direction: column; border-top: 1px solid var(--rule); }

.svc-tab {
  position: relative;
  display: grid;
  gap: .25rem;
  padding: 1.4rem 0 1.4rem 1.3rem;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--rule);
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: padding .5s var(--ease);
}
.svc-tab::before {
  content: "";
  position: absolute;
  left: 0; top: 1.4rem; bottom: 1.4rem;
  width: 4px;
  background: var(--avc);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform .5s var(--ease);
}
.svc-tab[aria-selected="true"]::before { transform: scaleY(1); }
.svc-tab:hover { padding-left: 1.8rem; }
.svc-name {
  font-size: clamp(1.3rem, 2vw, 1.8rem);
  font-weight: 700;
  font-stretch: 110%;
  line-height: 1.08;
  letter-spacing: -.01em;
  color: var(--steel-ink);
  transition: color .3s;
}
.svc-tab[aria-selected="true"] .svc-name, .svc-tab:hover .svc-name { color: var(--graphite); }
.svc-sub { font-size: .9rem; color: var(--steel-ink); }

.services__panel {
  position: sticky;
  top: calc(var(--header) + 20px);
  background: var(--paper);
  border: 1px solid var(--rule);
}
.services__panel:focus-visible { outline-offset: 4px; }
.panel__media { position: relative; aspect-ratio: 2 / 1; overflow: hidden; background: var(--graphite); }
.panel__media > img, .panel__media > svg, .panel__media > .media-3d { position: absolute; inset: 0; }
.panel__media > img, .panel__media > svg { display: block; width: 100%; height: 100%; object-fit: cover; }
.panel__body { padding: clamp(1.4rem, 3vw, 2.5rem); }
.panel__title { font-size: clamp(1.4rem, 2.2vw, 1.9rem); letter-spacing: -.01em; }
.panel__summary { max-width: 60ch; margin-top: .75rem; color: var(--steel-ink); }
.panel__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-top: 1.75rem; }
.panel__cols h4 { margin-bottom: .8rem; font-size: .95rem; font-weight: 700; }
.panel__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }

.ticks { list-style: none; }
.ticks li { position: relative; margin-bottom: .5rem; padding-left: 1.2rem; font-size: .95rem; line-height: 1.4; }
.ticks li::before {
  content: "";
  position: absolute;
  left: 0; top: .5em;
  width: 7px; height: 7px;
  background: var(--avc);
}
.chips { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; }
.chips li {
  padding: .38em .72em;
  background: var(--zinc);
  border: 1px solid var(--rule);
  border-radius: 2px;
  font-size: .86rem;
  line-height: 1.25;
}

/* ---------- Process ---------- */
.process {
  color: var(--on-dark);
  background-color: var(--graphite);
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 56px 56px;
}
.process__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(2.5rem, 7vw, 7rem); }
.process__aside { position: sticky; top: calc(var(--header) + 32px); align-self: start; }
.process__aside > p { max-width: 38ch; margin-top: 1.25rem; color: var(--on-dark-2); }
.process__figure { margin-top: 2.5rem; max-width: 380px; border: 1px solid rgba(255,255,255,.14); }

.process__steps { position: relative; list-style: none; padding-top: .4rem; }
.process__track {
  position: absolute;
  left: calc(1.15rem - 1px);
  top: 1rem; bottom: 4rem;
  width: 2px;
  background: rgba(255,255,255,.14);
}
.process__progress {
  position: absolute;
  inset: 0;
  background: var(--avc);
  transform: scaleY(0);
  transform-origin: top;
}
.step { position: relative; padding: 0 0 clamp(2.75rem, 5vw, 4.25rem) 4.2rem; }
.step__num {
  position: absolute;
  left: 0; top: -.2rem;
  display: grid;
  place-items: center;
  width: 2.3rem; height: 2.3rem;
  border: 2px solid rgba(255,255,255,.28);
  border-radius: 50%;
  background: var(--graphite);
  font-size: .9rem;
  font-weight: 700;
  transition: background-color .5s var(--ease), border-color .5s var(--ease), transform .5s var(--ease);
}
.step h3 { font-size: clamp(1.35rem, 2.2vw, 1.85rem); transition: color .5s; }
.step p { max-width: 46ch; margin-top: .55rem; color: var(--on-dark-2); }
.js-motion .step h3 { color: #8E9498; }
.js-motion .step.is-on h3 { color: var(--on-dark); }
.step.is-on .step__num { background: var(--avc); border-color: var(--avc); transform: scale(1.08); }

/* ---------- About ---------- */
.about__row {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  margin-bottom: clamp(4rem, 8vw, 7rem);
}
.about__row--flip { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
.about__row--flip .about__img { order: 2; }
.about__img { position: relative; overflow: hidden; }
.about__img img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; transform: scale(1.08); }
.about__text h3 { font-size: clamp(1.4rem, 2vw, 1.75rem); margin-bottom: .75rem; }
.about__text h3:not(:first-child) { margin-top: 2.25rem; }
.about__text p { max-width: 52ch; color: var(--steel-ink); }
.about__text p + p { margin-top: .9rem; }

.values h3 { font-size: clamp(1.4rem, 2vw, 1.75rem); margin-bottom: 1.75rem; }

/* ---------- Quote ---------- */
.quote {
  overflow: hidden;
  padding-block: clamp(5rem, 11vw, 10rem);
  background: var(--paper);
  border-block: 1px solid var(--rule);
}
.quote p {
  font-size: clamp(1.9rem, 4.5vw, 5.2rem);
  font-weight: 400;
  font-stretch: 112%;
  line-height: .98;
  letter-spacing: -.03em;
}
.q-line { display: block; }
.quote strong { font-weight: 800; }
@media (min-width: 760px) { .q-line { white-space: nowrap; } }

/* ---------- Contact ---------- */
.contact__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2.5rem, 6vw, 6rem); align-items: start; }
.contact__info > p { max-width: 40ch; margin-top: 1.25rem; color: var(--steel-ink); }
.contact__sub { margin-top: 2rem; font-size: .95rem; font-weight: 700; font-stretch: 104%; letter-spacing: .04em; color: var(--steel-ink); }
.contact__list { margin-top: 1rem; list-style: none; border-top: 1px solid var(--rule); }
.contact__list > li { padding: 1.1rem 0; border-bottom: 1px solid var(--rule); }
.contact__label { display: block; font-size: .82rem; font-stretch: 88%; color: var(--steel-ink); }
.contact__value { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin-top: .2rem; font-size: 1.2rem; font-weight: 600; font-stretch: 104%; }
.contact__list > li.contact__wa { padding: 1.1rem 0; }
.contact__list a { text-decoration: none; background: linear-gradient(var(--avc), var(--avc)) 0 100% / 0 2px no-repeat; transition: background-size .45s var(--ease); }
.contact__list a:hover { background-size: 100% 2px; }

.copy {
  padding: .3em .7em;
  background: none;
  border: 1px solid var(--rule);
  border-radius: 2px;
  font-size: .78rem;
  font-weight: 600;
  color: var(--steel-ink);
  cursor: pointer;
  transition: border-color .3s, color .3s, background-color .3s;
}
.copy:hover { border-color: var(--graphite); color: var(--graphite); }
.copy.is-done { background: var(--graphite); border-color: var(--graphite); color: #fff; }

.form { padding: clamp(1.5rem, 3.5vw, 3rem); background: var(--paper); border: 1px solid var(--rule); }
.form h3 { font-size: clamp(1.35rem, 2vw, 1.7rem); margin-bottom: 1.75rem; }
.form__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem 1.75rem; }
.field { position: relative; display: grid; gap: .35rem; }
.field--full { grid-column: 1 / -1; }
.field__label { font-size: .88rem; font-weight: 600; }
.field__label em { font-style: normal; font-weight: 400; color: var(--steel-ink); }
.field input, .field select, .field textarea {
  width: 100%;
  padding: .7rem 0 .6rem;
  background: transparent;
  border: 0;
  border-bottom: 1.5px solid var(--steel);
  border-radius: 0;
  color: var(--graphite);
  font: inherit;
  font-size: 1.02rem;
  resize: vertical;
}
.field select {
  appearance: none;
  padding-right: 1.5rem;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%231D2124' stroke-width='1.6'/%3E%3C/svg%3E") right 2px center no-repeat;
  cursor: pointer;
}
.field textarea::placeholder { color: #85898C; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; }
.field__line {
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: var(--avc);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .5s var(--ease);
  pointer-events: none;
}
.field__control { position: relative; display: block; }
.field__control textarea { display: block; }
.field__line { bottom: 0; }
.field:focus-within .field__line { transform: scaleX(1); }
.field.is-invalid input, .field.is-invalid textarea { border-bottom-color: var(--avc-ink); }
.field__error { min-height: 0; font-size: .82rem; font-weight: 600; color: var(--avc-ink); }
.field.flash select { animation: flash 1.2s var(--ease); }
@keyframes flash { 0%, 100% { background-color: transparent; } 25% { background-color: color-mix(in srgb, var(--avc) 14%, transparent); } }

.form__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.form__status { margin-top: 1rem; min-height: 1.5em; font-size: .95rem; font-weight: 600; }
.form__status.is-error { color: var(--avc-ink); }
.form__status a { color: inherit; text-underline-offset: 3px; }
.form__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.btn__spinner {
  display: none;
  width: 1em; height: 1em;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
.btn.is-loading { cursor: progress; }
.btn.is-loading .btn__spinner { display: inline-block; }
.btn.is-loading::before { transform: scaleX(0); }
@keyframes spin { to { transform: rotate(360deg); } }

.form__done { display: grid; justify-items: start; gap: 1rem; padding-block: 1rem; }
.form__done[hidden], .form__body[hidden] { display: none; }
.form__done:focus { outline: none; }
.form__done h3 { margin: .5rem 0 0; font-size: clamp(1.6rem, 2.6vw, 2.2rem); }
.form__done p { max-width: 46ch; color: var(--steel-ink); }
.form__done a { color: var(--graphite); font-weight: 600; }
.form__done .btn { margin-top: 1rem; }
.form__check { color: var(--avc); }
.form__check circle { stroke-dasharray: 151; stroke-dashoffset: 151; animation: draw .7s var(--ease) forwards; }
.form__check path { stroke-dasharray: 36; stroke-dashoffset: 36; animation: draw .45s .5s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) {
  .form__check circle, .form__check path { animation: none; stroke-dashoffset: 0; }
  .btn__spinner { animation-duration: 2s; }
}

/* ---------- Footer ---------- */
.footer { padding-block: 3rem 4rem; }
.footer__block {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2.5rem;
  align-items: start;
  padding-top: 1.75rem;
  border-top: 2px solid var(--graphite);
}
.footer__logo { width: 150px; }
.footer dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.footer__copy { grid-column: 1 / -1; padding-top: 1.25rem; border-top: 1px solid var(--rule); font-size: .85rem; color: var(--steel-ink); }
.footer dl > div { padding: 0 1.25rem; border-left: 1px solid var(--rule); }
.footer dt { font-size: .78rem; font-stretch: 88%; color: var(--steel-ink); }
.footer dd { margin-top: .25rem; font-size: .92rem; font-weight: 600; }
.footer a { text-decoration: none; }
.footer a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Responsive ---------- */
@media (max-width: 1120px) {
  .nav { display: none; }
  .header-cta { margin-left: auto; }
  .menu-toggle { display: inline-flex; margin-left: 0; }
  .titleblock { grid-template-columns: 1fr 1fr; }
  .titleblock > div:nth-child(3) { padding-left: 0; border-left: 0; }
  .titleblock > div:nth-child(n+3) { border-top: 1px solid var(--rule); }
  .footer dl { grid-template-columns: 1fr 1fr; row-gap: 1.25rem; }
}

@media (max-width: 900px) {
  :root { --header: 64px; }
  .brand img { height: 38px; }
  .header-cta { display: none; }
  .menu-toggle { margin-left: auto; }

  .hero { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto; min-height: 0; }
  .hero__copy { padding: 2.5rem var(--gutter) 1rem; }
  .hero__model { min-height: 0; padding: clamp(340px, 88vw, 560px) var(--gutter) 1.75rem; }
  .hero__model canvas {
    bottom: auto;
    height: clamp(340px, 88vw, 560px);
    -webkit-mask-image: linear-gradient(to top, transparent 0, #000 18%);
    mask-image: linear-gradient(to top, transparent 0, #000 18%);
  }
  .model-ui { position: relative; inset: auto; flex-direction: column; align-items: stretch; }
  .switcher { align-self: flex-start; max-width: 100%; }
  .build { justify-content: space-between; }
  .stages { flex: 1; }
  .stages li { min-width: 0; flex: 1; }

  .section-head { grid-template-columns: 1fr; }

  .services__grid { grid-template-columns: 1fr; }
  .services__index {
    position: sticky;
    top: var(--header);
    z-index: 5;
    flex-direction: row;
    gap: .5rem;
    margin-inline: calc(var(--gutter) * -1);
    padding: .75rem var(--gutter);
    overflow-x: auto;
    border: 0;
    background: var(--zinc);
    scrollbar-width: none;
  }
  .services__index::-webkit-scrollbar { display: none; }
  .svc-tab {
    flex: none;
    padding: .6rem 1rem;
    border: 1px solid var(--rule);
    border-radius: 2px;
    transition: background-color .3s, border-color .3s;
  }
  .svc-tab:hover { padding-left: 1rem; }
  .svc-tab::before { display: none; }
  .svc-tab .svc-sub { display: none; }
  .svc-name { font-size: 1rem; font-stretch: 100%; }
  .svc-tab[aria-selected="true"] { background: var(--graphite); border-color: var(--graphite); }
  .svc-tab[aria-selected="true"] .svc-name { color: #fff; }
  .services__panel { position: static; }

  .process__grid { grid-template-columns: 1fr; }
  .process__aside { position: static; }
  .process__figure { display: none; }

  .about__row, .about__row--flip { grid-template-columns: 1fr; }
  .about__row--flip .about__img { order: 0; }

  .contact__grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .titleblock { grid-template-columns: 1fr; }
  .titleblock > div { padding-left: 0 !important; border-left: 0 !important; }
  .titleblock > div + div { border-top: 1px solid var(--rule); }
  .titleblock > div { padding-block: .8rem; }
  .switcher button { padding: .6em .75em; font-size: .85rem; }
  .panel__cols { grid-template-columns: 1fr; }
  .form__grid { grid-template-columns: 1fr; }
  .footer__block { grid-template-columns: 1fr; }
  .footer dl { grid-template-columns: 1fr; }
  .footer dl > div { padding: 0; border: 0; }
  .replay span { display: none; }
}

/* ---------- Original AVC copy: rotator, company intro, uppercase headings ---------- */
.rotator { display: flex; align-items: center; gap: .75rem; margin-top: 1.4rem; max-width: 40ch; }
.rotator::before { content: ""; flex: none; width: 4px; align-self: stretch; background: var(--avc); }
.rotator__list { position: relative; flex: 1; list-style: none; min-height: 1.6em; overflow: hidden; transition: height .4s var(--ease); }
.rotator__list li {
  position: absolute; inset: 0 0 auto 0;
  font-size: clamp(1.02rem, 1.25vw, 1.15rem); font-weight: 600; font-stretch: 104%; line-height: 1.4; color: var(--graphite);
  opacity: 0; transform: translateY(100%);
  transition: transform .65s var(--ease), opacity .45s var(--ease);
}
.rotator__list li.is-active { opacity: 1; transform: translateY(0); }
.rotator__list li.is-leaving { opacity: 0; transform: translateY(-100%); }
.rotator__toggle {
  flex: none; display: grid; place-items: center; width: 28px; height: 28px;
  border: 1px solid var(--rule); border-radius: 50%; background: var(--paper); color: var(--steel-ink); cursor: pointer;
  transition: border-color .3s, color .3s;
}
.rotator__toggle:hover { border-color: var(--graphite); color: var(--graphite); }
.rotator__toggle .i-play, .rotator.is-paused .rotator__toggle .i-pause { display: none; }
.rotator.is-paused .rotator__toggle .i-play { display: block; }
@media (prefers-reduced-motion: reduce) { .rotator__list li { transition: none; } }

.hero__lede strong, .intro__text strong {
  font-weight: 700; color: var(--graphite);
  background: linear-gradient(var(--avc), var(--avc)) 0 100% / 0 2px no-repeat;
  transition: background-size .9s var(--ease);
}
.hero__lede.is-drawn strong, .intro__text p.is-drawn strong { background-size: 100% 2px; }
/* Many bold words in the company intro: a lighter, thinner rule keeps the paragraph calm. */
.intro__text strong { background-image: linear-gradient(color-mix(in srgb, var(--avc) 45%, transparent), color-mix(in srgb, var(--avc) 45%, transparent)); }
.intro__text p.is-drawn strong { background-size: 100% 1.5px; }
.intro__text p.is-drawn strong:nth-of-type(2), .hero__lede.is-drawn strong:nth-of-type(2) { transition-delay: .12s; }
.intro__text p.is-drawn strong:nth-of-type(3) { transition-delay: .24s; }
.intro__text p.is-drawn strong:nth-of-type(n+4) { transition-delay: .36s; }
@media (prefers-reduced-motion: reduce) { .hero__lede strong, .intro__text strong { background-size: 100% 2px; transition: none; } }

.intro { padding-block: clamp(4rem, 8vw, 7rem) clamp(2rem, 4vw, 3.5rem); }
.intro__grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 2rem clamp(2rem, 6vw, 6rem); align-items: start; }
.intro__title { font-size: clamp(1.5rem, 2.4vw, 2.2rem); letter-spacing: .01em; line-height: 1.1; }
.intro__text { display: grid; gap: 1.25rem; }
.intro__text p { max-width: 62ch; font-size: clamp(1.05rem, 1.3vw, 1.2rem); line-height: 1.6; color: var(--steel-ink); }

.section-head--single { grid-template-columns: 1fr; }
.panel__title { letter-spacing: .01em; }
.panel__label { margin-bottom: .8rem; font-size: .95rem; }
.panel__cols--single { grid-template-columns: 1fr; }
.ticks--two { columns: 2; column-gap: 2rem; }
.ticks--two li { break-inside: avoid; }
.about__text h3 { letter-spacing: .01em; }
.about__text .ticks + h3 { margin-top: 2.25rem; }
.about__text .ticks li { color: var(--steel-ink); max-width: 56ch; }
.values { margin-bottom: clamp(4rem, 8vw, 7rem); }
.values h3 { letter-spacing: .01em; }

.btn--wa { --fg: var(--graphite); }
.btn--wa svg { flex: none; }

@media (max-width: 900px) {
  .intro__grid { grid-template-columns: 1fr; }
  .ticks--two { columns: 1; }
}

.about__row:last-child { margin-bottom: 0; }

/* ---------- 3D: piece names, per-service models ---------- */
.model-hint { display: block; max-width: 34ch; text-align: right; line-height: 1.4; }
.model-tip {
  position: absolute; left: 0; top: 0; z-index: 6;
  padding: .38em .7em;
  background: var(--graphite); color: #fff;
  border-left: 3px solid var(--avc); border-radius: 2px;
  font-size: .8rem; font-weight: 600; font-stretch: 104%; white-space: nowrap;
  pointer-events: none; opacity: 0; transition: opacity .18s var(--ease);
}
.model-tip.is-on { opacity: 1; }

.panel__media .media-3d { position: absolute; inset: 0; z-index: 2; background: var(--zinc); }
.media-3d[hidden] { display: none; }
.media-3d__stage { position: absolute; inset: 0; }
.media-3d__canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; cursor: grab; touch-action: pan-y; }
.media-3d__canvas:active { cursor: grabbing; }
.media-3d__ui {
  position: absolute; left: 1rem; right: 1rem; bottom: .8rem; z-index: 3;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem;
  pointer-events: none;
}
.media-3d__ui > * { pointer-events: auto; }
.stages--compact { gap: .5rem; font-size: .72rem; }
.stages--compact li { min-width: 4.2rem; padding-top: 8px; }
.replay--compact {
  display: grid; place-items: center; width: 32px; height: 32px; padding: 0;
  background: color-mix(in srgb, var(--paper) 92%, transparent); border: 1px solid var(--rule); border-radius: 50%;
}
.replay--compact:hover svg { transform: rotate(-300deg); }

.media-toggle, .media-3d__models {
  position: absolute; top: .8rem; z-index: 4;
  display: inline-flex; padding: 3px;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  border: 1px solid var(--rule); border-radius: 3px;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.media-toggle { right: .8rem; }
.media-3d__models { left: .8rem; }
.media-toggle button, .media-3d__models button {
  padding: .45em .85em; background: none; border: 0; border-radius: 2px;
  font-size: .82rem; font-weight: 600; color: var(--steel-ink); cursor: pointer;
  transition: background-color .3s var(--ease), color .3s var(--ease);
}
.media-toggle button:hover, .media-3d__models button:hover { color: var(--graphite); }
.media-toggle button[aria-pressed="true"], .media-3d__models button[aria-checked="true"] { background: var(--graphite); color: #fff; }
.no-webgl .media-toggle { display: none; }

@media (max-width: 900px) {
  .panel__media.is-3d { aspect-ratio: 4 / 3; }
}
@media (max-width: 560px) {
  .media-toggle__long { display: none; }
  .stages--compact { display: none; }
  .media-3d__ui { justify-content: flex-end; }
}

/* ---------- Micro-interactions ---------- */
/* Measuring tape: reading progress under the header (ticks every 10 px, longer every 50 px). */
.measure {
  position: absolute; left: 0; right: 0; bottom: 0; height: 7px; pointer-events: none;
  background:
    repeating-linear-gradient(90deg, var(--steel) 0 1px, transparent 1px 50px) 0 0 / 100% 7px no-repeat,
    repeating-linear-gradient(90deg, var(--rule) 0 1px, transparent 1px 10px) 0 0 / 100% 4px no-repeat;
  opacity: 0; transition: opacity .35s var(--ease);
}
.site-header.is-scrolled .measure { opacity: 1; }
.measure__fill { position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--avc); transform: scaleX(0); transform-origin: left; }

/* Process: a red ring draws around each step number as the step lights up. */
.step__num { overflow: visible; }
.step__ring { position: absolute; inset: -4px; width: calc(100% + 8px); height: calc(100% + 8px); transform: rotate(-90deg); pointer-events: none; }
.step__ring circle { fill: none; stroke: var(--avc); stroke-width: 2; stroke-dasharray: var(--len); stroke-dashoffset: var(--len); transition: stroke-dashoffset .9s var(--ease); }
.step.is-on .step__ring circle { stroke-dashoffset: 0; }

/* Service tab pictograms: drawn at rest, re-traced on hover or focus. */
.svc-tab { grid-template-columns: auto 1fr; align-items: center; column-gap: .85rem; }
.svc-icon { width: 26px; height: 26px; fill: none; stroke: var(--steel); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: stroke .3s; }
.svc-icon path { stroke-dasharray: var(--len); stroke-dashoffset: 0; }
.svc-tab[aria-selected="true"] .svc-icon, .svc-tab:hover .svc-icon { stroke: var(--avc); }
.js-motion .svc-tab.is-tracing .svc-icon path { animation: trace .9s var(--ease); }
@keyframes trace { from { stroke-dashoffset: var(--len); } to { stroke-dashoffset: 0; } }

/* Photos in "Nosotros" open like a curtain. */
.js-motion .about__img { clip-path: inset(0 100% 0 0); transition: clip-path 1.1s var(--ease); }
.js-motion .about__img.is-in { clip-path: inset(0 0 0 0); }

/* Form: a check confirms each valid required field. */
.field.is-valid .field__control::after {
  content: ""; position: absolute; right: 4px; top: 50%; width: 12px; height: 6px;
  border-left: 2px solid var(--graphite); border-bottom: 2px solid var(--graphite);
  transform: translateY(-75%) rotate(-45deg); animation: pop .35s var(--ease);
}
.field.is-valid textarea + .field__line { display: none; }
.field.is-valid .field__control:has(textarea)::after { top: 1.2rem; }
.field.is-valid input { padding-right: 1.6rem; }
@keyframes pop { from { opacity: 0; transform: translateY(-75%) rotate(-45deg) scale(.4); } }

/* Floating WhatsApp button (phones). */
.wa-float {
  position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 58;
  display: none; place-items: center; width: 56px; height: 56px; border-radius: 50%;
  background: var(--graphite); color: #fff; box-shadow: 0 8px 24px rgba(29, 33, 36, .28), inset 0 0 0 2px var(--avc);
  opacity: 0; transform: translateY(16px) scale(.9); pointer-events: none;
  transition: opacity .35s var(--ease), transform .45s var(--ease);
}
.wa-float.is-on { opacity: 1; transform: none; pointer-events: auto; }
@media (max-width: 900px) {
  .wa-float { display: grid; }
  .svc-icon { display: none; }
  .svc-tab { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .step__ring circle { transition: none; }
  .wa-float { transition: none; }
}

/* ---------- Hero: nine-model picker ---------- */
.model-ui { flex-direction: column; align-items: stretch; gap: .9rem; }
.picker { display: flex; align-items: center; gap: .4rem; max-width: 100%; }
.picker .switcher {
  flex: 0 1 auto; min-width: 0; max-width: 100%;
  overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none;
}
.picker .switcher::-webkit-scrollbar { display: none; }
.picker .switcher button { flex: none; white-space: nowrap; }
.switcher.is-scrollable { -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 28px, #000 calc(100% - 28px), transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 28px, #000 calc(100% - 28px), transparent 100%); }
.switcher.is-scrollable.at-start { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent 100%); mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent 100%); }
.switcher.is-scrollable.at-end { -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 28px); mask-image: linear-gradient(90deg, transparent 0, #000 28px); }
.picker__nav {
  flex: none; display: grid; place-items: center; width: 36px; height: 36px; padding: 0;
  background: color-mix(in srgb, var(--paper) 92%, transparent); color: var(--graphite);
  border: 1px solid var(--rule); border-radius: 50%; cursor: pointer;
  transition: border-color .3s var(--ease), background-color .3s var(--ease), color .3s var(--ease), transform .15s;
}
.picker__nav:hover { border-color: var(--graphite); background: var(--graphite); color: #fff; }
.picker__nav:active { transform: scale(.94); }
.build { justify-content: space-between; }

/* ---------- Value proposition: cards ---------- */
.values__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; list-style: none; }
.value {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; grid-template-columns: 72px minmax(0, 1fr); align-items: center; gap: 1.6rem;
  padding: 2.1rem 2.2rem 2.1rem 1.9rem;
  background: var(--paper); border: 1px solid var(--rule);
  transition: border-color .45s var(--ease), transform .55s var(--ease), box-shadow .55s var(--ease), opacity .8s var(--ease);
}
/* red rule along the top, extends from the left when the card arrives */
.value::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--avc);
  transform-origin: left; transition: transform 1s var(--ease);
}
/* drawing-sheet grid + a soft light that follows the pointer */
.value::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(280px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--avc) 10%, transparent), transparent 70%),
    linear-gradient(color-mix(in srgb, var(--graphite) 6%, transparent) 1px, transparent 1px) 0 0 / 22px 22px,
    linear-gradient(90deg, color-mix(in srgb, var(--graphite) 6%, transparent) 1px, transparent 1px) 0 0 / 22px 22px;
  opacity: 0; transition: opacity .5s var(--ease);
}
.value:hover { border-color: var(--graphite); transform: translateY(-4px); box-shadow: 0 18px 36px -22px rgba(29, 33, 36, .45); }
.value:hover::after { opacity: 1; }
.value p { font-size: clamp(1.08rem, 1.45vw, 1.28rem); line-height: 1.5; color: var(--steel-ink); max-width: 44ch; }
.value strong { color: var(--graphite); font-weight: 700; }

/* registration marks in the corners, like the corners of a technical drawing */
.value__corners { position: absolute; inset: 0; pointer-events: none; }
.value__corners i { position: absolute; width: 14px; height: 14px; border: 0 solid var(--avc); opacity: 0; transition: opacity .35s var(--ease), transform .45s var(--ease); }
.value__corners i:nth-child(1) { top: 12px; left: 10px; border-top-width: 2px; border-left-width: 2px; transform: translate(6px, 6px); }
.value__corners i:nth-child(2) { top: 12px; right: 10px; border-top-width: 2px; border-right-width: 2px; transform: translate(-6px, 6px); }
.value__corners i:nth-child(3) { bottom: 10px; left: 10px; border-bottom-width: 2px; border-left-width: 2px; transform: translate(6px, -6px); }
.value__corners i:nth-child(4) { bottom: 10px; right: 10px; border-bottom-width: 2px; border-right-width: 2px; transform: translate(-6px, -6px); }
.value:hover .value__corners i { opacity: 1; transform: none; }

/* icon */
.value__icon { width: 64px; height: 64px; overflow: visible; color: var(--avc); fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.value__icon .vi-fill { fill: currentColor; stroke: none; }
.value__icon path, .value__icon circle:not(.vi-fill), .value__icon rect { stroke-dasharray: var(--len); stroke-dashoffset: 0; transition: stroke-dashoffset 1.2s var(--ease); }
.value__icon g, .value__icon .vi-shield { transform-box: view-box; transform-origin: 32px 32px; }

/* entrance: card rises, rule extends, strokes draw (only when JS motion is on) */
.js-motion .value:not(.is-in) { opacity: 0; transform: translateY(22px); }
.js-motion .value:not(.is-in)::before { transform: scaleX(0); }
.js-motion .value:not(.is-in) .value__icon path,
.js-motion .value:not(.is-in) .value__icon circle:not(.vi-fill),
.js-motion .value:not(.is-in) .value__icon rect { stroke-dashoffset: var(--len); }
.js-motion .value:nth-child(2) { transition-delay: .1s; }
.js-motion .value:nth-child(3) { transition-delay: .2s; }
.js-motion .value:nth-child(4) { transition-delay: .3s; }
.js-motion .value:nth-child(2)::before, .js-motion .value:nth-child(2) .value__icon * { transition-delay: .2s; }
.js-motion .value:nth-child(3)::before, .js-motion .value:nth-child(3) .value__icon * { transition-delay: .3s; }
.js-motion .value:nth-child(4)::before, .js-motion .value:nth-child(4) .value__icon * { transition-delay: .4s; }
.js-motion .value.is-in:hover { transition-delay: 0s; }

/* hover: each icon acts out its idea */
.value.is-hover .vi-hand--min { animation: vi-spin 1.4s var(--ease); }
.value.is-hover .vi-hand:not(.vi-hand--min) { animation: vi-spin 1.4s var(--ease) reverse; }
.value.is-hover .vi-shield { animation: vi-pulse .7s var(--ease); }
.value.is-hover .vi-check { animation: vi-redraw .8s var(--ease) .1s both; }
.value.is-hover .vi-arrow-a { animation: vi-nudge 1.1s var(--ease) 2; }
.value.is-hover .vi-arrow-b { animation: vi-nudge 1.1s var(--ease) 2 reverse; --nudge: -5px; }
.value.is-hover .vi-rings { animation: vi-bounce .6s var(--ease); }
@keyframes vi-spin { to { transform: rotate(360deg); } }
@keyframes vi-pulse { 50% { transform: scale(1.07); } }
@keyframes vi-redraw { from { stroke-dashoffset: var(--len); } to { stroke-dashoffset: 0; } }
@keyframes vi-nudge { 50% { transform: translateX(var(--nudge, 5px)); } }
@keyframes vi-bounce { 40% { transform: translateY(-3px); } }

@media (max-width: 900px) {
  .values__grid { grid-template-columns: 1fr; }
  .value { grid-template-columns: 56px minmax(0, 1fr); gap: 1.2rem; padding: 1.6rem 1.4rem; }
  .value__icon { width: 52px; height: 52px; }
}
@media (prefers-reduced-motion: reduce) {
  .value, .value::before, .value__icon * { transition: none !important; }
  .value.is-hover * { animation: none !important; }
  .value:hover { transform: none; }
}

/* The nine-model switcher scrolls inside its column; it must never widen the page. */
.hero__model, .model-ui, .picker { min-width: 0; }

/* ---------- Drawing details that fill the open spaces ---------- */
/* Shared: technical line drawings that draw themselves when they come into view.
   Each stroke's length is measured in JS (--len); without it the stroke simply shows complete. */
.bp { display: block; overflow: visible; fill: none; stroke: var(--graphite); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.bp .t, .bp .h { stroke: var(--steel); stroke-width: 1; }
.bp .h.bp-fade { stroke: var(--rule); }
.bp .a { stroke: var(--avc); }
.bp :is(path, circle, rect):not(.bp-fade) {
  stroke-dasharray: var(--len); stroke-dashoffset: 0;
  transition: stroke-dashoffset 1.1s var(--ease) calc(var(--i, 0) * 90ms);
}
.bp pattern path { stroke-dasharray: none !important; transition: none !important; }
.bp .bp-fade { transition: opacity .8s var(--ease) calc(var(--i, 0) * 90ms + .2s); }
.js-motion .bp:not(.is-in) :is(path, circle, rect):not(.bp-fade) { stroke-dashoffset: var(--len); }
.js-motion .bp:not(.is-in) .bp-fade { opacity: 0; }

/* Empresa: portal-frame elevation under the heading. */
.intro__aside { display: grid; gap: clamp(1rem, 2vw, 1.5rem); align-content: start; }
.intro__frame { width: 100%; max-width: 440px; height: auto; }

/* Nosotros, Compromiso: detail sheet under the list, inspection marks on the photo. */
.about__detail { width: 100%; max-width: 460px; height: auto; margin-top: 2rem; }
.about__img .inspect {
  position: absolute; inset: 0; width: 100%; height: 100%; transform: scale(1.08); pointer-events: none;
  fill: none; stroke: #fff; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .45));
}
.inspect :is(path, circle):not(.bp-fade):not(.inspect__dot) {
  stroke-dasharray: var(--len); stroke-dashoffset: 0;
  transition: stroke-dashoffset 1s var(--ease) calc(.9s + var(--i, 0) * 150ms);
}
.inspect .inspect__link path { stroke-dasharray: 3 7; transition: opacity .6s var(--ease) 1.3s; }
.inspect .bp-fade { stroke-width: 2; transition: opacity .6s var(--ease) 1.6s; }
.inspect__spin { transform-box: view-box; transform-origin: 562px 368px; animation: insp-spin 16s linear infinite; }
.inspect__dot { fill: var(--avc); stroke: #fff; stroke-width: 2; transform-box: fill-box; transform-origin: center; transition: opacity .4s var(--ease) 1.5s; animation: insp-pulse 2.2s ease-in-out infinite; }
.js-motion .about__img:not(.is-in) .inspect :is(path, circle):not(.bp-fade):not(.inspect__dot) { stroke-dashoffset: var(--len); }
.js-motion .about__img:not(.is-in) :is(.inspect__link path, .inspect .bp-fade, .inspect__dot) { opacity: 0; }
@keyframes insp-spin { to { transform: rotate(360deg); } }
@keyframes insp-pulse { 50% { transform: scale(1.35); } }

/* Servicios: drawing sheet under the tabs (wide screens). Tabs and sheet stay in view together. */
.services__aside { position: sticky; top: calc(var(--header) + 20px); display: grid; gap: 1.5rem; align-self: start; }
.svc-plate {
  position: relative; overflow: hidden; aspect-ratio: 16 / 11;
  background:
    linear-gradient(color-mix(in srgb, var(--graphite) 5%, transparent) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(90deg, color-mix(in srgb, var(--graphite) 5%, transparent) 1px, transparent 1px) 0 0 / 24px 24px,
    var(--paper);
  border: 1px solid var(--rule);
}
.svc-plate__count { position: absolute; left: 1.2rem; top: 1rem; display: flex; align-items: baseline; gap: .4rem; font-stretch: 112%; }
.svc-plate__num { display: inline-block; font-size: clamp(2.4rem, 3.8vw, 3.5rem); font-weight: 800; line-height: 1; letter-spacing: -.02em; color: var(--graphite); }
.svc-plate__num.is-flip { animation: plate-num .55s var(--ease); }
.svc-plate__total { font-size: .95rem; font-weight: 600; color: var(--steel-ink); }
.svc-plate__icon {
  position: absolute; left: 50%; top: 52%; width: 42%; height: auto; translate: -50% -50%; overflow: visible;
  fill: none; stroke: var(--graphite); stroke-width: .22; stroke-linecap: round; stroke-linejoin: round;
}
.svc-plate__shape { stroke-dasharray: var(--len); stroke-dashoffset: 0; }
.svc-plate__dim { stroke: var(--steel); stroke-width: .08; transition: opacity .5s var(--ease) .6s; }
.js-motion .svc-plate__icon.is-tracing .svc-plate__shape { animation: trace 1.2s var(--ease); }
.js-motion .svc-plate__icon.is-tracing .svc-plate__dim { animation: plate-dim 1.3s var(--ease); }
@keyframes plate-dim { 0%, 45% { opacity: 0; } }
.svc-plate__bar { position: absolute; left: 1.2rem; right: 1.2rem; bottom: 1.1rem; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; list-style: none; }
.svc-plate__bar li { height: 3px; background: var(--rule); transition: background-color .45s var(--ease); }
.svc-plate__bar li.is-on { background: var(--avc); }
@keyframes plate-num { from { opacity: 0; transform: translateY(35%); } }

/* Cita: a Warren truss spans the section; it is assembled as the quote scrolls past. */
.quote { padding-block: clamp(4rem, 8vw, 7rem); }
.truss { display: block; width: 100%; height: auto; margin-top: clamp(2rem, 4vw, 3.5rem); overflow: visible; fill: none; stroke: var(--graphite); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.truss .tr-chord { stroke-width: 3.2; }
.truss__members path { stroke-dasharray: var(--len); }
.truss__supports { stroke: var(--steel); stroke-width: 1.5; }
/* Nodes rest red (finished truss); with motion on, the scroll timeline starts them grey and turns each red as it is reached. */
.truss__nodes circle { fill: var(--avc); stroke: var(--avc); stroke-width: 1.5; }

/* Contacto: map of the address, from OpenStreetMap data. It fills the column next to the form. */
.contact__grid { align-items: stretch; }
.contact__grid > .form { align-self: start; }
.contact__info { display: flex; flex-direction: column; }
.map { position: relative; flex: 1 1 auto; min-height: 200px; margin-top: 1.75rem; overflow: hidden; background: var(--zinc); border: 1px solid var(--rule); }
.map__link { position: absolute; inset: 0; display: block; }
.map__link img, .map__overlay { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }
.map__link:hover img, .map__link:hover .map__overlay { transform: scale(1.05); }
.map__link:focus-visible { outline-offset: -4px; }
.map__labels text { font-family: var(--f); font-size: 11px; font-weight: 600; letter-spacing: .02em; fill: var(--steel-ink); paint-order: stroke; stroke: #fff; stroke-width: 3px; stroke-linejoin: round; }
.map__street { fill: none; stroke: var(--avc); stroke-width: 5; stroke-linecap: round; stroke-dasharray: var(--len); stroke-dashoffset: 0; transition: stroke-dashoffset .9s var(--ease) .3s; }
.map__pin { transition: opacity .5s var(--ease) .9s, transform .7s cubic-bezier(.3, 1.6, .5, 1) .9s; }
.map__dot { fill: var(--avc); stroke: #fff; stroke-width: 3; }
.map__pulse { fill: var(--avc); transform-box: fill-box; transform-origin: center; animation: map-pulse 2.4s ease-out infinite; }
.map__tag path { fill: var(--graphite); }
.map__tag text { font-family: var(--f); font-size: 10.5px; font-weight: 800; letter-spacing: .05em; fill: #fff; }
.map__credit { position: absolute; right: 0; bottom: 0; z-index: 2; padding: 2px 7px; background: rgba(243, 244, 243, .9); font-size: .7rem; color: var(--steel-ink); }
.map__credit a { color: inherit; }
.js-motion .map:not(.is-in) .map__street { stroke-dashoffset: var(--len); }
.js-motion .map:not(.is-in) .map__pin { opacity: 0; transform: translateY(-14px); }
@keyframes map-pulse { from { transform: scale(1); opacity: .45; } to { transform: scale(3.2); opacity: 0; } }

/* Site ruler: wide screens with a pointer. Marks = sections (names from the menu), red cursor = position. */
.rail { position: fixed; right: 14px; top: calc(var(--header) + 28px); bottom: 28px; z-index: 40; display: none; width: 14px; pointer-events: none; }
@media (min-width: 1280px) and (hover: hover) { .rail { display: block; } }
.rail__track {
  position: absolute; inset: 0; border-right: 1px solid var(--steel);
  background:
    repeating-linear-gradient(to bottom, var(--steel) 0 1px, transparent 1px 48px) right top / 11px 100% no-repeat,
    repeating-linear-gradient(to bottom, var(--rule) 0 1px, transparent 1px 8px) right top / 5px 100% no-repeat;
  transition: border-color .4s var(--ease);
}
.rail__mark { position: absolute; right: 0; width: 14px; height: 2px; background: var(--graphite); translate: 0 -50%; pointer-events: auto; cursor: pointer; transition: width .35s var(--ease), background-color .35s var(--ease); }
.rail__mark::before { content: ""; position: absolute; inset: -9px 0 -9px -12px; }
.rail__mark span {
  position: absolute; right: calc(100% + 10px); top: 50%; translate: 0 -50%; white-space: nowrap;
  padding: .3em .65em; background: var(--graphite); color: #fff; border-radius: 2px; font-size: .75rem; font-weight: 600;
  opacity: 0; transform: translateX(6px); transition: opacity .25s var(--ease), transform .35s var(--ease); pointer-events: none;
}
.rail__mark:hover span { opacity: 1; transform: none; }
.rail__mark.is-active { width: 20px; background: var(--avc); }
.rail__cursor { position: absolute; right: -2px; top: 0; width: 4px; height: 28px; background: var(--avc); translate: 0 -50%; }
.rail.on-dark .rail__track { border-color: rgba(255, 255, 255, .5); background: repeating-linear-gradient(to bottom, rgba(255,255,255,.55) 0 1px, transparent 1px 48px) right top / 11px 100% no-repeat, repeating-linear-gradient(to bottom, rgba(255,255,255,.22) 0 1px, transparent 1px 8px) right top / 5px 100% no-repeat; }
.rail.on-dark .rail__mark:not(.is-active) { background: #fff; }

@media (max-width: 900px) {
  .intro__frame, .about__detail, .svc-plate { display: none; }
  .services__aside { display: contents; }
  .map { flex: none; min-height: 0; aspect-ratio: 4 / 3; }
}
@media (max-width: 560px) {
  /* the truss is drawn at about a quarter of its size here: keep its lines visible */
  .truss { stroke-width: 5; }
  .truss .tr-chord { stroke-width: 7; }
  .truss__supports { stroke-width: 4; }
  .truss__nodes circle { stroke-width: 4; r: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  .inspect__spin, .inspect__dot, .map__pulse { animation: none; }
  .map__pulse { display: none; }
  .map__link img, .map__overlay { transition: none; }
}

/* ---------- Original AVC photos: value proposition (gears) and the quote (handshake) ---------- */
/* Propuesta de valor: the photo AVC used for this block sits beside the cards and stays in view while they scroll. */
.values__layout { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(1.25rem, 2.5vw, 2rem); align-items: start; }
.values__img { position: sticky; top: calc(var(--header) + 24px); }
.values__img img { aspect-ratio: 4 / 3; }
.values__layout .values__grid { grid-template-columns: minmax(0, 1fr); gap: 1rem; }

/* Cita: text and handshake side by side; the type is sized to its column so each line stays on one row. */
.quote__grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: clamp(2rem, 4vw, 4rem); align-items: center; }
.quote blockquote { container-type: inline-size; min-width: 0; }
.quote p { font-size: clamp(1.9rem, 5.5cqi, 5.2rem); }
.quote__img img { aspect-ratio: 4 / 3; }

@media (max-width: 900px) {
  .values__layout, .quote__grid { grid-template-columns: minmax(0, 1fr); }
  .values__img { position: relative; top: auto; }
  .values__img img, .quote__img img { aspect-ratio: 16 / 10; }
}

/* ---------- Privacy: consent box in the form, footer link, policy page ---------- */
.consent { margin-top: .25rem; }
.consent__label { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .8rem; align-items: start; cursor: pointer; }
.consent__label input { position: absolute; opacity: 0; width: 22px; height: 22px; margin: 0; cursor: pointer; }
.consent__box {
  display: grid; place-items: center; width: 22px; height: 22px; margin-top: .1rem;
  background: var(--paper); border: 1.5px solid var(--steel); border-radius: 2px;
  transition: background-color .25s var(--ease), border-color .25s var(--ease);
}
.consent__box svg { width: 14px; height: 14px; fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 14; stroke-dashoffset: 14; transition: stroke-dashoffset .35s var(--ease) .05s; }
.consent__label input:checked + .consent__box { background: var(--avc); border-color: var(--avc); }
.consent__label input:checked + .consent__box svg { stroke-dashoffset: 0; }
.consent__label input:focus-visible + .consent__box { outline: 2px solid var(--avc); outline-offset: 3px; }
.consent__label:hover .consent__box { border-color: var(--graphite); }
.consent.is-invalid .consent__box { border-color: var(--avc-ink); }
.consent__text { font-size: .9rem; line-height: 1.45; color: var(--steel-ink); }
.consent__text a { color: var(--graphite); font-weight: 600; text-underline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .consent__box, .consent__box svg { transition: none; } }

.footer__bottom { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .5rem 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--rule); }
.footer__bottom .footer__copy { grid-column: auto; padding-top: 0; border-top: 0; }
.footer__legal { font-size: .85rem; font-weight: 600; color: var(--graphite); }

.legal-page .site-header { position: sticky; top: 0; }
.legal-back { margin-left: auto; padding: .8em 1.2em; }
.legal { padding-block: clamp(2.5rem, 6vw, 5rem) clamp(4rem, 8vw, 7rem); }
.legal__grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 2rem clamp(2rem, 5vw, 5rem); }
.legal__head { grid-column: 1 / -1; max-width: 72ch; padding-bottom: clamp(1.5rem, 3vw, 2.5rem); border-bottom: 2px solid var(--graphite); }
.legal__eyebrow { font-size: .8rem; font-weight: 700; font-stretch: 104%; letter-spacing: .06em; text-transform: uppercase; color: var(--avc-ink); }
.legal h1 { margin-top: .6rem; font-size: clamp(2.2rem, 5vw, 4rem); font-stretch: 112%; font-weight: 800; line-height: 1; letter-spacing: -.02em; }
.legal__date { margin-top: .9rem; font-size: .9rem; color: var(--steel-ink); }
.legal__lede { margin-top: 1.25rem; font-size: clamp(1.05rem, 1.3vw, 1.18rem); line-height: 1.6; color: var(--steel-ink); }
.legal__toc { position: sticky; top: calc(var(--header) + 24px); align-self: start; }
.legal__toc-title { font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--steel-ink); }
.legal__toc ol { margin-top: .75rem; list-style: none; counter-reset: toc; border-top: 1px solid var(--rule); }
.legal__toc li { counter-increment: toc; border-bottom: 1px solid var(--rule); }
.legal__toc a { display: flex; gap: .75rem; padding: .55rem 0; font-size: .92rem; font-weight: 500; text-decoration: none; color: var(--graphite); transition: color .25s var(--ease), padding .35s var(--ease); }
.legal__toc a::before { content: counter(toc, decimal-leading-zero); font-weight: 700; font-stretch: 112%; color: var(--avc); }
.legal__toc a:hover { padding-left: .35rem; }
.legal__body { max-width: 72ch; }
.legal__body section { padding-block: 1.75rem; border-bottom: 1px solid var(--rule); scroll-margin-top: calc(var(--header) + 16px); }
.legal__body section:first-child { padding-top: 0; }
.legal__body h2 { display: flex; align-items: baseline; gap: .75rem; font-size: clamp(1.35rem, 2vw, 1.7rem); font-stretch: 106%; font-weight: 700; line-height: 1.15; letter-spacing: 0; }
.legal__body h2 span { font-size: .8em; font-weight: 800; font-stretch: 112%; color: var(--avc); }
.legal__body h3 { margin-top: 1.4rem; font-size: 1.05rem; }
.legal__body p, .legal__body li, .legal__body td, .legal__body dd { color: var(--steel-ink); }
.legal__body p { margin-top: .85rem; line-height: 1.65; }
.legal__body strong { color: var(--graphite); }
.legal__body a { color: var(--graphite); font-weight: 600; text-underline-offset: 3px; }
.legal__body .ticks { margin-top: .9rem; }
.legal__body .ticks li { font-size: 1rem; line-height: 1.55; margin-bottom: .6rem; }
.legal__list { margin-top: .9rem; padding-left: 1.4rem; }
.legal__list li { margin-bottom: .5rem; line-height: 1.55; }
.legal__list li::marker { font-weight: 700; color: var(--avc); }
.legal__card { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 1rem; background: var(--paper); border: 1px solid var(--rule); }
.legal__card > div { padding: .9rem 1.1rem; border-bottom: 1px solid var(--rule); }
.legal__card > div:nth-child(odd) { border-right: 1px solid var(--rule); }
.legal__card > div:last-child { grid-column: 1 / -1; border-right: 0; border-bottom: 0; }
.legal__card dt { font-size: .78rem; font-stretch: 88%; color: var(--steel-ink); }
.legal__card dd { margin-top: .2rem; font-weight: 700; color: var(--graphite); }
.legal__table { width: 100%; margin-top: 1rem; border-collapse: collapse; background: var(--paper); border: 1px solid var(--rule); }
.legal__table th, .legal__table td { padding: .7rem 1rem; text-align: left; border-bottom: 1px solid var(--rule); }
.legal__table th { font-size: .8rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--graphite); background: var(--zinc); }
.legal__table td:last-child { font-weight: 700; color: var(--graphite); white-space: nowrap; }
mark.todo { padding: .05em .35em; background: #FFE3E5; color: var(--avc-ink); font-weight: 700; border-radius: 2px; }

@media (max-width: 900px) {
  .legal__grid { grid-template-columns: minmax(0, 1fr); }
  .legal__toc { position: static; }
  .legal-back { margin-left: auto; }
}
@media (max-width: 560px) {
  .legal__card { grid-template-columns: minmax(0, 1fr); }
  .legal__card > div:nth-child(odd) { border-right: 0; }
  .legal-back { padding: .7em 1em; font-size: .88rem; }
}
.legal-page .header-cta { margin-left: 0; }

/* ---------- Texture: drawing-paper grain everywhere, faint blueprint grid on the light sections ---------- */
/* Grain: one small noise tile (SVG turbulence, rasterised once), fixed over the page, never intercepts clicks. */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 65; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .11 0 0 0 0 .13 0 0 0 0 .14 1.4 0 0 0 -.55'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
  opacity: var(--grain, .22);
}
/* Grid: 24 px minor / 120 px major lines, faded towards the edges so it reads as paper, not as a table. */
.intro, .services, .about, .contact { position: relative; isolation: isolate; }
:is(.intro, .services, .about, .contact)::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(color-mix(in srgb, var(--graphite) 7%, transparent) 1px, transparent 1px) 0 0 / 120px 120px,
    linear-gradient(90deg, color-mix(in srgb, var(--graphite) 7%, transparent) 1px, transparent 1px) 0 0 / 120px 120px,
    linear-gradient(color-mix(in srgb, var(--graphite) 3.5%, transparent) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(90deg, color-mix(in srgb, var(--graphite) 3.5%, transparent) 1px, transparent 1px) 0 0 / 24px 24px;
  background-position: center top;
  -webkit-mask-image: radial-gradient(ellipse 75% 70% at 50% 45%, #000 30%, transparent 85%);
  mask-image: radial-gradient(ellipse 75% 70% at 50% 45%, #000 30%, transparent 85%);
}
@media (max-width: 560px) { body { --grain: .16; } }
@media print { body::after, :is(.intro, .services, .about, .contact)::before { display: none; } }

/* ---------- Service pages (one per service, generated by tools/build-servicios.py) ---------- */
.svc-page { padding-top: calc(var(--header) + clamp(2rem, 5vw, 4rem)); }
.crumbs { display: flex; flex-wrap: wrap; gap: .5rem; align-items: baseline; font-size: .85rem; color: var(--steel-ink); }
.crumbs a { color: var(--graphite); font-weight: 600; text-underline-offset: 3px; }
.svc-page__title {
  max-width: 22ch;
  margin: 1.25rem 0 clamp(2rem, 4vw, 3.5rem);
  font-size: clamp(2rem, 4.6vw, 3.8rem);
  font-weight: 800;
  font-stretch: 110%;
  line-height: 1.02;
  letter-spacing: -.015em;
}
.svc-page__grid { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 3fr); gap: clamp(2rem, 4vw, 4rem); align-items: start; }
.svc-page .services__panel { position: relative; top: auto; }
.svc-page .panel__body > .panel__cols:first-child { margin-top: 0; }
.svc-page__others { position: sticky; top: calc(var(--header) + 20px); border-top: 1px solid var(--rule); }
.svc-page__others h2 { padding: 1rem 0 .5rem; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--steel-ink); }
.svc-page__others ul { list-style: none; }
.svc-page__others a {
  display: block;
  padding: 1rem 0;
  border-bottom: 1px solid var(--rule);
  font-size: 1.15rem;
  font-weight: 700;
  font-stretch: 110%;
  color: var(--graphite);
  text-decoration: none;
  transition: color .3s, padding .4s var(--ease);
}
.svc-page__others a:hover { color: var(--avc); padding-left: .5rem; }
@media (max-width: 900px) {
  .svc-page__grid { grid-template-columns: minmax(0, 1fr); }
  .svc-page__others { position: static; }
}
.panel__more { align-self: center; margin-left: .25rem; font-size: .9rem; font-weight: 600; color: var(--graphite); text-underline-offset: 3px; }
.panel__more:hover { color: var(--avc); }
.footer__credit { font-size: .85rem; color: var(--steel-ink); text-underline-offset: 3px; }
