:root {
  --carbon: #2E373A;
  --carbon-2: #172023;
  --red: #CB2529;
  --red-2: #E1363A;
  --navy: #333378;
  --white: #FFFFFF;
  --soft: #F4F5F6;
  --ink: #111719;
  --muted: #697579;
  --line: rgba(46, 55, 58, 0.12);
  --glass: rgba(255, 255, 255, 0.78);
  --shadow: 0 24px 70px rgba(17, 23, 25, 0.16);
  --shadow-red: 0 20px 44px rgba(203, 37, 41, 0.28);
  --radius: 8px;
  --max: 1180px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--white);
  color: var(--ink);
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}

body.is-loading {
  overflow: hidden;
}

img,
iframe {
  max-width: 100%;
}

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

button,
input,
select,
textarea {
  font: inherit;
}

.container {
  width: min(100% - 40px, var(--max));
  margin-inline: auto;
}

.label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  color: var(--red);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.label::before {
  content: "";
  width: 34px;
  height: 2px;
  background: linear-gradient(90deg, var(--red), var(--navy));
}

.section-title,
.why-quote,
.hero-title {
  font-family: "Montserrat", "Inter", sans-serif;
  letter-spacing: 0;
}

.section-title {
  margin: 0;
  color: var(--carbon);
  font-size: clamp(34px, 5.3vw, 66px);
  line-height: 0.98;
  font-weight: 900;
}

.section-lead {
  color: var(--muted);
  margin-top: 16px;
  font-size: 15.5px;
  max-width: 520px;
  line-height: 1.75;
}

.gold,
.accent {
  color: var(--red);
}

.btn-gold,
.btn-outline,
.form-submit {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: var(--radius);
  font-weight: 900;
  letter-spacing: 0;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.btn-gold {
  color: var(--white);
  background: linear-gradient(135deg, var(--red), #9d171b);
  box-shadow: var(--shadow-red);
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 14px 24px;
}

.btn-gold:hover,
.form-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 28px 54px rgba(203, 37, 41, 0.34);
}

.btn-outline {
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  padding: 14px 24px;
}

.btn-outline:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.15);
}

/* Loader */
#loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 28px;
  background:
    linear-gradient(120deg, rgba(203, 37, 41, 0.2), transparent 36%),
    radial-gradient(circle at 68% 48%, rgba(51, 51, 120, 0.28), transparent 30%),
    var(--carbon-2);
  transition: opacity 0.9s ease, visibility 0.9s ease;
}

#loader::before {
  content: "";
  position: absolute;
  inset: -2px;
  background:
    linear-gradient(rgba(255,255,255,0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.07) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.9), transparent);
  animation: gridDrift 4s linear infinite;
}

#loader::after {
  content: "";
  position: absolute;
  width: 160%;
  height: 14%;
  left: -30%;
  top: 48%;
  background: linear-gradient(90deg, transparent, rgba(203, 37, 41, 0.32), rgba(255,255,255,0.16), transparent);
  transform: rotate(-8deg) translateX(-35%);
  animation: loaderScan 1.9s ease-in-out infinite;
}

#loader.loader-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-emblem {
  position: relative;
  z-index: 1;
  width: min(64vw, 390px);
  min-height: 134px;
  display: grid;
  place-items: center;
  padding: 26px 30px;
}

.loader-emblem img {
  width: 100%;
  height: auto;
  filter: brightness(0) invert(1) drop-shadow(0 20px 46px rgba(0,0,0,0.45));
}

.loader-spinner {
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-top-color: var(--red-2);
  border-right-color: rgba(255, 255, 255, 0.45);
  border-radius: 50%;
  animation: spin 1.35s linear infinite;
}

.loader-bar {
  position: relative;
  z-index: 1;
  width: min(72vw, 420px);
  height: 4px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
}

.loader-bar-fill {
  width: 42%;
  height: 100%;
  background: linear-gradient(90deg, var(--red), var(--white), var(--navy));
  border-radius: inherit;
  animation: loaderBar 1.65s ease-in-out infinite;
}

.loader-text {
  position: relative;
  z-index: 1;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

/* Header */
#navbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 1000;
  padding: 14px 0;
  transition: background 0.25s ease, box-shadow 0.25s ease, padding 0.25s ease;
}

#navbar.nav-scrolled {
  padding: 9px 0;
  background: rgba(255, 255, 255, 0.93);
  box-shadow: 0 10px 34px rgba(17, 23, 25, 0.1);
  backdrop-filter: blur(18px);
}

.nav-inner {
  min-height: 70px;
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 22px;
}

.nav-logo {
  width: clamp(170px, 18vw, 230px);
  display: flex;
  align-items: center;
}

.nav-logo-img {
  width: 100%;
  height: auto;
  display: block;
  filter: brightness(0) invert(1);
  transition: filter 0.25s ease;
}

#navbar.nav-scrolled .nav-logo-img,
#mob-menu .nav-logo-img {
  filter: none;
}

.nav-links {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: clamp(14px, 2vw, 28px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.84);
  font-size: 13px;
  font-weight: 900;
  transition: color 0.22s ease;
}

#navbar.nav-scrolled .nav-links a {
  color: var(--carbon);
}

.nav-links a:hover {
  color: var(--red);
}

.nav-cta {
  padding: 12px 18px;
  font-size: 13px;
  white-space: nowrap;
}

.hamburger {
  display: none;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: var(--radius);
  background: var(--red);
  cursor: pointer;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 5px auto;
  background: var(--white);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.hamburger.is-active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.is-active span:nth-child(2) {
  opacity: 0;
}

.hamburger.is-active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

#mob-menu {
  display: none;
  position: absolute;
  left: 20px;
  right: 20px;
  top: calc(100% + 6px);
  padding: 14px;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

#mob-menu a {
  display: block;
  padding: 14px;
  color: var(--carbon);
  font-weight: 900;
  border-radius: 6px;
}

#mob-menu a:last-child {
  color: var(--white);
  background: var(--red);
}

#mob-menu.is-open {
  display: block;
}

/* Hero */
#hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-items: center;
  overflow: hidden;
  color: var(--white);
  isolation: isolate;
}

.hero-bg,
.fixed-band {
  position: absolute;
  inset: 0;
  z-index: -5;
  background-image: url("../assets/hero-tecnico-radsys.webp");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  transform: scale(1.08);
  animation: slowImageMove 18s ease-in-out infinite alternate;
}

.hero-bg {
  opacity: 0.72;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: -4;
  background:
    linear-gradient(90deg, rgba(17, 23, 25, 0.95), rgba(17, 23, 25, 0.72) 44%, rgba(17, 23, 25, 0.2)),
    linear-gradient(180deg, rgba(17, 23, 25, 0.28), rgba(17, 23, 25, 0.9));
}

.hero-vignette {
  position: absolute;
  inset: 0;
  z-index: -3;
  box-shadow: inset 0 0 190px rgba(0, 0, 0, 0.8);
}

.hero-grid,
.section-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-grid {
  z-index: -2;
  opacity: 0.2;
  background:
    linear-gradient(rgba(255,255,255,0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.12) 1px, transparent 1px);
  background-size: 58px 58px;
  animation: gridDrift 10s linear infinite;
}

#hero-canvas {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
}

.hero-rays {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: 0.38;
}

.hero-ray {
  position: absolute;
  top: -18%;
  width: 2px;
  height: 145%;
  background: linear-gradient(180deg, transparent, rgba(203, 37, 41, 0.7), transparent);
  transform: rotate(18deg);
  animation: rayPulse 4s ease-in-out infinite;
}

.r1 { left: 54%; animation-delay: 0.1s; }
.r2 { left: 61%; animation-delay: 0.7s; background: linear-gradient(180deg, transparent, rgba(51, 51, 120, 0.8), transparent); }
.r3 { left: 70%; animation-delay: 1.2s; }
.r4 { left: 78%; animation-delay: 1.7s; background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.5), transparent); }
.r5 { left: 87%; animation-delay: 2.1s; }

.hero-grain {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.1;
  background-image:
    repeating-radial-gradient(circle at 12% 12%, rgba(255,255,255,0.7) 0 1px, transparent 1px 6px);
}

.hero-scanline {
  position: absolute;
  left: -20%;
  right: -20%;
  top: 0;
  z-index: 1;
  height: 180px;
  background: linear-gradient(180deg, transparent, rgba(255,255,255,0.18), transparent);
  transform: translateY(-120%) rotate(-5deg);
  animation: scanline 2.4s ease-out 0.45s both;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(820px, 100%);
  padding: 145px 0 92px;
}

.hero-badge {
  width: fit-content;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  padding: 10px 14px;
  color: rgba(255, 255, 255, 0.86);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
  backdrop-filter: blur(18px);
}

.badge-dot,
.p-badge-dot {
  width: 9px;
  height: 9px;
  background: var(--red);
  border-radius: 50%;
  box-shadow: 0 0 0 8px rgba(203, 37, 41, 0.16);
}

.hero-title {
  margin: 0;
  font-size: clamp(42px, 7vw, 88px);
  line-height: 0.92;
  font-weight: 900;
  text-transform: uppercase;
}

.hero-title .line {
  display: block;
  overflow: hidden;
}

.hero-title .line span {
  display: inline-block;
  transform: translateY(110%);
  animation: titleIn 0.95s cubic-bezier(.2,.8,.2,1) forwards;
}

.hero-title .line:nth-child(2) span { animation-delay: 0.18s; }
.hero-title .line:nth-child(3) span { animation-delay: 0.36s; }

.type-target::after {
  content: "";
  display: inline-block;
  width: 0.08em;
  height: 0.82em;
  margin-left: 4px;
  background: var(--white);
  animation: caret 0.85s steps(1) infinite;
  vertical-align: -0.08em;
}

.hero-sub {
  max-width: 710px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.72;
}

.hero-sub strong {
  color: var(--white);
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.hero-trust {
  width: min(100%, 760px);
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  margin-top: 46px;
  padding: 18px 20px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px);
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 13px;
  font-weight: 800;
}

.trust-item i {
  color: var(--red-2);
}

.trust-divider {
  width: 1px;
  height: 28px;
  background: rgba(255, 255, 255, 0.16);
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 28px;
  z-index: 2;
  transform: translateX(-50%);
}

.scroll-mouse {
  width: 28px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 18px;
  display: grid;
  justify-content: center;
  padding-top: 9px;
}

.scroll-mouse-dot {
  width: 4px;
  height: 8px;
  background: var(--red);
  border-radius: 999px;
  animation: scrollDot 1.6s ease-in-out infinite;
}

/* Marquee */
.marquee {
  position: relative;
  overflow: hidden;
  background: var(--carbon);
  color: var(--white);
  border-block: 1px solid rgba(255,255,255,0.08);
}

.marquee-inner {
  display: flex;
  width: max-content;
  gap: 34px;
  padding: 15px 0;
  animation: marquee 30s linear infinite;
}

.marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  font-weight: 900;
  color: rgba(255,255,255,0.78);
  text-transform: uppercase;
}

.marquee-item::before {
  content: "";
  width: 8px;
  height: 8px;
  background: var(--red);
  border-radius: 50%;
}

/* Sections */
section {
  position: relative;
  padding: clamp(78px, 9vw, 126px) 0;
  overflow: hidden;
}

#why,
#producto {
  background:
    linear-gradient(135deg, rgba(203,37,41,0.04), transparent 30%),
    var(--white);
}

#ambientes,
#sectores {
  background: var(--soft);
}

.section-particles {
  opacity: 0.28;
  background-image:
    radial-gradient(circle, rgba(203,37,41,0.34) 1px, transparent 1.8px),
    radial-gradient(circle, rgba(51,51,120,0.28) 1px, transparent 1.8px);
  background-size: 74px 74px, 112px 112px;
  background-position: 0 0, 34px 48px;
  animation: particleDrift 18s linear infinite;
}

.section-particles.blue {
  opacity: 0.24;
}

.why-header,
.ambientes-top,
.gallery-head {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
  align-items: end;
  gap: 44px;
}

.why-quote {
  margin: 0;
  color: var(--carbon);
  font-size: clamp(34px, 5.5vw, 72px);
  line-height: 0.98;
  font-weight: 900;
}

.why-quote em {
  color: var(--red);
  font-style: italic;
}

.why-sub,
.sectores-hdr p,
.proceso-header p,
.gallery-head p,
.contact-hdr p {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.75;
  margin: 0;
}

.features-grid,
.ambientes-grid,
.proceso-grid,
.sectores-grid,
.gallery-grid {
  display: grid;
  gap: 18px;
}

.features-grid {
  grid-template-columns: repeat(4, 1fr);
  margin-top: 48px;
}

.f-card,
.proceso-step,
.sector-card,
.gallery-card {
  position: relative;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 16px 42px rgba(17, 23, 25, 0.07);
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.f-card:hover,
.proceso-step:hover,
.sector-card:hover,
.gallery-card:hover {
  transform: translateY(-5px);
  border-color: rgba(203, 37, 41, 0.28);
  box-shadow: var(--shadow);
}

.f-card {
  min-height: 286px;
  padding: 28px;
  overflow: hidden;
}

.f-num {
  position: absolute;
  top: 8px;
  right: 18px;
  color: rgba(203, 37, 41, 0.12);
  font-family: "Montserrat", sans-serif;
  font-size: 78px;
  line-height: 1;
  font-weight: 900;
}

.f-icon,
.f-row-icon,
.ci-icon,
.amb-icon-wrap {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  color: var(--white);
  background: linear-gradient(135deg, var(--red), var(--navy));
  border-radius: var(--radius);
}

.f-card h3,
.amb-card h3,
.proceso-step h3,
.sector-card h3,
.contact-info h3,
.contact-form-wrap h3 {
  margin: 20px 0 10px;
  color: var(--carbon);
  font-family: "Montserrat", sans-serif;
  font-size: 20px;
  line-height: 1.2;
  font-weight: 900;
}

.f-card p,
.proceso-step p,
.gallery-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.68;
}

/* Solution image cards */
.fixed-band {
  z-index: 0;
  opacity: 0.13;
  background-image: url("../assets/rack-cableado-radsys.webp");
}

#ambientes .container,
#contacto .container {
  position: relative;
  z-index: 1;
}

.ambiente-pill {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  color: var(--carbon);
  background: var(--white);
  border: 1px solid var(--line);
  font-weight: 900;
  box-shadow: 0 12px 28px rgba(17, 23, 25, 0.06);
}

.ambientes-grid {
  grid-template-columns: repeat(4, 1fr);
  margin-top: 42px;
}

.amb-card {
  position: relative;
  min-height: 430px;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--carbon);
  box-shadow: var(--shadow);
}

.amb-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  transition: transform 0.7s ease, opacity 0.7s ease;
}

.amb-card:hover .amb-img {
  transform: scale(1.1);
  opacity: 0.88;
}

.amb-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 26px;
  background: linear-gradient(180deg, rgba(17,23,25,0.08), rgba(17,23,25,0.92));
  color: var(--white);
}

.amb-overlay h3 {
  color: var(--white);
}

.amb-overlay p {
  margin: 0;
  color: rgba(255,255,255,0.78);
  line-height: 1.65;
}

.amb-temp {
  width: fit-content;
  max-width: 100%;
  margin-top: 18px;
  padding: 9px 12px;
  color: rgba(255,255,255,0.9);
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 999px;
  background: rgba(255,255,255,0.1);
  font-size: 12px;
  font-weight: 900;
}

/* Process */
#proceso {
  background:
    linear-gradient(180deg, rgba(46, 55, 58, 0.96), rgba(23, 32, 35, 0.98)),
    url("../assets/gabinete-comunicacion-radsys.webp") center/cover fixed;
  color: var(--white);
}

#proceso .section-title,
#proceso .proceso-header p {
  color: var(--white);
}

.proceso-header {
  max-width: 760px;
}

.proceso-grid {
  grid-template-columns: repeat(3, 1fr);
  margin-top: 42px;
}

.proceso-step {
  min-height: 250px;
  padding: 30px;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255,255,255,0.14);
  backdrop-filter: blur(14px);
}

.proceso-step h3 {
  color: var(--white);
}

.proceso-step p {
  color: rgba(255,255,255,0.74);
}

.step-number {
  color: var(--red-2);
  font-family: "Montserrat", sans-serif;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

/* Product */
.producto-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.78fr);
  align-items: center;
  gap: clamp(34px, 7vw, 86px);
}

.producto-lead {
  color: var(--muted);
  max-width: 600px;
  margin: 20px 0 26px;
  font-size: 16px;
  line-height: 1.78;
}

.feature-rows {
  display: grid;
  gap: 12px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.f-row {
  display: flex;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.f-row h4 {
  margin: 0 0 5px;
  color: var(--carbon);
  font-family: "Montserrat", sans-serif;
  font-size: 16px;
  font-weight: 900;
}

.f-row p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 14px;
}

.specs-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
}

.spec-cell {
  min-height: 84px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 16px;
  border-right: 1px solid var(--line);
}

.spec-cell:last-child {
  border-right: 0;
}

.spec-val {
  color: var(--red);
  font-family: "Montserrat", sans-serif;
  font-size: clamp(17px, 2vw, 24px);
  font-weight: 900;
}

.spec-name {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.panel-scene {
  position: relative;
  min-height: 620px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--carbon);
  box-shadow: var(--shadow);
}

.panel-scene::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(17,23,25,0.04), rgba(17,23,25,0.68)),
    linear-gradient(90deg, rgba(203,37,41,0.18), transparent);
}

.panel-photo {
  width: 100%;
  height: 100%;
  min-height: 620px;
  object-fit: cover;
  display: block;
  animation: slowImageMove 14s ease-in-out infinite alternate;
}

.p-badge {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100% - 28px);
  padding: 11px 14px;
  color: var(--white);
  background: rgba(17,23,25,0.72);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 900;
  backdrop-filter: blur(12px);
}

.pb-tl {
  top: 18px;
  left: 18px;
}

.pb-br {
  right: 18px;
  bottom: 18px;
}

/* Stats */
#stats {
  padding: 54px 0;
  background: var(--carbon);
  color: var(--white);
}

.stats-grid {
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(255,255,255,0.04);
}

.stat-cell {
  min-height: 154px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  text-align: center;
  border-right: 1px solid rgba(255,255,255,0.12);
}

.stat-cell:last-child {
  border-right: 0;
}

.stat-num {
  color: var(--white);
  font-family: "Montserrat", sans-serif;
  font-size: clamp(42px, 6vw, 74px);
  line-height: 1;
  font-weight: 900;
}

.stat-lbl {
  color: rgba(255,255,255,0.72);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

/* Sectors, gallery and reviews */
.sectores-hdr {
  max-width: 760px;
}

.sectores-grid {
  grid-template-columns: repeat(5, 1fr);
  margin-top: 40px;
}

.sector-card {
  min-height: 150px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  padding: 24px 14px;
  text-align: center;
}

.sector-icon {
  color: var(--red);
  font-size: 28px;
}

.sector-card h3 {
  margin: 0;
  font-size: 16px;
}

.gallery-block {
  margin-top: clamp(58px, 8vw, 96px);
}

.gallery-head {
  align-items: center;
}

.gallery-grid {
  grid-template-columns: repeat(4, 1fr);
  margin-top: 28px;
}

.gallery-card {
  overflow: hidden;
  background: var(--white);
}

.gallery-card img {
  width: 100%;
  aspect-ratio: 1.08 / 1;
  object-fit: cover;
  display: block;
  transition: transform 0.55s ease;
}

.gallery-card:hover img {
  transform: scale(1.06);
}

.gallery-card p {
  min-height: 78px;
  padding: 16px;
  font-weight: 700;
}

/* Contact */
#contacto {
  background: var(--white);
}

.contact-band {
  background-image: url("../assets/instalacion-cctv-radsys.webp");
  opacity: 0.09;
}

.contact-hdr {
  max-width: 780px;
  margin-bottom: 38px;
}

.contact-box {
  display: grid;
  grid-template-columns: minmax(300px, 0.82fr) minmax(0, 1.18fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: var(--white);
}

.contact-info {
  padding: clamp(28px, 4vw, 44px);
  color: var(--white);
  background:
    linear-gradient(150deg, rgba(46,55,58,0.98), rgba(23,32,35,0.98)),
    url("../assets/hero-tecnico-radsys.webp") center/cover;
}

.contact-info h3,
.contact-form-wrap h3 {
  margin-top: 0;
}

.contact-info h3 {
  color: var(--white);
}

.ci-sub {
  margin: 0 0 28px;
  color: rgba(255,255,255,0.74);
  line-height: 1.6;
}

.ci-list {
  display: grid;
  gap: 18px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.ci-item {
  display: flex;
  gap: 14px;
}

.ci-icon {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
}

.ci-body h4 {
  margin: 0 0 5px;
  color: var(--white);
  font-size: 14px;
  font-weight: 900;
}

.ci-body p {
  margin: 0;
  color: rgba(255,255,255,0.72);
  font-size: 13.5px;
  line-height: 1.55;
}

.ci-body a {
  color: var(--white);
  font-weight: 800;
}

.contact-form-wrap {
  padding: clamp(28px, 4vw, 44px);
  background: var(--white);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.form-group {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.form-label {
  color: var(--carbon);
  font-size: 13px;
  font-weight: 900;
}

.form-control {
  width: 100%;
  min-height: 48px;
  padding: 12px 13px;
  color: var(--carbon);
  border: 1px solid rgba(46, 55, 58, 0.16);
  border-radius: var(--radius);
  background: var(--soft);
  outline: 0;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

textarea.form-control {
  resize: vertical;
  min-height: 118px;
}

.form-control:focus {
  background: var(--white);
  border-color: rgba(203, 37, 41, 0.46);
  box-shadow: 0 0 0 4px rgba(203, 37, 41, 0.1);
}

.form-submit {
  width: 100%;
  border: 0;
  color: var(--white);
  background: linear-gradient(135deg, var(--red), #99161a);
  box-shadow: var(--shadow-red);
  cursor: pointer;
}

.form-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
}

.map-wrap {
  margin-top: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--soft);
}

.map-wrap iframe {
  width: 100%;
  height: 250px;
  display: block;
  border: 0;
}

/* Footer */
footer {
  padding: 58px 0 24px;
  color: rgba(255,255,255,0.72);
  background: var(--carbon-2);
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) 1fr auto;
  gap: 34px;
  align-items: start;
}

.footer-logo-img {
  width: min(100%, 230px);
  filter: brightness(0) invert(1);
}

.footer-brand p {
  max-width: 300px;
  margin: 14px 0 0;
  line-height: 1.6;
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.footer-cols h4 {
  margin: 0 0 12px;
  color: var(--white);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.footer-cols a {
  display: block;
  margin: 9px 0;
  font-size: 13px;
  transition: color 0.2s ease;
}

.footer-cols a:hover {
  color: var(--white);
}

.footer-socials {
  display: flex;
  gap: 10px;
}

.footer-soc,
.wa-btn {
  display: grid;
  place-items: center;
  color: var(--white);
  background: var(--red);
  border-radius: var(--radius);
  transition: transform 0.25s ease, background 0.25s ease;
}

.footer-soc {
  width: 42px;
  height: 42px;
}

.footer-soc:hover,
.wa-btn:hover {
  transform: translateY(-2px);
  background: var(--navy);
}

.footer-copy {
  margin: 34px 0 0;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 12.5px;
}

.wa-btn {
  position: fixed;
  z-index: 900;
  right: 22px;
  bottom: 22px;
  width: 58px;
  height: 58px;
  font-size: 26px;
  box-shadow: 0 18px 40px rgba(203,37,41,0.32);
}

/* Reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal.d1 { transition-delay: 0.08s; }
.reveal.d2 { transition-delay: 0.16s; }
.reveal.d3 { transition-delay: 0.24s; }
.reveal.d4 { transition-delay: 0.32s; }

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes loaderScan {
  0% { transform: rotate(-8deg) translateX(-45%); opacity: 0; }
  30%, 70% { opacity: 1; }
  100% { transform: rotate(-8deg) translateX(45%); opacity: 0; }
}

@keyframes loaderBar {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(260%); }
}

@keyframes gridDrift {
  to { background-position: 58px 58px; }
}

@keyframes slowImageMove {
  from { transform: scale(1.06) translate3d(-1.5%, -1%, 0); }
  to { transform: scale(1.12) translate3d(1.5%, 1%, 0); }
}

@keyframes rayPulse {
  0%, 100% { opacity: 0.14; transform: rotate(18deg) translateY(-18px); }
  50% { opacity: 0.8; transform: rotate(18deg) translateY(18px); }
}

@keyframes scanline {
  to { transform: translateY(125vh) rotate(-5deg); }
}

@keyframes titleIn {
  to { transform: translateY(0); }
}

@keyframes caret {
  50% { opacity: 0; }
}

@keyframes scrollDot {
  0%, 100% { transform: translateY(0); opacity: 0.4; }
  50% { transform: translateY(12px); opacity: 1; }
}

@keyframes marquee {
  to { transform: translateX(-50%); }
}

@keyframes particleDrift {
  to { background-position: 74px 74px, 146px 122px; }
}

@media (max-width: 1040px) {
  .nav-inner {
    grid-template-columns: auto 1fr auto;
  }

  .nav-links,
  .nav-cta {
    display: none;
  }

  .hamburger {
    display: block;
    justify-self: end;
  }

  .features-grid,
  .gallery-grid,
  .ambientes-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .sectores-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .producto-wrap,
  .contact-box {
    grid-template-columns: 1fr;
  }

  .panel-scene,
  .panel-photo {
    min-height: 520px;
  }
}

@media (max-width: 760px) {
  .container {
    width: min(100% - 28px, var(--max));
  }

  section {
    padding: 72px 0;
  }

  #navbar {
    padding: 10px 0;
  }

  .nav-inner {
    min-height: 58px;
  }

  .nav-logo {
    width: 170px;
  }

  #hero {
    min-height: 100svh;
  }

  .hero-bg,
  .fixed-band {
    background-attachment: scroll;
  }

  .hero-overlay {
    background:
      linear-gradient(180deg, rgba(17,23,25,0.92), rgba(17,23,25,0.72), rgba(17,23,25,0.94)),
      linear-gradient(90deg, rgba(17,23,25,0.82), rgba(17,23,25,0.4));
  }

  .hero-content {
    padding: 118px 0 86px;
  }

  .hero-title {
    font-size: clamp(36px, 11.5vw, 54px);
    line-height: 0.94;
  }

  .hero-sub {
    font-size: 16px;
  }

  .hero-ctas {
    display: grid;
  }

  .hero-trust {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .trust-divider {
    display: none;
  }

  .why-header,
  .ambientes-top,
  .gallery-head {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .features-grid,
  .ambientes-grid,
  .proceso-grid,
  .stats-grid,
  .sectores-grid,
  .gallery-grid,
  .footer-inner,
  .footer-cols,
  .form-row,
  .specs-bar {
    grid-template-columns: 1fr;
  }

  .amb-card {
    min-height: 390px;
  }

  .spec-cell {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .spec-cell:last-child {
    border-bottom: 0;
  }

  .stat-cell {
    border-right: 0;
    border-bottom: 1px solid rgba(255,255,255,0.12);
  }

  .stat-cell:last-child {
    border-bottom: 0;
  }

  .panel-scene,
  .panel-photo {
    min-height: 430px;
  }

  .contact-form-wrap,
  .contact-info {
    padding: 26px 18px;
  }

  .footer-socials {
    justify-content: flex-start;
  }

  .wa-btn {
    top: 86px;
    right: 14px;
    bottom: auto;
    width: 48px;
    height: 48px;
    font-size: 22px;
  }
}

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