/* =====================================================================
   NORTEA · Estilos (mobile-first)
   ===================================================================== */
:root {
  --navy: #0B1D2F;
  --navy-2: #12283F;
  --navy-3: #1C3550;
  --gold: #B8893A;
  --gold-light: #E8C777;
  --gold-grad: linear-gradient(135deg, #B8893A 0%, #CFA552 55%, #E8C777 100%);
  --cream: #F3F0E8;
  --white: #FFFFFF;
  --ink: #0B1D2F;
  --ink-soft: #3D4C5C;
  --on-dark-soft: #C9D0D8;
  --line: rgba(11, 29, 47, .12);
  --line-dark: rgba(255, 255, 255, .14);

  --f-head: "Montserrat", "Segoe UI", system-ui, -apple-system, sans-serif;
  --f-body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;

  --gutter: 20px;
  --radius: 4px;
  --header-h: 64px;
  --shadow: 0 1px 2px rgba(11,29,47,.06), 0 8px 24px rgba(11,29,47,.06);
  --shadow-hover: 0 2px 4px rgba(11,29,47,.08), 0 16px 40px rgba(11,29,47,.12);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
  margin: 0;
  font-family: var(--f-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--f-head); line-height: 1.15; margin: 0; font-weight: 600; overflow-wrap: break-word; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
[hidden] { display: none !important; }
address { font-style: normal; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--gold); color: var(--navy); padding: 10px 16px; font-weight: 600; border-radius: var(--radius);
}
.skip-link:focus { top: 12px; }

:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 3px; }
.section--light :focus-visible, .section:not(.section--navy) :focus-visible { outline-color: var(--gold); }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); }
.icon { width: 1.15em; height: 1.15em; flex: none; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: 48px; padding: 0 1.4em;
  font-family: var(--f-head); font-weight: 600; font-size: .9rem; letter-spacing: .04em;
  text-decoration: none; text-align: center; line-height: 1.2;
  border-radius: var(--radius); border: 1px solid transparent; cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background-color .25s, color .25s, border-color .25s;
}
.btn--gold { background: var(--gold-grad); color: var(--navy); box-shadow: 0 6px 18px rgba(184,137,58,.25); }
.btn--gold:hover { transform: translateY(-1px); box-shadow: 0 10px 26px rgba(184,137,58,.35); }
.btn--outline { color: var(--white); border-color: rgba(255,255,255,.55); background: transparent; }
.btn--outline:hover { border-color: var(--gold-light); color: var(--gold-light); }
.btn--sm { min-height: 40px; padding: 0 1em; font-size: .8rem; }
.btn--lg { min-height: 52px; font-size: .92rem; }
.btn--xl { min-height: 58px; padding: 0 2em; font-size: 1rem; }

/* ---------- Tipografía de sección ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--f-head); font-size: .72rem; font-weight: 600;
  letter-spacing: .22em; text-transform: uppercase; color: var(--ink-soft);
  margin-bottom: 14px;
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: var(--gold-grad); }
.eyebrow--light { color: var(--gold-light); }
.section-title {
  font-size: clamp(1.7rem, 6.4vw, 2.75rem);
  letter-spacing: .01em; font-weight: 600; color: var(--navy);
}
.section-title--light { color: var(--white); }
.section-lead { margin-top: 14px; color: var(--ink-soft); max-width: 56ch; font-size: 1.02rem; }

.section { padding: 72px 0; }
.section--light { background: var(--cream); }
.section--navy { background: var(--navy); color: var(--white); }
.section-head { margin-bottom: 36px; }
.section-head--center { text-align: center; }
.section-head--center .eyebrow { justify-content: center; }

/* ---------- Encabezado ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--header-h);
  background: rgba(11, 29, 47, .0);
  border-bottom: 1px solid transparent;
}
/* Fondo sólido desde el primer pixel de scroll, sin transición de color:
   así el logo claro nunca queda sobre fondo crema. */
.site-header.is-solid, .site-header.is-open {
  background: var(--navy);
  border-bottom-color: rgba(184, 137, 58, .28);
  box-shadow: 0 1px 0 rgba(0,0,0,.08), 0 6px 18px rgba(11,29,47,.18);
}
.header__inner { height: 100%; display: flex; align-items: center; gap: 12px; }
.header__brand { display: inline-flex; margin-right: auto; padding: 6px 0; }
.header__brand img { height: 24px; width: auto; }
.header__cta { display: none; }
.header__cta-long { display: none; }

.nav-toggle {
  width: 44px; height: 44px; display: inline-grid; place-items: center;
  background: transparent; border: 1px solid rgba(255,255,255,.25); border-radius: var(--radius);
  color: var(--white); cursor: pointer;
}
.nav-toggle .icon { width: 22px; height: 22px; }
.nav-toggle .icon--close { display: none; }
.nav-toggle[aria-expanded="true"] .icon--open { display: none; }
.nav-toggle[aria-expanded="true"] .icon--close { display: block; }

.nav {
  position: fixed; top: var(--header-h); left: 0; right: 0;
  background: var(--navy); border-bottom: 1px solid rgba(184,137,58,.28);
  padding: 8px var(--gutter) 24px;
  transform: translateY(-8px); opacity: 0; visibility: hidden;
  transition: opacity .25s var(--ease), transform .25s var(--ease), visibility .25s;
}
.nav.is-open { transform: none; opacity: 1; visibility: visible; }
.nav__list { list-style: none; }
.nav__list a {
  display: block; padding: 14px 0; color: var(--white); text-decoration: none;
  font-family: var(--f-head); font-size: .95rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 500;
  border-bottom: 1px solid var(--line-dark);
}
.nav__list a:hover { color: var(--gold-light); }
.nav__cta-mobile { width: 100%; margin-top: 20px; }

@media (min-width: 400px) {
  .header__cta { display: inline-flex; }
  .header__brand img { height: 26px; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; align-items: flex-end;
  color: var(--white); background: var(--navy); overflow: hidden;
  padding: calc(var(--header-h) + 48px) 0 64px;
}
.hero__media { position: absolute; inset: 0; }
.hero__img, .hero__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero__video { opacity: 0; transition: opacity .8s ease; }
.hero__video.is-playing { opacity: 1; }
/* cierre vectorial (trazo + logo) que main.js dibuja encima del video, alineado con su encuadre */
.hero__cierre { position: absolute; left: 0; top: 0; max-width: none; max-height: none; pointer-events: none; opacity: 0; overflow: visible; }
/* El video deja libre la mitad inferior en celular y la izquierda en escritorio:
   la capa azul solo refuerza esa zona para que el texto HTML se lea bien. */
.hero__media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(11,29,47,0) 0%, rgba(11,29,47,0) 48%, rgba(11,29,47,.78) 72%, rgba(11,29,47,.94) 100%);
}
.hero__content { position: relative; z-index: 1; }
.hero__note { margin-top: 14px; font-size: .9rem; color: var(--on-dark-soft); }
/* Celular: sin la línea superior para no invadir el video */
@media (max-width: 639px) { .hero .eyebrow { display: none; } }
.hero__title {
  font-size: clamp(2.2rem, 10.5vw, 4.6rem);
  font-weight: 600; letter-spacing: -.005em; line-height: 1.06;
  max-width: 14ch; text-wrap: balance;
}
.hero__lead { margin-top: 20px; font-size: clamp(1.02rem, 4.2vw, 1.25rem); color: #E6EAEE; max-width: 46ch; }
.hero__actions { margin-top: 32px; display: flex; flex-direction: column; gap: 12px; }
.hero__actions .btn { width: 100%; }

/* ---------- Quiénes somos ---------- */
.about { display: grid; gap: 28px; }
.about__text { display: grid; gap: 20px; }
.about__media { margin: 0; position: relative; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--radius); background: var(--navy-2); }
.about__media img { width: 100%; height: 100%; object-fit: cover; }
.about__media::before { content: ""; position: absolute; left: 0; top: 0; width: 64px; height: 2px; background: var(--gold-grad); z-index: 1; }
.about__body p { color: var(--ink-soft); font-size: 1.05rem; }
.about__body p + p { margin-top: 16px; }
.facts { list-style: none; display: grid; gap: 12px; margin-top: 40px; }
.fact {
  background: var(--white); padding: 22px 20px; border-radius: var(--radius);
  border-top: 2px solid var(--gold); box-shadow: var(--shadow);
  display: grid; grid-template-columns: 36px 1fr; column-gap: 14px; align-items: start;
}
.fact__icon { width: 28px; height: 28px; color: var(--gold); grid-row: span 2; margin-top: 2px; }
.fact h3 { font-size: 1rem; letter-spacing: .01em; }
.fact p { font-size: .92rem; color: var(--ink-soft); margin-top: 4px; }

/* ---------- Servicios ---------- */
.services { list-style: none; display: grid; gap: 14px; }
.service {
  position: relative; padding: 28px 24px; background: var(--white);
  border: 1px solid var(--line); border-radius: var(--radius);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s;
  display: flex; flex-direction: column;
}
.service::after {
  content: ""; position: absolute; left: 24px; right: 24px; bottom: -1px; height: 2px;
  background: var(--gold-grad); transform: scaleX(0); transform-origin: left; transition: transform .4s var(--ease);
}
.service:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); border-color: transparent; }
.service:hover::after { transform: scaleX(1); }
.service__icon { width: 44px; height: 44px; color: var(--gold); margin-bottom: 18px; }
.service h3 { font-size: 1.12rem; }
.service p { margin-top: 8px; color: var(--ink-soft); font-size: .96rem; flex: 1; }
.service--feature { padding: 0; overflow: hidden; }
.service__media { position: relative; aspect-ratio: 4 / 3; background: var(--navy-2); overflow: hidden; }
.service__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.service--feature:hover .service__media img { transform: scale(1.03); }
.service__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11,29,47,0) 55%, rgba(11,29,47,.55)); }
.service__num {
  position: absolute; left: 20px; bottom: 14px; z-index: 1;
  font-family: var(--f-head); font-weight: 600; font-size: .8rem; letter-spacing: .2em; color: var(--white);
  padding-top: 8px; border-top: 1px solid var(--gold-light);
}
.service__body { padding: 24px 24px 22px; display: flex; flex-direction: column; flex: 1; }
.service--feature h3 { font-size: 1.3rem; }
.link-cta {
  margin-top: 18px; align-self: flex-start;
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
  font-family: var(--f-head); font-weight: 600; font-size: .82rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--navy); text-decoration: none;
  background-image: var(--gold-grad); background-size: 100% 1px; background-repeat: no-repeat; background-position: 0 calc(100% - 8px);
}
.link-cta .icon { transition: transform .25s var(--ease); color: var(--gold); }
.link-cta:hover .icon { transform: translateX(4px); }

/* ---------- Catálogo ---------- */
.filters {
  display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 14px; margin: 0 calc(-1 * var(--gutter)) 18px;
  padding-left: var(--gutter); padding-right: var(--gutter);
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.filters::-webkit-scrollbar { display: none; }
.filter {
  flex: none; min-height: 40px; padding: 0 16px;
  font-family: var(--f-head); font-size: .78rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--navy); background: transparent; border: 1px solid rgba(11,29,47,.25); border-radius: 999px; cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s;
}
.filter:hover { border-color: var(--gold); }
.filter.is-active { background: var(--navy); color: var(--white); border-color: var(--navy); }

.works { list-style: none; display: grid; gap: 18px; }
.work { background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.work:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.work__btn { all: unset; display: block; width: 100%; cursor: pointer; box-sizing: border-box; }
.work__btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.work__media { position: relative; aspect-ratio: 4 / 3; background: var(--navy-2); overflow: hidden; }
.work__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.work:hover .work__media img { transform: scale(1.03); }
.work__badge {
  position: absolute; top: 12px; left: 12px; padding: 4px 10px; border-radius: 2px;
  font-family: var(--f-head); font-size: .66rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  background: var(--white); color: var(--navy);
}
.work__badge--ejemplo { background: #FCE9B8; color: #5A3F0B; }
.work__badge + .work__badge { left: auto; right: 12px; }
.work__photos {
  position: absolute; right: 12px; bottom: 12px; padding: 3px 9px; border-radius: 2px;
  background: rgba(11,29,47,.78); color: var(--white); font-size: .74rem;
}
.work__body { padding: 18px 20px 20px; }
.work__type { font-family: var(--f-head); font-size: .7rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: #7A5B21; }
.work__title { font-size: 1.08rem; margin-top: 6px; }
.work__loc { display: flex; align-items: center; gap: 6px; margin-top: 8px; color: var(--ink-soft); font-size: .9rem; }
.work__loc .icon { color: var(--gold); width: 16px; height: 16px; }
.works__empty { padding: 24px; text-align: center; color: var(--ink-soft); border: 1px dashed rgba(11,29,47,.25); border-radius: var(--radius); }

/* Vista ampliada */
.work-dialog {
  width: 100%; max-width: 100%; height: 100%; max-height: 100%; margin: 0; padding: 0; border: 0;
  background: var(--white); color: var(--ink); overflow-y: auto; overscroll-behavior: contain;
}
.work-dialog::backdrop { background: rgba(11, 29, 47, .82); }
.work-dialog[open] { animation: dlg-in .3s var(--ease); }
@keyframes dlg-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.work-dialog__inner { position: relative; display: flex; flex-direction: column; }
.work-dialog__close {
  position: absolute; top: 12px; right: 12px; z-index: 3; width: 44px; height: 44px;
  display: grid; place-items: center; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(11,29,47,.8); color: var(--white);
}
.work-dialog__close .icon { width: 22px; height: 22px; }
.carousel { position: relative; background: var(--navy); }
.carousel__track {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  scrollbar-width: none; height: min(62vh, 520px);
}
.carousel__track::-webkit-scrollbar { display: none; }
.carousel__slide { flex: 0 0 100%; scroll-snap-align: center; margin: 0; height: 100%; }
/* contain: la foto se ve completa, sea horizontal o vertical */
.carousel__slide img { width: 100%; height: 100%; object-fit: contain; }
.carousel__btn {
  position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px;
  display: grid; place-items: center; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255,255,255,.92); color: var(--navy); box-shadow: var(--shadow);
}
.carousel__btn:disabled { opacity: .35; cursor: default; }
.carousel__btn--prev { left: 12px; }
.carousel__btn--next { right: 12px; }
.carousel__count {
  position: absolute; left: 12px; bottom: 12px; padding: 3px 10px; border-radius: 2px;
  background: rgba(11,29,47,.8); color: var(--white); font-size: .78rem;
}
.work-dialog__body { padding: 24px var(--gutter) 32px; }
.work-dialog__meta { font-family: var(--f-head); font-size: .7rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: #7A5B21; }
.work-dialog__title { font-size: 1.45rem; margin-top: 8px; }
.work-dialog__client { margin-top: 6px; font-size: .9rem; color: var(--ink-soft); }
.work-dialog__desc { margin: 12px 0 18px; color: var(--ink-soft); }
.work-dialog__subtitle { font-size: .72rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: #7A5B21; margin-bottom: 8px; }
.work-dialog__list { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 24px; }
.work-dialog__list li { font-size: .82rem; padding: 4px 10px; background: var(--cream); border-radius: 2px; color: var(--navy); }
.work-dialog__body .btn { width: 100%; }

/* ---------- Proceso ---------- */
.timeline { list-style: none; position: relative; display: grid; gap: 28px; padding-left: 4px; }
.timeline::before {
  content: ""; position: absolute; left: 25px; top: 8px; bottom: 8px; width: 1px;
  background: linear-gradient(180deg, var(--gold), rgba(184,137,58,.15));
}
.step { position: relative; display: grid; grid-template-columns: 44px 1fr; gap: 18px; align-items: start; }
.step__num {
  position: relative; z-index: 1; width: 44px; height: 44px; display: grid; place-items: center;
  font-family: var(--f-head); font-weight: 600; font-size: .85rem; letter-spacing: .06em;
  color: var(--navy); background: var(--white); border: 1px solid var(--gold); border-radius: 50%;
}
.step h3 { font-size: 1.08rem; padding-top: 10px; }
.step p { margin-top: 6px; color: var(--ink-soft); font-size: .96rem; }

/* ---------- Clientes ---------- */
.clients__list { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 28px 44px; align-items: center; }
.clients__list li { font-family: var(--f-head); font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); font-size: .85rem; }
.clients__list img { height: 40px; width: auto; filter: grayscale(1); opacity: .75; }

/* ---------- Cierre ---------- */
.cta { position: relative; overflow: hidden; text-align: center; }
.cta::before {
  content: ""; position: absolute; inset: auto -10% -60% -10%; height: 120%;
  background: radial-gradient(closest-side, rgba(184,137,58,.14), transparent 70%);
  pointer-events: none;
}
.cta__inner { position: relative; display: flex; flex-direction: column; align-items: center; }
.cta .eyebrow { justify-content: center; }
.cta__lead { margin-top: 16px; color: var(--on-dark-soft); font-size: 1.05rem; }
.cta__list {
  list-style: none; margin: 18px 0 32px; display: grid; gap: 10px; text-align: left;
}
.cta__list li { position: relative; padding-left: 26px; color: var(--white); }
.cta__list li::before {
  content: ""; position: absolute; left: 0; top: .62em; width: 14px; height: 1px; background: var(--gold-grad);
}
.cta__chips { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 22px 0 30px; max-width: 640px; }
.chip {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px;
  font-family: var(--f-head); font-weight: 600; font-size: .82rem; letter-spacing: .06em; text-decoration: none;
  color: var(--white); border: 1px solid rgba(232,199,119,.45); transition: background-color .2s, color .2s, border-color .2s;
}
.chip:hover { border-color: var(--gold-light); color: var(--gold-light); }
.chip--main { background: var(--gold-grad); color: var(--navy); border-color: transparent; }
.chip--main:hover { color: var(--navy); }
.cta .btn--xl { width: 100%; max-width: 420px; }
.cta__note { margin-top: 14px; font-size: .88rem; color: var(--on-dark-soft); }

/* ---------- Pie ---------- */
.site-footer { background: #081624; color: var(--on-dark-soft); padding: 56px 0 calc(28px + env(safe-area-inset-bottom)); border-top: 1px solid rgba(184,137,58,.3); }
.footer__grid { display: grid; gap: 40px; }
.footer__brand img { width: 170px; height: auto; }
.footer__brand p { margin-top: 18px; font-size: .95rem; }
.footer__title {
  font-size: .74rem; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--gold-light); margin-bottom: 16px;
}
.footer__person { color: var(--white); font-weight: 600; margin-bottom: 6px; }
.contact-list { list-style: none; display: grid; gap: 4px; }
.contact-list li { display: flex; gap: 12px; align-items: flex-start; padding: 8px 0; font-size: .96rem; }
.contact-list .icon { color: var(--gold); margin-top: 4px; }
.contact-list a { color: var(--white); text-decoration: none; overflow-wrap: anywhere; }
.contact-list a:hover { color: var(--gold-light); text-decoration: underline; text-underline-offset: 3px; }
.map-facade {
  border: 1px solid var(--line-dark); border-radius: var(--radius); padding: 22px; display: grid; gap: 14px; justify-items: start;
  background: linear-gradient(135deg, rgba(255,255,255,.03), rgba(255,255,255,0));
}
.map-facade__link { font-size: .88rem; color: var(--on-dark-soft); }
.map-frame { width: 100%; aspect-ratio: 4 / 3; border: 0; border-radius: var(--radius); filter: grayscale(.3); }
.footer__bottom {
  margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line-dark);
  display: flex; flex-direction: column; gap: 10px; font-size: .84rem;
  padding-bottom: 72px; /* espacio para el botón flotante en celular */
}
.footer__bottom a { color: var(--on-dark-soft); }
.footer__bottom a:hover { color: var(--gold-light); }

/* ---------- WhatsApp flotante ---------- */
.wa-float {
  position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 90;
  width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center;
  background: var(--gold-grad); color: var(--navy);
  box-shadow: 0 8px 24px rgba(0,0,0,.28), 0 0 0 4px rgba(11,29,47,.15);
  transition: transform .25s var(--ease), opacity .25s;
}
.wa-float svg { width: 30px; height: 30px; }
.wa-float:hover { transform: scale(1.05); }
.wa-float.is-hidden { opacity: 0; pointer-events: none; transform: translateY(12px); }

/* ---------- Animación de aparición ----------
   El contenido es visible por defecto. main.js marca con .is-pending solo lo que
   está debajo de la pantalla al cargar, y lo libera antes de que llegue a la vista
   (o de inmediato si se salta con Fin / scroll rápido). */
.reveal { transition: opacity .5s var(--ease), transform .5s var(--ease); }
.reveal.is-pending { opacity: 0; transform: translateY(12px); }

/* =====================================================================
   Tablet y escritorio
   ===================================================================== */
@media (min-width: 640px) {
  :root { --gutter: 32px; }
  .hero__actions { flex-direction: row; flex-wrap: wrap; }
  .hero__actions .btn { width: auto; }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .services { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 1fr; }
  /* 5 tarjetas en 2 columnas: la última va centrada, del mismo ancho */
  .service:last-child:nth-child(odd) { grid-column: 1 / -1; justify-self: center; width: calc(50% - 7px); }
  .works { grid-template-columns: repeat(2, 1fr); }
  .cta__list { grid-template-columns: repeat(2, auto); column-gap: 40px; }
  .footer__bottom { flex-direction: row; justify-content: space-between; }
  .work-dialog { max-width: 920px; height: fit-content; max-height: calc(100% - 48px); margin: auto; border-radius: 6px; }
  .work-dialog__body { padding: 28px 36px 36px; }
  .work-dialog__body .btn { width: auto; }
}

@media (min-width: 900px) {
  :root { --header-h: 80px; }
  .section { padding: 112px 0; }
  .section-head { margin-bottom: 52px; }
  .header__brand img { height: 30px; }
  .header__cta-short { display: none; }
  .header__cta-long { display: inline; }
  .nav-toggle { display: none; }
  .nav {
    position: static; transform: none; opacity: 1; visibility: visible;
    background: none; border: 0; padding: 0; margin-right: 12px;
  }
  .nav__list { display: flex; gap: 34px; }
  .nav__list a {
    position: relative; border: 0; padding: 8px 0;
    font-size: .76rem; letter-spacing: .2em; color: rgba(255,255,255,.88);
  }
  .nav__list a::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--gold-grad);
    transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease);
  }
  .nav__list a:hover { color: var(--white); }
  .nav__list a:hover::after, .nav__list a[aria-current="true"]::after { transform: scaleX(1); }
  .nav__cta-mobile { display: none; }
  .header__cta { min-height: 44px; padding: 0 1.3em; }

  .hero { align-items: center; padding-bottom: 96px; }
  /* El texto se recorre a la orilla izquierda y se compacta: la animación ocupa la derecha (x 40–97 %) */
  .hero__content.container { max-width: none; margin: 0; padding-left: clamp(24px, 5vw, 96px); }
  .hero__content > * { max-width: min(31vw, 460px); }
  .hero__title { max-width: 11ch; font-size: clamp(2.4rem, 3.9vw, 3.7rem); }
  .hero__lead { font-size: 1.08rem; margin-top: 16px; }
  .hero__actions { margin-top: 26px; }

  .about { grid-template-columns: 5fr 7fr; gap: 64px; align-items: center; }
  .about__media { aspect-ratio: 4 / 5; }
  .facts { grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 64px; }
  .fact { grid-template-columns: 1fr; padding: 28px 24px; }
  .fact__icon { grid-row: auto; margin-bottom: 16px; }

  /* 3 arriba y 2 abajo centradas, todas del mismo ancho */
  .services { grid-template-columns: repeat(6, 1fr); grid-auto-rows: 1fr; gap: 20px; }
  .service { grid-column: span 2; padding: 36px 32px; }
  .service--feature { padding: 0; }
  .service__body { padding: 28px 32px 26px; }
  .service:last-child:nth-child(odd) { width: auto; justify-self: stretch; }
  .service:nth-child(4):nth-last-child(2) { grid-column: 2 / span 2; }
  .service:nth-child(5):last-child { grid-column: 4 / span 2; }

  .filters { overflow: visible; flex-wrap: wrap; margin-left: 0; margin-right: 0; padding-left: 2px; padding-right: 2px; }
  .works { grid-template-columns: repeat(3, 1fr); gap: 24px; }

  .timeline { grid-template-columns: repeat(5, 1fr); gap: 24px; padding-left: 0; }
  .timeline::before { left: 22px; right: 0; top: 22px; bottom: auto; width: auto; height: 1px; background: linear-gradient(90deg, var(--gold), rgba(184,137,58,.15)); }
  .step { grid-template-columns: 1fr; gap: 18px; }
  .step h3 { padding-top: 0; }

  .footer__grid { grid-template-columns: 1.1fr 1.4fr 1.2fr; gap: 56px; }
  .footer__bottom { padding-bottom: 0; }
  .wa-float { display: none; }
}

@media (min-width: 1100px) {
  .work-dialog { max-width: 1120px; }
  .work-dialog__inner { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); align-items: stretch; }
  .carousel { min-width: 0; }
  .carousel__track { height: min(78vh, 600px); }
  .work-dialog__body { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
}

/* Pantallas horizontales: el texto va a la izquierda, el video trabaja a la derecha */
@media (min-aspect-ratio: 4/5) and (min-width: 640px) {
  .hero__media::after {
    background: linear-gradient(90deg, rgba(11,29,47,.9) 0%, rgba(11,29,47,.6) 26%, rgba(11,29,47,0) 40%);
  }
  /* En ventanas más cuadradas el recorte favorece la derecha, donde está la animación */
  .hero__img, .hero__video { object-position: 65% 50%; }
}

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal.is-pending { opacity: 1; transform: none; }
  .carousel__track { scroll-behavior: auto; }
}
