/* ==========================================================================
   Centro Logístico León — sistema de diseño
   Paleta: hormigón claro + grafito, con el rojo de la banda del edificio.
   ========================================================================== */

:root {
  --paper: #f2f3f1;
  --paper-2: #e8eae6;
  --ink: #15191c;
  --steel: #56626b;
  --line: #d6d9d4;
  --graphite: #111416;
  --graphite-2: #1b2024;
  --on-dark: #eef0ee;
  --on-dark-muted: #9aa3a9;
  --red: #b81f2d;
  --red-dark: #931824;

  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --body: "Public Sans", "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", monospace;

  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --section: clamp(72px, 11vw, 140px);
  --radius: 4px;
  --header-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--header-h); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--ink); color: #fff; padding: 8px 14px; }
.skip:focus { left: 8px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- Tipografía ---------- */
h1, h2, h3 { font-family: var(--display); margin: 0; text-wrap: balance; }
h2 { font-weight: 800; font-stretch: 88%; font-size: clamp(2rem, 4.6vw, 3.4rem); line-height: 1; letter-spacing: -.02em; }
h3 { font-weight: 700; font-size: clamp(1.25rem, 2vw, 1.5rem); line-height: 1.15; letter-spacing: -.01em; }
p { margin: 0; max-width: 64ch; }
.eyebrow {
  font-family: var(--mono); font-size: .76rem; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase; color: var(--red);
  display: inline-flex; gap: .6em; align-items: center;
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: currentColor; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: var(--steel); }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .55em;
  font-family: var(--display); font-weight: 700; font-size: .95rem; letter-spacing: .01em;
  padding: .9em 1.4em; border-radius: var(--radius); text-decoration: none;
  border: 2px solid transparent; transition: background .2s, color .2s, border-color .2s;
  cursor: pointer;
}
.btn--red { background: var(--red); color: #fff; }
.btn--red:hover { background: var(--red-dark); }
.btn--ghost { border-color: currentColor; color: inherit; background: transparent; }
.btn--ghost:hover { background: rgba(255,255,255,.1); }
.btn svg { width: 18px; height: 18px; flex: none; }

/* ---------- Cabecera ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--header-h);
  color: #fff; transition: background .3s, color .3s, box-shadow .3s;
}
.site-header.is-solid { background: rgba(242,243,241,.96); color: var(--ink); box-shadow: 0 1px 0 var(--line); backdrop-filter: blur(8px); }
.site-header .wrap { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); font-weight: 800; letter-spacing: -.01em; line-height: 1.05; }
.brand__mark { width: 47px; height: 30px; flex: none; }
.brand small { display: block; font-family: var(--mono); font-weight: 400; font-size: .64rem; letter-spacing: .12em; text-transform: uppercase; opacity: .75; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { text-decoration: none; font-size: .9rem; font-weight: 500; padding: .5em .75em; border-radius: var(--radius); white-space: nowrap; }
.nav a:hover, .nav a[aria-current="page"] { background: rgba(127,127,127,.14); }
.nav .btn { margin-left: 10px; padding: .65em 1.1em; }
.nav-toggle { display: none; background: none; border: 0; color: inherit; padding: 8px; cursor: pointer; }
.nav-toggle svg { width: 26px; height: 26px; }

@media (max-width: 1120px) {
  .nav-toggle { display: block; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column; align-items: stretch;
    background: var(--paper); color: var(--ink); padding: 12px var(--gutter) 24px; gap: 2px;
    box-shadow: 0 12px 24px rgba(0,0,0,.12); display: none;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: .85em .5em; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav .btn { margin: 14px 0 0; justify-content: center; border-bottom: 0; border-radius: var(--radius); }
}

/* ---------- Hero con vídeo que gira con el scroll ---------- */
.hero { position: relative; height: 260vh; background: var(--graphite); color: #fff; }
.hero__stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.hero__media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero__shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(10,12,14,.62) 0%, rgba(10,12,14,.05) 26%, rgba(10,12,14,0) 50%, rgba(10,12,14,.78) 100%),
    linear-gradient(90deg, rgba(10,12,14,.55) 0%, rgba(10,12,14,0) 55%);
}
.hero__copy { position: absolute; left: 0; right: 0; bottom: clamp(120px, 20vh, 190px); will-change: opacity, transform; }
.hero__copy .eyebrow { color: #fff; }
.hero__copy .eyebrow::before { background: var(--red); }
.hero h1 {
  font-weight: 800; font-stretch: 85%;
  /* Limitado también por la altura: en pantallas anchas pero bajas el titular no puede subir hasta el menú */
  font-size: clamp(2.4rem, min(7.4vw, 8vh), 6.2rem); line-height: .92; letter-spacing: -.03em;
  margin-top: .3em; max-width: 16ch;
}
.hero__sub { margin-top: 1.1rem; font-size: clamp(1rem, 1.5vw, 1.2rem); color: rgba(255,255,255,.86); max-width: 46ch; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.8rem; }
@media (min-width: 721px) and (max-height: 620px) {
  .hero__copy { bottom: 120px; }
  .hero__sub { margin-top: .6rem; font-size: .95rem; }
  .hero__ctas { margin-top: 1rem; }
}

.hero__caption {
  position: absolute; left: 0; right: 0; bottom: clamp(120px, 20vh, 190px);
  opacity: 0; transform: translateY(20px); pointer-events: none;
}
.hero__caption p { font-family: var(--display); font-weight: 800; font-stretch: 85%; font-size: clamp(2rem, 5.4vw, 4.4rem); line-height: .95; letter-spacing: -.025em; max-width: 14ch; }
.hero__caption span { display: block; margin-top: .8rem; font-family: var(--mono); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.75); }

.hero__figures {
  position: absolute; left: 0; right: 0; bottom: 0;
  border-top: 1px solid rgba(255,255,255,.18); background: rgba(10,12,14,.45); backdrop-filter: blur(6px);
}
.hero__figures ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); }
.hero__figures li { padding: 18px 0 20px; border-left: 1px solid rgba(255,255,255,.14); padding-left: 18px; }
.hero__figures li:first-child { border-left: 0; padding-left: 0; }
.hero__figures b { display: block; font-family: var(--display); font-weight: 800; font-stretch: 88%; font-size: clamp(1.3rem, 2.6vw, 2rem); line-height: 1; }
.hero__figures small { display: block; margin-top: 6px; font-size: .8rem; color: rgba(255,255,255,.72); line-height: 1.3; }
.hero__progress { position: absolute; left: 0; top: 0; height: 2px; width: 100%; background: var(--red); transform-origin: left; transform: scaleX(0); }
.hero__hint { position: absolute; right: var(--gutter); top: calc(var(--header-h) + 18px); font-family: var(--mono); font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: rgba(255,255,255,.7); display: flex; align-items: center; gap: 8px; transition: opacity .3s; }
.hero__hint svg { width: 16px; height: 16px; }

@media (max-width: 720px) {
  .hero__figures ul { grid-template-columns: repeat(2, 1fr); }
  .hero__figures li:nth-child(3) { border-left: 0; padding-left: 0; }
  .hero__figures li { padding-block: 10px 12px; }
  .hero__figures b { font-size: 1.25rem; }
  .hero__figures small { font-size: .74rem; }
  .hero__copy, .hero__caption { bottom: 190px; }
  /* En el móvil el texto cae sobre las naves blancas: más sombra detrás para que se lea */
  .hero__shade {
    background: linear-gradient(180deg, rgba(10,12,14,.6) 0%, rgba(10,12,14,.18) 22%, rgba(10,12,14,.55) 42%, rgba(10,12,14,.82) 70%, rgba(10,12,14,.9) 100%);
  }
  .hero h1, .hero__sub, .hero__copy .eyebrow { text-shadow: 0 2px 14px rgba(0,0,0,.55), 0 1px 3px rgba(0,0,0,.5); }
  .hero h1 { font-size: clamp(2.3rem, 11vw, 3rem); }
  .hero__sub { font-size: .98rem; margin-top: .8rem; }
  .hero__ctas { margin-top: 1.2rem; }
  .hero__ctas .btn--ghost { display: none; }
  .hero__caption p { font-size: clamp(1.9rem, 9vw, 2.4rem); }
  .hero__caption span { font-size: .68rem; line-height: 1.6; }
  .hero__hint { display: none; }
  .wa-float { width: 48px; height: 48px; right: 14px; bottom: 14px; }
}

/* ---------- Secciones ---------- */
.section { padding-block: var(--section); }
.section--dark { background: var(--graphite); color: var(--on-dark); }
.section--dark .lead, .section--dark p { color: var(--on-dark-muted); }
.section--alt { background: var(--paper-2); }
.section__head { display: grid; gap: 18px; margin-bottom: clamp(40px, 6vw, 72px); }
.section__head--split { grid-template-columns: 1fr 1fr; align-items: end; gap: 40px; }
@media (max-width: 860px) { .section__head--split { grid-template-columns: 1fr; gap: 18px; } }

/* Ficha técnica (tabla de datos) */
.spec { margin: 0; border-top: 2px solid var(--ink); }
.spec div { display: grid; grid-template-columns: 1fr auto; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.spec dt { color: var(--steel); }
.spec dd { margin: 0; font-family: var(--mono); font-weight: 500; text-align: right; font-variant-numeric: tabular-nums; }
.section--dark .spec { border-top-color: var(--on-dark); }
.section--dark .spec div { border-bottom-color: #2a3035; }
.section--dark .spec dt { color: var(--on-dark-muted); }

/* Placeholder de foto (se sustituye por la foto real) */
.photo { position: relative; aspect-ratio: 4 / 3; background: var(--paper-2); overflow: hidden; border-radius: var(--radius); }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo--wide { aspect-ratio: 16 / 9; }
.photo--tall { aspect-ratio: 4 / 5; }
.photo--pending {
  display: grid; place-items: center; text-align: center; color: var(--steel);
  background: repeating-linear-gradient(135deg, var(--paper-2) 0 14px, #e1e4df 14px 28px);
  font-family: var(--mono); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; padding: 20px;
}
.section--dark .photo--pending { background: repeating-linear-gradient(135deg, #1b2024 0 14px, #20262a 14px 28px); color: var(--on-dark-muted); }

/* Intro del activo */
.asset { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.asset__text { display: grid; gap: 22px; }
@media (max-width: 900px) { .asset { grid-template-columns: 1fr; } }

/* Espacios en alquiler */
.spaces { display: grid; gap: clamp(56px, 8vw, 110px); }
.space { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 72px); align-items: center; }
.space:nth-child(even) .space__media { order: 2; }
.space__body { display: grid; gap: 18px; align-content: start; }
.space__index { font-family: var(--mono); font-size: .78rem; letter-spacing: .12em; color: var(--steel); text-transform: uppercase; }
.space__facts { list-style: none; padding: 0; margin: 6px 0 4px; display: grid; grid-template-columns: repeat(3, minmax(min-content, 1fr)); column-gap: 12px; border-top: 1px solid var(--line); }
.space__facts li { padding: 14px 0 0; }
.space__facts b { display: block; font-family: var(--display); font-weight: 800; font-stretch: 88%; font-size: clamp(1.15rem, 2.4vw, 1.9rem); line-height: 1; white-space: nowrap; }
.space__facts small { display: block; margin-top: 5px; font-size: .82rem; color: var(--steel); line-height: 1.3; }
.space__link { font-family: var(--display); font-weight: 700; color: var(--red); text-decoration: none; display: inline-flex; gap: .4em; align-items: center; }
.space__link:hover { text-decoration: underline; text-underline-offset: 4px; }
.space--featured { background: var(--graphite); color: var(--on-dark); padding: clamp(28px, 5vw, 56px); border-radius: var(--radius); }
.space--featured p { color: var(--on-dark-muted); }
.space--featured .space__facts { border-top-color: #2a3035; }
.space--featured .space__facts small, .space--featured .space__index { color: var(--on-dark-muted); }
.badge { display: inline-block; justify-self: start; background: var(--red); color: #fff; font-family: var(--mono); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; padding: 5px 9px; border-radius: 2px; }
@media (max-width: 860px) {
  .space { grid-template-columns: 1fr; }
  .space:nth-child(even) .space__media { order: 0; }
}

/* Operativas */
.uses { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid #2a3035; }
.use { padding: 28px 28px 32px 0; border-bottom: 1px solid #2a3035; display: grid; gap: 10px; align-content: start; }
.use:not(:nth-child(3n+1)) { padding-left: 28px; border-left: 1px solid #2a3035; }
.use svg { width: 30px; height: 30px; color: var(--red); }
.use h3 { color: var(--on-dark); font-size: 1.2rem; }
.use p { font-size: .95rem; }
@media (max-width: 860px) {
  .uses { grid-template-columns: 1fr 1fr; }
  .use:not(:nth-child(3n+1)) { padding-left: 0; border-left: 0; }
  .use:nth-child(even) { padding-left: 22px; border-left: 1px solid #2a3035; }
}
@media (max-width: 560px) {
  .uses { grid-template-columns: 1fr; }
  .use:nth-child(even) { padding-left: 0; border-left: 0; }
}

/* Ubicación */
.location { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.roads { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.roads li { font-family: var(--mono); font-size: .82rem; font-weight: 500; padding: 5px 9px; border: 1px solid var(--ink); border-radius: 2px; }
.map-card { position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; background: var(--graphite-2); color: var(--on-dark); display: grid; place-items: center; text-align: center; padding: 24px; }
.map-card iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map-card p { color: var(--on-dark-muted); margin: 10px auto 18px; font-size: .95rem; }
@media (max-width: 900px) { .location { grid-template-columns: 1fr; } }

.distances { width: 100%; border-collapse: collapse; font-size: .95rem; }
.distances th, .distances td { text-align: left; padding: 11px 0; border-bottom: 1px solid var(--line); }
.distances th { font-weight: 400; color: var(--steel); }
.distances td { font-family: var(--mono); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.distances caption { text-align: left; font-family: var(--display); font-weight: 700; padding-bottom: 8px; }

/* Clientes */
.clients { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 48px; }
.clients li { list-style: none; }
.clients img { filter: grayscale(1); opacity: .7; transition: filter .3s, opacity .3s; }
.clients img:hover { filter: none; opacity: 1; }
.clients ul { display: contents; }

/* FAQ */
.faq { display: grid; gap: 0; border-top: 2px solid var(--ink); max-width: 880px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 22px 44px 22px 0; position: relative; font-family: var(--display); font-weight: 700; font-size: 1.12rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 14px; height: 14px; margin-top: -9px; border-right: 2px solid var(--red); border-bottom: 2px solid var(--red); transform: rotate(45deg); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq details p { padding: 0 0 24px; color: var(--steel); }

/* Contacto */
.contact { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(32px, 6vw, 80px); }
.contact__direct { display: grid; gap: 22px; align-content: start; }
.contact__line { display: grid; gap: 2px; }
.contact__line span { font-family: var(--mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--on-dark-muted); }
.contact__line a, .contact__line address { font-family: var(--display); font-weight: 700; font-size: 1.25rem; font-style: normal; text-decoration: none; color: var(--on-dark); }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: 6px; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: .85rem; color: var(--on-dark-muted); }
.field input, .field select, .field textarea {
  font: inherit; font-size: 1rem; color: var(--on-dark); background: var(--graphite-2);
  border: 1px solid #6b7780; border-radius: var(--radius); padding: .8em .9em; width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--red); }
.field textarea { min-height: 120px; resize: vertical; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .85rem; color: var(--on-dark-muted); }
.check input { margin-top: 4px; accent-color: var(--red); }
.form__status { grid-column: 1 / -1; font-size: .95rem; }
@media (max-width: 900px) { .contact { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .form { grid-template-columns: 1fr; } }

/* Pie */
.site-footer { background: #0b0d0f; color: var(--on-dark-muted); padding-block: 56px 32px; font-size: .9rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.site-footer h2 { font-size: .75rem; font-family: var(--mono); font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--on-dark); margin-bottom: 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--on-dark); }
.site-footer address { font-style: normal; }
.footer-legal { margin-top: 48px; padding-top: 22px; border-top: 1px solid #22282c; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: .8rem; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }

/* Botón flotante de WhatsApp */
.wa-float { position: fixed; right: 18px; bottom: 18px; z-index: 40; width: 54px; height: 54px; border-radius: 50%; background: #1f9d55; color: #fff; display: grid; place-items: center; box-shadow: 0 6px 20px rgba(0,0,0,.25); }
.wa-float svg { width: 28px; height: 28px; }
.wa-float { transition: opacity .3s, transform .3s; }
body:not(.past-hero) .wa-float { opacity: 0; transform: scale(.8); pointer-events: none; }

/* ==========================================================================
   Páginas interiores
   ========================================================================== */
.page-hero { background: var(--graphite); color: var(--on-dark); padding-block: calc(var(--header-h) + clamp(28px, 5vw, 56px)) clamp(48px, 7vw, 88px); }
.page-hero__grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.page-hero h1 { font-weight: 800; font-stretch: 85%; font-size: clamp(2.1rem, 4vw, 3.4rem); line-height: .98; letter-spacing: -.025em; margin-top: .45em; }
.page-hero .lead { color: var(--on-dark-muted); margin-top: 1.2rem; }
.page-hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.8rem; }
.page-hero__media { position: relative; }
.page-hero__media img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: var(--radius); }
.page-hero__tag { position: absolute; left: 16px; bottom: 16px; background: rgba(10,12,14,.78); color: #fff; font-family: var(--mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; padding: 7px 10px; border-radius: 2px; }
.hero-facts { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; grid-template-columns: repeat(4, minmax(min-content, auto)); justify-content: space-between; column-gap: clamp(16px, 2.4vw, 36px); border-top: 1px solid #2a3035; }
.hero-facts li { padding: 16px 0 0; }
.hero-facts b { display: block; font-family: var(--display); font-weight: 800; font-stretch: 88%; font-size: clamp(1.3rem, 2.1vw, 1.9rem); line-height: 1; color: #fff; white-space: nowrap; }
.hero-facts small { display: block; margin-top: 6px; font-size: .8rem; color: var(--on-dark-muted); line-height: 1.3; }
@media (max-width: 900px) {
  .page-hero__grid { grid-template-columns: 1fr; }
  .page-hero__media { order: -1; }
  .page-hero__media img { aspect-ratio: 4 / 3; }
  .hero-facts { grid-template-columns: repeat(2, minmax(min-content, 1fr)); row-gap: 14px; }
}

.breadcrumb { font-family: var(--mono); font-size: .74rem; letter-spacing: .06em; color: var(--on-dark-muted); }
.breadcrumb ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.breadcrumb li + li::before { content: "/"; margin-right: 6px; opacity: .5; }
.breadcrumb a { text-decoration: none; }
.breadcrumb a:hover { color: #fff; }

/* Comparativa de densidad */
.density { display: grid; gap: 22px; }
.density__row { display: grid; grid-template-columns: 200px 1fr; gap: 16px; align-items: center; }
.density__bar { height: 44px; background: var(--paper-2); border-radius: 2px; position: relative; overflow: hidden; }
.density__bar span { position: absolute; inset: 0 auto 0 0; background: var(--steel); display: flex; align-items: center; justify-content: flex-end; padding-right: 12px; color: #fff; font-family: var(--mono); font-size: .85rem; font-weight: 500; }
.density__row--hl .density__bar span { background: var(--red); }
/* Barra corta: la cifra va fuera, a la derecha de la barra */
.density__bar em { position: absolute; top: 0; bottom: 0; display: flex; align-items: center; padding-left: 12px; font-style: normal; white-space: nowrap; color: var(--ink); font-family: var(--mono); font-size: .85rem; font-weight: 500; }
.density__label { font-size: .92rem; line-height: 1.3; }
.density__label b { display: block; font-family: var(--display); }
.density__note { font-size: .82rem; color: var(--steel); }
@media (max-width: 600px) { .density__row { grid-template-columns: 1fr; gap: 8px; } }

/* Flujo del sistema automatizado */
.flow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: paso; }
.flow li { display: grid; gap: 12px; align-content: start; counter-increment: paso; position: relative; }
.flow li:not(:last-child)::after { content: "→"; position: absolute; right: -16px; top: 22%; font-family: var(--display); font-weight: 800; color: var(--red); font-size: 1.3rem; }
.flow img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }
.flow h3 { font-size: 1.1rem; }
.flow h3::before { content: counter(paso, decimal-leading-zero) " "; font-family: var(--mono); font-weight: 500; color: var(--red); font-size: .85rem; }
.flow p { font-size: .93rem; color: var(--steel); }
@media (max-width: 900px) {
  .flow { grid-template-columns: 1fr 1fr; }
  .flow li::after { display: none; }
}
@media (max-width: 520px) { .flow { grid-template-columns: 1fr; } }

/* Sectores para temperatura controlada */
.temp { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.temp__scale { position: relative; height: 72px; border-radius: 2px; background: linear-gradient(90deg, #2d6fb3 0%, #6aa5c9 30%, #d9c27a 70%, #c8573e 100%); }
.temp__scale::before { content: ""; position: absolute; top: -8px; bottom: -8px; left: 26.67%; right: 16.67%; border: 2px solid #fff; border-radius: 2px; }
.temp__ticks { display: flex; justify-content: space-between; font-family: var(--mono); font-size: .78rem; color: var(--on-dark-muted); margin-top: 10px; }
.section--dark .temp__range { color: #fff; }
.temp__range { font-family: var(--display); font-weight: 800; font-stretch: 85%; font-size: clamp(3rem, 8vw, 6rem); line-height: .9; color: #fff; margin-bottom: 18px; }
.sectors { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-top: 1px solid #2a3035; }
.sectors li { padding: 16px 16px 16px 0; border-bottom: 1px solid #2a3035; }
.sectors b { display: block; color: var(--on-dark); font-family: var(--display); }
.sectors span { font-size: .9rem; color: var(--on-dark-muted); }
@media (max-width: 900px) { .temp { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .sectors { grid-template-columns: 1fr; } }

/* Ficha técnica en dos columnas */
.spec-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 clamp(32px, 5vw, 64px); }
.spec-cols h3 { font-size: 1rem; font-family: var(--mono); font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--red); margin: 0 0 10px; }
.spec-cols section + section { margin-top: 0; }
.spec-cols .spec { margin-bottom: 36px; }
@media (max-width: 860px) { .spec-cols { grid-template-columns: 1fr; } }

/* Galería */
.gallery { display: grid; grid-template-columns: repeat(12, 1fr); grid-auto-flow: dense; grid-auto-rows: 250px; gap: 12px; }
.gallery figure { margin: 0; position: relative; grid-column: span 4; }
.gallery figure.is-wide { grid-column: span 8; }
.gallery figure.is-tall { grid-row: span 2; }
.gallery a { display: block; height: 100%; }
.gallery img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); transition: filter .2s; }
.gallery a:hover img { filter: brightness(1.08); }
.gallery figcaption { position: absolute; left: 10px; bottom: 10px; right: 10px; font-size: .8rem; color: #fff; background: rgba(10,12,14,.7); padding: 6px 9px; border-radius: 2px; }
@media (max-width: 860px) {
  .gallery { grid-template-columns: 1fr 1fr; grid-auto-rows: 170px; }
  .gallery figure, .gallery figure.is-wide { grid-column: span 1; }
  .gallery figure.is-wide:first-child { grid-column: span 2; }
  .gallery figure.is-tall { grid-row: span 1; }
}
@media (max-width: 520px) {
  .gallery { grid-template-columns: 1fr; }
  .gallery figure.is-wide:first-child { grid-column: span 1; }
}

/* Visor de fotos */
.lightbox { border: 0; padding: 0; background: transparent; max-width: 96vw; max-height: 94vh; }
.lightbox::backdrop { background: rgba(8,10,12,.92); }
.lightbox img { max-width: 96vw; max-height: 86vh; width: auto; height: auto; margin: auto; border-radius: 2px; }
.lightbox p { color: #dfe3e6; text-align: center; margin: 12px auto 0; font-size: .92rem; }
.lightbox__close { position: fixed; top: 14px; right: 18px; background: none; border: 0; color: #fff; font-size: 2rem; line-height: 1; cursor: pointer; }

/* Planos */
.plans { display: grid; gap: 28px; }
.plans figure { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(12px, 2vw, 24px); display: grid; gap: 14px; }
.plans a { display: block; }
.plans img { width: 100%; }
.plans figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-family: var(--display); font-weight: 700; }
.plans figcaption span { font-family: var(--mono); font-weight: 500; font-size: .85rem; color: var(--steel); }

/* Contacto */
.page-hero .contact { align-items: start; }
.page-hero .contact h1 { margin-top: .45em; }
.quick-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.quick-actions .btn { padding: .75em 1.1em; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3vw, 40px); counter-reset: paso; }
.steps li { counter-increment: paso; display: grid; gap: 10px; align-content: start; padding-top: 18px; border-top: 2px solid var(--ink); }
.steps li::before { content: counter(paso); font-family: var(--display); font-weight: 800; font-stretch: 85%; font-size: 2.6rem; line-height: 1; color: var(--red); }
.steps p { color: var(--steel); font-size: .96rem; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }
.map-embed { position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; background: var(--graphite-2); color: var(--on-dark); display: grid; place-items: center; text-align: center; padding: 24px; }
.map-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; z-index: 1; background: var(--paper-2); }
.map-embed.is-loaded > div { visibility: hidden; }
@media (max-width: 600px) { .map-embed { aspect-ratio: auto; min-height: 380px; } }
.map-embed p { color: var(--on-dark-muted); margin: 10px auto 18px; font-size: .92rem; max-width: 36ch; }
.map-embed .map-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

/* Galería: índice de bloques */
.chips { list-style: none; margin: 1.6rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips a { display: inline-flex; gap: 8px; align-items: baseline; text-decoration: none; font-size: .92rem; padding: .55em .95em; border: 1px solid #3a4248; border-radius: 999px; color: var(--on-dark); transition: border-color .2s, background .2s; }
.chips a:hover { border-color: var(--on-dark); background: rgba(255,255,255,.06); }
.chips small { font-family: var(--mono); font-size: .75rem; color: var(--on-dark-muted); }
.gallery-group + .gallery-group { margin-top: clamp(56px, 8vw, 96px); }
.gallery-group .section__head { margin-bottom: 28px; }

/* Páginas legales */
.page-hero--compact { padding-block: calc(var(--header-h) + clamp(28px, 4vw, 48px)) clamp(36px, 5vw, 56px); }
.prose { max-width: 760px; }
.prose h2 { font-size: clamp(1.35rem, 2.4vw, 1.75rem); font-stretch: 92%; margin: 2.4rem 0 .8rem; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: #3b4349; }
.prose p + p { margin-top: .9rem; }
.prose ul { padding-left: 1.2rem; margin: .8rem 0 0; display: grid; gap: .4rem; }
.prose table { width: 100%; border-collapse: collapse; margin-top: 1rem; font-size: .92rem; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); }
.prose th { font-weight: 600; color: var(--ink); }
.table-scroll { overflow-x: auto; }
.prose .updated { font-family: var(--mono); font-size: .8rem; color: var(--steel); margin-bottom: 2rem; }
mark.todo { background: #ffe58a; color: #3a2f00; padding: 0 .25em; border-radius: 2px; }

/* Enlaces cruzados a otros espacios */
.cross { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.cross a { display: grid; gap: 6px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; background: var(--paper); transition: border-color .2s; }
.cross a:hover { border-color: var(--ink); }
.cross b { font-family: var(--display); font-size: 1.15rem; }
.cross span { color: var(--steel); font-size: .92rem; }
@media (max-width: 760px) { .cross { grid-template-columns: 1fr; } }

/* Aparición suave: el contenido está visible por defecto */
@media (prefers-reduced-motion: no-preference) {
  .reveal { transition: opacity .55s ease-out, transform .55s ease-out; }
  .reveal.is-pending { opacity: 0; transform: translateY(14px); }
}

/* ==========================================================================
   Micro-animaciones
   ========================================================================== */

/* Contadores: cifras de ancho fijo para que no "bailen" mientras cuentan */
.hero__figures b { font-variant-numeric: tabular-nums; }

/* Brillo que sigue al ratón en las tarjetas de operativas (solo con ratón) */
.use { position: relative; }
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .use::before {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(184, 31, 45, .16), transparent 70%);
    opacity: 0; transition: opacity .3s ease;
  }
  .use:hover::before { opacity: 1; }
}

/* Brillo sutil en el botón principal al pasar el ratón */
.btn--red { position: relative; overflow: hidden; isolation: isolate; }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .btn--red::after {
    content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 45%; z-index: -1;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .28), transparent);
    transform: translateX(0) skewX(-18deg); transition: transform .6s ease;
  }
  .btn--red:hover::after, .btn--red:focus-visible::after { transform: translateX(400%) skewX(-18deg); }
}

/* ---------- Maqueta 3D del recinto ---------- */
.maqueta { display: grid; gap: 18px; }
.maqueta__stage {
  position: relative; overflow: hidden; border-radius: var(--radius);
  height: clamp(440px, 70vh, 720px); background: #dde7ec; color: var(--ink);
}
.maqueta__stage canvas { display: block; width: 100%; height: 100%; cursor: grab; }
.maqueta__stage canvas:active { cursor: grabbing; }
.maqueta__loading {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--mono); font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--steel);
}
.maqueta__stage.is-ready .maqueta__loading { display: none; }
.maqueta__pins { position: absolute; inset: 0; pointer-events: none; }
.maqueta__pin {
  position: absolute; left: 0; top: 0; margin: -15px 0 0 -15px; padding: 0; border: 0; background: none;
  display: flex; align-items: center; gap: 7px; cursor: pointer; pointer-events: auto; color: var(--ink);
  font: 600 .82rem/1 var(--body); will-change: transform;
}
.maqueta__dot {
  width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center;
  background: var(--red); color: #fff; font-family: var(--mono); font-size: .8rem; font-weight: 600;
  box-shadow: 0 0 0 3px rgba(255,255,255,.9), 0 4px 12px rgba(0,0,0,.25);
}
.maqueta__label {
  background: #fff; padding: 6px 9px; border-radius: 3px; white-space: nowrap;
  box-shadow: 0 2px 10px rgba(0,0,0,.14); transition: background .2s, color .2s;
}
.maqueta__pin:hover .maqueta__label, .maqueta__pin.is-active .maqueta__label { background: var(--ink); color: #fff; }
.maqueta__pin.is-active .maqueta__dot { background: var(--ink); }
@media (prefers-reduced-motion: no-preference) {
  .maqueta__dot { animation: maqueta-pulse 2.4s ease-out infinite; }
  .maqueta.is-touched .maqueta__dot { animation: none; }
}
@keyframes maqueta-pulse {
  0% { box-shadow: 0 0 0 3px rgba(255,255,255,.9), 0 0 0 3px rgba(184,31,45,.55); }
  70%, 100% { box-shadow: 0 0 0 3px rgba(255,255,255,.9), 0 0 0 16px rgba(184,31,45,0); }
}
.maqueta__card {
  position: absolute; left: 16px; top: 16px; z-index: 2; width: min(370px, calc(100% - 32px));
  max-height: calc(100% - 32px); overflow: auto; display: grid; gap: 12px; padding: 24px 22px 22px;
  background: #fff; color: var(--ink); border-radius: var(--radius); box-shadow: 0 12px 40px rgba(0,0,0,.18);
}
.maqueta__card[hidden] { display: none; }
.section--dark .maqueta__card p { color: var(--steel); font-size: .95rem; }
.maqueta__card .space__facts small { color: var(--steel); }
.maqueta__card .space__facts b { font-size: 1.35rem; }
.maqueta__kicker { font-family: var(--mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--red); }
.maqueta__close {
  position: absolute; top: 8px; right: 8px; width: 36px; height: 36px; border: 0; border-radius: 50%;
  background: transparent; color: var(--steel); font-size: 1.5rem; line-height: 1; cursor: pointer;
}
.maqueta__close:hover { background: var(--paper-2); color: var(--ink); }
.maqueta__tools { position: absolute; right: 14px; bottom: 14px; display: grid; gap: 6px; z-index: 1; }
.maqueta__tools button {
  width: 40px; height: 40px; border: 0; border-radius: var(--radius); background: #fff; color: var(--ink);
  font-size: 1.3rem; line-height: 1; cursor: pointer; display: grid; place-items: center; box-shadow: 0 2px 10px rgba(0,0,0,.14);
}
.maqueta__tools button:hover { background: var(--ink); color: #fff; }
.maqueta__tools svg { width: 18px; height: 18px; }
.maqueta__hint {
  position: absolute; left: 16px; bottom: 16px; margin: 0; padding: 6px 10px; border-radius: 3px; pointer-events: none;
  background: rgba(255,255,255,.85); font-family: var(--mono); font-size: .72rem; color: var(--steel); transition: opacity .4s, background .2s, color .2s;
}
.maqueta__hint:empty { display: none; }
.maqueta.is-touched .maqueta__hint { opacity: 0; }
.maqueta .maqueta__hint.is-loud { opacity: 1; background: var(--ink); color: #fff; }
.maqueta__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.maqueta__chip {
  display: inline-flex; align-items: center; gap: 9px; padding: 9px 15px 9px 10px; cursor: pointer;
  border: 1px solid #2f363b; border-radius: 999px; background: transparent; color: var(--on-dark); font: 500 .9rem/1 var(--body);
  transition: background .2s, border-color .2s;
}
.maqueta__chip span {
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  background: var(--red); color: #fff; font-family: var(--mono); font-size: .72rem;
}
.maqueta__chip:hover { border-color: var(--on-dark-muted); }
.maqueta__chip[aria-pressed="true"] { background: var(--red); border-color: var(--red); }
.maqueta__chip[aria-pressed="true"] span { background: #fff; color: var(--red); }
.maqueta__info { display: none; }
.maqueta__note { font-size: .82rem; color: var(--on-dark-muted); }
@media (max-width: 700px) {
  .maqueta__stage { height: 66vh; min-height: 420px; }
  .maqueta__label { display: none; }
  .maqueta__pin.is-active .maqueta__label { display: block; }
  .maqueta__card { left: 8px; right: 8px; top: auto; bottom: 8px; width: auto; max-height: 52%; padding: 20px 18px 18px; }
  .maqueta__tools { top: 10px; bottom: auto; right: 10px; }
  .maqueta__hint { left: 10px; bottom: 10px; }
}

/* ---------- Accesibilidad y rendimiento ---------- */
/* Contraste suficiente del rojo sobre fondos oscuros, y foco visible en ellos */
.section--dark .eyebrow, .page-hero .eyebrow, .section--dark .use svg { color: #f2727b; }
.section--dark :focus-visible, .page-hero :focus-visible, .hero :focus-visible, .site-footer :focus-visible { outline-color: #ff8a93; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 2px solid #ff8a93; outline-offset: 2px; }

/* Estados del formulario */
.form__status.is-ok { color: #8fd6ad; }
.form__status.is-error { color: #ff9aa2; }
.form__status:focus { outline: none; }
.form button[disabled] { opacity: .7; cursor: progress; }

/* WhatsApp flotante oculto mientras se ve el formulario */
body.at-contact .wa-float { opacity: 0; transform: scale(.8); pointer-events: none; }

/* Visor: anterior / siguiente */
.lightbox__nav {
  position: fixed; top: 50%; transform: translateY(-50%); width: 48px; height: 64px; border: 0; border-radius: var(--radius);
  background: rgba(255,255,255,.08); color: #fff; font-size: 2.2rem; line-height: 1; cursor: pointer;
}
.lightbox__nav:hover { background: rgba(255,255,255,.18); }
.lightbox__nav--prev { left: 12px; }
.lightbox__nav--next { right: 12px; }
.lightbox.is-single .lightbox__nav { display: none; }

/* Cabecera sin animación (movimiento reducido o ahorro de datos): el póster fijo, sin scroll ligado */
.hero--static { height: auto; }
.hero--static .hero__stage { position: relative; height: 100vh; height: 100svh; }
.hero--static .hero__caption, .hero--static .hero__hint, .hero--static .hero__progress { display: none; }

/* El desenfoque bajo las cifras es caro en móviles: fondo opaco en su lugar */
@media (max-width: 860px) {
  .hero__figures { backdrop-filter: none; background: rgba(10,12,14,.78); }
}

/* Al imprimir, todo visible */
@media print {
  .reveal.is-pending { opacity: 1; transform: none; }
  .wa-float, .site-header, .hero__hint, .hero__progress { display: none; }
}

/* En el plan gratuito, Netlify añade su insignia abajo a la derecha (iframe de ~63 px de alto): el WhatsApp sube por encima */
html:has(#nl-badge-frame) .wa-float { bottom: 88px; }
@media (max-width: 720px) { html:has(#nl-badge-frame) .wa-float { bottom: 84px; } }
