/* ============================================================
   INFINITUM — Sistema de la web
   Version 2026-09-18 1800 v1
   Paleta y tipografia verificadas contra el manual de marca:
   Navy #14213D · Dorado champagne #C9A85C · Dorado sobre blanco #8A6D1D
   Tipografia web: Inter
   ============================================================ */

:root {
  --navy: #14213D;
  --navy-900: #14213D;   /* sin otro azul: el navy de la marca */
  --navy-700: #14213D;
  --gold: #C9A85C;
  --gold-dark: #8A6D1D;      /* el dorado legible sobre blanco */
  --white: #FFFFFF;
  --paper: #F7F4EC;
  --line: rgba(20, 33, 61, 0.12);
  --line-light: rgba(255, 255, 255, 0.18);
  --text: #14213D;
  --text-soft: #52514E;
  --text-on-dark: rgba(255, 255, 255, 0.72);

  --f: 'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --gutter: clamp(20px, 5vw, 80px);
  --maxw: 1440px;
}

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

/* El corte horizontal va en html, NO en body.
   Puesto en body, la regla convierte al body en su propio contenedor de
   scroll: window.scrollY se queda en 0, la cabecera nunca se vuelve solida
   y el logo blanco desaparece sobre las secciones blancas. */
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: hidden; }

body {
  margin: 0;
  font-family: var(--f);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

body.menu-open { overflow: hidden; }

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Rejilla ---------- */

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

section { padding: clamp(64px, 10vw, 140px) 0; }

/* ---------- Cabecera ---------- */

.hdr {
  position: fixed; top: 0; left: 0; right: 0; z-index: 90;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px var(--gutter);
  transition: background 0.4s var(--ease), padding 0.4s var(--ease);
}
.hdr.solid {
  background: rgba(20, 33, 61, 0.94);
  backdrop-filter: saturate(140%) blur(14px);
  padding-top: 12px; padding-bottom: 12px;
}
.hdr__logo img { height: 43px; width: auto; }   /* 160 px de ancho: mínimo del logo con descriptor en pantalla retina */
.hdr__right { display: flex; align-items: center; gap: 18px; }

.pill {
  display: inline-flex; align-items: center; gap: 8px;
  border-radius: 999px; padding: 10px 22px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  background: var(--white); color: var(--navy);
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}
.pill:hover { background: var(--gold); color: var(--navy); }
.pill--gold { background: var(--gold); color: var(--navy); }
.pill--gold:hover { background: var(--white); }
.pill--line { background: transparent; color: var(--white); box-shadow: inset 0 0 0 1px var(--line-light); }
.pill--line:hover { background: var(--white); color: var(--navy); }

.burger { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; width: 30px; height: 30px; justify-content: center; }
.burger span { display: block; height: 1px; background: var(--white); transition: width 0.3s var(--ease); }
.burger span:nth-child(1) { width: 28px; }
.burger span:nth-child(2) { width: 20px; }
.burger span:nth-child(3) { width: 28px; }
.burger:hover span:nth-child(2) { width: 28px; }

/* La cabecera sobre fondo claro invierte */
.hdr--light .burger span { background: var(--navy); }
.hdr--light .pill { background: var(--navy); color: var(--white); }
.hdr--light .pill:hover { background: var(--gold); color: var(--navy); }

/* ---------- Menu de pantalla completa ---------- */

.menu {
  position: fixed; inset: 0; z-index: 100;
  background: var(--navy);
  display: grid; grid-template-rows: auto 1fr auto;
  padding: 24px var(--gutter) 40px;
  opacity: 0; visibility: hidden; transform: translateY(-12px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease), visibility 0.4s;
}
.menu.open { opacity: 1; visibility: visible; transform: none; }
.menu__top { display: flex; align-items: center; justify-content: space-between; }
.menu__top img { height: 43px; }
.menu__close { font-size: 30px; line-height: 1; color: var(--white); padding: 6px 10px; }
.menu__close:hover { color: var(--gold); }

.menu__nav { display: flex; flex-direction: column; justify-content: center; gap: 2px; }
.menu__nav a {
  display: flex; align-items: baseline; gap: 18px;
  font-size: clamp(26px, 4.6vw, 54px); font-weight: 200; letter-spacing: -0.02em;
  color: var(--white); padding: 10px 0;
  border-bottom: 1px solid var(--line-light);
  transition: color 0.25s var(--ease), padding-left 0.35s var(--ease);
}
.menu__nav a:hover { color: var(--gold); padding-left: 16px; }
.menu__nav a span { font-size: 11px; font-weight: 500; letter-spacing: 0.2em; color: var(--gold); }
.menu__nav a.is-here { color: var(--gold); }

.menu__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; color: var(--text-on-dark); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; }
.menu__foot a:hover { color: var(--gold); }
.lang button { font-size: 12px; letter-spacing: 0.2em; color: var(--text-on-dark); padding: 4px 2px; }
.lang button.on { color: var(--gold); }
.lang span { opacity: 0.4; margin: 0 8px; }

/* ---------- Heroe de portada ---------- */

.hero { position: relative; height: 100svh; min-height: 560px; width: 100%; overflow: hidden; background: var(--navy-900); }
.hero__media { position: absolute; inset: 0; }
.hero__media img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 1.1s var(--ease), transform 7s linear;
  transform: scale(1.06);
}
.hero__media img.on { opacity: 1; transform: scale(1); }
.hero::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(12,22,40,0.55) 0%, rgba(12,22,40,0.15) 38%, rgba(12,22,40,0.72) 100%);
}
.hero__inner {
  position: relative; z-index: 2; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; color: var(--white); padding: 0 var(--gutter);
}
.hero__word {
  font-size: clamp(38px, 9.5vw, 132px); font-weight: 200; letter-spacing: 0.02em;
  line-height: 1; margin: 0; text-transform: uppercase;
}
.hero__sub { margin: 18px 0 0; font-size: clamp(12px, 1.4vw, 15px); letter-spacing: 0.3em; text-transform: uppercase; color: rgba(255,255,255,0.8); }
.hero__cta { margin-top: 38px; }

.hero__dots { position: absolute; bottom: 34px; left: 50%; transform: translateX(-50%); z-index: 3; display: flex; gap: 10px; }
.hero__dots button { width: 34px; height: 2px; background: rgba(255,255,255,0.32); transition: background 0.3s var(--ease); }
.hero__dots button.on { background: var(--gold); }

/* ---------- Heroe interior ---------- */

.phero { position: relative; min-height: 58svh; display: flex; align-items: flex-end; background: var(--navy-900); color: var(--white); overflow: hidden; }
.phero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.55; }
.phero::after {
  content: ''; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(12,22,40,0.66) 0%, rgba(12,22,40,0.30) 34%, rgba(12,22,40,0.92) 100%);
}
.phero__in { position: relative; z-index: 2; width: 100%; max-width: var(--maxw); margin: 0 auto; padding: clamp(110px, 14vw, 150px) var(--gutter) clamp(44px, 7vw, 88px); }
.phero h1 { font-size: clamp(34px, 6.4vw, 84px); font-weight: 200; letter-spacing: -0.02em; line-height: 1.02; margin: 12px 0 0; }
.phero p { max-width: 620px; margin: 20px 0 0; color: rgba(255,255,255,0.78); font-size: clamp(15px, 1.5vw, 18px); font-weight: 300; }

/* ---------- Tipografia de seccion ---------- */

.eyebrow {
  font-size: 11px; font-weight: 600; letter-spacing: 0.26em; text-transform: uppercase;
  color: var(--gold-dark); margin: 0 0 22px;
}
.eyebrow::before { content: '.'; margin-right: 2px; }
.on-dark .eyebrow, .phero .eyebrow { color: var(--gold); }

h2.big { font-size: clamp(28px, 4.6vw, 62px); font-weight: 200; letter-spacing: -0.02em; line-height: 1.06; margin: 0 0 28px; }
h3 { font-weight: 400; letter-spacing: -0.01em; }
p.lead { font-size: clamp(16px, 1.7vw, 21px); font-weight: 300; color: var(--text-soft); max-width: 720px; line-height: 1.65; }

.on-dark { background: var(--navy); color: var(--white); }
.on-dark p.lead, .on-dark p { color: var(--text-on-dark); }
.on-dark h2.big, .on-dark h3 { color: var(--white); }

.rule { height: 1px; background: var(--line); border: 0; margin: 0; }
.on-dark .rule { background: var(--line-light); }

/* ---------- Cifras ---------- */

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1px; background: var(--line); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.on-dark .stats, .on-dark .stats { background: var(--line-light); border-color: var(--line-light); }
.stat { background: var(--white); padding: 34px 26px; }
.on-dark .stat { background: var(--navy); }
.stat b { display: block; font-size: clamp(30px, 4vw, 52px); font-weight: 200; letter-spacing: -0.02em; color: var(--navy); line-height: 1; }
.on-dark .stat b { color: var(--gold); }
.stat span { display: block; margin-top: 10px; font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--text-soft); }
.on-dark .stat span { color: var(--text-on-dark); }

/* ---------- Rejilla de proyectos ---------- */

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 40px; }
.filters button {
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 500;
  padding: 9px 20px; border-radius: 999px; color: var(--text-soft);
  box-shadow: inset 0 0 0 1px var(--line); transition: all 0.25s var(--ease);
}
.filters button:hover { color: var(--navy); box-shadow: inset 0 0 0 1px var(--navy); }
.filters button.on { background: var(--navy); color: var(--white); box-shadow: none; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: clamp(18px, 2.4vw, 34px); }
.card { position: relative; display: block; overflow: hidden; background: var(--navy-900); }
.card__img { position: relative; aspect-ratio: 4 / 3; overflow: hidden; }
.card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.card:hover .card__img img { transform: scale(1.05); }
.card__img::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(12,22,40,0) 42%, rgba(12,22,40,0.88) 100%); }
.card__txt { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 26px; color: var(--white); }
.card__txt h3 { margin: 0; font-size: clamp(18px, 2vw, 26px); font-weight: 300; letter-spacing: 0.01em; }
.card__txt span { display: block; margin-top: 8px; font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold); }
.card__meta { display: block; margin-top: 4px; font-size: 11px; letter-spacing: 0.1em; color: rgba(255,255,255,0.64); text-transform: none; }
.card.hide { display: none; }

/* ---------- Lista numerada de servicios ---------- */

.svc { border-top: 1px solid var(--line); }
.on-dark .svc { border-color: var(--line-light); }
.svc__row {
  display: grid; grid-template-columns: 72px 1fr; gap: clamp(16px, 4vw, 60px);
  padding: clamp(28px, 4vw, 46px) 0; border-bottom: 1px solid var(--line);
  transition: padding-left 0.4s var(--ease);
}
.on-dark .svc__row { border-color: var(--line-light); }
.svc__row:hover { padding-left: 12px; }
.svc__n { font-size: 12px; letter-spacing: 0.16em; color: var(--gold-dark); font-weight: 600; padding-top: 8px; }
.on-dark .svc__n { color: var(--gold); }
.svc__row h3 { margin: 0 0 12px; font-size: clamp(20px, 2.6vw, 32px); font-weight: 300; }
.svc__row p { margin: 0; max-width: 780px; color: var(--text-soft); font-weight: 300; }
.on-dark .svc__row p { color: var(--text-on-dark); }

/* ---------- Clientes ---------- */

.clients { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.client { background: var(--white); padding: 34px 30px; min-height: 190px; display: flex; flex-direction: column; justify-content: flex-end; transition: background 0.3s var(--ease); }
.client:hover { background: var(--paper); }
.client h3 { margin: 0 0 10px; font-size: 20px; font-weight: 400; letter-spacing: 0.02em; }
.client p { margin: 0; font-size: 14px; color: var(--text-soft); font-weight: 300; line-height: 1.55; }
.client i { font-style: normal; display: block; margin-bottom: auto; font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold-dark); }

/* ---------- Catalogos ---------- */

.cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: clamp(16px, 2vw, 26px); }
.cat { position: relative; display: flex; flex-direction: column; justify-content: space-between; min-height: 230px; padding: 28px; background: var(--navy); color: var(--white); overflow: hidden; transition: transform 0.4s var(--ease); }
.cat:hover { transform: translateY(-4px); }
.cat::before { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(201,168,92,0.20), transparent 62%); opacity: 0; transition: opacity 0.4s var(--ease); }
.cat:hover::before { opacity: 1; }
.cat b { position: relative; font-size: 11px; letter-spacing: 0.24em; color: var(--gold); font-weight: 600; }
.cat h3 { position: relative; margin: 0; font-size: clamp(20px, 2.2vw, 28px); font-weight: 300; }
.cat span { position: relative; font-size: 12px; letter-spacing: 0.14em; color: rgba(255,255,255,0.6); }

/* ---------- Grupo empresarial ---------- */

.group { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: var(--line-light); }
.group div { background: var(--navy); padding: 30px 20px; text-align: center; }
.group b { display: block; font-size: 15px; letter-spacing: 0.16em; color: var(--white); font-weight: 500; }
.group span { display: block; margin-top: 8px; font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); }

/* ---------- Formulario ---------- */

.form { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--text-soft); }
.field input, .field textarea, .field select {
  font: inherit; font-size: 15px; font-weight: 300; color: var(--text);
  background: transparent; border: 0; border-bottom: 1px solid var(--line);
  padding: 10px 0; border-radius: 0; transition: border-color 0.3s var(--ease);
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-bottom-color: var(--gold-dark); }
.field textarea { resize: vertical; min-height: 120px; }

.contact-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 34px; }
.contact-list h4 { margin: 0 0 8px; font-size: 10px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--gold); font-weight: 600; }
.contact-list p { margin: 0; font-size: 17px; font-weight: 300; line-height: 1.5; }
.contact-list a:hover { color: var(--gold); }

/* ---------- Franja de cierre ---------- */

.cta-band { background: var(--navy); color: var(--white); text-align: center; }
.cta-band h2 { font-size: clamp(26px, 4.4vw, 58px); font-weight: 200; letter-spacing: -0.02em; margin: 0 0 30px; }

/* ---------- Pie ---------- */

.ftr { background: var(--navy-900); color: rgba(255,255,255,0.6); padding: clamp(46px, 6vw, 76px) 0 32px; font-size: 13px; }
.ftr__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 34px; padding-bottom: 42px; }
.ftr h5 { margin: 0 0 14px; font-size: 10px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--gold); font-weight: 600; }
.ftr ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.ftr a:hover { color: var(--white); }
.ftr__bot { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 26px; display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; font-size: 11px; letter-spacing: 0.1em; }
.ftr__logo img { height: 43px; margin-bottom: 18px; }

/* ---------- WhatsApp flotante ---------- */

.wa {
  position: fixed; right: 22px; bottom: 22px; z-index: 80;
  width: 54px; height: 54px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--gold); color: var(--navy);
  box-shadow: 0 10px 30px rgba(20,33,61,0.28);
  transition: transform 0.3s var(--ease);
}
.wa:hover { transform: scale(1.08); }
.wa svg { width: 27px; height: 27px; }

/* ---------- Aparicion al hacer scroll ---------- */

/* Si el JS no corre, nada se esconde. Una pagina en blanco es peor
   que una pagina sin animacion. */
.js .rise { opacity: 0; transform: translateY(18px); transition: opacity 0.55s var(--ease), transform 0.55s var(--ease); }
.js .rise.in { opacity: 1; transform: none; }

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

/* ---------- Celular ---------- */

@media (max-width: 760px) {
  .hdr__logo img { height: 43px; }
  .pill { padding: 9px 16px; font-size: 11px; letter-spacing: 0.1em; }
  .hero__dots button { width: 22px; }
  .svc__row { grid-template-columns: 1fr; gap: 10px; }
  .svc__n { padding-top: 0; }
  .menu__nav a { font-size: 26px; }
  .menu { grid-template-rows: auto 1fr auto; }
  .contact-list { gap: 26px; }
}

/* ---------- Banda destacada de un proyecto ---------- */

.feature { position: relative; display: block; overflow: hidden; background: var(--navy-900); margin-bottom: clamp(18px, 2.4vw, 34px); }
.feature img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 32 / 10; transition: transform 1.2s var(--ease); }
.feature:hover img { transform: scale(1.03); }
.feature::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(12,22,40,0.10) 30%, rgba(12,22,40,0.90) 100%); }
.feature__txt { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: clamp(20px, 3vw, 40px); color: var(--white); }
.feature__txt b { display: block; font-size: 10px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--gold); font-weight: 600; margin-bottom: 10px; }
.feature__txt h3 { margin: 0; font-size: clamp(24px, 4vw, 48px); font-weight: 200; letter-spacing: 0.01em; }
.feature__txt span { display: block; margin-top: 8px; font-size: 13px; letter-spacing: 0.1em; color: rgba(255,255,255,0.72); }

@media (max-width: 760px) {
  .feature img { aspect-ratio: 16 / 11; }
}

/* ---------- Las dos puertas ---------- */

.puertas { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; background: var(--line-light); }
.puerta {
  position: relative; display: block; min-height: 62svh; overflow: hidden;
  background: var(--navy-900); color: var(--white);
}
.puerta img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.5; transition: transform 1.2s var(--ease), opacity 0.5s var(--ease); }
.puerta:hover img { transform: scale(1.04); opacity: 0.62; }
.puerta::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(12,22,40,0.34) 0%, rgba(12,22,40,0.82) 100%); }
.puerta__in {
  position: relative; z-index: 2; height: 100%; min-height: inherit;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: clamp(28px, 4vw, 56px);
}
.puerta b { font-size: 10px; letter-spacing: 0.26em; text-transform: uppercase; color: var(--gold); font-weight: 600; }
.puerta h3 { margin: 14px 0 0; font-size: clamp(24px, 3.4vw, 42px); font-weight: 200; letter-spacing: -0.01em; line-height: 1.1; }
.puerta p { margin: 14px 0 0; max-width: 420px; color: rgba(255,255,255,0.8); font-weight: 300; }
.puerta ul { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.puerta li { font-size: 12px; letter-spacing: 0.1em; color: rgba(255,255,255,0.62); text-transform: uppercase; }
.puerta__ir { margin-top: 26px; display: inline-flex; align-items: center; gap: 10px; font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); font-weight: 600; }
.puerta:hover .puerta__ir { color: var(--white); }

/* ---------- Muro de aliados ---------- */

.aliados { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.aliado { background: var(--white); padding: 26px 18px; text-align: center; display: flex; flex-direction: column; justify-content: center; min-height: 118px; }
.aliado b { display: block; font-size: 14px; letter-spacing: 0.14em; color: var(--navy); font-weight: 600; }
.aliado span { display: block; margin-top: 7px; font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-soft); }
.aliado i { font-style: normal; display: block; margin-top: 6px; font-size: 9px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-dark); }

@media (max-width: 860px) {
  .puertas { grid-template-columns: 1fr; }
  .puerta { min-height: 52svh; }
}
