/* ============================================================================
   DINAMO INGENIERÍA — Sistema de diseño
   Corporativo industrial · oscuro premium · acento oro de marca
   ========================================================================== */

/* ------------------------------------------------------------------ Fuentes */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0,
    U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 600 800;
  font-display: swap;
  src: url('../fonts/archivo-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 600 800;
  font-display: swap;
  src: url('../fonts/archivo-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0,
    U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ------------------------------------------------------------------ Tokens */
:root {
  --ink-900: #05090d;
  --ink-850: #070d13;
  --ink-800: #0a1119;
  --ink-700: #101b25;
  --line-dark: #1e2c38;

  --paper: #ffffff;
  --paper-2: #f3f6f8;
  --paper-3: #e7edf1;
  --line: #dbe3e9;

  --text: #0b1620;
  --text-2: #40525f;
  --muted: #6a7c89;
  --muted-on-dark: #9db0be;

  --gold: #dfbe24;
  --gold-2: #f5d642;
  --gold-dim: rgba(223, 190, 36, .14);
  --teal: #0e7480;

  --font-display: 'Archivo', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;

  --wrap: 1240px;
  --wrap-narrow: 940px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --section-y: clamp(4.5rem, 9vw, 8.5rem);
  --radius: 4px;
  --radius-lg: 10px;

  --shadow-md: 0 10px 30px rgba(11, 22, 32, .10), 0 2px 6px rgba(11, 22, 32, .06);
  --shadow-lg: 0 30px 70px rgba(5, 9, 13, .28);

  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);

  --header-h: 84px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  font-feature-settings: 'kern' 1, 'liga' 1;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.nav-open { overflow: hidden; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -.018em;
  margin: 0 0 .6em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.3rem, 6vw, 4.5rem); }
h2 { font-size: clamp(1.8rem, 4.2vw, 3.1rem); }
h3 { font-size: clamp(1.1rem, 1.9vw, 1.5rem); letter-spacing: -.012em; }
h4 { font-size: 1.0625rem; letter-spacing: 0; }

p { margin: 0 0 1.1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

a { color: inherit; text-decoration: none; }

img, picture, svg { max-width: 100%; display: block; }
img { height: auto; }

ul { margin: 0; padding: 0; list-style: none; }

strong, b { font-weight: 650; }

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}

::selection { background: var(--gold); color: var(--ink-900); }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--gold); color: var(--ink-900);
  padding: .75rem 1.25rem; font-weight: 650;
}
.skip-link:focus { left: 0; }

.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;
}

/* ----------------------------------------------------------------- Layout */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap--narrow { max-width: var(--wrap-narrow); }

.section { padding-block: var(--section-y); position: relative; }
.section--tight { padding-block: clamp(3rem, 6vw, 5rem); }
.section--soft { background: var(--paper-2); }
.section--dark { background: var(--ink-850); color: #e7eef4; }
.section--dark h2, .section--dark h3 { color: #fff; }

/* Retícula técnica de fondo para bloques oscuros */
.section--grid::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .028) 1px, transparent 1px);
  background-size: 68px 68px;
  -webkit-mask-image: radial-gradient(ellipse 85% 70% at 50% 40%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 85% 70% at 50% 40%, #000 20%, transparent 75%);
  pointer-events: none;
}
.section > .wrap { position: relative; z-index: 1; }

.grid { display: grid; gap: clamp(1rem, 2.2vw, 1.75rem); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (max-width: 980px) {
  .grid--3, .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: minmax(0, 1fr); }
}

/* -------------------------------------------------------- Tipografía extra */
.eyebrow {
  display: inline-flex; align-items: center; gap: .7rem;
  font-family: var(--font-body);
  font-size: .75rem; font-weight: 650;
  letter-spacing: .19em; text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 1.1rem;
}
.eyebrow::before {
  content: ''; width: 2.25rem; height: 2px; background: var(--gold); flex: none;
}
.section--dark .eyebrow { color: var(--gold); }

.lead {
  font-size: clamp(1.02rem, 1.5vw, 1.18rem);
  color: var(--text-2);
  max-width: 62ch;
}
.section--dark .lead { color: #b9c8d3; }

.gold { color: var(--gold); }
.section-head { max-width: 68ch; margin-bottom: clamp(2.25rem, 4vw, 3.5rem); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head--center .eyebrow { justify-content: center; }
.section-head--center .lead { margin-inline: auto; }

/* ---------------------------------------------------------------- Botones */
.btn {
  display: inline-flex; align-items: center; gap: .65rem;
  font-family: var(--font-body);
  font-size: .8125rem; font-weight: 650;
  letter-spacing: .1em; text-transform: uppercase;
  padding: .95rem 1.6rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color .3s var(--ease), color .3s var(--ease),
              border-color .3s var(--ease), transform .3s var(--ease),
              box-shadow .3s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--gold { background: var(--gold); color: var(--ink-900); }
.btn--gold:hover { background: var(--gold-2); box-shadow: 0 10px 26px rgba(223, 190, 36, .3); }

.btn--ghost { border-color: rgba(255, 255, 255, .3); color: #fff; }
.btn--ghost:hover { border-color: var(--gold); color: var(--gold); background: rgba(223, 190, 36, .08); }

.btn--outline { border-color: var(--line); color: var(--text); background: var(--paper); }
.btn--outline:hover { border-color: var(--ink-800); box-shadow: var(--shadow-md); }

.btn__arrow { transition: transform .35s var(--ease-out); flex: none; }
.btn:hover .btn__arrow { transform: translateX(5px); }

.btn-row { display: flex; flex-wrap: wrap; gap: .9rem; }

/* --------------------------------------------------------------- Cabecera */
.progress {
  position: fixed; inset: 0 auto auto 0; z-index: 120;
  height: 3px; width: 100%;
  transform: scaleX(0); transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--gold), var(--gold-2));
}

.header {
  position: fixed; inset: 0 0 auto; z-index: 100;
  height: var(--header-h);
  display: flex; align-items: center;
  background: transparent;
  transition: height .35s var(--ease), background-color .35s var(--ease),
              box-shadow .35s var(--ease);
}
.header::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(5, 9, 13, .75), rgba(5, 9, 13, 0));
  opacity: 1; transition: opacity .35s var(--ease);
}
.header.is-stuck {
  height: 68px;
  background: rgba(6, 11, 17, .93);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .07), 0 12px 34px rgba(0, 0, 0, .3);
}
.header.is-stuck::after { opacity: 0; }

.header__inner {
  width: 100%; max-width: var(--wrap); margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex; align-items: center; gap: clamp(1rem, 3vw, 2.5rem);
}

.brand { flex: none; display: block; }
.brand img { height: 40px; width: auto; transition: height .35s var(--ease); }
.header.is-stuck .brand img { height: 32px; }

.nav { margin-left: auto; display: flex; align-items: center; gap: clamp(.4rem, 1.3vw, 1.05rem); }

.nav__link {
  position: relative; display: inline-block;
  font-family: var(--font-body);
  font-size: .78rem; font-weight: 600;
  letter-spacing: .085em; text-transform: uppercase;
  color: rgba(255, 255, 255, .84);
  padding: .55rem .2rem;
  white-space: nowrap;
  background: none; border: 0; cursor: pointer;
  transition: color .25s var(--ease);
}
.nav__link::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: .1rem;
  height: 2px; background: var(--gold);
  transform: scaleX(0); transform-origin: 0 50%;
  transition: transform .35s var(--ease-out);
}
.nav__link:hover { color: #fff; }
.nav__link:hover::after, .nav__link[aria-current='page']::after { transform: scaleX(1); }
.nav__link[aria-current='page'] { color: var(--gold); }

/* Menú desplegable de servicios */
.nav__group { position: relative; }
.nav__toggle { display: inline-flex; align-items: center; gap: .4rem; }
.nav__chev { transition: transform .3s var(--ease); }
.nav__group[data-open='true'] .nav__chev { transform: rotate(180deg); }
.nav__group[data-open='true'] .nav__toggle::after { transform: scaleX(1); }

.nav__panel {
  position: absolute; top: calc(100% + .9rem); left: 50%;
  min-width: 330px;
  background: rgba(8, 14, 20, .97);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: .55rem;
  opacity: 0; visibility: hidden;
  transform: translate(-50%, -8px);
  transition: opacity .28s var(--ease), transform .28s var(--ease-out), visibility .28s;
}
.nav__group[data-open='true'] .nav__panel {
  opacity: 1; visibility: visible; transform: translate(-50%, 0);
}

.nav__panel a {
  display: block; padding: .68rem .85rem; border-radius: var(--radius);
  color: rgba(255, 255, 255, .82);
  font-size: .875rem; line-height: 1.35;
  transition: background-color .2s var(--ease), color .2s var(--ease), padding-left .25s var(--ease);
}
.nav__panel a small { display: block; color: var(--muted-on-dark); font-size: .75rem; }
.nav__panel a:hover { background: rgba(223, 190, 36, .1); color: var(--gold); padding-left: 1.1rem; }
.nav__panel a:hover small { color: rgba(223, 190, 36, .75); }

.header__cta { flex: none; }
.header__cta .btn { padding: .78rem 1.2rem; }

.burger {
  display: none; flex: none;
  width: 46px; height: 46px;
  background: none; border: 1px solid rgba(255, 255, 255, .26);
  border-radius: var(--radius); cursor: pointer;
  align-items: center; justify-content: center;
  margin-left: auto;
}
.burger span {
  display: block; width: 20px; height: 2px; background: #fff; position: relative;
  transition: background-color .2s var(--ease);
}
.burger span::before, .burger span::after {
  content: ''; position: absolute; left: 0; width: 20px; height: 2px; background: #fff;
  transition: transform .35s var(--ease-out), top .25s var(--ease);
}
.burger span::before { top: -6px; }
.burger span::after { top: 6px; }
body.nav-open .burger span { background: transparent; }
body.nav-open .burger span::before { top: 0; transform: rotate(45deg); }
body.nav-open .burger span::after { top: 0; transform: rotate(-45deg); }

/* Panel móvil */
.drawer {
  position: fixed; inset: 0; z-index: 99;
  background: var(--ink-900);
  padding: calc(var(--header-h) + 1.5rem) var(--gutter) 3rem;
  overflow-y: auto;
  opacity: 0; visibility: hidden;
  transition: opacity .35s var(--ease), visibility .35s;
}
body.nav-open .drawer { opacity: 1; visibility: visible; }

.drawer__list { display: flex; flex-direction: column; }
.drawer__list a {
  display: flex; align-items: baseline; gap: .9rem;
  padding: .9rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  color: #fff;
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.1rem, 4.6vw, 1.45rem); letter-spacing: -.01em;
  opacity: 0; transform: translateY(14px);
}
body.nav-open .drawer__list a {
  animation: drawerIn .5s var(--ease-out) forwards;
  animation-delay: 120ms;
}
body.nav-open .drawer__list a:nth-child(2)  { animation-delay: 160ms; }
body.nav-open .drawer__list a:nth-child(3)  { animation-delay: 200ms; }
body.nav-open .drawer__list a:nth-child(4)  { animation-delay: 240ms; }
body.nav-open .drawer__list a:nth-child(5)  { animation-delay: 280ms; }
body.nav-open .drawer__list a:nth-child(6)  { animation-delay: 320ms; }
body.nav-open .drawer__list a:nth-child(7)  { animation-delay: 360ms; }
body.nav-open .drawer__list a:nth-child(8)  { animation-delay: 400ms; }
body.nav-open .drawer__list a:nth-child(9)  { animation-delay: 440ms; }
body.nav-open .drawer__list a:nth-child(10) { animation-delay: 480ms; }
body.nav-open .drawer__list a:nth-child(11) { animation-delay: 520ms; }
body.nav-open .drawer__list a:nth-child(12) { animation-delay: 560ms; }
body.nav-open .drawer__list a:nth-child(n+13) { animation-delay: 600ms; }
.drawer__list a span {
  font-family: var(--font-body); font-size: .68rem; font-weight: 600;
  color: var(--gold); letter-spacing: .12em; flex: none;
}
@keyframes drawerIn { to { opacity: 1; transform: translateY(0); } }

.drawer__foot { margin-top: 2.25rem; display: grid; gap: 1rem; }
.drawer__foot > div span {
  display: block; font-size: .7rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--muted-on-dark); margin-bottom: .2rem;
}
.drawer__foot a { color: var(--gold); font-weight: 600; word-break: break-word; }

@media (max-width: 1160px) {
  .nav, .header__cta { display: none; }
  .burger { display: flex; }
}

/* -------------------------------------------------------------------- Hero */
.hero {
  position: relative;
  min-height: min(94svh, 900px);
  display: flex; flex-direction: column; justify-content: flex-end;
  background: var(--ink-900);
  overflow: hidden;
  isolation: isolate;
}
.hero--page { min-height: min(70svh, 620px); }

.hero__media { position: absolute; inset: -8% 0 0; z-index: -2; }
.hero__media img { width: 100%; height: 108%; object-fit: cover; }
.hero__media::after {
  content: ''; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(5, 9, 13, .82) 0%, rgba(5, 9, 13, .35) 34%, rgba(5, 9, 13, .92) 90%),
    linear-gradient(100deg, rgba(5, 9, 13, .92) 0%, rgba(5, 9, 13, .45) 55%, rgba(5, 9, 13, .18) 100%);
}
.hero__grid {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 78px 78px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 62%);
  mask-image: linear-gradient(180deg, #000 0%, transparent 62%);
}

.hero__body { padding-block: clamp(7rem, 14vw, 9rem) clamp(3rem, 6vw, 4.5rem); color: #fff; }
.hero__title { color: #fff; max-width: 17ch; margin-bottom: .5em; }
.hero__title .line { display: block; overflow: hidden; padding-bottom: .06em; }
.hero__title .line > span {
  display: block;
  transform: translateY(105%);
  animation: lineUp .95s var(--ease-out) forwards;
  animation-delay: 150ms;
}
.hero__title .line:nth-child(2) > span { animation-delay: 240ms; }
.hero__title .line:nth-child(3) > span { animation-delay: 330ms; }
.hero__title .line:nth-child(4) > span { animation-delay: 420ms; }
@keyframes lineUp { to { transform: translateY(0); } }

.hero__sub {
  max-width: 56ch; color: #c3d1dc;
  font-size: clamp(1rem, 1.45vw, 1.15rem);
  margin-bottom: 2.25rem;
}
.hero__eyebrow {
  color: var(--gold); font-size: .76rem; font-weight: 650;
  letter-spacing: .24em; text-transform: uppercase;
  display: flex; align-items: center; gap: .85rem; margin-bottom: 1.5rem;
}
.hero__eyebrow::before { content: ''; width: 3rem; height: 2px; background: var(--gold); flex: none; }

.hero__scroll {
  position: absolute; right: var(--gutter); bottom: 8rem; z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: .75rem;
  color: rgba(255, 255, 255, .5);
  font-size: .66rem; letter-spacing: .2em; text-transform: uppercase;
  writing-mode: vertical-rl;
}
.hero__scroll::after {
  content: ''; width: 1px; height: 56px;
  background: linear-gradient(180deg, var(--gold), transparent);
  animation: scrollPulse 2.2s var(--ease) infinite;
}
@keyframes scrollPulse { 0%, 100% { opacity: .3; } 50% { opacity: 1; } }
@media (max-width: 1000px) { .hero__scroll { display: none; } }

/* Barra de credenciales bajo el hero */
.hero__strip {
  border-top: 1px solid rgba(255, 255, 255, .1);
  background: rgba(5, 9, 13, .5);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.hero__strip .wrap {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1rem; padding-block: 1.4rem;
}
.hero__stat { display: flex; flex-direction: column; gap: .1rem; }
.hero__stat b {
  font-family: var(--font-display); font-size: clamp(1.3rem, 2.5vw, 1.85rem);
  font-weight: 800; color: var(--gold); line-height: 1.1;
}
/* Combinador de hijo directo a proposito: los contadores animados viven en un
   <span> dentro del <b>, y el selector suelto los pintaba como si fueran la
   etiqueta pequena (gris y a .7rem) en vez de la cifra grande dorada. */
.hero__stat > span {
  font-size: .7rem; letter-spacing: .14em; text-transform: uppercase;
  color: rgba(255, 255, 255, .6); line-height: 1.4;
}
.hero__stat b > span { font: inherit; color: inherit; letter-spacing: inherit; text-transform: none; }
@media (max-width: 760px) {
  .hero__strip .wrap { grid-template-columns: repeat(2, 1fr); gap: 1.35rem 1rem; }
}

/* ------------------------------------------------------- Tarjetas servicio */
.svc {
  position: relative;
  display: flex; flex-direction: column;
  min-height: 380px;
  background: var(--ink-800);
  border-radius: var(--radius-lg);
  overflow: hidden;
  isolation: isolate;
  transition: transform .5s var(--ease-out), box-shadow .5s var(--ease-out);
}
.svc:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.svc__media { position: absolute; inset: 0; z-index: -2; }
.svc__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease-out); }
.svc:hover .svc__media img { transform: scale(1.07); }
.svc__media::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(5, 9, 13, .32) 0%, rgba(5, 9, 13, .74) 42%, rgba(5, 9, 13, .93) 66%, rgba(5, 9, 13, .97) 100%);
}
.svc::before {
  content: ''; position: absolute; inset: auto 0 0 0; height: 3px; z-index: 1;
  background: var(--gold);
  transform: scaleX(0); transform-origin: 0 50%;
  transition: transform .55s var(--ease-out);
}
.svc:hover::before { transform: scaleX(1); }

.svc__body { margin-top: auto; padding: clamp(1.4rem, 2.4vw, 1.9rem); color: #fff; }
.svc__num {
  font-family: var(--font-display); font-size: .74rem; font-weight: 700;
  letter-spacing: .18em; color: var(--gold); display: block; margin-bottom: .65rem;
}
.svc__title { font-size: clamp(1.05rem, 1.7vw, 1.28rem); color: #fff; margin-bottom: .5rem; }
.svc__text { font-size: .9rem; color: #b5c4d0; margin-bottom: 1.1rem; }
.svc__more {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .72rem; font-weight: 650; letter-spacing: .14em; text-transform: uppercase;
  color: var(--gold);
}
.svc__more svg { transition: transform .35s var(--ease-out); }
.svc:hover .svc__more svg { transform: translateX(5px); }
.svc__link { position: absolute; inset: 0; z-index: 3; }

/* ------------------------------------------------------------ Tarjeta base */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 2.6vw, 2.1rem);
  transition: transform .45s var(--ease-out), box-shadow .45s var(--ease-out),
              border-color .45s var(--ease), background-color .45s var(--ease);
  height: 100%;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--paper-3); }
.card h3 { margin-bottom: .55rem; }
.card p { font-size: .935rem; color: var(--text-2); }

.section--dark .card { background: rgba(255, 255, 255, .035); border-color: var(--line-dark); }
.section--dark .card:hover { border-color: rgba(223, 190, 36, .45); background: rgba(255, 255, 255, .06); }
.section--dark .card p { color: #a9bac6; }

/* Tarjeta con acciones ancladas abajo, para que varias en fila queden alineadas */
.card--flow { display: flex; flex-direction: column; }
.card--flow .card__actions { margin-top: auto; padding-top: 1.25rem; display: grid; gap: .6rem; justify-items: start; }

.card__icon {
  width: 52px; height: 52px; display: grid; place-items: center;
  border-radius: var(--radius);
  background: var(--gold-dim); color: var(--teal);
  margin-bottom: 1.25rem;
}
.section--dark .card__icon { color: var(--gold); background: rgba(223, 190, 36, .12); }
.card__icon svg { width: 24px; height: 24px; }

/* ------------------------------------------------------------ Lista chequeo */
.checks { display: grid; gap: .95rem; }
.checks li {
  display: grid; grid-template-columns: 22px 1fr; gap: .85rem;
  align-items: start;
  font-size: .96rem; color: var(--text-2);
}
.checks li::before {
  content: ''; width: 22px; height: 22px; margin-top: .2rem; border-radius: 50%;
  background-color: var(--gold-dim);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230e7480' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
  background-size: 13px; background-position: center; background-repeat: no-repeat;
}
.checks li b { color: var(--text); font-weight: 650; }
.section--dark .checks li { color: #b3c3ce; }
.section--dark .checks li b { color: #fff; }
.section--dark .checks li::before {
  background-color: rgba(223, 190, 36, .16);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23dfbe24' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
}

/* ---------------------------------------------------------------- Sectores */
.sectors {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.sector {
  position: relative;
  background: var(--paper);
  /* Anillo de 1px en vez de gap + fondo del contenedor: con anchos de columna
     fraccionarios el hueco de 1px se redondea a 0 en algunas columnas y las
     separaciones desaparecen de forma irregular. El box-shadow siempre pinta. */
  box-shadow: 0 0 0 1px var(--line);
  padding: clamp(1.4rem, 2.6vw, 2rem) .75rem;
  display: grid; gap: .9rem; justify-items: center; align-content: start;
  text-align: center;
  transition: background-color .4s var(--ease);
}
.sector::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: var(--gold);
  transform: scaleX(0); transform-origin: 50% 50%;
  transition: transform .45s var(--ease-out);
}
.sector:hover { background: var(--paper-2); }
.sector:hover::before { transform: scaleX(1); }

.sector__icon {
  width: 46px; height: 46px; display: grid; place-items: center;
  border-radius: 50%;
  background: var(--paper-2);
  color: var(--teal);
  transition: background-color .4s var(--ease), color .4s var(--ease),
              transform .45s var(--ease-out);
}
.sector__icon svg { width: 23px; height: 23px; }
.sector:hover .sector__icon {
  background: var(--gold); color: var(--ink-900); transform: translateY(-4px);
}
.sector__name {
  font-size: .84rem; font-weight: 600; line-height: 1.35;
  color: var(--text-2);
  transition: color .4s var(--ease);
}
.sector:hover .sector__name { color: var(--text); }

@media (max-width: 1100px) { .sectors { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 700px)  { .sectors { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 460px)  { .sectors { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* --------------------------------------------------------------- Split 2col */
.split {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem); align-items: center;
}
.split--wide-left { grid-template-columns: 1.12fr 1fr; }
.split--wide-right { grid-template-columns: 1fr 1.12fr; }
@media (max-width: 900px) {
  .split, .split--wide-left, .split--wide-right { grid-template-columns: 1fr; }
  .split__media-first { order: -1; }
}

.figure {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-md);
}
.figure img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.figure--tall img { aspect-ratio: 4 / 5; }
.figure__tag {
  position: absolute; left: 0; bottom: 0;
  background: var(--gold); color: var(--ink-900);
  font-size: .68rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  padding: .6rem 1.1rem;
}

.figure-frame { position: relative; isolation: isolate; }
.figure-frame::before {
  content: ''; position: absolute;
  inset: auto -16px -16px auto; width: 52%; height: 52%;
  border: 2px solid var(--gold); border-radius: var(--radius-lg);
  z-index: -1;
}
@media (max-width: 900px) { .figure-frame::before { display: none; } }

/* -------------------------------------------------------------- Estadística */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; background: var(--ink-850); }
.stats > div {
  background: var(--ink-850); padding: clamp(1.5rem, 3vw, 2.5rem); text-align: center;
  box-shadow: 0 0 0 1px var(--line-dark);   /* ver nota en .sector */
}
.stat__num {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1;
  color: var(--gold); letter-spacing: -.03em;
}
.stat__label {
  margin-top: .7rem; font-size: .76rem; letter-spacing: .13em;
  text-transform: uppercase; color: var(--muted-on-dark); line-height: 1.5;
}
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* ------------------------------------------------------------------- Pasos */
.steps { display: grid; gap: 0; background: var(--paper); counter-reset: step; }
.steps--3 { grid-template-columns: repeat(3, 1fr); }
.steps--4 { grid-template-columns: repeat(4, 1fr); }
.steps--5 { grid-template-columns: repeat(5, 1fr); }
.step {
  background: var(--paper); padding: clamp(1.5rem, 2.8vw, 2.25rem);
  position: relative; overflow: hidden;
  box-shadow: 0 0 0 1px var(--line);        /* ver nota en .sector */
  transition: background-color .4s var(--ease);
}
.step::after {
  content: ''; position: absolute; inset: 0 auto 0 0; width: 3px;
  background: var(--gold); transform: scaleY(0); transform-origin: 50% 0;
  transition: transform .5s var(--ease-out);
}
.step:hover { background: var(--paper-2); }
.step:hover::after { transform: scaleY(1); }
.step__n {
  counter-increment: step;
  font-family: var(--font-display); font-weight: 800; font-size: 2.3rem;
  line-height: 1; color: var(--paper-3); display: block; margin-bottom: .9rem;
  transition: color .4s var(--ease);
}
.step__n::before { content: '0' counter(step); }
.step:hover .step__n { color: var(--gold); }
.step h3 { font-size: 1.02rem; margin-bottom: .45rem; }
.step p { font-size: .88rem; color: var(--muted); }

.section--dark .steps { background: var(--ink-850); }
.section--dark .step { background: var(--ink-850); box-shadow: 0 0 0 1px var(--line-dark); }
.section--dark .step:hover { background: var(--ink-700); }
.section--dark .step__n { color: rgba(255, 255, 255, .13); }
.section--dark .step p { color: var(--muted-on-dark); }

@media (max-width: 980px) { .steps--4, .steps--5 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .steps--3, .steps--4, .steps--5 { grid-template-columns: 1fr; } }

/* ----------------------------------------------------------------- Timeline */
.tline { display: grid; }
.tline li {
  display: grid; grid-template-columns: 96px 1fr; gap: clamp(1rem, 3vw, 2.5rem);
  padding-block: clamp(1.4rem, 2.6vw, 2rem);
  border-top: 1px solid var(--line);
  align-items: start;
}
.tline li:last-child { border-bottom: 1px solid var(--line); }
.tline__k {
  font-family: var(--font-display); font-weight: 800; font-size: 1.02rem;
  color: var(--teal); letter-spacing: .04em; padding-top: .15rem;
}
.tline h3 { font-size: 1.05rem; margin-bottom: .35rem; }
.tline p { font-size: .93rem; color: var(--text-2); }
.section--dark .tline li { border-color: var(--line-dark); }
.section--dark .tline__k { color: var(--gold); }
.section--dark .tline p { color: var(--muted-on-dark); }
@media (max-width: 620px) { .tline li { grid-template-columns: 1fr; gap: .4rem; } }

/* ---------------------------------------------------------------- Etiquetas */
.tags { display: flex; flex-wrap: wrap; gap: .55rem; }
.tag {
  font-size: .76rem; font-weight: 600; letter-spacing: .05em;
  padding: .48rem .85rem;
  border: 1px solid var(--line); border-radius: 100px;
  color: var(--text-2); background: var(--paper);
}
.section--dark .tag { border-color: var(--line-dark); color: #c0cedb; background: rgba(255, 255, 255, .04); }
.tag--gold { border-color: rgba(223, 190, 36, .5); color: var(--gold); background: rgba(223, 190, 36, .08); }

/* --------------------------------------------------------- Normas / píldora */
.norms {
  display: flex; flex-wrap: wrap; gap: .55rem 1.75rem;
  align-items: center; justify-content: center;
  font-size: .76rem; font-weight: 650; letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted-on-dark);
}
.norms span { display: inline-flex; align-items: center; gap: .6rem; }
.norms span::before { content: ''; width: 6px; height: 6px; background: var(--gold); border-radius: 50%; flex: none; }
/* Sobre fondo claro hace falta un tono con contraste suficiente */
.section--soft .norms, .section:not(.section--dark):not(.bg-ink) .norms { color: var(--text-2); }
.section--dark .norms, .bg-ink .norms { color: var(--muted-on-dark); }

/* ------------------------------------------------------------------- ISO */
.iso { display: grid; gap: 0; background: var(--ink-850); grid-template-columns: repeat(2, 1fr); }
.iso article {
  background: var(--ink-850); padding: clamp(1.6rem, 3vw, 2.5rem);
  box-shadow: 0 0 0 1px var(--line-dark);   /* ver nota en .sector */
}
/* Selector anidado a proposito: debe ganar a `.iso p`, que es mas especifico
   que una clase suelta y dejaba la insignia en gris y a tamano de parrafo. */
.iso .iso__badge {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(1.45rem, 2.6vw, 2rem); color: var(--gold); line-height: 1.05;
}
.iso .iso__badge small {
  display: block; font-size: .7rem; letter-spacing: .2em;
  color: var(--muted-on-dark); font-weight: 600; margin-bottom: .3rem;
  font-family: var(--font-body);
}
.iso h3 {
  font-size: .88rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--gold-2); margin: 1.1rem 0 .6rem; line-height: 1.5;
}
.iso p { font-size: .9rem; color: #a7b8c4; }
@media (max-width: 780px) { .iso { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------- Clientes */
.marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee__track { display: flex; width: max-content; animation: marquee 46s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.marquee__item {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.05rem, 2.1vw, 1.6rem);
  letter-spacing: .04em;
  color: rgba(255, 255, 255, .42);
  padding-inline: clamp(1.4rem, 3vw, 2.75rem);
  white-space: nowrap;
  transition: color .3s var(--ease);
}
.marquee__item:hover { color: var(--gold); }

.client-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; background: var(--paper); }
.client-grid div {
  background: var(--paper); display: grid; place-items: center;
  box-shadow: 0 0 0 1px var(--line);        /* ver nota en .sector */
  padding: clamp(1.5rem, 3vw, 2.25rem) 1rem; text-align: center;
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(.88rem, 1.4vw, 1.08rem);
  color: var(--text-2);
  transition: color .3s var(--ease), background-color .3s var(--ease);
}
.client-grid div:hover { color: var(--ink-900); background: var(--paper-2); }
@media (max-width: 900px) { .client-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .client-grid { grid-template-columns: repeat(2, 1fr); } }

/* --------------------------------------------------------------- Galería */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: .75rem; }
.gallery figure { margin: 0; position: relative; overflow: hidden; border-radius: var(--radius); aspect-ratio: 4 / 3; background: var(--ink-800); }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease-out); }
.gallery figure:hover img { transform: scale(1.08); }
.gallery figure::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  box-shadow: inset 0 0 0 0 var(--gold);
  transition: box-shadow .35s var(--ease);
}
.gallery figure:hover::after { box-shadow: inset 0 0 0 3px var(--gold); }
@media (max-width: 900px) { .gallery { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .gallery { grid-template-columns: repeat(2, 1fr); } }

/* -------------------------------------------------------------------- CTA */
.cta {
  position: relative; isolation: isolate; overflow: hidden;
  background: var(--ink-900); color: #fff;
  padding-block: clamp(4rem, 8vw, 6.5rem);
}
.cta__media { position: absolute; inset: 0; z-index: -2; }
.cta__media img { width: 100%; height: 100%; object-fit: cover; }
.cta__media::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(95deg, rgba(5, 9, 13, .97) 20%, rgba(5, 9, 13, .68) 68%, rgba(5, 9, 13, .5) 100%);
}
.cta h2 { max-width: 20ch; color: #fff; }
/* Clase propia en vez de `.cta p`: ese selector tenia mas peso que .eyebrow
   y .contact-card__k y les robaba el color de marca. */
.cta__lead { color: #bccbd7; max-width: 54ch; margin-bottom: 2rem; }
.cta .eyebrow { color: var(--gold); }

/* auto-fit: se adapta al numero de canales publicados sin tocar el CSS */
.contact-cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 1rem; margin-top: clamp(2.5rem, 5vw, 3.5rem); max-width: 780px;
}
.contact-card {
  background: rgba(255, 255, 255, .045);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius-lg);
  padding: clamp(1.4rem, 2.4vw, 1.9rem);
  transition: border-color .35s var(--ease), background-color .35s var(--ease), transform .35s var(--ease-out);
}
.contact-card:hover { border-color: rgba(223, 190, 36, .55); background: rgba(223, 190, 36, .07); transform: translateY(-4px); }
.contact-card__k {
  font-size: .7rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--gold); margin-bottom: .6rem; display: flex; align-items: center; gap: .5rem;
}
/* En bloque: una tarjeta puede llevar más de un enlace y en línea quedarían
   pegados en la misma fila. */
.contact-card a { display: block; font-size: clamp(.93rem, 1.5vw, 1.05rem); font-weight: 600; color: #fff; word-break: break-word; }
.contact-card a + a { margin-top: .35rem; }
.contact-card a:hover { color: var(--gold); }
.contact-card small { display: block; margin-top: .4rem; color: var(--muted-on-dark); font-size: .82rem; }
@media (max-width: 860px) { .contact-cards { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------------- Pie */
.footer { background: var(--ink-900); color: #93a6b3; padding-top: clamp(3.5rem, 6vw, 5rem); }
.footer__top { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.25fr; gap: clamp(1.75rem, 4vw, 3rem); }
.footer__brand img { height: 42px; margin-bottom: 1.25rem; }
.footer p { font-size: .89rem; max-width: 40ch; }
.footer h4 {
  color: #fff; font-size: .74rem; letter-spacing: .18em; text-transform: uppercase;
  margin-bottom: 1.15rem; font-family: var(--font-body); font-weight: 650;
}
.footer__links { display: grid; gap: .6rem; }
.footer__links a { font-size: .89rem; transition: color .25s var(--ease), padding-left .25s var(--ease); }
.footer__links a:hover { color: var(--gold); padding-left: .35rem; }
.footer__mail { color: #fff; font-weight: 600; font-size: .9rem; word-break: break-word; }
.footer__mail:hover { color: var(--gold); }
.footer__row { display: grid; gap: .25rem; margin-bottom: 1.1rem; }
.footer__row > span { font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
.footer__iso { margin-top: 2.5rem; padding-top: 2rem; border-top: 1px solid var(--line-dark); }
.footer__iso img { height: 54px; width: auto; opacity: .85; }
.footer__bottom {
  margin-top: clamp(2rem, 4vw, 3rem);
  border-top: 1px solid var(--line-dark);
  padding-block: 1.5rem;
  display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; justify-content: space-between;
  font-size: .79rem;
}
.footer__credit a {
  display: inline-flex; align-items: center; gap: .35rem;
  color: #c3d2dd; font-weight: 600;
  border-bottom: 1px solid transparent;
  transition: color .25s var(--ease), border-color .25s var(--ease);
}
.footer__credit a:hover { color: var(--gold); border-bottom-color: var(--gold); }
.footer__credit svg { flex: none; opacity: .7; }
@media (max-width: 760px) {
  .footer__bottom { justify-content: flex-start; gap: .5rem 1.25rem; }
}
@media (max-width: 900px) { .footer__top { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .footer__top { grid-template-columns: 1fr; } }

.to-top {
  position: fixed; right: clamp(1rem, 3vw, 2rem); bottom: clamp(1rem, 3vw, 2rem);
  z-index: 90;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--gold); color: var(--ink-900);
  border: 0; cursor: pointer;
  display: grid; place-items: center;
  opacity: 0; visibility: hidden; transform: translateY(12px) scale(.9);
  transition: opacity .35s var(--ease), transform .35s var(--ease-out), visibility .35s,
              background-color .3s var(--ease);
  box-shadow: 0 10px 26px rgba(0, 0, 0, .3);
}
.to-top.is-on { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }
.to-top:hover { background: var(--gold-2); }

/* ------------------------------------------------------------- Página error */
.errpage {
  min-height: 100svh; display: grid; place-items: center; text-align: center;
  background: var(--ink-900); color: #fff; padding: 2rem;
}
.errpage__code {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(4.5rem, 18vw, 11rem); line-height: .9; color: var(--gold);
  letter-spacing: -.05em;
}
.errpage p { color: var(--muted-on-dark); max-width: 48ch; margin-inline: auto; }
.errpage h1 { font-size: clamp(1.6rem, 4vw, 2.6rem); }
.errpage__logo { height: 42px; width: auto; margin: 0 auto 2.5rem; }

/* -------------------------------------------------------------- Utilidades */
/* La CSP del sitio no permite atributos style="" inline; todo va en clases. */
.mt-s { margin-top: 1.25rem; }
.mt-m { margin-top: 2rem; }
.mt-l { margin-top: clamp(2.25rem, 4vw, 3rem); }
.mb-0 { margin-bottom: 0; }
.mb-m { margin-bottom: 2rem; }
.row-center { display: flex; justify-content: center; }
.h2-sm { font-size: clamp(1.45rem, 3vw, 2.15rem); }
.bg-ink { background: var(--ink-900); }

/* ------------------------------------------------------------- Animaciones */
[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .8s var(--ease-out), transform .8s var(--ease-out);
  transition-delay: var(--d, 0ms);
}
[data-reveal='left'] { transform: translateX(-30px); }
[data-reveal='right'] { transform: translateX(30px); }
[data-reveal='scale'] { transform: scale(.955); }
[data-reveal].is-in { opacity: 1; transform: none; }

/* En pantallas estrechas el desplazamiento lateral previo al revelado
   generaria scroll horizontal: solo se anima en vertical. */
@media (max-width: 900px) {
  [data-reveal='left'], [data-reveal='right'] { transform: translateY(24px); }
}

html.no-js [data-reveal] { opacity: 1; transform: none; }
html.no-js .hero__title .line > span { transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  .hero__title .line > span { transform: none; }
  .marquee__track { animation: none; }
}

@media print {
  .header, .drawer, .to-top, .progress, .hero__scroll { display: none !important; }
  body { color: #000; background: #fff; }
}
