/* ==========================================================================
   JMB Develop — landing
   Tokens primero: cambiar color, tipografía, escala o ritmo se hace acá arriba.
   ========================================================================== */

@font-face {
  font-family: "Red Hat Display";
  src: url("../fonts/redhat-display-latin.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Red Hat Text";
  src: url("../fonts/redhat-text-latin.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Red Hat Mono";
  src: url("../fonts/redhat-mono-latin.woff2") format("woff2");
  font-weight: 400 500;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Color — navy teñido de azul, un solo acento (azul → cian del logo) */
  --bg: #070c18;
  --bg-2: #0a1222;
  --surface: #0d1628;
  --line: rgb(148 180 255 / 0.12);
  --line-strong: rgb(148 180 255 / 0.22);
  --text: #e9eef8;
  --text-muted: #9aa9c4;
  --text-faint: #7d8dab;
  --blue: #3a7bff;
  --cyan: #34d0f5;
  --brand: linear-gradient(115deg, #5b9bff 0%, #3dd6f7 100%);
  --on-brand: #04101f;

  /* Tipografía */
  --font-display: "Red Hat Display", system-ui, sans-serif;
  --font-body: "Red Hat Text", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Red Hat Mono", ui-monospace, "Cascadia Code", Consolas, monospace;
  --display-stretch: 100%;

  /* Escala tipográfica (contenida) */
  --fs-h1: clamp(2.1rem, 1.3rem + 3.4vw, 4.25rem);
  --fs-h2: clamp(1.65rem, 1.2rem + 1.5vw, 2.6rem);
  --fs-h3: 1.2rem;
  --fs-lead: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  --fs-body: 1rem;
  --fs-small: 0.875rem;
  --fs-mono: 0.75rem;

  /* Ritmo */
  --gutter: clamp(20px, 4.5vw, 72px);
  --section-y: clamp(64px, 8vw, 112px);
  --radius: 12px;

  /* Movimiento */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur: 0.7s;

  color-scheme: dark;
}

/* ---------- Base ---------- */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
  caret-color: var(--cyan);
}

::selection {
  background: rgb(52 208 245 / 0.28);
  color: #fff;
}

h1,
h2,
h3,
p,
figure,
ul,
ol {
  margin: 0;
}

ul[role="list"],
ol[role="list"] {
  list-style: none;
  padding: 0;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-stretch: var(--display-stretch);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h2 {
  font-size: var(--fs-h2);
  max-width: 26ch;
}

h3 {
  font-size: var(--fs-h3);
  letter-spacing: -0.005em;
}

p {
  text-wrap: pretty;
}

img,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.nowrap {
  white-space: nowrap;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--text);
  color: var(--bg);
  border-radius: 8px;
  font-weight: 600;
  transform: translateY(-160%);
  transition: transform 0.2s var(--ease-out);
}

.skip-link:focus-visible {
  transform: none;
}

.container {
  width: 100%;
  max-width: 1600px;
  margin-inline: auto;
  padding-inline: max(var(--gutter), env(safe-area-inset-left)) max(var(--gutter), env(safe-area-inset-right));
}

/* ---------- Piezas compartidas ---------- */

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cyan);
}

.eyebrow b {
  font-weight: 500;
  color: var(--cyan);
}

.eyebrow b::after {
  content: "";
  display: inline-block;
  width: 20px;
  height: 1px;
  margin-left: 0.6em;
  vertical-align: middle;
  background: var(--line-strong);
}

.eyebrow i {
  font-style: normal;
  color: var(--cyan);
}



.text-brand {
  background: var(--brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section {
  position: relative;
  padding-block: var(--section-y);
}

/* transición entre secciones: un filete con brillo en el centro */
.section::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line) 25%, rgb(52 208 245 / 0.25) 50%, var(--line) 75%, transparent);
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  margin-bottom: clamp(32px, 4vw, 48px);
}

.section-lead {
  max-width: 60ch;
  font-size: var(--fs-lead);
  color: var(--text-muted);
}

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

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 20px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  isolation: isolate;
  overflow: hidden;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out), border-color 0.3s var(--ease-out), background-color 0.3s var(--ease-out);
}

.btn:active {
  transform: scale(0.97);
}

.btn--primary {
  background: var(--brand);
  color: var(--on-brand);
  box-shadow: 0 8px 24px -12px rgb(58 123 255 / 0.6);
}

/* brillo que cruza el botón */
.btn--primary::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(100deg, transparent 30%, rgb(255 255 255 / 0.45) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.8s var(--ease-out);
}

.btn--primary:hover {
  box-shadow: 0 0 0 3px rgb(52 208 245 / 0.14), 0 12px 32px -14px rgb(58 123 255 / 0.8);
}

.btn--primary:hover::after {
  transform: translateX(120%);
}

.btn--ghost {
  color: var(--text);
  border: 1px solid var(--line-strong);
  background: rgb(13 22 40 / 0.5);
}

.btn--ghost:hover {
  border-color: rgb(52 208 245 / 0.55);
  background: rgb(52 208 245 / 0.06);
}

.btn--small {
  padding: 8px 16px;
  font-size: 0.875rem;
}

.btn__arrow {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.3s var(--ease-out);
}

.btn:hover .btn__arrow {
  transform: translateX(3px);
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  font-weight: 600;
  font-size: var(--fs-small);
  color: var(--cyan);
  text-decoration: none;
}

.link-arrow svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.3s var(--ease-out);
}

.link-arrow:hover {
  text-decoration: underline;
}

.link-arrow:hover svg {
  transform: translate(2px, -2px);
}

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  padding-top: env(safe-area-inset-top);
  border-bottom: 1px solid transparent;
  transition: background-color 0.4s var(--ease-out), border-color 0.4s var(--ease-out);
}

.site-header.is-scrolled {
  background: rgb(7 12 24 / 0.86);
  border-bottom-color: var(--line);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  backdrop-filter: saturate(140%) blur(10px);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  text-decoration: none;
}

.brand__mark {
  width: 28px;
  height: 28px;
  flex: none;
  transition: transform 0.6s var(--ease-out);
}

.brand:hover .brand__mark {
  transform: rotate(60deg);
}

.brand__word {
  white-space: nowrap;
  font-family: var(--font-display);
  font-stretch: 115%;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.brand__word span {
  font-weight: 400;
  font-size: 0.7em;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-left: 0.3em;
}

.site-nav {
  margin-left: auto;
}

.site-nav ul {
  display: flex;
  gap: 2px;
  list-style: none;
  padding: 0;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 12px;
  font-size: var(--fs-small);
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 999px;
  transition: color 0.3s var(--ease-out);
}

.site-nav a:hover {
  color: var(--text);
}

@media (max-width: 820px) {
  .site-nav {
    display: none;
  }

  .site-header__inner > .btn {
    margin-left: auto;
  }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding-block: calc(64px + clamp(48px, 9vw, 112px)) clamp(64px, 8vw, 104px);
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero__grid {
  position: absolute;
  inset: -80px 0 0;
  background-image:
    linear-gradient(to right, rgb(148 180 255 / 0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgb(148 180 255 / 0.06) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 68% 45%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 68% 45%, #000 20%, transparent 75%);
}

.hero__glow {
  position: absolute;
  width: min(760px, 120vw);
  aspect-ratio: 1;
  right: -18%;
  top: -30%;
  background: radial-gradient(closest-side, rgb(58 123 255 / 0.18), rgb(52 208 245 / 0.05) 55%, transparent);
  animation: drift 22s var(--ease-in-out) infinite alternate;
}

@keyframes drift {
  to {
    transform: translate3d(-12%, 14%, 0) scale(1.08);
  }
}

/* parallax sutil del grid al scrollear (sin JS, donde el navegador lo soporte) */
@supports (animation-timeline: scroll()) {
  .hero__grid {
    animation: grid-parallax linear both;
    animation-timeline: scroll(root);
    animation-range: 0 100vh;
  }

  @keyframes grid-parallax {
    to {
      transform: translate3d(0, 70px, 0);
    }
  }
}

.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(24px, 5vw, 96px);
}

.hero__copy {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
}

.hero__title {
  font-size: var(--fs-h1);
  line-height: 1.05;
  letter-spacing: -0.02em;
  max-width: 15ch;
}

.hero__lead {
  max-width: 48ch;
  font-size: var(--fs-lead);
  color: var(--text-muted);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.hero__visual {
  width: min(100%, 620px);
  justify-self: end;
}

@media (max-width: 900px) {
  .hero__inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero__visual {
    justify-self: center;
    width: min(100%, 420px);
  }
}

@media (max-width: 480px) {
  .hero__actions .btn {
    flex: 1 1 auto;
  }
}

/* ---------- Diagrama del hero ---------- */

.system {
  width: 100%;
  height: auto;
  overflow: visible;
}

.system__layer {
  transition: transform 0.9s var(--ease-out);
}

.system__layer--back {
  transform: translate3d(calc(var(--px, 0) * -6px), calc(var(--py, 0) * -6px), 0);
}

.system__layer--mid {
  transform: translate3d(calc(var(--px, 0) * 4px), calc(var(--py, 0) * 4px), 0);
}

.system__layer--front {
  transform: translate3d(calc(var(--px, 0) * 12px), calc(var(--py, 0) * 12px), 0);
}

.orbit {
  fill: none;
  stroke: rgb(148 180 255 / 0.18);
  stroke-dasharray: 2 7;
}

.orbit-dot {
  fill: var(--cyan);
  transform-origin: 320px 280px;
  animation: spin 14s linear infinite;
}

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

.trace {
  fill: none;
  stroke: rgb(148 180 255 / 0.22);
  stroke-width: 1.5;
}

.pulse {
  fill: none;
  stroke: url(#g-brand);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 14 86;
  stroke-dashoffset: 100;
  opacity: 0;
  animation: pulse 3.2s linear var(--delay, 0s) infinite;
}

@keyframes pulse {
  0% {
    stroke-dashoffset: 100;
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  85% {
    opacity: 1;
  }
  100% {
    stroke-dashoffset: 14;
    opacity: 0;
  }
}

.hex {
  fill: none;
  stroke-linejoin: round;
}

.hex--outer {
  stroke: url(#g-brand);
  stroke-width: 3;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}

.js .hex--outer {
  animation: draw 1.8s var(--ease-in-out) 0.25s both;
}

@keyframes draw {
  from {
    stroke-dashoffset: 1;
  }
  to {
    stroke-dashoffset: 0;
  }
}

.hex--inner {
  stroke: rgb(52 208 245 / 0.35);
  stroke-width: 1.2;
  stroke-dasharray: 46 14;
}

.vertices circle {
  fill: var(--bg);
  stroke: var(--cyan);
  stroke-width: 2;
}

.core-word {
  font-family: var(--font-display);
  font-stretch: 112%;
  font-weight: 600;
  font-size: 62px;
  letter-spacing: -0.02em;
  fill: var(--text);
}

.core-sub {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.55em;
  fill: var(--cyan);
}

.node {
  transform-box: fill-box;
  animation: float 6s var(--ease-in-out) var(--f, 0s) infinite alternate;
}

.node rect {
  fill: var(--surface);
  stroke: var(--line-strong);
}

.node text {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-anchor: middle;
  fill: var(--text);
}

@keyframes float {
  to {
    transform: translate3d(0, -7px, 0);
  }
}

/* en móvil el diagrama se ve chico: etiquetas más grandes para que sigan legibles */
@media (max-width: 480px) {
  .node text {
    font-size: 20px;
    letter-spacing: 0.06em;
  }
}

/* ---------- Servicios ---------- */

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

.service {
  --x: 50%;
  --y: 50%;
  position: relative;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: start;
  gap: 16px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg-2) 100%);
  overflow: hidden;
  transition: border-color 0.4s var(--ease-out);
}

/* luz que sigue al puntero */
.service::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(320px circle at var(--x) var(--y), rgb(52 208 245 / 0.1), transparent 45%);
  opacity: 0;
  transition: opacity 0.4s var(--ease-out);
  pointer-events: none;
}

.service:hover {
  border-color: rgb(52 208 245 / 0.32);
}

.service:hover::before {
  opacity: 1;
}

.service__icon {
  width: 40px;
  height: 40px;
  padding: 9px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: rgb(58 123 255 / 0.08);
  fill: none;
  stroke: var(--cyan);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.5s var(--ease-out), background-color 0.4s var(--ease-out);
}

.service:hover .service__icon {
  transform: rotate(-6deg);
  background: rgb(58 123 255 / 0.16);
}

.service h3 {
  margin-bottom: 6px;
}

.service p {
  max-width: 44ch;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

@media (min-width: 1180px) {
  .services {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
  }

  .service {
    grid-template-columns: 1fr;
    align-content: start;
    gap: 20px;
    padding: 28px;
    min-height: 240px;
  }

  .service__icon {
    width: 44px;
    height: 44px;
    padding: 10px;
  }
}

@media (max-width: 720px) {
  .services {
    grid-template-columns: 1fr;
  }

  .service {
    padding: 18px;
  }
}

/* ---------- Cómo trabajamos ---------- */

.method {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}

.method__aside {
  position: sticky;
  top: 104px;
  display: grid;
  gap: 16px;
}

.loop {
  width: min(100%, 260px);
  margin-top: 12px;
}

.loop__track {
  fill: none;
  stroke: var(--line-strong);
  stroke-width: 1.5;
}

.loop__pulse {
  fill: none;
  stroke: var(--cyan);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 10 90;
  animation: loop 5s linear infinite;
}

@keyframes loop {
  from {
    stroke-dashoffset: 100;
  }
  to {
    stroke-dashoffset: 0;
  }
}

.loop__node circle {
  fill: var(--surface);
  stroke: var(--line-strong);
}

.loop__node--human circle {
  stroke: var(--cyan);
}

.loop__node text {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  text-anchor: middle;
  fill: var(--text);
}

.loop__caption {
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.steps {
  position: relative;
  padding-left: 32px;
}

.steps__rail {
  position: absolute;
  left: 5px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: var(--line-strong);
}

.steps__fill {
  position: absolute;
  inset: 0;
  background: linear-gradient(var(--blue), var(--cyan));
  transform-origin: top;
  transform: scaleY(var(--progress, 1));
}

.steps__list {
  display: grid;
}

.step {
  position: relative;
  display: grid;
  gap: 6px;
  padding-block: 4px clamp(28px, 4vw, 40px);
}

.step:last-child {
  padding-bottom: 4px;
}

/* punto sobre el riel */
.step::before {
  content: "";
  position: absolute;
  left: -32px;
  top: 8px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--line-strong);
  transition: border-color 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out);
}

.step.is-active::before,
html:not(.js) .step::before {
  border-color: var(--cyan);
  box-shadow: 0 0 0 4px rgb(52 208 245 / 0.12);
}

.step__tag {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cyan);
}

.step p {
  max-width: 60ch;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

@media (max-width: 860px) {
  .method {
    grid-template-columns: 1fr;
  }

  .method__aside {
    position: static;
  }

  .loop {
    width: 220px;
  }
}

/* ---------- Proyectos ---------- */

.projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 16px;
}

.project {
  display: grid;
  grid-template-rows: auto 1fr;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  transition: border-color 0.4s var(--ease-out);
}

.project:hover {
  border-color: rgb(52 208 245 / 0.32);
}

.project__media {
  position: relative;
  overflow: hidden;
  background: var(--bg-2);
  border-bottom: 1px solid var(--line);
  aspect-ratio: 16 / 10;
}

/* carrusel de imágenes: scroll-snap (se desliza con el dedo) + puntos */
.carousel__track {
  display: flex;
  height: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.carousel__track::-webkit-scrollbar {
  display: none;
}

.carousel__track img {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  scroll-snap-align: start;
  outline: 1px solid rgb(255 255 255 / 0.06);
  outline-offset: -1px;
}

.carousel__dots {
  position: absolute;
  left: 50%;
  bottom: 10px;
  display: flex;
  padding: 0 6px;
  border-radius: 999px;
  background: rgb(7 12 24 / 0.65);
  transform: translateX(-50%);
}

.carousel__dots button {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.carousel__dots button::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgb(233 238 248 / 0.5);
  transition: width 0.3s var(--ease-out), background-color 0.3s var(--ease-out);
}

.carousel__dots button:hover::before {
  background: var(--text);
}

.carousel__dots button[aria-current="true"]::before {
  width: 20px;
  background: var(--cyan);
}

.project__body {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 20px 22px 14px;
}

.project__cat {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cyan);
}

.project h3 {
  font-size: 1.4rem;
}

.project__body > p:not([class]) {
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.project .link-arrow {
  justify-self: start;
}

/* ---------- Tecnología (capas) ---------- */

.stack {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(24px, 6vw, 96px);
  align-items: start;
}

.stack__head {
  margin-bottom: 0;
}

.layers {
  border-top: 1px solid var(--line);
}

.layer {
  position: relative;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 12px;
  padding-block: 14px;
  border-bottom: 1px solid var(--line);
  isolation: isolate;
}

.layer::before {
  content: "";
  position: absolute;
  inset: 0 -12px;
  z-index: -1;
  border-radius: 8px;
  background: linear-gradient(90deg, rgb(58 123 255 / 0.1), transparent 80%);
  opacity: 0;
  transition: opacity 0.4s var(--ease-out);
}

.layer:hover::before {
  opacity: 1;
}

.layer__idx {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  color: var(--text-faint);
}

.layer__name {
  font-family: var(--font-display);
  font-stretch: var(--display-stretch);
  font-weight: 700;
  font-size: clamp(1.25rem, 1.1rem + 0.5vw, 1.6rem);
  line-height: 1.2;
  transition: transform 0.5s var(--ease-out), color 0.4s var(--ease-out);
}

.layer:hover .layer__name {
  transform: translateX(6px);
  color: var(--cyan);
}

.layer__role {
  font-size: 0.875rem;
  color: var(--text-muted);
  text-align: right;
}

@media (max-width: 860px) {
  .stack {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .layer {
    grid-template-columns: 28px minmax(0, 1fr);
    row-gap: 2px;
  }

  .layer__role {
    grid-column: 2;
    text-align: left;
  }
}

/* ---------- Frase central ---------- */

.statement {
  position: relative;
  padding-block: clamp(72px, 10vw, 128px);
  background:
    radial-gradient(ellipse 60% 50% at 50% 50%, rgb(58 123 255 / 0.07), transparent 70%),
    var(--bg);
}

.statement__text {
  max-width: 56ch;
  font-family: var(--font-display);
  font-stretch: var(--display-stretch);
  font-weight: 600;
  font-size: clamp(1.35rem, 1rem + 1.3vw, 2.25rem);
  line-height: 1.22;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.statement__text .word {
  opacity: 0.18;
  transition: opacity 0.35s var(--ease-out), color 0.35s var(--ease-out);
}

.statement__text .word.is-lit {
  opacity: 1;
}

.statement__text .word.is-accent.is-lit {
  color: var(--cyan);
}

/* ---------- Contacto ---------- */

.cta {
  position: relative;
  padding-block: var(--section-y);
  overflow: hidden;
  border-top: 1px solid var(--line);
}

.cta__bg {
  position: absolute;
  right: -8%;
  top: 50%;
  width: min(520px, 90vw);
  transform: translateY(-50%);
  opacity: 0.05;
  pointer-events: none;
}

.cta__bg svg {
  animation: spin 120s linear infinite;
}

.cta__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
}

.cta__main {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

@media (min-width: 960px) {
  .cta__inner {
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 0.5fr);
    align-items: end;
    gap: clamp(32px, 6vw, 96px);
  }

  .cta .channels {
    flex-direction: column;
    gap: 0;
    margin-top: 0;
    padding-top: 0;
    padding-left: 32px;
    border-top: 0;
    border-left: 1px solid var(--line);
  }

  .cta .channels a {
    flex-direction: column;
    gap: 2px;
  }
}

.cta__question {
  max-width: 36ch;
  font-size: clamp(1.2rem, 1rem + 0.8vw, 1.75rem);
  font-weight: 500;
  color: var(--text-muted);
}

.cta__big {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.75rem, 1.5rem + 4.6vw, 5.75rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

.cta__actions {
  margin-top: 8px;
}

.channels {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 28px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.channels a {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  min-height: 44px;
  padding-block: 10px;
  font-size: 0.9375rem;
  text-decoration: none;
  color: var(--text);
  transition: color 0.3s var(--ease-out);
}

.channels a:hover {
  color: var(--cyan);
  text-decoration: underline;
}

.channels__k {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}

@media (max-width: 480px) {
  .channels {
    flex-direction: column;
    gap: 0;
  }
}

/* ---------- Footer ---------- */

.site-footer {
  padding-block: 40px max(32px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: var(--bg-2);
}

.site-footer__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px 40px;
}

.site-footer__brand {
  display: grid;
  gap: 6px;
}

.site-footer__brand p {
  font-size: var(--fs-small);
  color: var(--text-muted);
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 4px;
  list-style: none;
  padding: 0;
}

.site-footer__links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 10px;
  font-size: var(--fs-small);
  color: var(--text-muted);
  text-decoration: none;
}

.site-footer__links a:hover {
  color: var(--text);
  text-decoration: underline;
}

.site-footer__copy {
  grid-column: 1 / -1;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 0.8125rem;
  color: var(--text-faint);
}

@media (max-width: 720px) {
  .site-footer__inner {
    grid-template-columns: 1fr;
  }

  .site-footer__links {
    margin-inline: -10px;
  }
}

/* ---------- Aparición progresiva (sólo con JS) ---------- */

.js [data-reveal] {
  opacity: 0;
  transform: translate3d(0, 20px, 0);
  transition:
    opacity var(--dur) var(--ease-out) var(--d, 0ms),
    transform var(--dur) var(--ease-out) var(--d, 0ms);
}

.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- Movimiento reducido: menos, no cero ----------
   Se quita desplazamiento, parallax y loops; se conservan los fundidos
   y el feedback de color de hover/foco. */

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

  .js [data-reveal] {
    transform: none;
    transition: opacity 0.4s linear;
  }

  .hero__glow,
  .hero__grid,
  .node,
  .orbit-dot,
  .cta__bg svg,
  .js .hex--outer {
    animation: none;
  }

  .pulse,
  .loop__pulse {
    display: none;
  }

  .carousel__track {
    scroll-behavior: auto;
  }

  .system__layer,
  .service__icon,
  .layer__name,
  .brand__mark,
  .btn__arrow,
  .link-arrow svg {
    transform: none !important;
  }

  .btn--primary::after {
    display: none;
  }

  .btn:active {
    transform: none;
  }
}
