:root {
  --ink: #0e0e0e;
  --ink-2: #1a1a1a;
  --paper: #f4f1ea;
  --paper-2: #e9e4d9;
  --accent: #d4a23a;
  --silver: #b9bcc0;
  --line-dark: rgba(14, 14, 14, .16);
  --line-light: rgba(244, 241, 234, .18);
  --muted-dark: #575757;
  --muted-light: #b0b0b0;
  --display: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --header-h: 72px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
  margin: 0;
  font-family: var(--display);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ol, ul, dl, dd, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a { color: inherit; }
canvas { display: block; width: 100%; height: 100%; }

h2 {
  font-size: clamp(1.9rem, 4.2vw, 3.25rem);
  font-stretch: 88%;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -.02em;
  text-wrap: balance;
}

h3 { font-size: 1.3rem; font-weight: 650; line-height: 1.2; }

.wrap {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2.5rem);
}

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  padding: .6rem 1rem; background: var(--accent); color: var(--ink);
  font-weight: 600; text-decoration: none;
}
.skip:focus { top: 1rem; }

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

.eyebrow {
  font-family: var(--mono);
  font-size: .78rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.25rem;
}
.eyebrow--dark { color: var(--ink); opacity: .7; }

.tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .3rem .55rem;
  border: 1px solid currentColor;
  opacity: .75;
}

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: .75rem 1.5rem;
  font: inherit; font-weight: 650; font-size: 1rem; line-height: 1.1;
  text-decoration: none; border: 1.5px solid transparent; border-radius: 2px;
  cursor: pointer; transition: background-color .2s, color .2s, border-color .2s;
}
.btn--accent { background: var(--accent); color: var(--ink); }
.btn--accent:hover { background: #e6b955; }
.btn--ghost { border-color: rgba(244, 241, 234, .55); color: var(--paper); }
.btn--ghost:hover { background: var(--paper); color: var(--ink); }
.btn--dark { background: var(--ink); color: var(--paper); }
.btn--dark:hover { background: #2c2c2c; }

/* Cabecera */
.header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--header-h);
  color: var(--paper);
  transition: background-color .25s, box-shadow .25s;
}
.header.is-solid { background: rgba(14, 14, 14, .94); box-shadow: 0 1px 0 var(--line-light); backdrop-filter: blur(8px); }
.header__in { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }

.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: inherit; }
.brand__mark { width: auto; height: 46px; flex: none; }
.brand__name { font-stretch: 80%; font-weight: 500; font-size: 1.2rem; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.brand__name b { font-weight: 800; color: var(--accent); }

.nav { display: flex; align-items: center; gap: clamp(1rem, 2.4vw, 2.2rem); }
.nav a:not(.btn) { text-decoration: none; font-size: .95rem; font-weight: 500; padding: .5rem 0; border-bottom: 2px solid transparent; }
.nav a:not(.btn):hover { border-bottom-color: var(--accent); }
.nav__cta { min-height: 42px; padding: .55rem 1.1rem; font-size: .92rem; }

.nav-toggle { display: none; width: 46px; height: 46px; padding: 0; background: none; border: 1px solid var(--line-light); border-radius: 2px; color: inherit; cursor: pointer; }
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after {
  content: ""; display: block; width: 20px; height: 2px; margin-inline: auto; background: currentColor; transition: transform .2s;
}
.nav-toggle__bars { position: relative; }
.nav-toggle__bars::before { position: absolute; top: -6px; left: 0; }
.nav-toggle__bars::after { position: absolute; top: 6px; left: 0; }

/* Portada */
.hero {
  position: relative; isolation: isolate;
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: flex-end;
  background: var(--ink); color: var(--paper);
  overflow: hidden;
}
.hero__media { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; object-fit: cover; }
.hero__shade {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(to top, rgba(14, 14, 14, .94) 0%, rgba(14, 14, 14, .55) 45%, rgba(14, 14, 14, .32) 75%, rgba(14, 14, 14, .65) 100%),
    linear-gradient(to right, rgba(14, 14, 14, .72), transparent 70%);
}
.hero__in { padding-block: calc(var(--header-h) + 3rem) clamp(4.5rem, 11vh, 7.5rem); }
.hero__title {
  font-size: clamp(2rem, 5.6vw, 4.75rem);
  font-stretch: 78%;
  font-weight: 800;
  line-height: .95;
  letter-spacing: -.02em;
  text-transform: uppercase;
  max-width: 9em;
}
.hero__title span { display: block; color: var(--accent); }
.hero__title, .hero__lead, .hero .eyebrow { text-shadow: 0 2px 18px rgba(14, 14, 14, .55); }
.hero__lead { max-width: 44rem; margin-top: 1.75rem; text-wrap: balance; font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: #d9d6cf; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .85rem; margin-top: 2.25rem; }

.hero__toggle {
  position: absolute; right: clamp(1rem, 4vw, 2.5rem); bottom: 1.75rem;
  font-family: var(--mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase;
  padding: .55rem .8rem; background: rgba(14, 14, 14, .55); color: var(--paper);
  border: 1px solid var(--line-light); border-radius: 2px; cursor: pointer;
}
.hero__scroll { position: absolute; left: 50%; bottom: 1.5rem; width: 24px; height: 40px; margin-left: -12px; border: 1.5px solid rgba(244, 241, 234, .5); border-radius: 12px; }
.hero__scroll span { position: absolute; left: 50%; top: 8px; width: 3px; height: 8px; margin-left: -1.5px; background: var(--accent); border-radius: 2px; animation: scroll-dot 1.8s infinite; }
@keyframes scroll-dot { 0% { transform: translateY(0); opacity: 1; } 70%, 100% { transform: translateY(14px); opacity: 0; } }

/* Secciones */
.section { padding-block: clamp(4rem, 10vw, 8rem); }
.section--paper { background: var(--paper); }
.section--dark { background: var(--ink); color: var(--paper); }
.section--accent { background: var(--accent); }
.section__head { max-width: 46rem; margin-bottom: clamp(2.5rem, 6vw, 4.5rem); }

/* Servicios */
.services { border-top: 1px solid var(--line-dark); }
.service {
  position: relative;
  display: grid; grid-template-columns: 5rem minmax(0, 1fr) minmax(0, 1.25fr); gap: 1.5rem 2.5rem; align-items: start;
  padding: 2rem 1rem 2rem 0;
  border-bottom: 1px solid var(--line-dark);
  transition: padding-left .25s, background-color .25s;
}
.service::before { content: ""; position: absolute; left: 0; top: -1px; bottom: -1px; width: 0; background: var(--accent); transition: width .25s; }
.service:hover { padding-left: 1.5rem; background: var(--paper-2); }
.service:hover::before { width: 6px; }
.service__n { font-family: var(--mono); font-size: .85rem; color: var(--muted-dark); padding-top: .55rem; }
.service h3 { font-size: clamp(1.35rem, 2.6vw, 2rem); font-stretch: 88%; font-weight: 700; letter-spacing: -.01em; }
.service p { color: var(--muted-dark); }
.chips { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .9rem; }
.chips li { font-family: var(--mono); font-size: .74rem; letter-spacing: .04em; text-transform: uppercase; padding: .3rem .6rem; border: 1px solid var(--line-dark); background: #fff; }

/* Bloques de foto + texto (especialidad, quiénes somos) */
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.split--reverse { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
.split__visual { position: relative; aspect-ratio: 1 / 1; background: var(--ink-2); border: 1px solid var(--line-light); overflow: hidden; }
.split__visual--wide { aspect-ratio: 4 / 3; }
.split__visual::after { content: ""; position: absolute; left: 0; bottom: 0; width: 38%; height: 6px; background: var(--accent); }
.split__visual img { display: block; width: 100%; height: 100%; object-fit: cover; }
.split__text > p:not(.eyebrow) { margin-top: 1.25rem; max-width: 36rem; color: #d6d3cc; }
.split__text > h2 + p { margin-top: 1.5rem; }
.facts { margin-top: 2.5rem; border-top: 1px solid var(--line-light); }
.facts li { display: grid; grid-template-columns: 9.5rem 1fr; gap: 1rem; padding: 1.1rem 0; border-bottom: 1px solid var(--line-light); color: var(--muted-light); font-size: .98rem; }
.facts b { color: var(--accent); font-weight: 650; text-transform: uppercase; font-stretch: 85%; letter-spacing: .03em; }

/* Maquinaria */
.section__head--row { max-width: none; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1.5rem 3rem; }
.section__head--row > div { max-width: 46rem; }
.fleet { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.fleet li { background: #fff; border: 1px solid var(--line-dark); border-bottom: 4px solid var(--ink); padding-bottom: 1.25rem; transition: border-color .2s, transform .2s; }
.fleet li:hover { border-bottom-color: var(--accent); transform: translateY(-3px); }
.fleet img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.fleet h3 { margin: 1.1rem 1.25rem 0; font-stretch: 88%; }
.fleet p { margin: .35rem 1.25rem 0; color: var(--muted-dark); font-size: .96rem; }

/* Fotos de obra */
.works { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; margin-top: clamp(2.5rem, 6vw, 4.5rem); }
.work { position: relative; aspect-ratio: 16 / 8; background: var(--ink-2); border: 1px solid var(--line-light); overflow: hidden; }
.work img { display: block; width: 100%; height: 100%; object-fit: cover; }
.work figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 2.5rem 1.25rem 1.1rem; font-weight: 700; font-size: 1.25rem; font-stretch: 88%; background: linear-gradient(to top, rgba(14, 14, 14, .92), transparent); }
.work small { display: block; font-family: var(--mono); font-size: .75rem; font-weight: 400; color: var(--muted-light); margin-top: .2rem; }

/* Presupuesto */
.quote { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.quote__text > p:not(.eyebrow) { margin-top: 1.25rem; max-width: 30rem; font-size: 1.1rem; }
.contact { margin-top: 2.5rem; border-top: 1.5px solid var(--ink); }
.contact div { display: grid; grid-template-columns: 7rem 1fr; gap: 1rem; padding: .9rem 0; border-bottom: 1px solid rgba(14, 14, 14, .3); }
.contact dt { font-family: var(--mono); font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; align-self: center; }
.contact dd { font-weight: 600; display: flex; flex-wrap: wrap; gap: .15rem 1.25rem; }
.contact a { text-decoration: none; border-bottom: 1.5px solid rgba(14, 14, 14, .35); }
.contact a:hover { border-bottom-color: var(--ink); }

.form { display: grid; gap: 1.1rem; padding: clamp(1.25rem, 3vw, 2.25rem); background: var(--paper); border-radius: 2px; box-shadow: 10px 10px 0 var(--ink); }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.form label { display: grid; gap: .4rem; font-size: .85rem; font-weight: 600; }
.form input, .form select, .form textarea {
  width: 100%; min-height: 48px; padding: .7rem .85rem;
  font: inherit; font-size: 1rem; font-weight: 400; color: var(--ink);
  background: #fff; border: 1.5px solid rgba(14, 14, 14, .3); border-radius: 2px;
}
.form textarea { resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(212, 162, 58, .45); }
.form .is-invalid { border-color: #b3261e; }
.form__status { min-height: 1.4em; font-size: .92rem; color: var(--muted-dark); }
.form__status.is-error { color: #b3261e; }

/* Pie */
.footer { background: var(--ink); color: var(--paper); padding-block: 3rem; border-top: 1px solid var(--line-light); }
.footer__logo { width: 120px; height: auto; }
.footer__in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem 2.5rem; }
.footer__nav { display: flex; flex-wrap: wrap; gap: .75rem 1.75rem; }
.footer__nav a { text-decoration: none; font-size: .92rem; color: var(--muted-light); }
.footer__nav a:hover { color: var(--accent); }
.footer__copy { width: 100%; padding-top: 1.5rem; border-top: 1px solid var(--line-light); font-family: var(--mono); font-size: .75rem; color: var(--muted-light); }

/* Aparición al hacer scroll */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s, transform .6s; }
.js .reveal.is-in { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: .5rem clamp(1rem, 4vw, 2.5rem) 1.5rem;
    background: var(--ink); border-bottom: 1px solid var(--line-light);
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav a:not(.btn) { padding: 1rem 0; border-bottom: 1px solid var(--line-light); font-size: 1.05rem; }
  .nav__cta { margin-top: 1.25rem; min-height: 48px; }
  .header:has(.nav.is-open) { background: var(--ink); }

  .service { grid-template-columns: 3rem minmax(0, 1fr); }
  .service > div { grid-column: 2; }
  .split, .quote { grid-template-columns: minmax(0, 1fr); }
  .split--reverse .split__visual { order: -1; }
  .split__visual, .split__visual--wide { aspect-ratio: 16 / 11; }
  .fleet { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .works { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 560px) {
  .form__row { grid-template-columns: minmax(0, 1fr); }
  .contact div { grid-template-columns: minmax(0, 1fr); gap: .3rem; }
  .contact a { overflow-wrap: anywhere; }
  .facts li { grid-template-columns: minmax(0, 1fr); gap: .25rem; }
  .fleet { gap: .75rem; }
  .fleet h3 { margin: .9rem .85rem 0; font-size: 1.05rem; }
  .fleet p { margin: .3rem .85rem 0; font-size: .88rem; }
  .brand__name { font-size: 1.05rem; }
  .hero__actions .btn { width: 100%; }
  .hero__scroll { display: none; }
  .form { box-shadow: 6px 6px 0 var(--ink); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
