/* Nova Construction Solutions — plantilla demo
   Paleta: pizarra de techo, amarillo de cinta métrica, musgo de jardín, tiza fría. */

:root {
  --slate: #1E2933;
  --slate-2: #2B3A47;
  --shingle: #6A7681;
  --chalk: #F4F5F2;
  --chalk-2: #E9ECE7;
  --tape: #F4B81C;
  --tape-deep: #D99E0B;
  --moss: #55733A;
  --line: rgba(30, 41, 51, .18);
  --focus: #1E2933;

  --f-display: "Archivo", "Arial Narrow", Arial, sans-serif;
  --f-body: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 1180px;
  --gutter: clamp(18px, 4vw, 40px);
  --header-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0;
  font-family: var(--f-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--slate);
  background: var(--chalk);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.on-dark { --focus: var(--tape); }

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

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--slate); color: var(--chalk); padding: 10px 16px; border-radius: 4px;
}
.skip:focus { top: 12px; }

/* ---------- Tipografía ---------- */
.display, .h2, .h3, .h4, .brand-name, .btn, .step-n, .phone-big {
  font-family: var(--f-display);
}
.display {
  font-size: clamp(2.7rem, 6.2vw, 5.5rem);
  font-weight: 850;
  font-stretch: 118%;
  line-height: .98;
  letter-spacing: -.012em;
  text-wrap: balance;
}
.h2 {
  font-size: clamp(1.9rem, 4vw, 3.15rem);
  font-weight: 800;
  font-stretch: 112%;
  line-height: 1.05;
  letter-spacing: -.01em;
  text-wrap: balance;
}
.h3 {
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
  font-weight: 800;
  font-stretch: 110%;
  line-height: 1.1;
}
.h4 {
  font-size: 1.25rem;
  font-weight: 750;
  font-stretch: 105%;
  line-height: 1.2;
}
.lede { font-size: 1.2rem; max-width: 34em; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .85rem 1.35rem;
  border: 2px solid transparent; border-radius: 4px;
  font-size: 1rem; font-weight: 750; font-stretch: 105%;
  text-decoration: none; line-height: 1.1; white-space: nowrap;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn-sm { padding: .6rem 1rem; font-size: .95rem; }
.btn-block { width: 100%; }
.btn-primary { background: var(--tape); color: var(--slate); }
.btn-primary:hover { background: var(--tape-deep); }
.btn-dark { background: var(--slate); color: var(--chalk); }
.btn-dark:hover { background: var(--slate-2); }
.btn-line { border-color: var(--slate); color: var(--slate); }
.btn-line:hover { background: var(--slate); color: var(--chalk); }

/* ---------- Encabezado ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--chalk);
  border-bottom: 1px solid var(--line);
}
.header-row { height: var(--header-h); display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark { width: 44px; height: 44px; color: var(--slate); flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name { font-size: 1.55rem; font-weight: 850; font-stretch: 122%; letter-spacing: -.01em; }
.brand-sub { font-size: .72rem; font-weight: 600; letter-spacing: .03em; margin-top: 4px; opacity: .85; }

.nav { display: flex; gap: 26px; margin-left: auto; }
.nav a { text-decoration: none; font-weight: 600; font-size: .98rem; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a:hover { border-bottom-color: var(--tape); }

.header-tools { display: flex; align-items: center; gap: 14px; }
.lang { display: inline-flex; border: 2px solid var(--slate); border-radius: 4px; overflow: hidden; }
.lang button { border: 0; background: transparent; padding: 6px 11px; font-weight: 700; font-size: .85rem; }
.lang button[aria-pressed="true"] { background: var(--slate); color: var(--chalk); }

.menu-btn {
  display: none; width: 44px; height: 44px; border: 2px solid var(--slate); border-radius: 4px;
  background: transparent; padding: 0; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.menu-btn span { width: 20px; height: 2px; background: var(--slate); }

/* ---------- Hero ---------- */
.hero { padding: clamp(28px, 5vw, 56px) 0 clamp(48px, 7vw, 88px); }
.hero-grid { display: grid; grid-template-columns: 1.12fr .88fr; gap: clamp(32px, 5vw, 72px); align-items: end; }
.hero-copy { display: grid; gap: 28px; align-content: end; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.facts { display: grid; gap: 0; border-top: 2px solid var(--slate); max-width: 34em; }
.facts li { padding: 11px 0; border-bottom: 1px solid var(--line); font-weight: 600; }

.hero-visual {
  position: relative;
  display: grid; grid-template-columns: 56px 1fr;
  height: min(76vh, 660px); min-height: 460px;
}
.tape {
  position: relative; background: var(--tape); border-radius: 4px 0 0 4px; overflow: hidden;
  animation: roll 1.1s cubic-bezier(.2, .7, .2, 1) both;
}
.tape::before, .tape::after { content: ""; position: absolute; right: 0; top: 0; bottom: 0; }
.tape::before { width: 14px; background: repeating-linear-gradient(to bottom, var(--slate) 0 2px, transparent 2px 10px); }
.tape::after { width: 28px; background: repeating-linear-gradient(to bottom, var(--slate) 0 3px, transparent 3px 50px); }
@keyframes roll { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0 0 0 0); } }

.stage { position: relative; overflow: hidden; border-radius: 0 4px 4px 0; background: var(--chalk-2); }
.stage .hero-img { position: absolute; inset: 0; opacity: 0; transition: opacity .8s ease; }
.stage .hero-img.is-active { opacity: 1; }
.stage .hero-img img { transform-origin: 50% 60%; }
.stage .hero-img.is-active img { animation: kenburns 7s ease-out forwards; }
@keyframes kenburns { from { transform: scale(1.08); } to { transform: scale(1); } }

.levels { position: absolute; inset: 0; pointer-events: none; }
.level {
  position: absolute; left: 0; top: var(--y); transform: translateY(-50%);
  display: flex; align-items: center; padding: 0; border: 0; background: transparent;
  pointer-events: auto;
}
.level::before { content: ""; width: 56px; height: 4px; background: var(--slate); flex: none; transition: height .35s ease; }
.level.is-active::before { height: 9px; }
.level-name {
  position: relative; overflow: hidden;
  background: var(--chalk); color: var(--slate);
  padding: 8px 14px; font-family: var(--f-display); font-weight: 750; font-stretch: 105%; font-size: .98rem;
  border: 2px solid var(--slate); border-left: 0; border-radius: 0 4px 4px 0;
  transition: background-color .3s ease;
}
.level:hover .level-name { background: #fff; }
.level.is-active .level-name { background: var(--tape); }
/* Barra de progreso: al terminar, la foto siguiente entra sola */
.level-name::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px;
  background: var(--slate); transform: scaleX(0); transform-origin: left;
}
.level.is-active .level-name::after { animation: lvl-progress 5.5s linear forwards; }
@keyframes lvl-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.hero-visual.is-paused .level-name::after,
.hero-visual.is-offscreen .level-name::after,
.hero-visual.is-tabhidden .level-name::after,
.hero-visual.is-paused .stage .hero-img img,
.hero-visual.is-offscreen .stage .hero-img img,
.hero-visual:has(.level:focus-visible) .level-name::after { animation-play-state: paused; }
@media (hover: hover) {
  .hero-visual:hover .level-name::after,
  .hero-visual:hover .stage .hero-img img { animation-play-state: paused; }
}

.hero-pause {
  position: absolute; right: 12px; bottom: 12px; z-index: 2;
  display: grid; place-items: center; width: 40px; height: 40px; padding: 0;
  background: var(--slate); color: var(--chalk); border: 2px solid var(--chalk); border-radius: 4px;
}
.hero-pause:hover { background: var(--slate-2); }
.hero-pause .ic-play, .hero-pause[aria-pressed="true"] .ic-pause { display: none; }
.hero-pause[aria-pressed="true"] .ic-play { display: block; }
.hero-pause { --focus: var(--tape); }

/* ---------- Placeholders de foto ---------- */
.ph {
  position: relative; display: block; overflow: hidden; width: 100%; height: 100%;
  background: repeating-linear-gradient(135deg, var(--chalk-2) 0 12px, #E0E4DE 12px 24px);
}
.ph img { width: 100%; height: 100%; object-fit: cover; }
.ph.is-missing img { display: none; }
.ph.is-missing::after {
  content: attr(data-file);
  position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 16px;
  font-size: .8rem; font-weight: 600; color: var(--shingle); word-break: break-all;
}

/* ---------- Secciones ---------- */
.section { padding: clamp(56px, 8vw, 104px) 0; }
.section-tint { background: var(--chalk-2); }
.section-dark { background: var(--slate); color: var(--chalk); }
.section-tape { background: var(--tape); }
.section-title { margin-bottom: clamp(28px, 4vw, 48px); max-width: 18em; }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 32px; }

/* Servicios */
.service {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 72px); align-items: center;
  padding: clamp(28px, 4vw, 48px) 0; border-top: 1px solid var(--line);
}
.service-flip .service-media { order: 2; }
.service-media { aspect-ratio: 4 / 3; border-radius: 4px; overflow: hidden; }
.service-body { display: grid; gap: 18px; justify-items: start; }
.service-body p { max-width: 30em; }
.checks { width: 100%; max-width: 30em; border-top: 2px solid var(--slate); }
.checks li {
  position: relative; padding: 10px 0 10px 26px; border-bottom: 1px solid var(--line); font-weight: 500;
}
.checks li::before {
  content: ""; position: absolute; left: 0; top: 50%; width: 12px; height: 12px; transform: translateY(-50%);
  background: var(--trade); outline: 1px solid var(--line);
}

/* Galería */
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filter {
  padding: 8px 16px; border: 2px solid var(--slate); border-radius: 4px; background: transparent;
  font-weight: 700; font-size: .92rem;
}
.filter[aria-pressed="true"] { background: var(--slate); color: var(--chalk); }
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.g-item {
  position: relative; display: block; width: 100%; aspect-ratio: 4 / 3; padding: 0; border: 0;
  background: var(--chalk-2); border-radius: 4px; overflow: hidden;
}
.g-item[hidden] { display: none; }
.g-item .ph { position: absolute; inset: 0; transition: transform .35s ease; }
.g-item:hover .ph { transform: scale(1.04); }

/* Antes y después */
.ba { display: grid; grid-template-columns: .7fr 1.3fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.ba-copy { display: grid; gap: 16px; }
.compare { position: relative; aspect-ratio: 16 / 10; border-radius: 4px; overflow: hidden; background: var(--chalk-2); }
.compare-layer { position: absolute; inset: 0; }
.compare-before { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.compare-handle {
  position: absolute; top: 0; bottom: 0; left: var(--pos); width: 4px; margin-left: -2px;
  background: var(--tape); pointer-events: none;
}
.compare-knob {
  position: absolute; top: 50%; left: 50%; width: 44px; height: 44px; transform: translate(-50%, -50%);
  background: var(--tape); border: 3px solid var(--slate); border-radius: 50%;
}
.compare-knob::before, .compare-knob::after {
  content: ""; position: absolute; top: 50%; width: 0; height: 0; transform: translateY(-50%);
  border: 6px solid transparent;
}
.compare-knob::before { left: 3px; border-right-color: var(--slate); border-left-width: 0; }
.compare-knob::after { right: 3px; border-left-color: var(--slate); border-right-width: 0; }
.compare-tag {
  position: absolute; top: 14px; padding: 5px 12px; background: var(--chalk); color: var(--slate);
  font-weight: 700; font-size: .85rem; border-radius: 4px; pointer-events: none;
}
.tag-before { left: 14px; }
.tag-after { right: 14px; }
.compare-range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.compare:has(.compare-range:focus-visible) { outline: 3px solid var(--focus); outline-offset: 3px; }

/* Por qué */
.why { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid rgba(244, 245, 242, .3); }
.why-item { padding: 28px 28px 8px 0; display: grid; gap: 10px; align-content: start; }
.why-item + .why-item { padding-left: 28px; border-left: 1px solid rgba(244, 245, 242, .3); }
.why-item p { opacity: .88; max-width: 26em; }

/* Proceso */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; counter-reset: s; }
.step { display: grid; gap: 10px; align-content: start; padding-top: 18px; border-top: 3px dashed var(--shingle); position: relative; }
.step-n {
  display: grid; place-items: center; width: 44px; height: 44px; background: var(--tape); color: var(--slate);
  font-weight: 850; font-size: 1.25rem; border-radius: 4px; margin-top: -40px;
  position: relative; z-index: 1;
}
.step p { max-width: 20em; }

/* Zona */
.area { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: stretch; }
.area-copy { display: grid; gap: 20px; align-content: start; }
.cities { display: flex; flex-wrap: wrap; gap: 8px; }
.cities li { border: 1.5px solid var(--slate); border-radius: 4px; padding: 5px 12px; font-weight: 600; font-size: .95rem; }
.area-map { min-height: 340px; border-radius: 4px; overflow: hidden; background: var(--chalk); }
.area-map iframe { width: 100%; height: 100%; min-height: 340px; border: 0; }

/* Contacto */
.contact { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(28px, 5vw, 72px); align-items: start; }
.contact-copy { display: grid; gap: 18px; justify-items: start; }
.phone-big { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 850; font-stretch: 115%; text-decoration: none; line-height: 1; }
.phone-big:hover { text-decoration: underline; text-decoration-thickness: 4px; text-underline-offset: 6px; }
.form { display: grid; gap: 16px; background: var(--chalk); padding: clamp(20px, 3vw, 32px); border-radius: 4px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 700; font-size: .95rem; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; background: #fff; border: 2px solid var(--slate); border-radius: 4px;
}
.field input:user-invalid, .field select:user-invalid { border-color: #B3261E; }
.form-note { font-size: .9rem; opacity: .8; }
.form-status { font-weight: 700; min-height: 1.4em; }

/* Pie */
.site-footer { background: var(--slate); color: var(--chalk); padding-top: 56px; }
.site-footer .brand-mark { color: var(--chalk); }
.footer-row { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-bottom: 40px; }
.footer-brand { display: grid; gap: 16px; align-content: start; }
.footer-brand p { max-width: 24em; opacity: .85; }
.footer-col { display: grid; gap: 8px; align-content: start; }
.footer-col .h4 { margin-bottom: 4px; }
.footer-col a { text-decoration: none; opacity: .9; }
.footer-col a:hover { text-decoration: underline; }
.footer-legal { border-top: 1px solid rgba(244, 245, 242, .25); padding: 18px 0 24px; font-size: .9rem; opacity: .8; }

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

/* WhatsApp flotante */
.wa-float {
  position: fixed; right: clamp(14px, 2.5vw, 28px); bottom: clamp(14px, 2.5vw, 28px); z-index: 70;
  display: flex; align-items: center; gap: 10px; text-decoration: none; --focus: var(--slate);
}
.wa-btn {
  position: relative; display: grid; place-items: center; width: 62px; height: 62px; border-radius: 50%;
  background: #25D366; box-shadow: 0 6px 18px rgba(30, 41, 51, .35);
  transition: transform .2s ease, background-color .2s ease;
  animation: wa-bob 5s ease-in-out 2s infinite;
}
.wa-btn::before, .wa-btn::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; border: 3px solid #25D366;
  animation: wa-ring 2.4s ease-out infinite; pointer-events: none;
}
.wa-btn::after { animation-delay: 1.2s; }
.wa-tip {
  background: var(--slate); color: var(--chalk); font-family: var(--f-display); font-weight: 700; font-stretch: 105%;
  font-size: .95rem; padding: 9px 14px; border-radius: 4px; white-space: nowrap;
  opacity: 0; transform: translateX(10px); pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.wa-float:hover .wa-tip, .wa-float:focus-visible .wa-tip { opacity: 1; transform: none; }
.wa-float:hover .wa-btn { transform: scale(1.08); background: #1EBE5A; }
@keyframes wa-ring { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(1.75); opacity: 0; } }
@keyframes wa-bob { 0%, 88%, 100% { transform: translateY(0); } 92% { transform: translateY(-8px); } 96% { transform: translateY(0); } }

/* Visor */
.lightbox {
  width: min(96vw, 1100px); max-height: 94vh; padding: 0; border: 0; background: transparent; color: var(--chalk);
  overflow: visible;
}
.lightbox::backdrop { background: rgba(20, 28, 35, .88); }
.lightbox[open] { display: grid; grid-template-columns: 56px 1fr 56px; align-items: center; }
.lb-fig { margin: 0; display: grid; gap: 10px; }
.lb-ph { height: auto; max-height: 78vh; aspect-ratio: 4 / 3; border-radius: 4px; }
.lb-fig figcaption { text-align: center; font-weight: 600; }
.lb-nav, .lb-close {
  width: 48px; height: 48px; border: 2px solid var(--chalk); border-radius: 4px; background: rgba(30, 41, 51, .6);
  color: var(--chalk); font-size: 1.8rem; line-height: 1; display: grid; place-items: center; padding: 0 0 4px;
}
.lb-close { position: absolute; top: -56px; right: 0; }
.lightbox { --focus: var(--tape); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .nav {
    position: absolute; left: 0; right: 0; top: var(--header-h); margin: 0;
    flex-direction: column; gap: 0; background: var(--chalk); border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 16px; display: none;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .menu-btn { display: flex; }
  .header-tools { margin-left: auto; }
  .hero-grid, .service, .ba, .area, .contact { grid-template-columns: 1fr; }
  .service-flip .service-media { order: 0; }
  .hero-visual { height: 460px; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: 1fr 1fr; row-gap: 48px; }
  .why { grid-template-columns: 1fr; }
  .why-item, .why-item + .why-item { padding: 22px 0; border-left: 0; }
  .why-item + .why-item { border-top: 1px solid rgba(244, 245, 242, .3); }
  .footer-row { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .header-num, .header-call { display: none; }
  .header-row { gap: 12px; }
  .header-tools { gap: 10px; }
  .brand-mark { width: 38px; height: 38px; }
  .brand-name { font-size: 1.35rem; }
  .brand-sub { font-size: .64rem; }
  .hero-visual { height: 400px; min-height: 0; grid-template-columns: 44px 1fr; }
  .level::before { width: 44px; }
  .level-name { padding: 6px 10px; font-size: .9rem; }
  .gallery { gap: 8px; }
  .g-item { aspect-ratio: 1 / 1; }
  .section-head { align-items: start; }
  .filters { gap: 6px; }
  .filter { padding: 7px 12px; font-size: .88rem; }
  .steps { grid-template-columns: 1fr; }
  .lightbox[open] { grid-template-columns: 1fr; }
  .lb-nav { position: absolute; top: 50%; z-index: 2; }
  .lb-prev { left: 4px; } .lb-next { right: 4px; }
  .mobile-bar {
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    padding: 10px var(--gutter); background: var(--chalk); border-top: 1px solid var(--line);
  }
  body { padding-bottom: 70px; }
  .wa-float { bottom: 84px; }
  .wa-btn { width: 56px; height: 56px; }
  .wa-tip { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tape { animation: none; }
  .level.is-active .level-name::after { animation: none; transform: scaleX(1); }
  .stage .hero-img.is-active img { animation: none; }
  .hero-pause { display: none; }
  .wa-btn, .wa-btn::before, .wa-btn::after { animation: none; }
  .wa-btn::before, .wa-btn::after { display: none; }
  .stage .hero-img, .g-item .ph, .btn { transition: none; }
}

/* =========================================================
   Efectos de scroll
   Solo se activan con la clase .motion (la pone un script en el <head>
   si el visitante no pidió reducir movimiento). Sin JS, todo se ve normal.
   ========================================================= */

/* Cinta que se desenrolla bajo el encabezado según avanza la página */
.scroll-bar {
  position: absolute; left: 0; bottom: -1px; width: 100%; height: 4px; background: var(--tape);
  transform: scaleX(var(--p, 0)); transform-origin: left; pointer-events: none;
}
.site-header { transition: box-shadow .3s ease; }
.site-header.is-scrolled { box-shadow: 0 8px 22px rgba(30, 41, 51, .1); }

/* Títulos: cortina que baja */
/* Nota: el estado oculto deja 1 px visible; si se recorta todo, el navegador nunca avisa que el elemento entró en pantalla. */
.motion [data-reveal="curtain"] {
  clip-path: inset(0 0 calc(100% - 1px) 0); opacity: 0; transform: translateY(26px);
  transition: clip-path .9s cubic-bezier(.2, .7, .2, 1), transform .9s cubic-bezier(.2, .7, .2, 1), opacity .5s ease;
}
.motion [data-reveal="curtain"].is-in { clip-path: inset(-.25em -.1em -.25em -.1em); opacity: 1; transform: none; }

/* Fotos y bloques grandes: se destapan de arriba hacia abajo, como una cinta que se desenrolla */
.motion [data-reveal="wipe"] {
  clip-path: inset(0 0 calc(100% - 1px) 0); opacity: 0;
  transition: clip-path 1.1s cubic-bezier(.2, .7, .2, 1), opacity .4s ease;
}
.motion [data-reveal="wipe"].is-in { clip-path: inset(-8px); opacity: 1; } /* margen negativo: no recorta el contorno de foco */

/* Grupos: los hijos entran uno tras otro */
.motion [data-reveal="stagger"] > * {
  opacity: 0; transform: translateY(18px);
  transition: opacity .6s ease, transform .6s cubic-bezier(.2, .7, .2, 1);
  transition-delay: calc(var(--i, 0) * 90ms);
}
.motion [data-reveal="stagger"].is-in > * { opacity: 1; transform: none; }

/* Galería: cada foto aparece con un pequeño rebote, escalonadas */
.motion [data-reveal="pop"] {
  opacity: 0; transform: translateY(22px) scale(.95);
  transition: opacity .6s ease, transform .7s cubic-bezier(.2, .9, .3, 1.2);
}
.motion [data-reveal="pop"].is-in { opacity: 1; transform: none; }

/* Proceso: la línea se tiende de paso en paso y el número aparece al llegar */
.motion .steps[data-reveal] .step { border-top-color: transparent; }
.motion .steps[data-reveal] .step::before {
  content: ""; position: absolute; left: 0; right: 0; top: -3px; height: 0;
  border-top: 3px dashed var(--shingle);
}
.motion .steps[data-reveal] .step::after {
  content: ""; position: absolute; left: 0; right: 0; top: -3px; height: 3px; background: var(--slate);
  transform: scaleX(0); transform-origin: left;
  transition: transform .8s cubic-bezier(.4, 0, .2, 1); transition-delay: calc(var(--i, 0) * .35s);
}
.motion .steps[data-reveal].is-in .step::after { transform: scaleX(1); }
.motion .steps[data-reveal] .step-n {
  transform: scale(.3) rotate(-12deg); opacity: 0;
  transition: transform .5s cubic-bezier(.3, 1.6, .5, 1), opacity .3s ease;
  transition-delay: calc(var(--i, 0) * .35s + .15s);
}
.motion .steps[data-reveal].is-in .step-n { transform: none; opacity: 1; }
.motion .steps[data-reveal] .step > :not(.step-n) {
  opacity: 0; transform: translateY(12px);
  transition: opacity .5s ease, transform .5s ease; transition-delay: calc(var(--i, 0) * .35s + .3s);
}
.motion .steps[data-reveal].is-in .step > :not(.step-n) { opacity: 1; transform: none; }

/* Parallax suave en las fotos de servicios (lo mueve main.js) */
.service-media .ph img[data-parallax] { transform: scale(1.14); will-change: transform; }

@media print {
  .motion [data-reveal], .motion [data-reveal] > *, .motion .steps[data-reveal] .step > * {
    opacity: 1 !important; transform: none !important; clip-path: none !important;
  }
}
