/* ==========================================================================
   Prolink
   Tema: oscuro, bloqueado para toda la página (color-scheme: dark).
   Para pasar a claro basta con reemplazar el bloque de tokens de :root.
   Radios: botones = píldora, tarjetas/media = 14px, inputs = 10px.
   Acento único: --brand (naranja del logo). No se usa ningún otro acento.
   ========================================================================== */

:root {
  color-scheme: dark;

  --ink:        #0b0c0e;
  --surface:    #131418;
  --surface-2:  #1b1d22;
  --line:       rgb(255 255 255 / .10);
  --line-strong:rgb(255 255 255 / .20);

  --text:       #f4f4f5;
  --muted:      #a5a5ae;

  --brand:      #f4811e;
  --brand-soft: #f7a25a;
  --on-brand:   #17120b;

  --r-card:  14px;
  --r-input: 10px;
  --r-pill:  999px;

  --pad-x: clamp(1.25rem, 5vw, 5rem);
  --sec-y: clamp(5rem, 11vw, 10rem);

  --ease: cubic-bezier(.16, 1, .3, 1);

  --font-display: "Sora", "Helvetica Neue", Arial, sans-serif;
  --font-body:    "Manrope", "Helvetica Neue", Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-body);
  font-size: clamp(1rem, .96rem + .2vw, 1.0625rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  /* clip, no hidden: hidden convierte al body en contenedor de scroll y rompe el pin. */
  overflow-x: clip;
}

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

a { color: inherit; }

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

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--brand); color: var(--on-brand);
  padding: .75rem 1.25rem; border-radius: 0 0 var(--r-card) 0;
  font-weight: 700; text-decoration: none;
}
.skip:focus { left: 0; }

/* ---------- Tipografía --------------------------------------------------- */

.h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.9rem, 1.1rem + 3.2vw, 3.5rem);
  line-height: 1.08;
  letter-spacing: -.025em;
  margin: 0 0 1.25rem;
  text-wrap: balance;
}

.eyebrow {
  font-family: var(--font-body);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--brand);
  margin: 0 0 1rem;
}

.lead {
  font-size: clamp(1.05rem, 1rem + .35vw, 1.25rem);
  color: var(--muted);
  max-width: 58ch;
  margin: 0 0 2.5rem;
}

/* ---------- Botones ------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  white-space: nowrap;
  padding: .9rem 1.9rem;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  font-family: var(--font-body);
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: .01em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .25s var(--ease), border-color .25s var(--ease),
              color .25s var(--ease), transform .12s var(--ease);
}
.btn:active { transform: translateY(1px) scale(.985); }

.btn-primary { background: var(--brand); color: var(--on-brand); }
.btn-primary:hover { background: var(--brand-soft); }

.btn-ghost {
  background: rgb(255 255 255 / .06);
  color: var(--text);
  border-color: var(--line-strong);
  backdrop-filter: blur(8px);
}
.btn-ghost:hover { background: rgb(255 255 255 / .14); border-color: var(--text); }

.btn-sm { padding: .6rem 1.35rem; font-size: .875rem; }
.btn-block { width: 100%; }

.link-arrow {
  display: inline-flex; align-items: center; gap: .5rem;
  color: var(--brand);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid rgb(244 129 30 / .35);
  padding-bottom: 2px;
  transition: border-color .25s var(--ease), gap .25s var(--ease);
}
.link-arrow:hover { border-color: var(--brand); gap: .85rem; }

/* ---------- Barra de progreso de scroll ---------------------------------- */

.scroll-progress {
  position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 60;
  background: rgb(255 255 255 / .06);
  pointer-events: none;
}
.scroll-progress span {
  display: block; height: 100%; width: 100%;
  background: var(--brand);
  transform: scaleX(0);
  transform-origin: 0 50%;
}

/* ---------- Navegación --------------------------------------------------- */

.nav {
  position: fixed; inset: 3px 0 auto 0; z-index: 50;
  transition: background-color .35s var(--ease), border-color .35s var(--ease),
              backdrop-filter .35s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-stuck {
  background: rgb(11 12 14 / .78);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--line);
}
@media (prefers-reduced-transparency: reduce) {
  .nav.is-stuck { background: var(--ink); backdrop-filter: none; }
}

.nav-inner {
  height: 72px;
  max-width: 1400px;
  margin-inline: auto;
  padding-inline: var(--pad-x);
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-logo { flex: none; line-height: 0; }
.nav-logo img { width: 116px; height: auto; }

.nav-links {
  margin-left: auto;
  display: flex;
  gap: clamp(1rem, 2.2vw, 2.25rem);
  font-size: .925rem;
  font-weight: 500;
}
.nav-links a {
  position: relative;
  text-decoration: none;
  color: var(--muted);
  padding: .25rem 0;
  transition: color .2s var(--ease);
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 2px; background: var(--brand);
  transform: scaleX(0); transform-origin: 0 50%;
  transition: transform .3s var(--ease);
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { transform: scaleX(1); }

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 44px; height: 44px;
  background: none; border: 0; cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center; gap: 6px;
}
.nav-toggle span {
  display: block; width: 22px; height: 2px; background: var(--text);
  transition: transform .3s var(--ease), opacity .3s var(--ease);
}
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child  { transform: translateY(-4px) rotate(-45deg); }

.nav-mobile {
  display: none;
  flex-direction: column;
  gap: .35rem;
  padding: .5rem var(--pad-x) 1.75rem;
  background: rgb(11 12 14 / .96);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-mobile a {
  text-decoration: none;
  padding: .85rem 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  border-bottom: 1px solid var(--line);
}
.nav-mobile .btn { margin-top: 1.25rem; border-bottom: 0; font-size: .95rem; }

@media (max-width: 900px) {
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: flex; }
  .nav-mobile:not([hidden]) { display: flex; }
}

/* ---------- 1. Hero ------------------------------------------------------ */

.hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  isolation: isolate;
}

.hero-media { position: absolute; inset: -20% 0 -20% 0; z-index: -2; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }

.hero-scrim {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgb(11 12 14 / .82) 0%, rgb(11 12 14 / .35) 32%, rgb(11 12 14 / .92) 88%, var(--ink) 100%),
    linear-gradient(90deg, rgb(11 12 14 / .75) 0%, rgb(11 12 14 / .1) 62%);
}

.hero-body {
  width: 100%;
  max-width: 1400px;
  margin-inline: auto;
  padding: 0 var(--pad-x) clamp(4rem, 9vh, 7rem);
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.05rem, 1rem + 4.4vw, 4.25rem);
  line-height: 1.05;
  letter-spacing: -.035em;
  margin: 0 0 1.5rem;
  max-width: 32ch;
}
.hero-title .line { display: block; overflow: hidden; padding-bottom: .06em; }
.hero-title .line > span { display: block; }

.hero-sub {
  font-size: clamp(1.05rem, .98rem + .45vw, 1.3rem);
  color: #d9d9de;
  max-width: 46ch;
  margin: 0 0 2.25rem;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: .85rem; }

/* ---------- 2. Quiénes somos --------------------------------------------- */

.about {
  max-width: 1400px;
  margin-inline: auto;
  padding: var(--sec-y) var(--pad-x);
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}
@media (min-width: 900px) {
  .about { grid-template-columns: 0.95fr 1.05fr; gap: clamp(3rem, 6vw, 6rem); align-items: start; }
}

.about-media { position: relative; }
@media (min-width: 900px) {
  .about-media { position: sticky; top: 120px; }
}
.about-media-inner {
  border-radius: var(--r-card);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  border: 1px solid var(--line);
}
.about-media-inner img { width: 100%; height: 132%; object-fit: cover; margin-top: -16%; }

.about-copy { padding-top: clamp(0rem, 2vw, 2rem); }
.about-note { color: var(--muted); margin: 0 0 1.5rem; max-width: 58ch; }

.pillars { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.pillars li {
  display: grid;
  gap: .35rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--line);
}
.pillars li:last-child { border-bottom: 1px solid var(--line); }
.pillars strong {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -.01em;
}
.pillars span { color: var(--muted); font-size: .975rem; }
@media (min-width: 640px) {
  .pillars li { grid-template-columns: 10rem 1fr; gap: 1.5rem; align-items: baseline; }
}

/* ---------- 3. Servicios (pan horizontal) -------------------------------- */

.svc {
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  /* La sección se fija a pantalla completa: todo el bloque tiene que entrar
     en el viewport o las tarjetas quedan cortadas mientras está pineada. */
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: clamp(5.5rem, 10vh, 7rem);
  overflow: hidden;
}

.svc-head {
  max-width: 1400px;
  margin: 0 auto clamp(2rem, 4vh, 3rem);
  padding-inline: var(--pad-x);
  width: 100%;
}
.svc-head .h2 {
  font-size: clamp(1.75rem, 1.1rem + 2.2vw, 2.75rem);
  margin-bottom: 1.5rem;
  max-width: 16ch;
}

.svc-rail { height: 2px; background: var(--line); max-width: 420px; overflow: hidden; }
.svc-rail span {
  display: block; height: 100%; width: 100%;
  background: var(--brand);
  transform: scaleX(0.14); transform-origin: 0 50%;
}

.svc-viewport { width: 100%; }

.svc-track {
  display: flex;
  gap: clamp(1rem, 2vw, 1.75rem);
  /* Mismo margen izquierdo que .svc-head en pantallas anchas. */
  padding-inline: max(var(--pad-x), calc((100% - 1400px) / 2));
  will-change: transform;
}

.svc-card {
  flex: 0 0 min(86vw, 25rem);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color .35s var(--ease), transform .35s var(--ease);
}
.svc-card:hover { border-color: var(--brand); transform: translateY(-4px); }

.svc-img { aspect-ratio: 16 / 10; max-height: 11rem; overflow: hidden; background: var(--ink); }
.svc-img img {
  width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(1) contrast(1.05);
  transition: filter .5s var(--ease), transform .7s var(--ease);
}
.svc-card:hover .svc-img img { filter: grayscale(0) contrast(1); transform: scale(1.05); }

.svc-card h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -.02em;
  margin: 1.5rem 1.5rem .65rem;
}
.svc-card p {
  margin: 0 1.5rem 1.5rem;
  color: var(--muted);
  font-size: .975rem;
}
.svc-partner { margin: -.5rem 1.5rem 1.25rem; }
.svc-partner img {
  display: block; width:50%; height: auto;
}
.svc-card .incl { font-size: .8125rem; line-height: 1.5; }
.svc-card .incl strong { color: var(--text); }

/* Sin pin (móvil o motion reducido): scroll horizontal nativo con snap. */
.svc-viewport.is-native {
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 1rem;
  scrollbar-width: thin;
  scrollbar-color: var(--brand) var(--surface-2);
}
.svc-viewport.is-native::-webkit-scrollbar { height: 6px; }
.svc-viewport.is-native::-webkit-scrollbar-thumb { background: var(--brand); border-radius: var(--r-pill); }
.svc-viewport.is-native::-webkit-scrollbar-track { background: var(--surface-2); }
/* Sin pin no hay progreso que mostrar: manda la barra de scroll nativa. */
.svc:has(.svc-viewport.is-native) .svc-rail { display: none; }
.svc-viewport.is-native .svc-track { transform: none !important; }
.svc-viewport.is-native .svc-card { scroll-snap-align: center; }

/* ---------- Bloques de 4 (diferenciales y sectores) ---------------------- */

.g4 {
  max-width: 1400px;
  margin-inline: auto;
  padding: var(--sec-y) var(--pad-x);
}
.g4-items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: clamp(1rem, 2vw, 1.5rem);
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}
.g4-items li {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: clamp(1.35rem, 2.4vw, 2rem);
  transition: border-color .35s var(--ease);
}
.g4-items li:hover { border-color: var(--brand); }
.g4-items strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -.01em;
  margin-bottom: .5rem;
}
.g4-items span { color: var(--muted); font-size: .975rem; }

.g4-foot { margin-top: clamp(2.5rem, 5vw, 4rem); }
.g4-foot .lead { margin-bottom: 1.5rem; }

/* ---------- 4. Banda a sangre -------------------------------------------- */

.band {
  position: relative;
  min-height: 88vh;
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
}
.band-media { position: absolute; inset: 0; z-index: -2; }
.band-media img { width: 100%; height: 100%; object-fit: cover; will-change: transform; }
.band::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse 62% 42% at 50% 50%, rgb(11 12 14 / .62), transparent 72%),
    linear-gradient(180deg, var(--ink) 0%, rgb(11 12 14 / .52) 26%, rgb(11 12 14 / .52) 74%, var(--ink) 100%);
}
.band-copy {
  max-width: 1400px;
  padding: var(--sec-y) var(--pad-x);
  text-align: center;
}
.band-quote {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(1.7rem, .9rem + 3.4vw, 3.75rem);
  line-height: 1.12;
  letter-spacing: -.03em;
  margin: 0;
  max-width: 20ch;
  text-wrap: balance;
}

/* ---------- 5. Equipo ---------------------------------------------------- */

.team {
  max-width: 1400px;
  margin-inline: auto;
  padding: var(--sec-y) var(--pad-x);
  display: grid;
  gap: 0;
}
@media (min-width: 900px) {
  .team { grid-template-columns: repeat(12, 1fr); align-items: center; }
}

.team-img {
  border-radius: var(--r-card);
  overflow: hidden;
  border: 1px solid var(--line);
  aspect-ratio: 16 / 11;
}
.team-img img { width: 100%; height: 130%; object-fit: cover; margin-top: -15%; }
@media (min-width: 900px) {
  .team-img { grid-column: 1 / 9; grid-row: 1; aspect-ratio: 16 / 10; }
}

.team-card {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: clamp(1.75rem, 3vw, 2.75rem);
  margin-top: -2.5rem;
  margin-inline: clamp(0rem, 3vw, 2rem);
}
@media (min-width: 900px) {
  .team-card { grid-column: 7 / 13; grid-row: 1; margin: 0; }
}
.team-card .h2 { font-size: clamp(1.6rem, 1rem + 1.9vw, 2.4rem); }
.team-card p { color: var(--muted); margin: 0 0 1rem; }
.team-card .link-arrow { margin-top: .75rem; }

/* ---------- 6. Contacto -------------------------------------------------- */

.contact {
  background: var(--surface);
  border-top: 1px solid var(--line);
  /* Fondo a sangre, contenido acotado a 1400px. */
  padding-block: var(--sec-y);
  padding-inline: max(var(--pad-x), calc((100% - 1400px) / 2));
  display: grid;
  gap: clamp(2.5rem, 5vw, 5rem);
}
@media (min-width: 900px) {
  .contact { grid-template-columns: 1fr 1fr; align-items: start; }
}

.contact-list { margin: 2.5rem 0 0; display: grid; gap: 0; }
.contact-list > div { padding: 1.35rem 0; border-top: 1px solid var(--line); }
.contact-list > div:last-child { border-bottom: 1px solid var(--line); }
.contact-list dt {
  display: flex; align-items: center; gap: .5rem;
  font-size: .78rem; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted);
  margin-bottom: .4rem;
}
.contact-list dt i { color: var(--brand); font-size: 1.05rem; }
.contact-list dd { margin: 0; font-size: 1.05rem; }
.contact-list dd a { text-decoration: none; border-bottom: 1px solid var(--line-strong); }
.contact-list dd a:hover { border-color: var(--brand); color: var(--brand); }

.form { display: grid; gap: 1.25rem; }

.field { display: grid; gap: .5rem; }
.field label { font-size: .875rem; font-weight: 600; color: var(--text); }

.field input,
.field textarea {
  width: 100%;
  background: var(--ink);
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-input);
  padding: .85rem 1rem;
  font: inherit;
  font-size: 1rem;
  transition: border-color .2s var(--ease), background-color .2s var(--ease);
}
.field textarea { resize: vertical; min-height: 8rem; }
.field input:hover, .field textarea:hover { border-color: rgb(255 255 255 / .34); }
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px rgb(244 129 30 / .22);
}
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: #ff8f7a; }

.hint { margin: 0; font-size: .8125rem; color: var(--muted); }
.err  { margin: 0; font-size: .8125rem; color: #ffb0a0; font-weight: 600; }

.form-status {
  margin: 0; padding: .9rem 1rem;
  border-radius: var(--r-input);
  background: rgb(244 129 30 / .12);
  border: 1px solid rgb(244 129 30 / .4);
  font-size: .925rem;
}

/* Error: mismo bloque, acento rojo en vez del naranja de marca. */
.form-status.is-error {
  background: rgb(255 122 98 / .12);
  border-color: rgb(255 122 98 / .45);
}

/* Campo trampa anti-bots: fuera de pantalla, nunca oculto con display:none
   (algunos bots ignoran los campos que no se renderizan). */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

#submitBtn { position: relative; }
#submitBtn .btn-spinner { display: none; }
#submitBtn.is-busy { pointer-events: none; opacity: .75; }
#submitBtn.is-busy .btn-label { visibility: hidden; }
#submitBtn.is-busy .btn-spinner {
  display: block; position: absolute;
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgb(23 18 11 / .3);
  border-top-color: var(--on-brand);
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

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

.wa {
  position: fixed;
  right: clamp(1rem, 3vw, 2rem);
  bottom: clamp(1rem, 3vw, 2rem);
  z-index: 55;
  width: 3.5rem;
  height: 3.5rem;
  display: grid;
  place-items: center;
  border-radius: var(--r-pill);
  background: #25d366;
  color: #0b0c0e;
  font-size: 1.85rem;
  text-decoration: none;
  box-shadow: 0 10px 30px rgb(0 0 0 / .45);
  transition: transform .3s var(--ease), background .3s var(--ease);
}
.wa:hover { background: #4ae585; transform: translateY(-3px) scale(1.05); }
.wa i { line-height: 1; }

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

.foot { border-top: 1px solid var(--line); padding: 3.5rem var(--pad-x); }
.foot-inner {
  max-width: 1400px; margin-inline: auto;
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 1.5rem 2.5rem;
}
.foot-logo { width: 108px; height: auto; }
.foot-links { display: flex; flex-wrap: wrap; gap: 1.5rem; font-size: .925rem; }
.foot-links a { color: var(--muted); text-decoration: none; }
.foot-links a:hover { color: var(--text); }
.foot-legal { margin: 0; margin-left: auto; font-size: .8125rem; color: var(--muted); }

/* ---------- Estados de entrada (GSAP los revierte al animar) ------------- */

@media (prefers-reduced-motion: no-preference) {
  .js-anim [data-reveal],
  .js-anim [data-reveal-stagger] > *,
  .js-anim .hero-sub,
  .js-anim .hero-actions { opacity: 0; }
  /* Solo opacity como guarda anti-flash: un transform en CSS se suma al que
     escribe GSAP y el titular queda desplazado. */
  .js-anim .hero-title .line > span { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
