/* =============================================================
   REDELECTRIC E.I.R.L. — hoja de estilos única
   Arquetipo: editorial claro / técnico-corporativo
   Marca: rojo #C8202E · verde #52A13F
   ============================================================= */

/* =============================================================
   1. Tokens
   ============================================================= */
:root {
  /* Superficies */
  --bg:        #ffffff;
  --bg-2:      #f5f7f9;
  --bg-3:      #eaeff3;
  --paper:     #ffffff;
  --dark:      #0f1519;
  --dark-2:    #161e25;

  /* Tinta */
  --ink:       #10151b;
  --ink-2:     #39434e;
  --ink-3:     #6d7a88;
  --on-dark:   #eef2f5;
  --on-dark-2: #9aa8b4;

  /* Marca */
  --red:       #c8202e;
  --red-d:     #a5121f;
  --red-soft:  rgba(200, 32, 46, .10);
  --green:     #52a13f;
  --green-d:   #3f8130;
  --green-soft:rgba(82, 161, 63, .12);

  /* Líneas */
  --line:      rgba(16, 21, 27, .10);
  --line-2:    rgba(16, 21, 27, .18);
  --line-dark: rgba(238, 242, 245, .14);

  /* Tipografía */
  --display: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --sans:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --mono:    "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Ritmo */
  --gutter:  1.25rem;
  --maxw:    1240px;
  --sec-y:   clamp(4.5rem, 9vw, 8rem);
  --radius:  14px;
  --radius-s: 9px;

  /* Easings */
  --ease-out:    cubic-bezier(.16, 1, .3, 1);
  --ease-in:     cubic-bezier(.7, 0, .84, 0);
  --ease-soft:   cubic-bezier(.25, .46, .45, .94);
  --ease-bounce: cubic-bezier(.34, 1.56, .64, 1);

  /* Sombras */
  --sh-1: 0 1px 2px rgba(16,21,27,.05), 0 4px 14px rgba(16,21,27,.05);
  --sh-2: 0 2px 6px rgba(16,21,27,.06), 0 18px 40px rgba(16,21,27,.09);
  --sh-3: 0 30px 70px rgba(16,21,27,.16);
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  tab-size: 2;
  overflow-x: clip;
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
}

body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-2);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  overscroll-behavior-y: none;
}

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
p { text-wrap: pretty; }
ul { list-style: none; padding: 0; }

::selection { background: var(--red); color: #fff; }

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

/* =============================================================
   3. Utilidades
   ============================================================= */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: fixed; top: -100px; left: 1rem;
  padding: .65rem 1.1rem;
  background: var(--ink); color: #fff;
  z-index: 9999; border-radius: 8px; font-weight: 500;
}
.skip-link:focus { top: 1rem; }

/* =============================================================
   4. Tipografía
   ============================================================= */
h1, h2, h3, h4 {
  font-family: var(--display);
  color: var(--ink);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -.022em;
  text-wrap: balance;
}

.kicker {
  font-family: var(--mono);
  font-size: .74rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: inline-flex;
  align-items: center;
  gap: .6rem;
}
.kicker-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px var(--green-soft);
  animation: pulseDot 2.4s var(--ease-soft) infinite;
}
@keyframes pulseDot {
  0%, 100% { box-shadow: 0 0 0 3px var(--green-soft); }
  50%      { box-shadow: 0 0 0 7px rgba(82,161,63,.05); }
}

.lead {
  font-size: clamp(1.08rem, 2.1vw, 1.32rem);
  line-height: 1.55;
  color: var(--ink);
  font-weight: 400;
}

/* Encabezado de sección */
.section-head {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  gap: .5rem 1.1rem;
  margin-bottom: 2rem;
}
.section-num {
  font-family: var(--mono);
  font-size: .78rem;
  font-weight: 500;
  color: var(--red);
  letter-spacing: .08em;
}
.section-title {
  font-size: clamp(1.85rem, 4.6vw, 3rem);
  grid-column: 1 / -1;
  order: 2;
}
.section-rule {
  grid-column: 1 / -1;
  order: 3;
  display: block;
  height: 1px;
  background: var(--line);
  margin-top: 1.4rem;
  position: relative;
  overflow: hidden;
}
.section-rule i {
  position: absolute; inset-block: 0; left: 0;
  width: 90px;
  background: linear-gradient(90deg, transparent, var(--red), transparent);
  transform: translateX(-100px);
}
.is-visible .section-rule i,
.section-head.is-visible .section-rule i {
  animation: railPulse 2.2s var(--ease-soft) .25s;
}
@keyframes railPulse {
  from { transform: translateX(-100px); }
  to   { transform: translateX(calc(100vw + 100px)); }
}

.section-intro {
  max-width: 62ch;
  font-size: clamp(1rem, 1.7vw, 1.1rem);
  color: var(--ink-2);
  margin-bottom: 2.8rem;
}

/* =============================================================
   5. Componentes
   ============================================================= */

/* --- Botones --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  padding: .92rem 1.6rem;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: -.005em;
  line-height: 1;
  cursor: pointer;
  transition: transform .35s var(--ease-out),
              background-color .3s var(--ease-out),
              color .3s var(--ease-out),
              box-shadow .35s var(--ease-out),
              border-color .3s var(--ease-out);
  will-change: transform;
}
.btn-sm { padding: .7rem 1.2rem; font-size: .88rem; }
.btn-block { width: 100%; }

.btn-primary {
  background: var(--red);
  color: #fff;
  box-shadow: 0 6px 18px rgba(200,32,46,.22);
}
.btn-primary:hover {
  background: var(--red-d);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(200,32,46,.30);
}
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-2);
}
.btn-ghost:hover {
  border-color: var(--ink);
  transform: translateY(-2px);
  background: var(--bg-2);
}

.btn-wa {
  background: var(--green);
  color: #fff;
  box-shadow: 0 6px 18px rgba(82,161,63,.22);
}
.btn-wa:hover {
  background: var(--green-d);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(82,161,63,.30);
}

/* --- Navegación --- */
.nav {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.86);
  border-bottom: 1px solid transparent;
  transition: background .35s var(--ease-out),
              border-color .35s var(--ease-out),
              box-shadow .35s var(--ease-out);
}
@supports (backdrop-filter: blur(14px)) {
  .nav { background: rgba(255,255,255,.72); backdrop-filter: blur(14px) saturate(160%); -webkit-backdrop-filter: blur(14px) saturate(160%); }
}
.nav.is-stuck {
  background: rgba(255,255,255,.94);
  border-bottom-color: var(--line);
  box-shadow: 0 6px 24px rgba(16,21,27,.06);
}
@supports (backdrop-filter: blur(14px)) {
  .nav.is-stuck { background: rgba(255,255,255,.85); }
}

.nav-inner {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: .7rem var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* --- Logotipo ---------------------------------------------------
   Simbolo en SVG + nombre en texto vivo (Archivo, ya cargada).
   Todo el bloqueo escala con una sola medida: font-size en .logo,
   que equivale a la altura de mayuscula del nombre. */
.logo {
  --logo-head: #2f6b27;
  display: inline-flex;
  vertical-align: middle;
  align-items: center;
  gap: .5em;
  font-size: 15.5px;
}
.logo-mark {
  width: 1.846em;
  height: auto;
  flex: none;
  display: block;
  color: var(--green);
  margin-top: -.135em;
}
.logo-text { display: flex; flex-direction: column; gap: .135em; }
.logo-name {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1em;
  line-height: .84;
  letter-spacing: .012em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--red);
}
.logo-tag {
  font-family: var(--display);
  font-weight: 600;
  font-size: .3462em;
  line-height: 1;
  letter-spacing: .316em;
  text-transform: uppercase;
  white-space: nowrap;
  padding-left: .05em;
  color: #a11421;
}

.nav-links { display: none; }

.nav-links a {
  position: relative;
  font-size: .92rem;
  font-weight: 500;
  color: var(--ink-2);
  padding: .35rem 0;
  transition: color .28s var(--ease-out);
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 2px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .38s var(--ease-out);
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after,
.nav-links a.is-active::after { transform: scaleX(1); transform-origin: left; }
.nav-links a.is-active { color: var(--ink); }

.nav-actions { display: flex; align-items: center; gap: .6rem; }
.nav-actions .btn-primary { display: none; }

.nav-toggle {
  width: 44px; height: 40px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-radius: 10px;
  border: 1px solid var(--line);
}
.nav-toggle span {
  display: block;
  width: 19px; height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .35s var(--ease-out), opacity .25s var(--ease-out);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-mobile {
  border-top: 1px solid var(--line);
  background: rgba(255,255,255,.97);
  padding: .6rem var(--gutter) 1.2rem;
  display: flex;
  flex-direction: column;
}
.nav-mobile[hidden] { display: none; }
.nav-mobile a {
  padding: .85rem .2rem;
  border-bottom: 1px solid var(--line);
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink);
}
.nav-mobile a:last-child { border-bottom: 0; }
.nav-mobile-cta {
  margin-top: .9rem;
  text-align: center;
  background: var(--red);
  color: #fff !important;
  border-radius: 999px;
  padding: .9rem 1rem !important;
  font-weight: 600;
}

/* --- Rail de corriente (firma visual) --- */
.rail { display: none; }

/* =============================================================
   6. Secciones
   ============================================================= */

.section { padding-block: var(--sec-y); position: relative; }
.section-about   { background: var(--bg); }
.section-services{ background: var(--bg-2); }
.section-projects{ background: var(--bg); }
.section-clients { background: var(--bg-2); }
.section-contact { background: var(--bg); }

/* --- Hero --- */
.hero {
  position: relative;
  /* La franja de clientes ya separa el hero de la barra fija. */
  padding-top: clamp(2.4rem, 6vw, 4.2rem);
  padding-bottom: clamp(3rem, 7vw, 5.5rem);
  overflow: hidden;
}
.hero-grid-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right,  rgba(16,21,27,.055) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(16,21,27,.055) 1px, transparent 1px);
  background-size: 68px 68px;
  -webkit-mask-image: radial-gradient(120% 85% at 78% 12%, #000 0%, transparent 72%);
          mask-image: radial-gradient(120% 85% at 78% 12%, #000 0%, transparent 72%);
}

.hero-inner {
  position: relative;
  display: grid;
  gap: clamp(2.4rem, 6vw, 4rem);
}

.hero-title {
  font-size: clamp(2.15rem, 6.4vw, 4.05rem);
  line-height: 1.03;
  margin-top: 1.15rem;
  max-width: 17ch;
}
.hero-title em {
  font-style: normal;
  color: var(--red);
  position: relative;
  white-space: nowrap;
}

.hero-sub {
  margin-top: 1.35rem;
  max-width: 56ch;
  font-size: clamp(1rem, 1.85vw, 1.12rem);
  color: var(--ink-2);
}

/* Especialidades técnicas — diferenciación frente a la competencia informal */
.hero-caps {
  margin-top: 1.3rem;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
.hero-caps li {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .01em;
  color: var(--ink-2);
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .38rem .8rem;
}

.hero-actions {
  margin-top: 1.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}

.hero-stats {
  margin-top: 2.6rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  align-items: stretch;
}
/* Las etiquetas pueden ocupar 1 o 2 líneas: los números se alinean abajo. */
.hero-stat { display: flex; flex-direction: column; height: 100%; }
.hero-stat dd { margin-top: auto; }
.hero-stat dt {
  font-family: var(--mono);
  font-size: .66rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: .3rem;
}
.hero-stat dd {
  font-family: var(--display);
  font-size: clamp(1.5rem, 3.4vw, 2.05rem);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -.03em;
  line-height: 1;
}

/* Media del hero */
.hero-media { position: relative; }
.hero-figure {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--sh-3);
  aspect-ratio: 4 / 5;
  background: var(--bg-3);
}
.hero-figure img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 50% 32%;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity 1.1s var(--ease-soft), transform 7s var(--ease-out);
}
/* La primera imagen ya trae la clase en el HTML: sin JS (o mientras
   arranca) se ve igual, sin depender de que el script llegue a correr. */
.hero-figure img.is-active {
  opacity: 1;
  transform: scale(1.07);
  z-index: 1;
}
.hero-figure:hover img.is-active { transform: scale(1.1); }
.hero-figure-frame {
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: var(--radius);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.22);
  pointer-events: none;
}
.hero-figure::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 46%; height: 4px;
  background: var(--red);
  z-index: 2;
}

.hero-badge {
  position: relative;
  margin-top: -2.2rem;
  margin-left: auto;
  margin-right: .8rem;
  width: min(300px, 82%);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  padding: 1rem 1.1rem;
  box-shadow: var(--sh-2);
  z-index: 3;
}
.hero-badge-label {
  display: block;
  font-family: var(--mono);
  font-size: .62rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: .3rem;
}
.hero-badge strong {
  display: block;
  font-family: var(--display);
  font-size: 1rem;
  color: var(--ink);
  letter-spacing: -.015em;
}
.hero-badge-note {
  display: block;
  margin-top: .3rem;
  font-size: .8rem;
  color: var(--ink-3);
  line-height: 1.45;
}

/* --- Marquesina de confianza — franja superior, bajo la navegación --- */
.trust {
  /* Deja libre la altura de la barra fija para que la franja quede justo
     debajo de ella, no oculta detrás. Medido: 63px móvil, 69px ≥960px. */
  margin-top: 63px;
  padding-block: .85rem;
  background: var(--dark);
  color: var(--on-dark);
  overflow: hidden;
}
.trust-inner {
  display: grid;
  gap: .5rem;
  align-items: center;
}
.trust-label {
  font-family: var(--mono);
  font-size: .62rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--on-dark-2);
  white-space: nowrap;
}
.marquee {
  overflow: hidden;
  min-width: 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
}
.marquee-track {
  display: flex;
  align-items: center;
  gap: 1.15rem;
  width: max-content;
  animation: marquee 42s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span {
  font-family: var(--display);
  font-size: clamp(.9rem, 1.5vw, 1.02rem);
  font-weight: 500;
  letter-spacing: -.01em;
  color: var(--on-dark);
  white-space: nowrap;
}
.marquee-track .marquee-sep { color: var(--red); font-weight: 400; }
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* --- Nosotros --- */
.about-grid {
  display: grid;
  gap: clamp(2.2rem, 5vw, 3.5rem);
}
.about-lead p + p { margin-top: 1.05rem; }
.about-lead strong { color: var(--red); font-weight: 600; }

.about-pillars { display: grid; gap: 1rem; }
.pillar {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  padding: 1.35rem 1.4rem;
  transition: border-color .35s var(--ease-out), box-shadow .35s var(--ease-out), transform .35s var(--ease-out);
}
.pillar:hover {
  border-color: var(--line-2);
  box-shadow: var(--sh-1);
  transform: translateY(-2px);
}
.pillar-num {
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .1em;
  color: var(--red);
}
.pillar h3 { font-size: 1.08rem; margin: .35rem 0 .45rem; }
.pillar p { font-size: .92rem; color: var(--ink-3); line-height: 1.6; }

/* Gerencia */
.leader {
  margin-top: clamp(2.6rem, 6vw, 4rem);
  padding-top: clamp(2.2rem, 5vw, 3rem);
  border-top: 1px solid var(--line);
  display: grid;
  gap: 1.8rem;
  align-items: center;
}
.leader-photo {
  position: relative;
  width: 132px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  overflow: hidden;
  background: var(--bg-3);
  flex: none;
}
.leader-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; }
.leader-monogram {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  font-family: var(--display);
  font-size: 2.4rem;
  font-weight: 600;
  letter-spacing: -.03em;
  color: #fff;
  background: linear-gradient(150deg, var(--red) 0%, var(--red-d) 55%, var(--green-d) 100%);
}
.leader-photo.is-fallback .leader-monogram { display: flex; }

.leader-quote p {
  font-family: var(--display);
  font-size: clamp(1.12rem, 2.5vw, 1.5rem);
  font-weight: 400;
  line-height: 1.42;
  letter-spacing: -.018em;
  color: var(--ink);
  max-width: 42ch;
}
.leader-quote footer { margin-top: 1.1rem; }
.leader-quote strong {
  display: block;
  font-family: var(--display);
  font-size: 1rem;
  color: var(--ink);
}
.leader-quote span {
  display: block;
  margin-top: .18rem;
  font-size: .85rem;
  color: var(--ink-3);
  line-height: 1.5;
}

/* --- Servicios --- */
.services-grid {
  display: grid;
  gap: 1.1rem;
}

.service {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color .4s var(--ease-out),
              box-shadow .4s var(--ease-out),
              transform .4s var(--ease-out);
}
.service::before {
  content: "";
  position: absolute;
  inset-inline: 0; top: 0;
  height: 3px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .5s var(--ease-out);
  z-index: 3;
}
.service:hover {
  border-color: transparent;
  box-shadow: var(--sh-2);
  transform: translateY(-4px);
}
.service:hover::before { transform: scaleX(1); }

.service-body { padding: 1.6rem 1.5rem 1.7rem; flex: 1; }
.service-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: .62rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--red);
  background: var(--red-soft);
  padding: .28rem .55rem;
  border-radius: 5px;
  margin-bottom: .7rem;
}
.service h3 { font-size: 1.22rem; margin-bottom: .5rem; }
.service p { font-size: .93rem; color: var(--ink-3); line-height: 1.62; }

.service-list {
  margin-top: 1.15rem;
  padding-top: 1.05rem;
  border-top: 1px solid var(--line);
  display: grid;
  gap: .45rem;
}
.service-list li {
  position: relative;
  padding-left: 1.05rem;
  font-size: .88rem;
  color: var(--ink-2);
}
.service-list li::before {
  content: "";
  position: absolute;
  left: 0; top: .62em;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--green);
}

/* --- Cifras --- */
.figures {
  background: var(--dark);
  color: var(--on-dark);
  padding-block: clamp(3rem, 7vw, 4.6rem);
  position: relative;
  overflow: hidden;
}
.figures::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(238,242,245,.05) 1px, transparent 1px);
  background-size: 68px 100%;
  pointer-events: none;
}
.figures-inner {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem 1.2rem;
}
.figure-item { text-align: left; }
.figure-num {
  display: block;
  font-family: var(--display);
  font-size: clamp(2rem, 5.6vw, 3.2rem);
  font-weight: 600;
  letter-spacing: -.035em;
  line-height: 1;
  color: #fff;
}
.figure-label {
  display: block;
  margin-top: .5rem;
  font-family: var(--mono);
  font-size: .66rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--on-dark-2);
}

/* --- Proyectos --- */
.projects { display: grid; gap: 1.1rem; }

.project {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color .4s var(--ease-out), box-shadow .4s var(--ease-out), transform .4s var(--ease-out);
}
.project:hover {
  border-color: transparent;
  box-shadow: var(--sh-2);
  transform: translateY(-3px);
}
.project-media { overflow: hidden; aspect-ratio: 16 / 10; background: var(--bg-3); }
.project-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .9s var(--ease-out);
}
.project:hover .project-media img { transform: scale(1.055); }

.project-body { padding: 1.35rem 1.4rem 1.5rem; flex: 1; }
.project-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem .7rem;
  font-family: var(--mono);
  font-size: .66rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: .6rem;
}
.project-meta span:first-child { color: var(--red); }
.project-meta span + span::before {
  content: "·";
  margin-right: .7rem;
  color: var(--line-2);
}
.project h3 { font-size: 1.2rem; margin-bottom: .55rem; }
.project-body > p { font-size: .93rem; color: var(--ink-3); line-height: 1.62; }

.project-tags {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}
.project-tags li {
  font-size: .74rem;
  color: var(--ink-2);
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .26rem .68rem;
}

.project-text {
  background: linear-gradient(155deg, var(--bg-2) 0%, var(--paper) 60%);
}
.project-text .project-body { padding-top: 1.6rem; }

/* --- Clientes / Misión-Visión --- */
.clients-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: .7rem;
  margin-bottom: clamp(2.4rem, 5vw, 3.4rem);
}
.client-chip {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  padding: 1.1rem 1rem;
  text-align: center;
  font-family: var(--display);
  font-size: .95rem;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -.012em;
  transition: border-color .35s var(--ease-out), transform .35s var(--ease-out), box-shadow .35s var(--ease-out);
}
.client-chip:hover {
  border-color: var(--red);
  transform: translateY(-2px);
  box-shadow: var(--sh-1);
}

.mv-grid { display: grid; gap: 1.1rem; }
.mv-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 3px solid var(--green);
  border-radius: var(--radius-s);
  padding: 1.5rem 1.5rem 1.6rem;
}
.mv-card:last-child { border-left-color: var(--red); }
.mv-tag {
  display: block;
  font-family: var(--mono);
  font-size: .66rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: .7rem;
}
.mv-card p { font-size: .96rem; color: var(--ink-2); line-height: 1.68; }

/* --- Contacto --- */
.contact-grid { display: grid; gap: clamp(2rem, 5vw, 3.2rem); }

.contact-lead {
  font-size: clamp(1.02rem, 1.9vw, 1.15rem);
  color: var(--ink);
  max-width: 44ch;
  margin-bottom: 1.8rem;
}

.contact-list { display: grid; gap: 1.15rem; margin-bottom: 1.8rem; }
.contact-list li {
  display: grid;
  gap: .2rem;
  padding-bottom: 1.15rem;
  border-bottom: 1px solid var(--line);
}
.contact-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.contact-label {
  font-family: var(--mono);
  font-size: .64rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.contact-list a,
.contact-list li > span:last-child {
  font-family: var(--display);
  font-size: 1.02rem;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.45;
  letter-spacing: -.012em;
}
.contact-list a { transition: color .28s var(--ease-out); }
.contact-list a:hover { color: var(--red); }

/* Formulario */
.contact-form-wrap {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.4rem, 3.5vw, 2.2rem);
}
/* Trampa antispam: invisible para personas, no para robots */
.hp-field {
  position: absolute !important;
  left: -9999px;
  width: 1px; height: 1px;
  opacity: 0;
  pointer-events: none;
}

.form-title {
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 1.4rem;
}
.field { display: grid; gap: .4rem; margin-bottom: 1rem; }
.field-row { display: grid; gap: 1rem; }
.field label {
  font-size: .82rem;
  font-weight: 500;
  color: var(--ink-2);
}
.field .opt { color: var(--ink-3); font-weight: 400; }

.field input,
.field select,
.field textarea {
  width: 100%;
  font: inherit;
  font-size: .95rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-s);
  padding: .78rem .9rem;
  transition: border-color .28s var(--ease-out), box-shadow .28s var(--ease-out);
}
.field textarea { resize: vertical; min-height: 120px; line-height: 1.55; }
.field input::placeholder,
.field textarea::placeholder { color: #a3adb8; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px var(--red-soft);
}
.field input.is-error,
.field textarea.is-error { border-color: var(--red); background: #fffafa; }

.contact-form .btn { margin-top: .6rem; }

.form-note {
  margin-top: .9rem;
  font-size: .86rem;
  line-height: 1.55;
  min-height: 1.2em;
}
.form-note.is-ok    { color: var(--green-d); }
.form-note.is-error { color: var(--red); }

/* --- Footer --- */
.footer {
  background: var(--dark);
  color: var(--on-dark-2);
  padding-top: clamp(3rem, 6vw, 4.2rem);
}
.footer-inner {
  display: grid;
  gap: 2.2rem;
  padding-bottom: 2.6rem;
}
/* El logotipo va directo sobre el fondo oscuro: ya no necesita el
   recuadro blanco que tapaba el fondo del PNG antiguo. */
.footer .logo {
  --logo-head: #b7e3a8;
  font-size: 17px;
  margin-bottom: 1.15rem;
}
.footer .logo-mark { color: #6dbe54; }
.footer .logo-name { color: #fff; }
.footer .logo-tag  { color: #8fd07c; }
.footer-brand p { font-size: .9rem; line-height: 1.65; max-width: 38ch; }

.footer-nav-title {
  font-family: var(--mono);
  font-size: .64rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--on-dark);
  margin-bottom: .9rem;
}
.footer-nav, .footer-contact { display: flex; flex-direction: column; gap: .55rem; }
.footer-nav a, .footer-contact a, .footer-contact span {
  font-size: .9rem;
  color: var(--on-dark-2);
  transition: color .28s var(--ease-out);
}
.footer-nav a:hover, .footer-contact a:hover { color: #fff; }

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem 1.2rem;
  justify-content: space-between;
  padding-block: 1.3rem 1.5rem;
  /* Espacio reservado para que el botón flotante no pise el texto */
  padding-right: calc(var(--gutter) + 4.4rem);
  border-top: 1px solid var(--line-dark);
  font-size: .8rem;
  color: var(--on-dark-2);
}

/* --- WhatsApp flotante --- */
.wa-float {
  position: fixed;
  right: 1rem; bottom: 1rem;
  z-index: 90;
  width: 54px; height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  box-shadow: 0 10px 26px rgba(82,161,63,.35);
  transition: transform .38s var(--ease-out), background-color .3s var(--ease-out);
}
.wa-float:hover { transform: translateY(-3px) scale(1.05); background: var(--green-d); }

/* =============================================================
   7. Efectos — revelado al hacer scroll
   ============================================================= */
/* Por defecto TODO es visible: si el JS falla, el contenido se ve igual. */
.reveal { opacity: 1; transform: none; }

.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .8s var(--ease-out), transform .8s var(--ease-out);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

/* Defensa obligatoria: un elemento con .reveal y data-split nunca queda invisible */
.reveal[data-split],
.js .reveal[data-split] { opacity: 1; transform: none; }

/* Escalonado dentro de rejillas */
.js .services-grid .reveal:nth-child(2) { transition-delay: .07s; }
.js .services-grid .reveal:nth-child(3) { transition-delay: .14s; }
.js .services-grid .reveal:nth-child(4) { transition-delay: .07s; }
.js .services-grid .reveal:nth-child(5) { transition-delay: .14s; }
.js .services-grid .reveal:nth-child(6) { transition-delay: .21s; }
.js .projects .reveal:nth-child(2) { transition-delay: .07s; }
.js .projects .reveal:nth-child(3) { transition-delay: .14s; }
.js .figures-inner .reveal:nth-child(2) { transition-delay: .08s; }
.js .figures-inner .reveal:nth-child(3) { transition-delay: .16s; }
.js .figures-inner .reveal:nth-child(4) { transition-delay: .24s; }

/* Inclinación 3D suave en tarjetas */
[data-tilt] { transform-style: preserve-3d; }

/* =============================================================
   8. Responsive
   ============================================================= */
@media (min-width: 540px) {
  :root { --gutter: 1.5rem; }
  .field-row { grid-template-columns: 1fr 1fr; }
  .leader { grid-template-columns: auto 1fr; gap: 2rem; }
  .mv-grid { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 720px) {
  :root { --gutter: 2rem; }
  /* Etiqueta y marquesina en una sola línea */
  .trust-inner { grid-template-columns: auto 1fr; gap: 1.5rem; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .projects { grid-template-columns: repeat(2, 1fr); }
  .figures-inner { grid-template-columns: repeat(4, 1fr); }
  .about-pillars { grid-template-columns: repeat(3, 1fr); }
  .footer-inner { grid-template-columns: 1.6fr 1fr 1.2fr; }
  .hero-badge { margin-right: 1.6rem; }
}

@media (min-width: 960px) {
  html { scroll-padding-top: 104px; }
  .nav-links { display: flex; align-items: center; gap: 1.9rem; }
  .nav-actions .btn-primary { display: inline-flex; }
  .nav-toggle { display: none; }
  .nav-mobile { display: none !important; }
  .nav-brand .logo { font-size: 22.3px; }
  /* El logotipo nuevo es más ancho y más bajo que el antiguo. Se compensa
     con el aire vertical de la barra para que siga midiendo 69px y nada
     más abajo se mueva. */
  .nav-inner { padding-block: .93rem; }
  .trust { margin-top: 69px; }

  .hero-inner {
    grid-template-columns: 1.08fr .92fr;
    align-items: center;
    gap: clamp(2.5rem, 5vw, 4.5rem);
  }
  .hero-badge {
    position: absolute;
    left: -3.4rem;
    bottom: 1.9rem;
    margin: 0;
    width: 244px;
    padding: .9rem 1rem;
  }
  .hero-badge strong { font-size: .95rem; }
  .hero-figure { aspect-ratio: 3 / 4; }

  .about-grid { grid-template-columns: 1.25fr .95fr; align-items: start; }
  .about-pillars { grid-template-columns: 1fr; }

  /* 6 tarjetas iguales = 3 columnas × 2 filas exactas */
  .services-grid { grid-template-columns: repeat(3, 1fr); }

  /* Proyectos: 9 tarjetas iguales = 3 columnas × 3 filas exactas. */
  .projects { grid-template-columns: repeat(3, 1fr); }

  .contact-grid { grid-template-columns: .92fr 1.08fr; align-items: start; }

  .section-head { grid-template-columns: auto 1fr; }
  .section-num { order: 1; }
  .section-title { grid-column: auto; order: 1; }
}

@media (min-width: 1280px) {
  .hero { padding-top: clamp(3rem, 4.5vw, 4.6rem); }
  .hero-title { font-size: clamp(3rem, 4.15vw, 4.3rem); }

  /* Rail de corriente — firma visual, solo en pantallas anchas */
  .rail {
    display: block;
    position: fixed;
    left: max(1.1rem, calc((100vw - var(--maxw)) / 2 - 2.2rem));
    top: 50%;
    transform: translateY(-50%);
    z-index: 80;
    pointer-events: none;
  }
  .rail-track {
    width: 2px;
    height: 168px;
    background: var(--line);
    border-radius: 2px;
    overflow: hidden;
  }
  .rail-fill {
    width: 100%;
    height: 0%;
    background: linear-gradient(180deg, var(--red) 0%, var(--red) 72%, var(--green) 100%);
    border-radius: 2px;
    transition: height .18s linear;
  }
}

/* =============================================================
   9. Reduced-motion — solo efectos intrusivos
   Windows envía 'reduce' por defecto en muchas configuraciones:
   NO desactivamos hovers, fades, tilts ni contadores.
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee-track { animation: none; transform: none; }
  .kicker-dot { animation: none; }
  .section-rule i { animation: none !important; }
}

/* Impresión */
@media print {
  .nav, .wa-float, .rail, .marquee { display: none !important; }
  body { color: #000; background: #fff; }
  .reveal, .js .reveal { opacity: 1 !important; transform: none !important; }
}
