/* =========================================================
   MTP División Concretos — "Solidez que se ve"
   ========================================================= */

@font-face { font-family: "Barlow Condensed"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/BarlowCondensed-600.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/BarlowCondensed-700.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 800; font-style: normal; font-display: swap; src: url("../fonts/BarlowCondensed-800.woff2") format("woff2"); }
@font-face { font-family: "Manrope"; font-weight: 400 800; font-style: normal; font-display: swap; src: url("../fonts/Manrope-var.woff2") format("woff2"); }

:root {
  /* Paleta */
  --carbon: #151719;
  --carbon-2: #1d2023;   /* superficie de campos sobre carbón */
  --grafito: #303438;
  --concreto: #c7c8c4;
  --mineral: #f3f2ee;
  --naranja: #d85a25;     /* acentos, botones con texto carbón (4.6:1) */
  --naranja-hi: #e5682f;  /* hover de botón (5.4:1 con carbón) */
  --naranja-ink: #b04317; /* texto naranja sobre mineral (4.7:1) */
  --muted-dark: #a9aba7;  /* texto secundario sobre carbón (7.7:1) */
  --muted-step: #8e918d;  /* capítulos inactivos sobre carbón (5.5:1) */
  --muted-light: #4a4e52; /* texto secundario sobre mineral (7.5:1) */
  --line-dark: #3d4247;
  --error: #f4a27e;

  /* Tipografía */
  --f-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --f-text: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Retícula */
  --m: clamp(20px, 4vw, 56px);
  --gap: clamp(16px, 2vw, 28px);
  --section: clamp(96px, 11vw, 176px);
  --header-h: 68px;

  /* Movimiento */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 8px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--mineral);
  color: var(--carbon);
  font-family: var(--f-text);
  font-size: 1.0625rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
picture { display: contents; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
address { font-style: normal; }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid var(--naranja); outline-offset: 3px; }
::selection { background: var(--naranja); color: var(--carbon); }

.skip {
  position: fixed; left: 12px; top: 12px; z-index: 100;
  background: var(--naranja); color: var(--carbon); font-weight: 700;
  padding: 12px 18px; text-decoration: none;
  transform: translateY(-160%);
}
.skip:focus { transform: none; }

.wrap { width: 100%; max-width: 1600px; margin-inline: auto; padding-inline: var(--m); }

/* ---------- Tipos ---------- */
.h2 {
  font-family: var(--f-display);
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(2.25rem, 5.2vw, 5.25rem);
  line-height: 0.92;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.h3 {
  font-family: var(--f-display);
  font-weight: 700;
  text-transform: uppercase;
  font-size: clamp(1.9rem, 2.8vw, 2.75rem);
  line-height: 1;
  letter-spacing: 0;
}

/* ---------- Botones ---------- */
.btn {
  --arrow-x: 0px;
  display: inline-flex; align-items: center; justify-content: center; gap: 14px;
  min-height: 52px; padding: 0 24px;
  font-family: var(--f-text); font-weight: 700; font-size: 1rem; line-height: 1.2;
  text-decoration: none; text-align: center;
  border: 2px solid transparent; border-radius: 0; cursor: pointer;
  background: none;
  transition: background-color 200ms var(--ease-out), color 200ms var(--ease-out), border-color 200ms var(--ease-out), transform 160ms var(--ease-out);
  touch-action: manipulation;
  user-select: none;
}
.btn:active { transform: scale(0.97); }
.btn__arrow {
  position: relative; display: inline-block; flex: none;
  width: 18px; height: 2px; background: currentColor;
  transform: translateX(var(--arrow-x));
  transition: transform 220ms var(--ease-out);
}
.btn__arrow::after {
  content: ""; position: absolute; right: 0; top: 50%;
  width: 8px; height: 8px;
  border-top: 2px solid currentColor; border-right: 2px solid currentColor;
  transform: translate(0, -50%) rotate(45deg); transform-origin: center;
}
.btn--primary { background: var(--naranja); color: var(--carbon); }
.btn--dark { background: var(--carbon); color: var(--mineral); }
.btn--ghost-light { border-color: rgba(243, 242, 238, 0.72); color: var(--mineral); }
.btn--sm { min-height: 44px; padding: 0 18px; font-size: 0.9375rem; }
.btn--lg { min-height: 58px; padding: 0 28px; font-size: 1.0625rem; }
.btn--block { display: flex; width: 100%; }

@media (hover: hover) and (pointer: fine) {
  .btn:hover { --arrow-x: 5px; }
  .btn--primary:hover { background: var(--naranja-hi); }
  .btn--dark:hover { background: var(--grafito); }
  .btn--ghost-light:hover { background: var(--mineral); color: var(--carbon); border-color: var(--mineral); }
  .link-arrow:hover .btn__arrow { --arrow-x: 5px; }
}

.link-arrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-weight: 700; text-decoration: none;
  padding-block: 10px;
  --arrow-x: 0px;
}
.link-arrow span:not(.btn__arrow) { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Progreso ---------- */
.progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 60; pointer-events: none; }
.progress__bar { display: block; height: 100%; background: var(--naranja); transform: scaleX(0); transform-origin: left; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--header-h);
  color: var(--mineral);
}
.site-header::before {
  content: ""; position: absolute; inset: 0;
  background: var(--carbon);
  opacity: 0;
  transition: opacity 260ms var(--ease-out);
}
.site-header__inner {
  position: relative; height: 100%;
  max-width: 1600px; margin-inline: auto; padding-inline: var(--m);
  display: flex; align-items: center; gap: 28px;
  transform: translateY(12px);
  transition: transform 320ms var(--ease-out);
}
.site-header.is-compact::before, html:not(.js) .site-header::before { opacity: 1; }
.site-header.is-compact .site-header__inner { transform: none; }
.brand { display: block; flex: none; transform-origin: left center; transition: transform 320ms var(--ease-out); }
.brand img { width: 108px; height: auto; }
.site-header.is-compact .brand { transform: scale(0.86); }

.nav { margin-left: auto; }
.nav__list { display: flex; gap: 4px; }
.nav__list a {
  display: block; padding: 10px 12px;
  font-size: 0.9375rem; font-weight: 600; text-decoration: none;
  position: relative;
}
.nav__list a::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 4px; height: 2px;
  background: var(--naranja); transform: scaleX(0); transform-origin: left;
  transition: transform 240ms var(--ease-out);
}
.nav__list a[aria-current="true"]::after { transform: scaleX(1); }
@media (hover: hover) and (pointer: fine) { .nav__list a:hover::after { transform: scaleX(1); } }
.site-header__tel { font-weight: 700; font-size: 0.9375rem; text-decoration: none; white-space: nowrap; }
.site-header__cta { white-space: nowrap; }

.menu-toggle {
  display: none; margin-left: auto;
  align-items: center; gap: 12px;
  min-height: 48px; padding: 0 4px 0 14px;
  background: none; border: 0; cursor: pointer; color: var(--mineral);
  font-weight: 700;
}
.menu-toggle__icon { display: grid; gap: 6px; width: 26px; }
.menu-toggle__icon span { height: 2px; background: currentColor; }

@media (max-width: 1279px) { .site-header__tel { display: none; } .nav__list a { padding-inline: 9px; } .nav__list a::after { left: 9px; right: 9px; } }
@media (max-width: 1079px) {
  .nav, .site-header__cta { display: none; }
  .menu-toggle { display: inline-flex; }
}

/* Menú móvil */
.mobile-menu {
  position: fixed; inset: 0; z-index: 70;
  background: var(--carbon); color: var(--mineral);
  display: flex; flex-direction: column;
  padding: 0 var(--m) calc(24px + env(safe-area-inset-bottom));
  overflow-y: auto; overscroll-behavior: contain;
  opacity: 0; transform: translateY(-12px);
  transition: opacity 220ms var(--ease-out), transform 220ms var(--ease-out);
}
.mobile-menu.is-open { opacity: 1; transform: none; }
.mobile-menu__top { display: flex; align-items: center; justify-content: space-between; min-height: var(--header-h); padding-top: env(safe-area-inset-top); }
.mobile-menu__title { font-family: var(--f-display); font-weight: 700; font-size: 1.25rem; text-transform: uppercase; color: var(--muted-dark); }
.mobile-menu__close {
  display: inline-flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 4px 0 14px;
  background: none; border: 0; color: var(--mineral); font-weight: 700; cursor: pointer;
}
.mobile-menu__x { position: relative; width: 22px; height: 22px; }
.mobile-menu__x::before, .mobile-menu__x::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 2px; background: currentColor; transform: rotate(45deg); }
.mobile-menu__x::after { transform: rotate(-45deg); }
.mobile-menu__list { padding-block: 24px 32px; }
.mobile-menu__list a {
  display: block; padding: 8px 0;
  font-family: var(--f-display); font-weight: 800; text-transform: uppercase;
  font-size: clamp(2.5rem, 11vw, 3.5rem); line-height: 1.05; text-decoration: none;
}
.mobile-menu__foot { margin-top: auto; display: grid; gap: 12px; }

/* ---------- Hero ---------- */
.hero {
  position: relative; isolation: isolate;
  min-height: max(680px, 100svh);
  display: grid; grid-template-rows: 1fr auto;
  color: var(--mineral);
  background: var(--carbon);
  overflow: hidden;
}
.hero__media { position: absolute; inset: 0; z-index: -2; will-change: transform; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: 72% 62%; }
.hero__scrim {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(21, 23, 25, 0.9) 0%, rgba(21, 23, 25, 0.72) 38%, rgba(21, 23, 25, 0.2) 70%, rgba(21, 23, 25, 0.05) 100%),
    linear-gradient(0deg, rgba(21, 23, 25, 0.75) 0%, rgba(21, 23, 25, 0) 32%);
}
.hero__plan { position: absolute; inset: calc(var(--header-h) + 28px) var(--m) 150px; pointer-events: none; }
.tick { position: absolute; width: 18px; height: 18px; border-color: rgba(243, 242, 238, 0.55); border-style: solid; border-width: 0; }
.tick--tl { top: 0; left: 0; border-top-width: 1px; border-left-width: 1px; }
.tick--tr { top: 0; right: 0; border-top-width: 1px; border-right-width: 1px; }
.tick--bl { bottom: 0; left: 0; border-bottom-width: 1px; border-left-width: 1px; }
.tick--br { bottom: 0; right: 0; border-bottom-width: 1px; border-right-width: 1px; }

.hero__body {
  align-self: end;
  padding-top: calc(var(--header-h) + 64px);
  padding-bottom: clamp(32px, 5vh, 64px);
}
.hero__title {
  font-family: var(--f-display); font-weight: 800; text-transform: uppercase;
  font-size: clamp(3.4rem, min(7vw, 11.5vh), 8rem);
  line-height: 0.88; letter-spacing: -0.01em;
}
.line { display: block; overflow: hidden; padding-bottom: 0.04em; margin-bottom: -0.04em; }
.line > span { display: block; white-space: nowrap; }

.hero__dim {
  display: flex; align-items: center; gap: 16px;
  margin-top: clamp(20px, 2.6vw, 32px);
  max-width: 640px;
}
.hero__dim-rule {
  position: relative; flex: 0 0 clamp(80px, 12vw, 180px); height: 1px; background: rgba(243, 242, 238, 0.7);
  transform-origin: left;
}
.hero__dim-rule::before, .hero__dim-rule::after { content: ""; position: absolute; top: -6px; width: 1px; height: 13px; background: rgba(243, 242, 238, 0.7); }
.hero__dim-rule::before { left: 0; }
.hero__dim-rule::after { right: 0; }
.hero__dim-label { font-size: 0.875rem; font-weight: 600; color: var(--concreto); }

.hero__lead { margin-top: 20px; max-width: 34ch; font-size: clamp(1.125rem, 1.4vw, 1.3125rem); line-height: 1.5; font-weight: 500; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.hero__strip {
  position: relative;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--carbon);
  max-width: 1600px; width: 100%; margin-inline: auto;
}
.hero__strip li { padding: 22px var(--m) 24px; display: grid; gap: 2px; }
.hero__strip li + li { box-shadow: inset 1px 0 0 var(--line-dark); }
.hero__strip strong { font-family: var(--f-display); font-weight: 700; text-transform: uppercase; font-size: clamp(1.4rem, 1.9vw, 1.9rem); line-height: 1.05; }
.hero__strip span { font-size: 0.875rem; color: var(--muted-dark); }
.hero__strip-call { background: var(--naranja); color: var(--carbon); }
.hero__strip-call a { display: grid; gap: 2px; text-decoration: none; }
.hero__strip-call span { color: var(--carbon); font-weight: 600; }
.hero__strip li.hero__strip-call { box-shadow: none; }
@media (hover: hover) and (pointer: fine) { .hero__strip-call { transition: background-color 200ms var(--ease-out); } .hero__strip-call:hover { background: var(--naranja-hi); } }

/* ---------- Secciones ---------- */
section { position: relative; }
.section-head {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); row-gap: 24px;
  align-items: end;
  margin-bottom: clamp(48px, 6vw, 96px);
}
.section-head .h2 { grid-column: 1 / span 8; }
.section-head__aside { grid-column: 9 / -1; font-size: 1.125rem; line-height: 1.55; max-width: 38ch; }

/* ---------- Soluciones ---------- */
.solutions { background: var(--mineral); padding-block: var(--section); }
.sol { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); }
.sol__media { position: relative; }
.sol__media img { width: 100%; height: 100%; object-fit: cover; }
.sol__media figcaption { margin-top: 12px; font-size: 0.875rem; color: var(--muted-light); }
.sol--a .sol__media { grid-column: 1 / span 6; }
.sol--a .sol__media img { aspect-ratio: 4 / 5; }
.sol--a .sol__text { grid-column: 8 / -1; align-self: end; padding-bottom: 40px; }
.sol--b { margin-top: clamp(80px, 10vw, 160px); align-items: start; }
.sol--b .sol__text { grid-column: 1 / span 5; padding-top: clamp(0px, 4vw, 64px); }
.sol--b .sol__media { grid-column: 7 / -1; }
.sol--b .sol__media img { aspect-ratio: 5 / 4; }
.sol__media-clip { overflow: hidden; }
.sol__num {
  display: block;
  font-family: var(--f-display); font-weight: 800; font-size: clamp(4.5rem, 8vw, 8rem); line-height: 0.8;
  color: var(--naranja); letter-spacing: -0.02em;
  margin-bottom: 20px;
}
.sol__text .h3 { margin-bottom: 18px; }
.sol__text p { max-width: 46ch; }
.sol__text p + p { margin-top: 14px; }
.sol__text .btn { margin-top: 32px; }
.checklist { margin-top: 28px; border-top: 3px solid var(--carbon); max-width: 520px; }
.checklist li { display: grid; grid-template-columns: 1fr auto; gap: 16px; padding: 14px 0; border-bottom: 1px solid rgba(21, 23, 25, 0.18); }
.checklist span { font-weight: 700; }
.checklist em { font-style: normal; color: var(--muted-light); font-size: 0.9375rem; text-align: right; }

/* ---------- Secuencia ---------- */
.base { background: var(--carbon); color: var(--mineral); padding-block: var(--section); }
.base .section-head__aside { color: var(--muted-dark); }
.base__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); }
.base__stage { grid-column: 1 / span 6; position: relative; }
.base__frame {
  position: sticky; top: calc(var(--header-h) + 32px);
  height: min(calc(100svh - var(--header-h) - 64px), 760px);
  overflow: hidden;
  background: var(--grafito);
}
.base__img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  clip-path: inset(100% 0 0 0);
}
.base__img.is-active { clip-path: inset(0 0 0 0); }
.layer { position: absolute; inset: 7%; pointer-events: none; }
.layer--1 { border: 1px solid rgba(243, 242, 238, 0.7); }
.layer--2 { border: 1px solid var(--naranja); }
.layer--3 { inset: auto auto 7% 7%; width: 56px; height: 56px; background: var(--naranja); }
.base__readout {
  position: absolute; right: 7%; bottom: 7%;
  background: var(--carbon); color: var(--mineral);
  padding: 8px 14px;
  font-family: var(--f-display); font-weight: 600; font-size: 1.25rem; letter-spacing: 0.02em;
}
.base__readout b { color: var(--naranja); font-weight: 700; }
.base__rail { grid-column: 7; justify-self: center; width: 2px; background: var(--line-dark); position: relative; }
.base__rail-fill { position: absolute; inset: 0; background: var(--naranja); transform-origin: top; transform: scaleY(0.33); }
.base__steps { grid-column: 8 / -1; }
.step {
  min-height: min(62svh, 560px);
  display: flex; flex-direction: column; justify-content: center;
  padding-block: 32px;
}
.step__media { display: none; }
.step__num {
  font-family: var(--f-display); font-weight: 800; font-size: clamp(3.5rem, 5vw, 5rem); line-height: 0.85;
  color: var(--muted-step);
  transition: color 300ms var(--ease-out);
  margin-bottom: 14px;
}
.step .h3 { color: var(--muted-step); transition: color 300ms var(--ease-out); }
.step__lead { margin-top: 14px; font-size: 1.25rem; line-height: 1.45; font-weight: 600; color: var(--muted-step); transition: color 300ms var(--ease-out); max-width: 30ch; }
.step p:not(.step__lead) { margin-top: 12px; color: var(--muted-step); max-width: 44ch; transition: color 300ms var(--ease-out); }
.step .btn { margin-top: 28px; align-self: flex-start; }
.step.is-active .step__num { color: var(--naranja); }
.step.is-active .h3, .step.is-active .step__lead { color: var(--mineral); }
.step.is-active p:not(.step__lead) { color: var(--muted-dark); }

/* ---------- Nosotros ---------- */
.about { background: var(--concreto); padding-block: var(--section); }
.about__top { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); align-items: end; }
.about__year {
  grid-column: 1 / span 7;
  display: flex;
  font-family: var(--f-display); font-weight: 800;
  font-size: clamp(8rem, 23vw, 23rem); line-height: 0.78; letter-spacing: -0.035em;
  color: var(--carbon);
  margin-left: -0.04em;
  padding-bottom: 0.02em;
}
.about__year .d { display: block; overflow: hidden; padding-top: 0.06em; }
.about__year .d > span { display: block; }
.about__copy { grid-column: 8 / -1; padding-bottom: 0.6vw; }
.about__copy .h2 { font-size: clamp(2.4rem, 3.6vw, 3.75rem); margin-bottom: 24px; }
.about__copy > p { max-width: 46ch; }
.about__quote { margin-top: 28px; border-left: 6px solid var(--carbon); padding-left: 18px; }
.about__quote p { font-family: var(--f-display); font-weight: 800; text-transform: uppercase; font-size: clamp(1.75rem, 2.4vw, 2.25rem); line-height: 1; }
.about__quote footer { margin-top: 6px; font-size: 0.875rem; color: #2b2f33; }
.about__pano { margin-top: clamp(48px, 6vw, 88px); }
.about__pano img { width: 100%; aspect-ratio: 1280 / 343; object-fit: cover; }
.about__pano figcaption { margin-top: 12px; font-size: 0.875rem; color: #2b2f33; }
.about__facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); margin-top: clamp(40px, 5vw, 72px); }
.about__facts li { border-top: 6px solid var(--carbon); padding-top: 20px; }
.about__facts h3 { font-family: var(--f-display); font-weight: 700; text-transform: uppercase; font-size: clamp(1.6rem, 2vw, 2rem); line-height: 1.02; margin-bottom: 10px; }
.about__facts p { max-width: 36ch; }

/* ---------- Galería ---------- */
.gallery { background: var(--carbon); color: var(--mineral); padding-block: var(--section); }
.gallery .section-head__aside { color: var(--muted-dark); }
.gallery__grid {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-rows: clamp(84px, 8.6vw, 140px);
  gap: 14px;
}
.g { min-width: 0; }
.g--a { grid-column: 1 / 9; grid-row: 1 / 4; }
.g--b { grid-column: 9 / 13; grid-row: 1 / 5; }
.g--c { grid-column: 1 / 5; grid-row: 4 / 8; }
.g--d { grid-column: 5 / 9; grid-row: 4 / 7; }
.g--e { grid-column: 9 / 13; grid-row: 5 / 8; }
.g--f { grid-column: 5 / 9; grid-row: 7 / 8; display: flex; flex-wrap: wrap; align-items: center; column-gap: 28px; row-gap: 0; padding-top: 8px; }
.g--f p { flex-basis: 100%; color: var(--muted-dark); font-size: 1rem; }
.g__btn {
  display: block; width: 100%; height: 100%; padding: 0; border: 0; background: var(--grafito);
  overflow: hidden; cursor: zoom-in; position: relative;
}
.g__btn img { width: 100%; height: 100%; object-fit: cover; transition: transform 700ms var(--ease-out); }
.g--a .g__btn img { object-position: 50% 60%; }
@media (hover: hover) and (pointer: fine) { .g__btn:hover img { transform: scale(1.045); } }
.g__btn:focus-visible { outline-offset: 4px; }

/* Visor */
.lightbox {
  width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0;
  background: rgba(21, 23, 25, 0.97); color: var(--mineral);
}
.lightbox::backdrop { background: rgba(21, 23, 25, 0.6); }
.lightbox[open] { animation: lb-in 220ms var(--ease-out); }
@keyframes lb-in { from { opacity: 0; } to { opacity: 1; } }
.lightbox__inner { height: 100%; display: grid; grid-template-rows: 1fr auto; gap: 16px; padding: max(20px, env(safe-area-inset-top)) var(--m) max(20px, env(safe-area-inset-bottom)); }
.lightbox__fig { min-height: 0; display: grid; grid-template-rows: 1fr auto; gap: 12px; }
.lightbox__img { width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.lightbox__img.is-swapping { animation: lb-img 260ms var(--ease-out); }
@keyframes lb-img { from { opacity: 0.2; transform: scale(0.985); } to { opacity: 1; transform: none; } }
.lightbox__cap { display: flex; gap: 16px; font-size: 1rem; }
.lightbox__cap span:first-child { font-family: var(--f-display); font-weight: 700; color: var(--naranja); font-size: 1.125rem; }
.lightbox__controls { display: flex; gap: 10px; flex-wrap: wrap; }
.lb-btn {
  min-height: 48px; padding: 0 20px; border: 2px solid rgba(243, 242, 238, 0.6); background: none; color: var(--mineral);
  font-weight: 700; cursor: pointer; transition: background-color 200ms var(--ease-out), color 200ms var(--ease-out), transform 160ms var(--ease-out);
}
.lb-btn:active { transform: scale(0.97); }
.lb-btn--close { margin-left: auto; background: var(--naranja); color: var(--carbon); border-color: var(--naranja); }
@media (hover: hover) and (pointer: fine) { .lb-btn:hover { background: var(--mineral); color: var(--carbon); } .lb-btn--close:hover { background: var(--naranja-hi); border-color: var(--naranja-hi); } }

/* ---------- Ubicación ---------- */
.location { background: var(--mineral); padding-block: var(--section); }
.location .section-head .h2 { grid-column: 1 / span 9; }
.location .section-head__aside { grid-column: 10 / -1; }
.location__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); align-items: stretch; }
.map { grid-column: 1 / span 7; position: relative; min-height: 560px; background: var(--grafito); overflow: hidden; }
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map__placeholder { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 16px; padding: 24px; text-align: center; color: var(--mineral); }
.map__placeholder .btn--dark { background: var(--mineral); color: var(--carbon); }
.card { grid-column: 8 / -1; background: var(--carbon); color: var(--mineral); padding: clamp(28px, 3vw, 44px); display: flex; flex-direction: column; }
.card__km { font-family: var(--f-display); font-weight: 800; font-size: clamp(5rem, 7vw, 7.5rem); line-height: 0.8; color: var(--naranja); letter-spacing: -0.02em; }
.card__km span { font-size: 0.36em; margin-right: 0.12em; color: var(--mineral); letter-spacing: 0; }
.card__title { margin-top: 18px; font-family: var(--f-display); font-weight: 700; text-transform: uppercase; font-size: 1.75rem; line-height: 1.05; }
.card__addr { margin-top: 8px; color: var(--muted-dark); }
.status { margin-top: 20px; display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 0.9375rem; }
.status__dot { width: 10px; height: 10px; background: var(--concreto); flex: none; }
.status.is-open .status__dot { background: var(--naranja); }
.hours { margin-top: 20px; border-top: 1px solid var(--line-dark); }
.hours div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line-dark); }
.hours dt { color: var(--muted-dark); }
.hours dd { font-weight: 700; font-variant-numeric: tabular-nums; }
.phones { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 4px 22px; }
.phones a { display: inline-block; padding-block: 6px; font-family: var(--f-display); font-weight: 700; font-size: 1.5rem; text-decoration: none; font-variant-numeric: tabular-nums; }
@media (hover: hover) and (pointer: fine) { .phones a:hover { color: var(--naranja); } }
.card__actions { margin-top: auto; padding-top: 28px; display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Cotización ---------- */
.quote { background: var(--carbon); color: var(--mineral); padding-block: var(--section); }
.quote__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); row-gap: 56px; align-items: start; }
.quote__title { grid-column: 1 / -1; }
.quote__intro { grid-column: 1 / span 5; }
.quote__intro > p { color: var(--muted-dark); max-width: 42ch; }
.ticket { margin-top: 36px; background: var(--mineral); color: var(--carbon); padding: 24px 24px 20px; max-width: 520px; }
.ticket__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; padding-bottom: 14px; border-bottom: 3px solid var(--carbon); }
.ticket__brand { font-family: var(--f-display); font-weight: 800; text-transform: uppercase; font-size: 1.375rem; line-height: 1; }
.ticket__kind { font-size: 0.875rem; font-weight: 700; color: var(--naranja-ink); }
.ticket__rows div { display: grid; grid-template-columns: 116px 1fr; gap: 12px; padding: 9px 0; border-bottom: 1px dashed rgba(21, 23, 25, 0.35); }
.ticket__rows dt { font-size: 0.875rem; color: var(--muted-light); padding-top: 2px; }
.ticket__rows dd { font-weight: 700; font-size: 0.9375rem; overflow-wrap: anywhere; }
.ticket__rows dd.is-filled { animation: tick-in 260ms var(--ease-out); }
@keyframes tick-in { from { opacity: 0.35; } to { opacity: 1; } }
.ticket__foot { margin-top: 14px; font-size: 0.875rem; color: var(--muted-light); }
.quote__call { margin-top: 36px; }
.quote__call > p { font-weight: 700; }
.quote__call .phones { margin-top: 6px; }
.phones--big a { font-size: 1.875rem; }

.form { grid-column: 7 / -1; display: grid; gap: 22px; }
.field { display: grid; gap: 8px; border: 0; margin: 0; padding: 0; min-width: 0; }
.field label, .field legend { font-weight: 700; font-size: 0.9375rem; padding: 0; }
.req { font-weight: 500; color: var(--muted-dark); }
.field input[type="text"], .field input[type="tel"], .field input[type="number"], .field input[type="date"], .field textarea {
  width: 100%; min-height: 54px; padding: 12px 16px;
  background: var(--carbon-2); color: var(--mineral);
  border: 1px solid #4f555b; border-radius: 0;
  font-size: 1rem;
  transition: border-color 160ms var(--ease-out), background-color 160ms var(--ease-out);
  color-scheme: dark;
}
.field textarea { resize: vertical; min-height: 120px; line-height: 1.5; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--naranja); box-shadow: inset 0 0 0 1px var(--naranja); }
.field input:focus-visible, .field textarea:focus-visible { outline: none; }
.field input:disabled { opacity: 0.55; }
.field [aria-invalid="true"] { border-color: var(--error); }
.field__hint { font-size: 0.875rem; color: var(--muted-dark); }
.field__error { font-size: 0.9375rem; font-weight: 700; color: var(--error); }
.field legend { margin-bottom: 8px; }
.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.choice__opt {
  display: flex; align-items: center; gap: 12px;
  min-height: 64px; padding: 14px 16px;
  border: 1px solid #4f555b; background: var(--carbon-2);
  cursor: pointer; font-weight: 700 !important;
  transition: border-color 160ms var(--ease-out), background-color 160ms var(--ease-out);
}
.choice__opt input { width: 20px; height: 20px; accent-color: var(--naranja); flex: none; margin: 0; }
.choice__opt:has(input:checked) { border-color: var(--naranja); background: #24282b; box-shadow: inset 0 0 0 1px var(--naranja); }
.choice__opt:has(input:focus-visible) { outline: 3px solid var(--naranja); outline-offset: 3px; }
.choice__opt input:focus-visible { outline: none; }
.concrete { border-left: 4px solid var(--naranja); padding: 4px 0 4px 20px; display: grid; gap: 18px; }
.concrete__note { font-size: 0.9375rem; color: var(--muted-dark); }
.concrete__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.check { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 600 !important; cursor: pointer; justify-self: start; }
.check input { width: 20px; height: 20px; accent-color: var(--naranja); margin: 0; }
.form > .btn { margin-top: 6px; }
.result { background: var(--carbon-2); border-top: 4px solid var(--naranja); padding: 24px; display: grid; gap: 12px; }
.result:focus { outline: none; }
.result:focus-visible { outline: none; }
.result__title { font-family: var(--f-display); font-weight: 800; text-transform: uppercase; font-size: 1.875rem; line-height: 1; }
.result p { color: var(--muted-dark); }
.result__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.result__status { font-weight: 700; color: var(--mineral) !important; min-height: 1.6em; }

/* ---------- Footer ---------- */
.footer { background: var(--grafito); color: var(--mineral); padding-block: clamp(64px, 8vw, 112px) 28px; }
.footer__cols { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 40px var(--gap); }
.footer__brand img { width: 140px; }
.footer__brand p { margin-top: 18px; max-width: 32ch; color: var(--concreto); }
.footer__h { font-family: var(--f-display); font-weight: 700; text-transform: uppercase; font-size: 1.25rem; color: var(--concreto); margin-bottom: 10px; }
.footer__list { font-size: 0.9375rem; line-height: 1.75; }
.footer__list + .footer__list { margin-top: 12px; }
.footer__list a { text-decoration: none; display: inline-block; padding-block: 3px; }
@media (hover: hover) and (pointer: fine) { .footer__list a:hover { text-decoration: underline; text-underline-offset: 4px; } }
.footer__name {
  margin-top: clamp(56px, 8vw, 120px);
  font-family: var(--f-display); font-weight: 800; text-transform: uppercase;
  font-size: 8.15vw; line-height: 0.82; letter-spacing: -0.015em; white-space: nowrap;
  color: var(--concreto);
}
@media (min-width: 1600px) { .footer__name { font-size: 8.15rem; } }
.footer__legal { margin-top: 28px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 32px; font-size: 0.875rem; color: var(--concreto); }

/* ---------- Barra móvil ---------- */
.mobile-bar { display: none; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1079px) {
  .footer__cols { grid-template-columns: 1fr 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 899px) {
  :root { --header-h: 64px; }
  body { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }

  .section-head .h2, .location .section-head .h2 { grid-column: 1 / -1; }
  .section-head__aside, .location .section-head__aside { grid-column: 1 / -1; }

  .hero__strip { grid-template-columns: 1fr 1fr; }
  .hero__strip li { padding: 16px var(--m) 18px; }
  .hero__strip li:nth-child(3) { box-shadow: inset 0 1px 0 var(--line-dark); }
  .hero__strip li:nth-child(2) { box-shadow: inset 1px 0 0 var(--line-dark); }
  .hero__plan { display: none; }

  .sol--a .sol__media, .sol--a .sol__text, .sol--b .sol__media, .sol--b .sol__text { grid-column: 1 / -1; }
  .sol--a .sol__text { padding-bottom: 0; margin-top: 28px; }
  .sol--b { margin-top: 72px; }
  .sol--b .sol__media { order: -1; margin-bottom: 28px; }
  .sol--b .sol__text { padding-top: 0; }
  .sol__num { font-size: 4rem; margin-bottom: 12px; }

  .base__stage, .base__rail { display: none; }
  .base__steps { grid-column: 1 / -1; display: grid; gap: 48px; }
  .step { min-height: 0; padding: 0; display: block; }
  .step__media { display: block; margin-bottom: 20px; }
  .step__media img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
  .step .btn { display: inline-flex; }
  .step__num, .step .h3, .step__lead { color: var(--mineral); }
  .step__num { color: var(--naranja); font-size: 3.25rem; }
  .step p:not(.step__lead) { color: var(--muted-dark); }

  .about__year, .about__copy { grid-column: 1 / -1; }
  .about__year { font-size: 37vw; margin-bottom: 28px; }
  .about__pano img { aspect-ratio: 16 / 9; object-position: 30% 50%; }
  .about__facts { grid-template-columns: 1fr; gap: 28px; }

  .gallery__grid { grid-template-columns: 1fr 1fr; grid-auto-rows: auto; gap: 10px; }
  .g--a, .g--b, .g--c, .g--d, .g--e, .g--f { grid-column: auto; grid-row: auto; }
  .g--a { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
  .g--b, .g--c, .g--d, .g--e { aspect-ratio: 3 / 4; }
  .g--f { grid-column: 1 / -1; padding-top: 12px; }
  .g--f p { flex-basis: 100%; }

  .map, .card { grid-column: 1 / -1; }
  .map { min-height: 340px; }

  .quote__intro, .form { grid-column: 1 / -1; }
  .quote__grid { row-gap: 32px; }
  /* En móvil el ticket va después del formulario, junto al resultado */
  .quote__intro { display: contents; }
  .quote__intro > p { grid-column: 1 / -1; order: 1; }
  .form { order: 2; }
  .ticket { grid-column: 1 / -1; order: 3; margin-top: 8px; }
  .quote__call { grid-column: 1 / -1; order: 4; margin-top: 0; }

  .footer__cols { grid-template-columns: 1fr 1fr; gap: 32px 20px; }
  .footer__name { white-space: normal; font-size: 15vw; line-height: 0.86; }

  .mobile-bar {
    display: grid; grid-template-columns: 1.4fr 1fr; gap: 8px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    padding: 8px var(--m) calc(8px + env(safe-area-inset-bottom));
    background: var(--carbon);
    transition: transform 280ms var(--ease-out);
  }
  .mobile-bar.is-hidden, .mobile-bar.is-hero { transform: translateY(110%); }
  .mobile-bar__btn {
    display: flex; align-items: center; justify-content: center; min-height: 52px;
    font-weight: 700; text-decoration: none; color: var(--mineral);
    border: 2px solid rgba(243, 242, 238, 0.72);
    touch-action: manipulation;
    transition: transform 160ms var(--ease-out);
  }
  .mobile-bar__btn:active { transform: scale(0.97); }
  .mobile-bar__btn--primary { background: var(--naranja); color: var(--carbon); border-color: var(--naranja); }
}

@media (max-width: 699px) {
  .hero { min-height: max(620px, 100svh); }
  .hero__media img { object-position: 60% 50%; }
  .hero__scrim {
    background:
      linear-gradient(0deg, rgba(21, 23, 25, 0.94) 0%, rgba(21, 23, 25, 0.72) 48%, rgba(21, 23, 25, 0.35) 75%, rgba(21, 23, 25, 0.5) 100%);
  }
  .hero__title { font-size: clamp(2.6rem, 12.4vw, 4.25rem); }
  .hero__body { padding-top: calc(var(--header-h) + 96px); padding-bottom: 28px; }
  .hero__lead { margin-top: 16px; font-size: 1.0625rem; }
  .hero__actions { margin-top: 22px; }
  .hero__actions .btn--lg { min-height: 54px; }
  .hero__dim-rule { flex-basis: 56px; }
  .hero__actions .btn { flex: 1 1 100%; }
  .hero__strip strong { font-size: 1.3rem; }
  .hero__strip span { font-size: 0.875rem; }

  .checklist li { grid-template-columns: 1fr; gap: 2px; }
  .checklist em { text-align: left; }

  .choice, .concrete__grid { grid-template-columns: 1fr; }
  .ticket__rows div { grid-template-columns: 100px 1fr; }
  .phones--big a { font-size: 1.625rem; }
  .card__actions .btn, .result__actions .btn { flex: 1 1 100%; }
  .footer__cols { grid-template-columns: 1fr; }
}

/* =========================================================
   Estados iniciales de animación (solo con .anim: JS activo y
   movimiento permitido). Sin JS, todo es visible.
   ========================================================= */
.anim .hero__media img { opacity: 0; transform: scale(1.12); }
.anim .hero__title .line > span { transform: translateY(106%); }
.anim .hero__dim-rule { transform: scaleX(0); }
.anim .hero__dim-label, .anim [data-hero-fade] { opacity: 0; transform: translateY(18px); }
.anim .hero__strip li { opacity: 0; transform: translateY(28px); }
.anim .site-header__inner > * { opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 1ms !important; animation-duration: 1ms !important; }
  .base__img { transition: none; }
}
