:root {
  --blue: #061d3a;
  --blue-dark: #031326;
  --teal: #3fd6d0;
  --teal-on-light: #0b7774;
  --white: #ffffff;
  --text: #d9e6f2;
  --muted: #6b7c8f;
  --green: #2f7d32;
  --red: #ef4444;
  --alert: #f59e0b;
  --positive: #22c55e;
  --card: rgba(255, 255, 255, 0.08);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 140px;
}

body {
  font-family: Inter, "Segoe UI", Arial, Helvetica, sans-serif;
  background: var(--blue-dark);
  color: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

#contenido-principal:focus {
  outline: none;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 16px;
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--white);
  color: var(--blue-dark);
  font-weight: 800;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

::selection {
  background: rgba(63, 214, 208, 0.28);
  color: var(--white);
}

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

.header {
  width: 100%;
  padding: 12px 7%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(3, 19, 38, 0.95);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  box-shadow: 0 0 0 rgba(0, 0, 0, 0);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.header::before {
  content: "";
  position: absolute;
  z-index: 3;
  top: -3px;
  left: 0;
  right: 0;
  height: 8px;
  pointer-events: none;
  opacity: 0.72;
  background-image:
    radial-gradient(
      circle,
      #ffffff 0 10%,
      #76fff7 22%,
      rgba(63, 214, 208, 0.58) 42%,
      transparent 72%
    ),
    linear-gradient(
      90deg,
      transparent 0%,
      rgba(63, 214, 208, 0.3) 12%,
      rgba(118, 255, 247, 0.66) 50%,
      rgba(63, 214, 208, 0.3) 88%,
      transparent 100%
    );
  background-repeat: no-repeat;
  background-size: 11px 11px, 100% 1px;
  background-position: -14px 50%, center;
  filter: drop-shadow(0 0 5px rgba(63, 214, 208, 0.36));
  animation: header-energy-travel 9s linear infinite;
  transition: opacity 0.3s ease;
}

.header.is-scrolled {
  border-bottom-color: rgba(63, 214, 208, 0.1);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
}

.header.is-scrolled::before {
  opacity: 0.94;
}

@keyframes header-energy-travel {
  0%,
  5% {
    background-position: -14px 50%, center;
  }

  92%,
  100% {
    background-position: calc(100% + 14px) 50%, center;
  }
}

.logo {
  flex: 0 0 auto;
}

.logo img {
  width: 160px;
}

.nav {
  display: flex;
  gap: 28px;
}

.nav a {
  color: var(--white);
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  position: relative;
  padding: 10px 0;
  transition: color 0.25s ease;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 4px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--teal), transparent);
  box-shadow: 0 0 7px rgba(63, 214, 208, 0.5);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.25s ease;
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--teal);
}

.nav a:hover::after,
.nav a:focus-visible::after {
  transform: scaleX(1);
}

.logo:focus-visible,
.nav a:focus-visible,
.header-btn:focus-visible,
.btn:focus-visible,
.contact-buttons a:focus-visible,
.footer-portal:focus-visible,
.menu-toggle:focus-visible,
.dashboard-motion-toggle:focus-visible {
  outline: 2px solid #76fff7;
  outline-offset: 4px;
}

.header-btn {
  border: 1px solid var(--teal);
  color: var(--white);
  padding: 11px 18px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 800;
  font-size: 14px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.header-btn:hover {
  transform: translateY(-2px);
  background: rgba(63, 214, 208, 0.1);
  box-shadow: 0 8px 22px rgba(63, 214, 208, 0.14);
}

/* MENU MÓVIL */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid rgba(63, 214, 208, 0.35);
  border-radius: 10px;
  cursor: pointer;
  padding: 8px;
  transition: background 0.25s ease, border-color 0.25s ease;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 3px;
  background: var(--teal);
  border-radius: 999px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

.menu-toggle[aria-expanded="true"] {
  background: rgba(63, 214, 208, 0.1);
  border-color: rgba(118, 255, 247, 0.72);
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 88vh;
  padding: 80px 7%;
  display: grid;
  grid-template-columns: 1.1fr 0.8fr;
  gap: 60px;
  align-items: center;
  background:
    linear-gradient(
      90deg,
      rgba(3, 19, 38, 0.94) 0%,
      rgba(3, 19, 38, 0.76) 30%,
      rgba(3, 19, 38, 0.46) 42%,
      rgba(3, 19, 38, 0.28) 55%,
      rgba(3, 19, 38, 0.16) 100%
    ),
    url("../img/hero-brochure-scene.webp");
  background-size: cover, cover;
  background-position: center, center right;
  background-repeat: no-repeat;
}

.hero > :not(.energy-flow) {
  position: relative;
  z-index: 2;
}

.energy-flow {
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  bottom: 8px;
  height: 190px;
  pointer-events: none;
  opacity: 0.8;
}

.energy-flow svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.energy-line {
  fill: none;
  stroke: url(#energy-line);
  stroke-width: 1.25;
  vector-effect: non-scaling-stroke;
}

.energy-line-2,
.energy-line-4 {
  opacity: 0.58;
}

.energy-line-3 {
  opacity: 0.32;
}

.energy-electron {
  fill: #76fff7;
  stroke: #ffffff;
  stroke-width: 1.5;
}

.hero-text span,
.intro span,
.section-title span,
.why span,
.contact span {
  color: var(--teal);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.hero h1 {
  font-size: clamp(42px, 5vw, 72px);
  line-height: 1.05;
  margin: 18px 0 24px;
}

.hero h1 strong {
  color: var(--teal);
}

.hero p {
  color: var(--text);
  font-size: 18px;
  line-height: 1.7;
  max-width: 620px;
}

.hero p,
.intro p,
.service-card p,
.why p {
  text-align: left;
}

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

.btn {
  padding: 15px 24px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 900;
  display: inline-block;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.2);
}

.btn-secondary:hover {
  background: rgba(63, 214, 208, 0.09);
  border-color: #76fff7;
}

.btn-primary {
  background: var(--teal);
  border: 1px solid var(--teal);
  color: var(--blue-dark);
  box-shadow: 0 10px 26px rgba(63, 214, 208, 0.18);
}

.btn-primary:hover {
  background: #76fff7;
  border-color: #76fff7;
  box-shadow: 0 13px 30px rgba(63, 214, 208, 0.26);
}

.btn-secondary {
  border: 1px solid var(--teal);
  color: var(--white);
}

.hero-card {
  width: 100%;
  max-width: 380px;
  margin-left: auto;
  background: rgba(3, 19, 38, 0.34);
  border: 1px solid rgba(63, 214, 208, 0.25);
  border-radius: 22px;
  padding: 22px;
  backdrop-filter: none;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.24);
  transform: translateX(clamp(-180px, calc(136.4px - 18vw), -40px));
}

.dashboard-heading {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;
}

.hero-card h3 {
  color: var(--teal);
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.dashboard-status {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  width: 100%;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(3, 16, 31, 0.42);
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}

.dashboard-status span {
  padding: 7px 9px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.58);
  transition: color 0.4s ease, background 0.4s ease, box-shadow 0.4s ease;
}

.dashboard-status .status-current {
  background: rgba(245, 158, 11, 0.16);
  color: var(--alert);
  box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.42);
}

.dashboard-status.is-proposed .status-current {
  background: transparent;
  color: rgba(255, 255, 255, 0.58);
  box-shadow: none;
}

.dashboard-status.is-proposed .status-proposed {
  background: rgba(34, 197, 94, 0.12);
  color: var(--positive);
  box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.5);
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.kpi {
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 13px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.045);
  transition: transform 0.35s ease, opacity 0.35s ease, border-color 0.5s ease, background 0.5s ease;
}

.kpi.is-updating {
  transform: translateY(6px);
  opacity: 0.25;
}

.kpi dt {
  display: block;
  color: #b8c9d8;
  text-transform: uppercase;
  font-size: 11px;
  margin-bottom: 8px;
}

.kpi dd {
  font-size: 20px;
  font-weight: 800;
}

.kpi-alert {
  border-color: rgba(245, 158, 11, 0.55);
  background: rgba(245, 158, 11, 0.12);
}

.kpi-alert dd {
  color: var(--alert);
}

.kpi-risk:not(.kpi-positive),
.kpi-danger:not(.kpi-positive) {
  border-color: rgba(239, 68, 68, 0.62);
  background: rgba(239, 68, 68, 0.15);
}

.kpi-risk:not(.kpi-positive) dd,
.kpi-danger:not(.kpi-positive) dd {
  color: var(--red);
}

.kpi-positive {
  border-color: rgba(34, 197, 94, 0.55);
  background: rgba(34, 197, 94, 0.12);
}

.kpi-positive dd {
  color: var(--positive);
}

.dashboard-footer {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  margin-top: 16px;
}

.dashboard-note {
  flex: 1;
  color: #9fb1c2;
  font-size: 11px !important;
  line-height: 1.45 !important;
  text-align: left !important;
}

.dashboard-motion-toggle {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid rgba(118, 255, 247, 0.34);
  border-radius: 999px;
  background: rgba(63, 214, 208, 0.06);
  color: #c8f8f5;
  font: inherit;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.25s ease, border-color 0.25s ease;
}

.dashboard-motion-toggle:hover {
  background: rgba(63, 214, 208, 0.14);
  border-color: rgba(118, 255, 247, 0.66);
}

@media (prefers-reduced-motion: reduce) {
  .kpi,
  .dashboard-status {
    transition: none;
  }

  .header {
    transition: none;
  }

  .header::before {
    animation: none;
  }

  .menu-toggle span {
    transition: none;
  }

  .energy-electron {
    display: none;
  }

  .motion-ready .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .btn,
  .header-btn,
  .service-card,
  .why-item svg,
  .contact-buttons a {
    transition: none;
  }

  .btn:hover,
  .header-btn:hover,
  .why-item:hover svg,
  .contact-buttons a:hover {
    transform: none;
  }

  .service-card:hover {
    translate: none;
  }
}

.intro {
  background: var(--white);
  color: var(--blue);
  padding: 80px 7%;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 48px;
  align-items: start;
}

.intro span,
.section-title span,
.process-heading span {
  color: var(--teal-on-light);
}

.intro h2 {
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.18;
  margin-top: 14px;
}

.intro p {
  color: #33475b;
  font-size: 17px;
  line-height: 1.8;
  margin-bottom: 16px;
}

.intro-lead {
  font-weight: 650;
}

.intro-benefits {
  display: grid;
  gap: 10px;
  margin: 20px 0;
  list-style: none;
}

.intro-benefits li {
  position: relative;
  padding: 12px 14px 12px 40px;
  border: 1px solid #dce6ec;
  border-radius: 12px;
  background: #f7fafb;
  color: #20384f;
  font-weight: 700;
  line-height: 1.4;
}

.intro-benefits li::before {
  content: "✓";
  position: absolute;
  left: 15px;
  color: var(--teal-on-light);
  font-weight: 900;
}

.intro p.intro-scope {
  margin-bottom: 0;
  color: #586b7d;
  font-size: 14px;
  line-height: 1.6;
}

.services {
  background: #eaf0f4;
  color: var(--blue);
  padding: 90px 7%;
}

.section-title {
  text-align: center;
  max-width: 850px;
  margin: 0 auto 46px;
}

.section-title h2 {
  font-size: clamp(30px, 4vw, 44px);
  margin-top: 12px;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

.service-card {
  background: var(--white);
  border-radius: 26px;
  overflow: hidden;
  box-shadow: 0 18px 45px rgba(6, 29, 58, 0.12);
  border: 1px solid #d8e3ea;
  transition: translate 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.service-card:hover {
  translate: 0 -6px;
  border-color: rgba(63, 214, 208, 0.55);
  box-shadow: 0 24px 55px rgba(6, 29, 58, 0.17);
}

.service-card::before {
  content: "";
  display: block;
  height: 190px;
  background-size: cover;
  background-position: center;
  filter: saturate(0.88) contrast(1.06);
  box-shadow: inset 0 -3px 0 rgba(63, 214, 208, 0.72);
}

.service-card.consultoria::before {
  background-image:
    linear-gradient(180deg, rgba(3, 19, 38, 0.04), rgba(3, 19, 38, 0.25)),
    url("../img/consultoria.webp");
}

.service-card.disenos::before {
  background-image:
    linear-gradient(180deg, rgba(3, 19, 38, 0.04), rgba(3, 19, 38, 0.25)),
    url("../img/disenos.webp");
}

.service-card.proyectos::before {
  background-image:
    linear-gradient(180deg, rgba(3, 19, 38, 0.04), rgba(3, 19, 38, 0.25)),
    url("../img/proyectos.webp");
}

.service-card h3,
.service-card p,
.service-card ul {
  margin-left: 26px;
  margin-right: 26px;
}

.service-card h3 {
  font-size: 26px;
  margin-top: 26px;
  margin-bottom: 14px;
}

.consultoria h3 {
  color: var(--teal-on-light);
}

.disenos h3 {
  color: #082b63;
}

.proyectos h3 {
  color: var(--green);
}

.service-card p {
  color: #394b5f;
  line-height: 1.65;
  margin-bottom: 18px;
}

.service-card ul {
  padding-left: 18px;
  padding-bottom: 30px;
}

.service-card li {
  margin-bottom: 10px;
  line-height: 1.5;
}

.service-card li::marker {
  font-size: 1.15em;
  font-weight: 900;
}

.service-card.consultoria > ul > li::marker {
  color: var(--teal-on-light);
}

.service-card.disenos > ul > li::marker {
  color: #082b63;
}

.service-card.proyectos > ul > li::marker {
  color: var(--green);
}

.process {
  margin-top: 68px;
  padding: 38px;
  border: 1px solid #d4e1e8;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 16px 42px rgba(6, 29, 58, 0.07);
}

.process-heading {
  max-width: 760px;
}

.process-heading span {
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.process-heading h2 {
  margin-top: 10px;
  font-size: clamp(28px, 3.5vw, 38px);
  line-height: 1.18;
}

.process-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 26px;
  margin-top: 34px;
  list-style: none;
}

.process-grid::before {
  content: "";
  position: absolute;
  top: 21px;
  left: 22px;
  /* Finaliza en el centro del cuarto nodo, no al final de su columna. */
  right: calc(25% - 41.5px);
  height: 1px;
  background: linear-gradient(90deg, var(--teal-on-light), rgba(11, 119, 116, 0.16));
}

.process-step {
  position: relative;
  z-index: 1;
}

.process-number {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 4px solid #f8fafb;
  border-radius: 50%;
  background: var(--blue);
  color: var(--white);
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 0 0 1px rgba(11, 119, 116, 0.3);
}

.process-step h3 {
  margin: 18px 0 8px;
  font-size: 18px;
  line-height: 1.3;
}

.process-step p {
  color: #526679;
  line-height: 1.6;
}

.services-next-step {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin-top: 34px;
  padding: 25px 28px;
  border: 1px solid rgba(63, 214, 208, 0.24);
  border-radius: 20px;
  background: var(--blue);
  color: var(--white);
  box-shadow: 0 16px 36px rgba(6, 29, 58, 0.16);
}

.services-next-step span {
  color: var(--teal);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.services-next-step p {
  max-width: 650px;
  margin-top: 6px;
  color: #d9e6f2;
  font-size: 16px;
  line-height: 1.55;
}

.services-next-step-btn {
  flex: 0 0 auto;
  background: var(--teal);
  color: var(--blue-dark);
  white-space: nowrap;
}

.services-next-step-btn:hover {
  background: #76fff7;
}

.why {
  position: relative;
  overflow: hidden;
  background: var(--blue-dark);
  padding: 170px 7% 90px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  align-items: start;
}

.why > div:first-child {
  max-width: 850px;
}

.why > :not(.energy-flow-secondary):not(.energy-flow-tertiary) {
  position: relative;
  z-index: 2;
}

.energy-flow-secondary {
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  top: 0;
  height: 145px;
  opacity: 0.8;
  pointer-events: none;
}

.energy-flow-secondary svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.energy-line-secondary {
  fill: none;
  stroke: url(#energy-line-secondary);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.energy-line-secondary-muted {
  opacity: 0.58;
}

.energy-flow-tertiary {
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  bottom: -28px;
  height: 145px;
  opacity: 0.8;
  pointer-events: none;
}

.energy-flow-tertiary svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.energy-line-tertiary {
  fill: none;
  stroke: url(#energy-line-tertiary);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.energy-line-tertiary-muted {
  opacity: 0.58;
}

.why h2 {
  font-size: clamp(30px, 4vw, 44px);
  margin: 16px 0 18px;
}

.why p {
  color: var(--text);
  font-size: 18px;
  line-height: 1.7;
}

.why-grid {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 0;
  background: rgba(255, 255, 255, 0.04);
  border-top: 1px solid rgba(63, 214, 208, 0.35);
  border-bottom: 1px solid rgba(63, 214, 208, 0.35);
  padding: 28px 0;
  list-style: none;
}

.why-item {
  flex: 1;
  text-align: center;
  padding: 0 18px;
  border-right: 1px solid rgba(255, 255, 255, 0.25);
}

.why-item:last-child {
  border-right: none;
}

.why-item span {
  display: block;
  color: var(--teal);
  font-size: 34px;
  line-height: 1;
  margin-bottom: 10px;
}

.why-item svg {
  width: 34px;
  height: 34px;
  margin-bottom: 10px;
  color: var(--teal);
  stroke-width: 1.6;
  transition: transform 0.25s ease, filter 0.25s ease;
}

.why-item:hover svg {
  transform: translateY(-3px) scale(1.06);
  filter: drop-shadow(0 0 8px rgba(63, 214, 208, 0.38));
}

.why-item p {
  color: var(--white);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
}

.contact {
  background: linear-gradient(135deg, #2fc8c2, #57e0da);
  color: var(--blue-dark);
  padding: 70px 7%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 38px;
}

.contact span {
  color: var(--blue-dark);
}

.contact h2 {
  font-size: clamp(30px, 4vw, 42px);
  margin: 12px 0;
}

.contact p {
  font-size: 17px;
}

.contact-buttons {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 300px;
}

.contact-buttons a {
  background: var(--blue-dark);
  color: var(--white);
  text-decoration: none;
  padding: 17px 22px;
  border-radius: 16px;
  font-weight: 900;
  text-align: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.contact-buttons a:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(3, 19, 38, 0.2);
}

.contact-buttons a:focus-visible {
  outline-color: var(--blue-dark);
}

/* APARICIONES SUAVES AL DESPLAZARSE */
.motion-ready .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.7s ease var(--reveal-delay, 0ms),
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1) var(--reveal-delay, 0ms);
}

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

.footer {
  background: #020d1c;
  padding: 34px 7%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

.footer img {
  width: 190px;
}

.footer-portal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid rgba(63, 214, 208, 0.24);
  border-radius: 999px;
  background: rgba(63, 214, 208, 0.035);
  color: var(--white);
  text-decoration: none;
  line-height: 1;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.footer-portal > svg:first-child {
  width: 15px;
  height: 15px;
  color: var(--teal);
  stroke-width: 1.8;
}

.footer-portal-copy {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  white-space: nowrap;
}

.footer-portal strong {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.15px;
}

.footer-portal-separator {
  color: rgba(63, 214, 208, 0.52);
}

.footer-portal-meta {
  color: #9fb0c0;
  font-size: 12px;
  font-weight: 600;
  transition: color 0.25s ease;
}

.footer-portal-external {
  width: 13px;
  height: 13px;
  color: var(--teal);
  opacity: 0.58;
  stroke-width: 1.8;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.footer-portal:hover {
  transform: translateY(-2px);
  border-color: rgba(118, 255, 247, 0.58);
  background: rgba(63, 214, 208, 0.08);
  box-shadow: 0 8px 22px rgba(63, 214, 208, 0.08);
}

.footer-portal:hover .footer-portal-meta {
  color: #c5d3df;
}

.footer-portal:hover .footer-portal-external {
  transform: translate(1px, -1px);
  opacity: 0.9;
}

.footer p {
  color: #9fb0c0;
  font-size: 14px;
}

/* TABLET Y MÓVIL */
@media (max-width: 980px) {
  .nav,
  .header-btn {
    display: none;
  }

  .menu-toggle {
    display: flex;
    margin-left: auto;
  }

  .nav.active {
    display: flex;
    position: absolute;
    top: calc(100% + 8px);
    right: 6%;
    width: 235px;
    flex-direction: column;
    gap: 14px;
    padding: 18px;
    background: var(--blue-dark);
    border: 1px solid rgba(63, 214, 208, 0.35);
    border-radius: 16px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
    z-index: 9999;
  }

  .nav.active a {
    color: var(--white);
    font-weight: 700;
    text-decoration: none;
  }

  .nav.active a:hover {
    color: var(--teal);
  }

  .logo img {
    width: 150px;
  }

  .hero {
    grid-template-columns: 1fr;
    padding: 60px 6%;
    background-position: center, 85% center;
  }

  .hero-card {
    max-width: 380px;
    margin: 0 auto;
    background: rgba(3, 19, 38, 0.32);
    backdrop-filter: none;
    transform: none;
  }

  .intro,
  .why {
    grid-template-columns: 1fr;
    padding: 64px 6%;
  }

  .why {
    padding: 145px 6% 64px;
  }

  .why-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .why-item {
    padding: 24px 12px;
  }

  .why-item:nth-child(3n) {
    border-right: none;
  }

  .why-item:nth-child(n + 4) {
    border-top: 1px solid rgba(255, 255, 255, 0.18);
  }

  .services {
    padding: 64px 6%;
  }

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

  .process {
    padding: 32px;
  }

  .process-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 34px;
  }

  .process-grid::before {
    display: none;
  }

  .services-next-step {
    flex-direction: column;
    align-items: flex-start;
  }

  .contact {
    flex-direction: column;
    align-items: flex-start;
    padding: 58px 6%;
  }

  .contact-buttons {
    width: 100%;
    min-width: auto;
  }

  .footer {
    flex-direction: column;
    text-align: center;
  }

  .footer p {
    display: block;
    width: 100%;
    color: #b8c9d8;
    font-size: 12px;
    line-height: 1.5;
  }
}

/* CELULAR */
@media (max-width: 560px) {
  html {
    scroll-padding-top: 125px;
  }

  .hero p,
  .intro p,
  .service-card p,
  .why p {
    text-align: left;
  }

  .header {
    padding: 10px 5%;
  }

  .logo img {
    width: 132px;
  }

  .hero {
    padding: 46px 5% 51px;
    min-height: auto;

    background-size: cover, 180%;
    background-position: center, 92% 72%;
  }

  .hero h1 {
    font-size: clamp(34px, 10vw, 44px);
  }

  .energy-flow {
    bottom: 110px;
    height: 130px;
  }

  .hero-card {
    width: 84%;
    max-width: 269px;
    margin-top: 152px;
    margin-left: 0;
    margin-right: auto;
    padding: 13px;
    border-radius: 19px;
    transform: none;
  }

  .dashboard-heading {
    margin-bottom: 14px;
  }

  .dashboard-status {
    font-size: 10px;
  }

  .dashboard-status span {
    padding: 6px 5px;
  }

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

  .kpi {
    padding: 8px;
    border-radius: 11px;
  }

  .kpi dd {
    font-size: 17px;
  }

  .kpi dt {
    font-size: 11px;
    margin-bottom: 6px;
  }

  .dashboard-note {
    margin-top: 0;
    font-size: 11px !important;
  }

  .dashboard-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .dashboard-motion-toggle {
    align-self: flex-end;
    padding-right: 8px;
    padding-left: 8px;
    font-size: 11px;
  }

  .btn {
    width: 100%;
    text-align: center;
  }

  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .service-card::before {
    height: 160px;
  }

  .process {
    margin-top: 48px;
    padding: 24px 20px;
  }

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

  .process-step {
    padding-left: 16px;
    border-left: 1px solid rgba(11, 119, 116, 0.24);
  }

  .services-next-step {
    padding: 22px 20px;
  }

  .services-next-step-btn {
    white-space: normal;
  }

  .why-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 0;
  }

  .why-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-align: center;
    padding: 22px 12px;
    border-top: none;
    border-right: 1px solid rgba(255, 255, 255, 0.18);
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  }

  .why-item:nth-child(3n) {
    border-right: 1px solid rgba(255, 255, 255, 0.18);
  }

  .why-item:nth-child(n + 4) {
    border-top: none;
  }

  .why-item:nth-child(2n) {
    border-right: none;
  }

  .why-item:nth-child(n + 5) {
    border-bottom: none;
  }

  .why-item p {
    text-align: center;
    margin: 0;
  }

  .nav.active {
    top: calc(100% + 8px);
    right: 5%;
  }
}

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

  .skip-link {
    transition: none;
  }

  .dashboard-motion-toggle {
    display: none;
  }

  .btn,
  .header-btn,
  .service-card,
  .why-item svg,
  .contact-buttons a {
    transition: none;
  }

  .btn:hover,
  .header-btn:hover,
  .why-item:hover svg,
  .contact-buttons a:hover {
    transform: none;
  }

  .service-card:hover {
    translate: none;
  }

  .footer-portal,
  .footer-portal-meta,
  .footer-portal-external {
    transition: none;
  }

  .footer-portal:hover,
  .footer-portal:hover .footer-portal-external {
    transform: none;
  }
}
