:root {
  --ink: #f8fbff;
  --muted: rgba(248, 251, 255, 0.72);
  --dim: rgba(248, 251, 255, 0.52);
  --steel: #111417;
  --panel: rgba(13, 17, 20, 0.68);
  --panel-strong: rgba(13, 17, 20, 0.86);
  --line: rgba(248, 251, 255, 0.2);
  --cyan: #39d8ff;
  --lime: #c8ff4a;
  --amber: #ffb84d;
  --red: #ff5e5b;
  --shadow: 0 28px 100px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

body.is-loading {
  overflow: hidden;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(to bottom, transparent 0, #000 18%, #000 82%, transparent 100%);
}

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

button,
input,
select {
  font: inherit;
}

.cursor-glow {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 60;
  width: 260px;
  height: 260px;
  pointer-events: none;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(57, 216, 255, 0.18), transparent 68%);
  opacity: 0;
  transform: translate3d(-50%, -50%, 0);
  transition: opacity 240ms ease;
}

body.has-pointer .cursor-glow {
  opacity: 1;
}

.loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    radial-gradient(circle at 25% 20%, rgba(57, 216, 255, 0.16), transparent 28%),
    radial-gradient(circle at 74% 76%, rgba(255, 184, 77, 0.14), transparent 32%),
    #080a0b;
  transition:
    opacity 700ms ease,
    visibility 700ms ease,
    transform 700ms ease;
}

.loader.is-done {
  visibility: hidden;
  opacity: 0;
  transform: scale(1.03);
}

/* ── Escenario completo de la cinta ──────────────────────────── */
.loader__stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border: 1px solid rgba(248, 251, 255, 0.14);
  background:
    linear-gradient(120deg, transparent 0 36%, rgba(57, 216, 255, 0.06) 36% 38%, transparent 38%),
    rgba(255, 255, 255, 0.035);
}

/* Línea de escaneo horizontal que baja de arriba a abajo */
.loader__stage::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 49%, rgba(57, 216, 255, 0.08) 50%, transparent 51%);
  animation: scanLine 3.2s linear infinite;
}

@keyframes scanLine {
  from { transform: translateY(-100%); }
  to   { transform: translateY(100%); }
}

/* ── Cinta ───────────────────────────────────────────────────── */
.belt {
  position: absolute;
  left: 50%;
  bottom: 22%;
  width: min(780px, 88vw);
  height: 118px;
  transform: translateX(-50%) perspective(800px) rotateX(54deg);
  transform-origin: center bottom;
  border: 1px solid rgba(248, 251, 255, 0.18);
  background:
    repeating-linear-gradient(90deg, rgba(248, 251, 255, 0.08) 0 18px, transparent 18px 56px),
    linear-gradient(180deg, rgba(57, 216, 255, 0.18), rgba(255, 184, 77, 0.1));
  animation: beltMove 1.1s linear infinite;
}

.belt__line {
  position: absolute;
  left: 0;
  width: 100%;
  height: 1px;
  background: rgba(248, 251, 255, 0.28);
}
.belt__line:nth-child(1) { top: 24%; }
.belt__line:nth-child(2) { top: 50%; }
.belt__line:nth-child(3) { top: 76%; }

/* ── Cajas interactivas ──────────────────────────────────────── */
.loader-box {
  position: absolute;
  bottom: 30%;
  left: -90px;
  display: grid;
  place-items: center;
  width: 70px;
  aspect-ratio: 1;
  padding: 0;
  border: 1px solid rgba(248, 251, 255, 0.18);
  border-radius: 8px;
  cursor: pointer;
  background: linear-gradient(135deg, rgba(255, 184, 77, 0.92), rgba(200, 255, 74, 0.72));
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
  transform: rotate(45deg);
  animation: boxTravel 4.8s linear infinite;
  transition: filter 200ms ease, box-shadow 200ms ease;
}

.loader-box:hover {
  filter: brightness(1.3);
  box-shadow: 0 0 32px rgba(57, 216, 255, 0.5), 0 18px 42px rgba(0, 0, 0, 0.34);
}

.loader-box span {
  width: 28px;
  height: 28px;
  border: 2px solid rgba(8, 10, 11, 0.65);
  border-radius: 5px;
}

.loader-box--two {
  animation-delay: -1.6s;
  background: linear-gradient(135deg, rgba(57, 216, 255, 0.95), rgba(248, 251, 255, 0.72));
}

.loader-box--three {
  animation-delay: -3.2s;
  background: linear-gradient(135deg, rgba(255, 94, 91, 0.9), rgba(255, 184, 77, 0.82));
}

.loader-box.is-pushed {
  animation-duration: 2.1s;
  filter: brightness(1.5);
  box-shadow: 0 0 48px rgba(200, 255, 74, 0.7), 0 18px 42px rgba(0, 0, 0, 0.34);
}

/* ── Mini-dashboard de métricas ──────────────────────────────── */
.loader__dash {
  position: absolute;
  top: 18px;
  right: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 160px;
  padding: 14px;
  border: 1px solid rgba(248, 251, 255, 0.12);
  border-radius: 8px;
  background: rgba(8, 10, 11, 0.7);
  backdrop-filter: blur(12px);
}

.loader__dash-item {
  display: grid;
  gap: 4px;
}

.dash-label {
  color: var(--dim);
  font-family: "JetBrains Mono", monospace;
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dash-value {
  color: var(--cyan);
  font-family: "JetBrains Mono", monospace;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.dash-bar {
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.dash-fill {
  display: block;
  height: 100%;
  border-radius: 2px;
  width: 0%;
}

.dash-fill--speed   { background: var(--cyan);  animation: dashAnimate 2.6s ease-in-out infinite alternate; }
.dash-fill--pallets { background: var(--lime);  animation: dashAnimate 3.1s ease-in-out infinite alternate-reverse; }
.dash-fill--temp    { background: var(--amber); animation: dashAnimate 4.0s ease-in-out infinite alternate; }

@keyframes dashAnimate {
  from { width: 12%; }
  to   { width: 88%; }
}

/* ── Radar de escaneo ────────────────────────────────────────── */
.loader__radar {
  position: absolute;
  bottom: 20px;
  right: 22px;
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
}

.radar__ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(57, 216, 255, 0.3);
  animation: radarPulse 2s ease-out infinite;
}

.radar__ring--2 {
  inset: 14px;
  border-color: rgba(57, 216, 255, 0.5);
  animation-delay: -1s;
}

.radar__sweep {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 75%, rgba(57, 216, 255, 0.35) 100%);
  animation: radarSweep 2s linear infinite;
}

.radar__label {
  position: relative;
  z-index: 1;
  color: var(--cyan);
  font-family: "JetBrains Mono", monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

@keyframes radarPulse {
  0%   { opacity: 0.8; transform: scale(1); }
  100% { opacity: 0;   transform: scale(1.6); }
}

@keyframes radarSweep {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ── Panel de texto de carga ─────────────────────────────────── */
.loader__content {
  position: relative;
  z-index: 1;
  width: min(620px, 100%);
  padding: 32px;
  border: 1px solid rgba(248, 251, 255, 0.14);
  background: rgba(8, 10, 11, 0.72);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.loader__content h1 {
  margin: 4px 0 12px;
  font-size: clamp(54px, 12vw, 142px);
  line-height: 0.88;
  letter-spacing: 0;
}

.loader__content p {
  max-width: 470px;
  margin: 0;
  min-height: 1.5em;
  color: var(--muted);
}

.loader__bar {
  height: 12px;
  margin-top: 28px;
  overflow: hidden;
  border: 1px solid rgba(248, 251, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
}

.loader__bar span {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--lime), var(--amber));
  transition: width 250ms ease;
  box-shadow: 0 0 12px rgba(57, 216, 255, 0.4);
}

.loader__meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 12px;
  color: var(--dim);
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  text-transform: uppercase;
}

.loader__hint {
  color: rgba(200, 255, 74, 0.6);
  animation: hintPulse 2s ease-in-out infinite;
}

@keyframes hintPulse {
  0%, 100% { opacity: 0.6; }
  50%       { opacity: 1; }
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 18px clamp(18px, 4vw, 56px);
  background: linear-gradient(to bottom, rgba(8, 10, 11, 0.82), rgba(8, 10, 11, 0));
  transition:
    padding 220ms ease,
    background 220ms ease;
}

.topbar.is-compact {
  padding-top: 12px;
  padding-bottom: 12px;
  background: rgba(8, 10, 11, 0.78);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 42px;
  aspect-ratio: 1;
  border: 1px solid rgba(248, 251, 255, 0.28);
  border-radius: 8px;
  color: #081012;
  background: linear-gradient(135deg, var(--cyan), var(--lime));
  font-family: "JetBrains Mono", monospace;
  font-size: 14px;
}

.topnav {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 28px);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.topnav a {
  position: relative;
}

.topnav a::after {
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -8px;
  height: 2px;
  content: "";
  background: var(--lime);
  transition: right 180ms ease;
}

.topnav a:hover::after {
  right: 0;
}

.topbar__cta,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border: 1px solid rgba(248, 251, 255, 0.22);
  border-radius: 8px;
  font-weight: 900;
  cursor: pointer;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    color 180ms ease;
}

.topbar__cta {
  color: #081012;
  background: var(--lime);
}

.button--primary {
  color: #071014;
  background: linear-gradient(135deg, var(--lime), var(--cyan));
  border-color: transparent;
}

.button:hover,
.topbar__cta:hover {
  transform: translateY(-2px);
}

.rail {
  position: fixed;
  right: clamp(14px, 2.4vw, 34px);
  top: 50%;
  z-index: 45;
  display: grid;
  gap: 12px;
  transform: translateY(-50%);
}

.rail__dot {
  display: grid;
  place-items: center;
  width: 38px;
  aspect-ratio: 1;
  border: 1px solid rgba(248, 251, 255, 0.16);
  border-radius: 50%;
  color: transparent;
  background: rgba(8, 10, 11, 0.42);
  backdrop-filter: blur(12px);
  transition:
    width 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    background 180ms ease;
}

.rail__dot span {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
}

.rail__dot.is-active,
.rail__dot:hover {
  width: 54px;
  color: var(--ink);
  border-color: var(--cyan);
  background: rgba(57, 216, 255, 0.16);
}

.scene {
  position: relative;
  min-height: 96svh;
  display: grid;
  align-items: center;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(96px, 12vh, 150px) clamp(20px, 7vw, 112px);
  border-top: 1px solid rgba(248, 251, 255, 0.12);
}

.scene--hero {
  min-height: 92svh;
  align-items: end;
}

.scene__video {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  filter: saturate(1.08) contrast(1.06);
}

.scene__shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(8, 10, 11, 0.9) 0%, rgba(8, 10, 11, 0.44) 48%, rgba(8, 10, 11, 0.76) 100%),
    linear-gradient(180deg, rgba(8, 10, 11, 0.42), rgba(8, 10, 11, 0.88));
}

.scene__grid {
  position: absolute;
  inset: auto 0 0;
  z-index: 2;
  height: 38%;
  opacity: 0.55;
  background:
    linear-gradient(rgba(57, 216, 255, 0.28) 1px, transparent 1px),
    linear-gradient(90deg, rgba(57, 216, 255, 0.28) 1px, transparent 1px);
  background-size: 58px 58px;
  transform: perspective(560px) rotateX(62deg);
  transform-origin: bottom center;
  animation: gridFlow 8s linear infinite;
}

.scene__grid--fast {
  animation-duration: 4s;
}

.scene__content {
  position: relative;
  z-index: 3;
  width: min(1180px, 100%);
}

.hero-content {
  margin-bottom: 62px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--lime);
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.hero-title {
  max-width: 900px;
  margin: 0;
  font-size: clamp(76px, 17vw, 230px);
  line-height: 0.82;
  letter-spacing: 0;
  text-transform: uppercase;
  text-shadow: 0 28px 70px rgba(0, 0, 0, 0.36);
}

.hero-slogan {
  max-width: 780px;
  margin: 24px 0 0;
  color: var(--ink);
  font-size: clamp(22px, 4vw, 54px);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: 0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.62fr);
  gap: clamp(28px, 6vw, 86px);
  align-items: center;
}

.split--reverse {
  grid-template-columns: minmax(300px, 0.62fr) minmax(0, 1.05fr);
}

.copy-block {
  max-width: 760px;
}

.copy-block h2 {
  margin: 0;
  font-size: clamp(42px, 7vw, 96px);
  line-height: 0.94;
  letter-spacing: 0;
}

.copy-block p:not(.eyebrow) {
  max-width: 680px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.45;
}

.service-panel,
.metrics,
.lead-form,
.plan-row article {
  border: 1px solid rgba(248, 251, 255, 0.16);
  border-radius: 8px;
  background: var(--panel);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.service-panel {
  padding: clamp(22px, 4vw, 36px);
}

.service-panel::before {
  display: block;
  width: 100%;
  height: 5px;
  margin-bottom: 24px;
  content: "";
  background: linear-gradient(90deg, var(--cyan), var(--lime));
}

.service-panel--warm::before {
  background: linear-gradient(90deg, var(--amber), var(--red));
}

.panel-kicker {
  display: block;
  margin-bottom: 18px;
  color: var(--ink);
  font-size: 22px;
  font-weight: 900;
}

.service-panel ul {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  color: var(--muted);
  list-style: none;
}

.service-panel li {
  position: relative;
  padding-left: 24px;
  line-height: 1.4;
}

.service-panel li::before {
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  content: "";
  background: var(--lime);
  box-shadow: 0 0 18px var(--lime);
}

.metrics {
  display: grid;
  grid-template-columns: 1fr;
  overflow: hidden;
}

.metrics div {
  padding: 28px;
  border-bottom: 1px solid rgba(248, 251, 255, 0.14);
}

.metrics div:last-child {
  border-bottom: 0;
}

.metrics strong {
  display: block;
  color: var(--cyan);
  font-family: "JetBrains Mono", monospace;
  font-size: clamp(44px, 7vw, 84px);
  line-height: 1;
}

.metrics span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.sorter {
  display: grid;
  gap: 42px;
}

.process {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.process span {
  position: relative;
  min-height: 92px;
  display: flex;
  align-items: end;
  padding: 18px;
  overflow: hidden;
  border: 1px solid rgba(248, 251, 255, 0.18);
  border-radius: 8px;
  background: rgba(8, 10, 11, 0.58);
  color: var(--ink);
  font-weight: 900;
}

.process span::before {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(110deg, transparent 0 32%, rgba(57, 216, 255, 0.2) 42%, transparent 54%);
  transform: translateX(-110%);
  animation: scan 2.8s ease-in-out infinite;
}

.process span:nth-child(2)::before {
  animation-delay: 0.25s;
}

.process span:nth-child(3)::before {
  animation-delay: 0.5s;
}

.process span:nth-child(4)::before {
  animation-delay: 0.75s;
}

.final {
  display: grid;
  gap: 30px;
}

.plan-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.plan-row article {
  padding: 24px;
}

.plan-row span {
  color: var(--cyan);
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
}

.plan-row h3 {
  margin: 18px 0 10px;
  font-size: 28px;
}

.plan-row p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.lead-form {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 12px;
  align-items: end;
  padding: 16px;
  background: var(--panel-strong);
}

.lead-form label {
  display: grid;
  gap: 7px;
}

.lead-form span {
  color: var(--dim);
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  text-transform: uppercase;
}

.lead-form input,
.lead-form select {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(248, 251, 255, 0.16);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.08);
  padding: 0 12px;
  outline: none;
}

.lead-form input:focus,
.lead-form select:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(57, 216, 255, 0.14);
}

.contact-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.contact-item {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid rgba(248, 251, 255, 0.16);
  border-radius: 8px;
  background: var(--panel-strong);
  color: var(--ink);
  text-decoration: none;
  transition:
    border-color 240ms ease,
    transform 240ms ease;
}

.contact-item:hover {
  border-color: var(--cyan);
  transform: translateY(-2px);
}

.contact-label {
  color: var(--dim);
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  text-transform: uppercase;
}

.contact-item strong {
  font-size: 17px;
  font-weight: 700;
  word-break: break-word;
}

.reveal {
  opacity: 0;
  transform: translate3d(0, 36px, 0);
  transition:
    opacity 700ms ease,
    transform 700ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

@keyframes beltMove {
  from {
    background-position: 0 0, 0 0;
  }

  to {
    background-position: 74px 0, 0 0;
  }
}

@keyframes boxTravel {
  from {
    left: calc(50% - min(390px, 44vw));
    transform: translateX(-120px) rotate(45deg) scale(0.8);
  }

  50% {
    transform: translateX(0) rotate(45deg) scale(1);
  }

  to {
    left: calc(50% + min(390px, 44vw));
    transform: translateX(120px) rotate(45deg) scale(0.8);
  }
}

@keyframes gridFlow {
  from {
    background-position: 0 0, 0 0;
  }

  to {
    background-position: 0 116px, 116px 0;
  }
}

@keyframes scan {
  0%,
  28% {
    transform: translateX(-110%);
  }

  72%,
  100% {
    transform: translateX(110%);
  }
}

@media (max-width: 980px) {
  .topnav {
    display: none;
  }

  .split,
  .split--reverse,
  .lead-form {
    grid-template-columns: 1fr;
  }

  .plan-row {
    grid-template-columns: 1fr;
  }

  .contact-row {
    grid-template-columns: 1fr;
  }

  .rail {
    right: 10px;
  }
}

@media (max-width: 680px) {
  .topbar {
    gap: 12px;
  }

  .topbar__cta {
    display: none;
  }

  .brand__mark {
    width: 38px;
  }

  .scene {
    min-height: 100svh;
    padding: 94px 18px 56px;
  }

  .scene--hero {
    min-height: 92svh;
  }

  .hero-content {
    margin-bottom: 80px;
  }

  .hero-title {
    font-size: clamp(62px, 22vw, 108px);
  }

  .hero-slogan {
    font-size: clamp(24px, 8vw, 38px);
  }

  .copy-block h2 {
    font-size: clamp(38px, 12vw, 62px);
  }

  .copy-block p:not(.eyebrow) {
    font-size: 16px;
  }

  .process {
    grid-template-columns: 1fr 1fr;
  }

  .rail {
    display: none;
  }

  .loader__video {
    inset: 6%;
  }

  .loader__content {
    padding: 22px;
  }
}

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