/* ProgramerZ · landing
   Paleta y tipografía tomadas de /brand (Exo 2, degradado violeta → magenta → rojo, inclinación 14°).
   Lo memorable es la terminal del hero; el resto de la página se mantiene sobrio a propósito. */

/* Exo 2 (OFL) auto-alojada y recortada a latín: sin terceros, sin bloqueos de render externos. */
@font-face { font-family: "Exo 2"; src: url("assets/fonts/exo2-regular.woff2") format("woff2"), url("assets/fonts/exo2-regular.woff") format("woff"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Exo 2"; src: url("assets/fonts/exo2-semibold.woff2") format("woff2"), url("assets/fonts/exo2-semibold.woff") format("woff"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Exo 2"; src: url("assets/fonts/exo2-bold.woff2") format("woff2"), url("assets/fonts/exo2-bold.woff") format("woff"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Exo 2"; src: url("assets/fonts/exo2-extrabolditalic.woff2") format("woff2"), url("assets/fonts/exo2-extrabolditalic.woff") format("woff"); font-weight: 800; font-style: italic; font-display: swap; }

:root {
  --ink: #0E0C18;
  --ink-2: #12101C;
  --surface: #17142A;
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .14);
  --text: #F4F2FA;
  --muted: #C9C5D8;
  --dim: #9C97B4;
  --violet: #6D28FF;
  --magenta: #E21BC8;
  --red: #FF2A4D;
  --error: #FF6B81;
  --grad: linear-gradient(100deg, var(--violet) 0%, var(--magenta) 50%, var(--red) 100%);
  --skew: -14deg;
  --radius: 14px;
  --wrap: 1180px;
  --nav-h: 76px;
  --font: "Exo 2", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html {
  color-scheme: dark;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 12px);
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: rgba(226, 27, 200, .25);
}
body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  touch-action: manipulation;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.08; letter-spacing: -.015em; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; overflow-wrap: break-word; }
::selection { background: var(--magenta); color: #fff; }
:focus-visible { outline: 2px solid #fff; outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(100% - 48px, var(--wrap)); margin-inline: auto; }
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip {
  position: absolute;
  left: 8px; top: -60px;
  z-index: 100;
  background: #fff;
  color: var(--ink);
  font-weight: 600;
  padding: 10px 16px;
  border-radius: 8px;
  transition: top .2s ease;
}
.skip:focus { top: 8px; }

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-style: italic;
  font-weight: 800;
  padding-right: .08em; /* evita que la cursiva se corte */
}
@media (forced-colors: active) {
  .grad-text { color: CanvasText; background: none; }
}

/* ---------- Botones: paralelogramo a 14°, como la Z del logo ---------- */
.btn {
  --h: 52px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--h);
  padding: 0 30px;
  font: 600 16px/1 var(--font);
  letter-spacing: .01em;
  text-decoration: none;
  color: #fff;
  background: none;
  border: 0;
  cursor: pointer;
  isolation: isolate;
  transition: transform .2s ease;
}
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  transform: skewX(var(--skew));
  border-radius: 6px;
  transition: filter .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.btn--grad::before { background: var(--grad); box-shadow: 0 10px 30px -10px rgba(226, 27, 200, .6); }
.btn--grad:hover::before { filter: brightness(1.12) saturate(1.1); box-shadow: 0 14px 40px -10px rgba(226, 27, 200, .85); }
.btn--ghost::before { background-color: rgba(255, 255, 255, .04); box-shadow: inset 0 0 0 1px var(--line-2); }
.btn--ghost:hover::before { background-color: rgba(255, 255, 255, .1); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .3); }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--sm { --h: 44px; padding: 0 20px; font-size: 15px; }
.btn--block { width: 100%; }
@media (forced-colors: active) {
  .btn::before { border: 1px solid ButtonText; }
}

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  padding-top: env(safe-area-inset-top);
  border-bottom: 1px solid transparent;
  transition: background-color .3s ease, border-color .3s ease;
}
.nav.is-scrolled, .nav.menu-open {
  background-color: rgba(14, 12, 24, .9);
  border-bottom-color: var(--line);
}
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .nav.is-scrolled { background-color: rgba(14, 12, 24, .75); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4); }
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: var(--nav-h); }
.nav__brand { display: block; padding: 6px 0; }
.nav__brand img { height: 32px; width: auto; }
.nav__links { display: flex; align-items: center; gap: 30px; }
.nav__links a:not(.btn) {
  font-size: 15px;
  color: var(--muted);
  text-decoration: none;
  padding: 10px 0;
  transition: color .2s ease;
}
.nav__links a:not(.btn):hover { color: #fff; }
.nav__links .btn { margin-left: 8px; }
.nav__toggle { display: none; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 168px 0 128px; overflow: hidden; }
.hero__bg {
  position: absolute; inset: 0; z-index: -1; overflow: hidden;
  mask-image: linear-gradient(#000 65%, transparent);
  -webkit-mask-image: linear-gradient(#000 65%, transparent);
}
.hero__blob {
  position: absolute;
  border-radius: 50%;
  will-change: transform;
}
.hero__blob--1 { width: 70vw; height: 70vw; left: -24vw; top: -20vw; background: radial-gradient(closest-side, rgba(109, 40, 255, .55), rgba(109, 40, 255, 0)); }
.hero__blob--2 { width: 60vw; height: 60vw; right: -20vw; bottom: -24vw; background: radial-gradient(closest-side, rgba(255, 42, 77, .38), rgba(255, 42, 77, 0)); }
.hero__blob--3 { width: 46vw; height: 46vw; left: 44%; top: -16vw; background: radial-gradient(closest-side, rgba(226, 27, 200, .22), rgba(226, 27, 200, 0)); }
.hero__grid-lines {
  position: absolute;
  inset: -56px 0 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  transform: skewX(var(--skew));
  transform-origin: bottom;
  mask-image: radial-gradient(70% 70% at 50% 45%, #000 20%, transparent 80%);
  -webkit-mask-image: radial-gradient(70% 70% at 50% 45%, #000 20%, transparent 80%);
  opacity: .6;
}
.hero__spot { position: absolute; inset: 0; opacity: 0; transition: opacity .4s ease; }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: 64px; align-items: center; }

.eyebrow {
  margin: 0;
  line-height: 1.3;
  letter-spacing: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 16px;
  font-weight: 600;
  color: var(--muted);
}
.eyebrow::before {
  content: "";
  width: 22px; height: 12px;
  background: var(--grad);
  transform: skewX(var(--skew));
  border-radius: 2px;
}

.hero__title {
  line-height: 1.08;
  text-wrap: balance;
  margin-top: 22px;
  font-size: clamp(44px, 5.6vw, 80px);
  font-weight: 700;
  letter-spacing: -.025em;
}
.lead { margin-top: 24px; max-width: 34em; font-size: clamp(17px, 1.5vw, 20px); color: var(--muted); }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 38px; padding-left: 8px; }

/* Terminal */
.term {
  position: relative;
  margin: 0;
  min-width: 0;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(30, 26, 52, .92), rgba(18, 16, 28, .96));
  box-shadow: 0 0 0 1px var(--line-2), 0 40px 80px -30px rgba(0, 0, 0, .8), 0 0 120px -40px rgba(226, 27, 200, .45);
  overflow: hidden;
}
.term::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: var(--grad);
}
.term__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 8px 8px 18px;
  min-height: 46px;
  border-bottom: 1px solid var(--line);
}
.term__bar i { width: 11px; height: 11px; border-radius: 50%; background: #2E2947; }
.term__bar > span { margin-left: 10px; font: 12px/1 var(--mono); color: var(--dim); }
.term__pause {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding: 0 10px;
  font: 13px/1 var(--font);
  color: var(--dim);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: color .2s ease, border-color .2s ease;
}
.term__pause:hover { color: #fff; border-color: var(--line-2); }
.term__pause svg { width: 14px; height: 14px; fill: currentColor; }
.term__pause .i-play { display: none; }
.term__pause[aria-pressed="true"] .i-play { display: inline; }
.term__pause[aria-pressed="true"] .i-pause { display: none; }
.term__body {
  margin: 0;
  padding: 24px 24px 28px;
  min-height: 300px;
  font: 14px/1.85 var(--mono);
  color: var(--text);
  white-space: pre-wrap;
  overflow: hidden;
}
.t-prompt { color: var(--magenta); }
.t-str { color: #FFB86B; }
.t-ok { color: #43E3A1; }
.t-go { color: var(--red); }
.t-dim { color: var(--dim); }
.t-done { font-family: var(--font); font-size: 18px; }
.caret {
  display: inline-block;
  width: .55em;
  height: 1.1em;
  margin-left: 2px;
  vertical-align: -.2em;
  background: var(--magenta);
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ---------- Secciones ---------- */
.section { padding: 120px 0; position: relative; }
.section--alt { background: var(--ink-2); border-block: 1px solid var(--line); }
.section__head { max-width: 820px; margin-bottom: 64px; }
.section h2, .cta h2 { font-size: clamp(34px, 4.4vw, 56px); font-weight: 700; }
.section__lead { margin-top: 20px; font-size: 18px; color: var(--muted); max-width: 40em; }

/* Servicios: lista en rejilla con divisiones finas, sin tarjetas */
.services {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line-2);
}
.service {
  padding: 36px 36px 40px 0;
  border-bottom: 1px solid var(--line);
}
.service:not(:nth-child(3n + 1)) { padding-left: 36px; border-left: 1px solid var(--line); }
.service__icon {
  width: 28px; height: 28px;
  margin-bottom: 22px;
  fill: none;
  stroke: var(--magenta);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.service h3 { font-size: 21px; font-weight: 600; }
.service p { margin-top: 10px; color: var(--muted); font-size: 16px; max-width: 32em; }

/* Proceso */
.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.step { position: relative; padding-top: 28px; border-top: 1px solid var(--line-2); }
.step::before {
  content: "";
  position: absolute;
  top: -1px; left: 0;
  width: 56px; height: 3px;
  background: var(--grad);
}
.step__n {
  display: block;
  font: italic 800 64px/1 var(--font);
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-right: .1em;
  margin-bottom: 18px;
  font-variant-numeric: tabular-nums;
}
.step h3 { font-size: 21px; font-weight: 600; }
.step p { margin-top: 10px; color: var(--muted); font-size: 16px; }

/* Stack */
.stack { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.stack .section__head { margin-bottom: 0; }
.stack h2 { font-size: clamp(32px, 3.6vw, 48px); }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.chips li {
  font: 14px/1 var(--mono);
  color: var(--muted);
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
}

/* Por qué */
.why {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.why__item { padding: 40px 40px 44px; background: var(--ink-2); }
.why__item h3 { font-size: 23px; font-weight: 600; display: flex; align-items: center; gap: 14px; }
.why__item h3::before {
  content: "";
  flex: none;
  width: 14px; height: 22px;
  background: var(--grad);
  transform: skewX(var(--skew));
  border-radius: 2px;
}
.why__item p { margin-top: 12px; color: var(--muted); max-width: 30em; }

/* CTA / contacto */
.cta { position: relative; padding: 140px 0; overflow: hidden; }
.cta__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(45% 70% at 0% 100%, rgba(109, 40, 255, .32), transparent 70%),
    radial-gradient(40% 60% at 100% 0%, rgba(255, 42, 77, .22), transparent 70%);
}
.cta__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 72px; align-items: center; }
.cta__mark { width: 80px; height: auto; margin-bottom: 30px; }
.cta h2 { font-size: clamp(38px, 5vw, 64px); }
.cta h2 .grad-text { display: inline-block; }
.cta__mail { margin-top: 28px; color: var(--dim); }
.cta__mail a { color: #fff; text-decoration-color: var(--magenta); text-underline-offset: 4px; overflow-wrap: anywhere; }
.cta__mail a:hover { text-decoration-thickness: 2px; }

.form {
  padding: 36px;
  border-radius: 18px;
  background: rgba(23, 20, 42, .9);
  border: 1px solid var(--line-2);
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .8);
  display: grid;
  gap: 18px;
}
.form__help { font-size: 14px; color: var(--dim); }
.field { display: grid; gap: 8px; }
.field label { font-size: 15px; font-weight: 600; color: var(--muted); cursor: pointer; }
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 48px;
  font: 16px/1.4 var(--font);
  color: var(--text);
  background-color: var(--ink);
  border: 1px solid var(--line-2);
  border-radius: 10px;
  padding: 12px 14px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field textarea { resize: vertical; min-height: 120px; }
.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23C9C5D8' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;
  padding-right: 40px;
  cursor: pointer;
}
.field option { background-color: var(--ink); color: var(--text); }
.field ::placeholder { color: #7A7592; opacity: 1; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: rgba(255, 255, 255, .26); }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible {
  outline: 2px solid var(--magenta);
  outline-offset: 1px;
  border-color: var(--magenta);
}
.field [aria-invalid="true"] { border-color: var(--error); }
.field__error {
  display: flex;
  gap: 8px;
  align-items: baseline;
  font-size: 14px;
  color: var(--error);
}
.field__error::before { content: "!"; flex: none; display: grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: var(--error); color: var(--ink); font-weight: 700; font-size: 11px; line-height: 1; transform: translateY(2px); }
.field__error[hidden] { display: none; }
.form .btn { margin-top: 6px; }
.form__note { min-height: 1.4em; font-size: 14px; color: var(--muted); text-align: center; }

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .hero__grid, .cta__grid, .stack { grid-template-columns: minmax(0, 1fr); }
  .hero__grid { gap: 56px; }
  .services { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .service:not(:nth-child(3n + 1)) { padding-left: 0; border-left: 0; }
  .service:nth-child(2n) { padding-left: 36px; border-left: 1px solid var(--line); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 48px; }
  .stack { gap: 40px; }
}

@media (max-width: 820px) {
  .nav__toggle {
    display: grid;
    gap: 6px;
    place-content: center;
    width: 44px; height: 44px;
    background: transparent;
    border: 1px solid var(--line-2);
    border-radius: 10px;
    cursor: pointer;
  }
  .nav__toggle span { display: block; width: 18px; height: 2px; background: #fff; border-radius: 2px; transition: transform .25s ease; }
  .nav__toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
  .nav__toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }
  .nav__links {
    position: fixed;
    top: calc(var(--nav-h) + env(safe-area-inset-top));
    left: 0; right: 0;
    max-height: calc(100dvh - var(--nav-h));
    overflow-y: auto;
    overscroll-behavior: contain;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px 24px 28px;
    background: rgba(14, 12, 24, .98);
    border-bottom: 1px solid var(--line);
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease, transform .25s ease, visibility .25s;
  }
  .nav__links.is-open { opacity: 1; transform: none; visibility: visible; }
  .nav__links a:not(.btn) { padding: 16px 0; font-size: 18px; border-bottom: 1px solid var(--line); }
  .nav__links .btn { margin: 22px 8px 0; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { width: min(100% - 40px, var(--wrap)); }
  .hero { padding: 132px 0 88px; }
  .section { padding: 88px 0; }
  .section__head { margin-bottom: 44px; }
  .services, .steps, .why { grid-template-columns: minmax(0, 1fr); }
  .service, .service:nth-child(2n) { padding: 28px 0 30px; border-left: 0; }
  .why__item { padding: 30px 26px 32px; }
  .term__body { font-size: 12.5px; padding: 20px 18px 22px; min-height: 270px; }
  .term__pause-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
  .term__pause { min-width: 32px; justify-content: center; }
  .cta { padding: 96px 0; }
  .form { padding: 26px 22px; }
}

@media (pointer: fine) {
  html { overscroll-behavior-y: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* =====================================================================
   MOVIMIENTO
   Todo lo de abajo solo se activa con html.motion, que main.js pone cuando el
   usuario NO pidió "reducir movimiento". Sin JS o con movimiento reducido,
   la página se ve completa y estática.
   Solo se animan transform y opacity (compositor).
   ===================================================================== */
:root {
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --ease-spring: cubic-bezier(.34, 1.4, .64, 1);
}

/* Barra de progreso de lectura en el nav */
.nav__progress {
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: var(--grad);
  transform-origin: left;
  transform: scaleX(var(--p, 0));
  opacity: 0;
  transition: opacity .3s ease;
}
.nav.is-scrolled .nav__progress { opacity: 1; }

/* ---- Fondo del hero: manchas que respiran, rejilla que avanza, foco que sigue al cursor ---- */
.motion .hero__blob--1 { animation: drift1 18s ease-in-out infinite alternate; }
.motion .hero__blob--2 { animation: drift2 22s ease-in-out infinite alternate; }
.motion .hero__blob--3 { animation: drift3 15s ease-in-out infinite alternate; }
@keyframes drift1 { to { transform: translate3d(14vw, 10vh, 0) scale(1.15); } }
@keyframes drift2 { to { transform: translate3d(-16vw, -12vh, 0) scale(1.2); } }
@keyframes drift3 { to { transform: translate3d(-10vw, 18vh, 0) scale(.85); } }
.motion .hero__grid-lines { animation: grid-flow 7s linear infinite; }
@keyframes grid-flow { to { transform: skewX(var(--skew)) translate3d(0, 56px, 0); } }

.motion .hero__spot {
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 40%), rgba(226, 27, 200, .16), transparent 70%);
}
.motion .hero.is-pointer .hero__spot { opacity: 1; }

/* Pausa global (WCAG 2.2.2) */
.motion-paused .hero__blob,
.motion-paused .hero__grid-lines,
.motion-paused .caret { animation-play-state: paused !important; }

/* ---- Entrada del hero (al cargar) ---- */
.motion [data-enter] {
  opacity: 0;
  transform: translate3d(0, 24px, 0);
  transition: opacity .6s var(--ease-out), transform .7s var(--ease-out);
  transition-delay: calc(var(--d, 0) * 45ms + 40ms);
}
.motion .term[data-enter] { transform: translate3d(60px, 0, 0) skewX(var(--skew)); }
.motion .is-loaded [data-enter] { opacity: 1; transform: none; }

/* Terminal con inclinación 3D siguiendo el cursor */
.hero__grid { perspective: 1200px; }
.motion .is-loaded .term[data-enter] {
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: opacity .8s var(--ease-out), transform .9s var(--ease-out);
}
.motion .is-loaded .term.is-tilting { transition: opacity .8s var(--ease-out), transform .15s linear; }

/* ---- Titulares palabra por palabra, con la inclinación de la Z ---- */
.w {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  /* Holgura para tildes, descendentes (g, p) y la cursiva; el margen negativo la compensa */
  padding: .18em .16em .32em .04em;
  margin: -.18em -.16em -.32em -.04em;
}
.w__i { display: inline-block; }
.motion [data-split] .w__i {
  transform: translate3d(0, 150%, 0) skewX(var(--skew));
  transition: transform 1s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 55ms);
}
.motion [data-split].is-in .w__i { transform: none; }
.motion .hero__title .w__i { transition-delay: calc(var(--i, 0) * 45ms + 80ms); }
/* El degradado se reparte entre las palabras para que se lea continuo */
.w__i.grad-text { background-size: calc(var(--n, 1) * 100%) 100%; background-position: var(--gp, 0%) 0; }

/* ---- Aparición de bloques al hacer scroll ---- */
.motion [data-reveal] {
  opacity: 0;
  transform: translate3d(0, 28px, 0);
  transition: opacity .7s var(--ease-out), transform .8s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 90ms);
}
.motion [data-reveal].is-in { opacity: 1; transform: none; }

/* ---- Servicios: foco de luz que sigue al cursor + icono que se inclina ---- */
.service { position: relative; }
.service::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(260px circle at var(--x, 50%) var(--y, 50%), rgba(226, 27, 200, .13), transparent 70%);
  opacity: 0;
  transition: opacity .35s ease;
}
.services { isolation: isolate; }
.service__icon { transition: transform .45s var(--ease-spring); }
@media (hover: hover) and (pointer: fine) {
  .service:hover::before { opacity: 1; }
  .service:hover .service__icon { transform: translate3d(0, -4px, 0) scale(1.1); }
}

/* ---- Proceso: la barra de cada paso se llena al hacer scroll ---- */
.step::before { width: 100%; transform-origin: left; transform: scaleX(var(--fill, 1)); }
.motion .step::before { transform: scaleX(var(--fill, 0)); }
.motion .step__n {
  opacity: .22;
  transform: translate3d(-10px, 0, 0) skewX(var(--skew));
  transition: opacity .5s ease, transform .6s var(--ease-spring);
}
.motion .step.is-active .step__n { opacity: 1; transform: none; }

/* ---- Tecnología: cinta continua (se acelera con el scroll) ---- */
.marquee {
  display: grid;
  gap: 14px;
  margin-top: 56px;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee[hidden] { display: none; }
.marquee__row { display: flex; gap: 12px; width: max-content; will-change: transform; }
.marquee__row span {
  font: 15px/1 var(--mono);
  color: var(--muted);
  padding: 16px 22px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  white-space: nowrap;
  transition: color .2s ease, border-color .2s ease;
}
.marquee__row span:nth-child(3n + 1) { color: #fff; border-color: rgba(226, 27, 200, .35); }
.motion .stack { grid-template-columns: minmax(0, 1fr); }
.motion .stack .section__head { max-width: 820px; }

/* ---- CTA: el isotipo se arma (la idea P recibe a la solución Z) ---- */
.cta__mark { display: block; width: 88px; height: 88px; margin-bottom: 30px; overflow: visible; }
.motion .cta__mark .mark__p {
  opacity: 0;
  transform: translate3d(-30px, 0, 0);
  transition: opacity .6s ease, transform .8s var(--ease-out);
}
.motion .cta__mark .mark__z {
  opacity: 0;
  transform: translate3d(70px, 0, 0) skewX(-20deg);
  transition: opacity .5s ease .35s, transform 1s var(--ease-spring) .35s;
}
.motion .cta__mark.is-in .mark__p,
.motion .cta__mark.is-in .mark__z { opacity: 1; transform: none; }
.motion .cta__mark.is-in { animation: mark-glow 1.2s ease 1.1s both; }
@keyframes mark-glow {
  0% { filter: drop-shadow(0 0 0 rgba(226, 27, 200, 0)); }
  40% { filter: drop-shadow(0 0 22px rgba(226, 27, 200, .7)); }
  100% { filter: drop-shadow(0 0 0 rgba(226, 27, 200, 0)); }
}

/* ---- Botones: destello que cruza al pasar el cursor ---- */
.btn--grad { overflow: visible; }
.btn--grad::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  transform: skewX(var(--skew));
  border-radius: 6px;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .45) 50%, transparent 70%) no-repeat;
  background-size: 250% 100%;
  background-position: 120% 0;
  opacity: 0;
  transition: background-position 0s, opacity .2s;
}
@media (hover: hover) {
  .motion .btn--grad:hover::after { opacity: 1; background-position: -120% 0; transition: background-position .8s var(--ease-out), opacity .2s; }
}

@media (max-width: 640px) {
  .marquee { margin-top: 40px; }
  .marquee__row span { font-size: 14px; padding: 13px 18px; }
}
.marquee__ctrl { display: flex; justify-content: flex-end; margin-top: 14px; }

/* El párrafo principal es el LCP: se desliza pero se pinta desde el primer cuadro (sin opacidad 0). */


/* Servicio destacado a todo el ancho (7º ítem: producción audiovisual) */
.service--wide {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  grid-template-areas: "icon text" "title text";
  column-gap: 48px;
  align-items: start;
}
.service--wide .service__icon { grid-area: icon; }
.service--wide h3 { grid-area: title; display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.service--wide p { grid-area: text; margin-top: 0; align-self: center; max-width: 44em; font-size: 17px; }
.service.service--wide { padding-left: 0; border-left: 0; }
.badge {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: .02em;
  color: #fff;
  padding: 6px 10px 6px 12px;
  position: relative;
  isolation: isolate;
}
.badge::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--grad);
  transform: skewX(var(--skew));
  border-radius: 4px;
}
@media (max-width: 640px) {
  .service--wide { display: block; }
  .service--wide p { margin-top: 10px; font-size: 16px; }
}
/* En escritorio, el texto del servicio ancho se alinea con la segunda columna de la rejilla */
@media (min-width: 1021px) {
  @supports (grid-template-columns: subgrid) {
    .service--wide {
      grid-template-columns: subgrid;
      grid-template-areas: "icon text text" "title text text";
      column-gap: 0;
    }
    .service--wide p { padding-left: 36px; }
  }
}

/* ---------- Ajustes responsive finos ---------- */
/* Tablet y móvil: el hero pasa a una columna y el titular escala con el ancho */
@media (max-width: 1020px) {
  .hero__title { font-size: clamp(32px, 10.5vw, 72px); }
  .term { max-width: 640px; }
}
/* Pantallas muy angostas (320–380 px) */
@media (max-width: 380px) {
  .wrap { width: min(100% - 32px, var(--wrap)); }
  .section h2, .cta h2 { font-size: clamp(28px, 9vw, 34px); }
  .btn { padding: 0 22px; }
  .hero__ctas { gap: 14px; }
  .term__body { font-size: 11.5px; padding: 18px 14px 20px; }
  .term__bar > span { display: none; }
  .step__n { font-size: 52px; }
}
/* Enlaces de texto con área táctil cómoda */
.cta__mail a { display: inline-block; padding: 8px 0; }
/* Pantallas grandes: más aire sin estirar las líneas de texto */
@media (min-width: 1600px) {
  :root { --wrap: 1320px; }
  body { font-size: 18px; }
}

/* Terminal en pantallas angostas: solo pasos y estado, sin la columna de detalle (evita saltos de línea) */
@media (max-width: 420px) {
  .term__body .t-desc { display: none; }
  .term__body { min-height: 230px; }
}
/* Tablet (2 columnas): el texto del servicio ancho se alinea con la segunda columna */
@media (min-width: 641px) and (max-width: 1020px) {
  .service--wide { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  @supports (grid-template-columns: subgrid) {
    .service--wide { grid-template-columns: subgrid; column-gap: 0; }
    .service--wide p { padding-left: 36px; }
  }
}

/* =====================================================================
   MEJORAS: hero a pantalla completa, servicios cotizables, FAQ, footer
   ===================================================================== */

/* Menú móvil con el teléfono en horizontal: más compacto para que quepa */
@media (max-width: 820px) and (max-height: 500px) {
  .nav__links a:not(.btn) { padding: 10px 0; font-size: 16px; }
  .nav__links .btn { margin-top: 14px; }
}

/* Hero a pantalla completa en escritorio */
/* Escritorio: todo el hero cabe en la primera pantalla. El titular y los espacios
   se ajustan también a la ALTURA de la ventana (svh), no solo al ancho. */
@media (min-width: 1021px) {
  .hero {
    min-height: 100svh;
    display: flex;
    align-items: center;
    padding: calc(var(--nav-h) + clamp(10px, 2svh, 28px)) 0 clamp(64px, 15svh, 160px);
  }
  .hero > .wrap { width: min(100% - 48px, var(--wrap)); }
  .hero__title { margin-top: clamp(12px, 2.2svh, 22px); font-size: clamp(40px, min(5.8vw, 9.4svh), 88px); }
  .hero .lead { margin-top: clamp(12px, 2.4svh, 24px); font-size: clamp(16px, min(1.4vw, 2.3svh), 20px); }
  .hero__ctas { margin-top: clamp(18px, 3.6svh, 38px); }
  .term__body { min-height: clamp(220px, 34svh, 300px); padding-block: clamp(16px, 2.6svh, 24px) clamp(18px, 3svh, 28px); }
}
.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 28px;
  width: 44px;
  height: 56px;
  margin-left: -22px;
  display: none;
  place-items: center;
  border-radius: 22px;
}
.scroll-cue span {
  position: relative;
  width: 2px;
  height: 40px;
  overflow: hidden;
  background: var(--line-2);
  transform: skewX(var(--skew));
}
.scroll-cue span::after {
  content: "";
  position: absolute;
  left: 0; top: 0;
  width: 100%;
  height: 40%;
  background: var(--grad);
}
.motion .scroll-cue span::after { animation: cue 1.8s var(--ease-out) infinite; }
.motion-paused .scroll-cue span::after { animation-play-state: paused; }
@keyframes cue { from { transform: translateY(-100%); } to { transform: translateY(250%); } }
.scroll-cue:hover span { background: rgba(255, 255, 255, .3); }
@media (min-width: 1021px) and (min-height: 640px) { .scroll-cue { display: grid; bottom: clamp(10px, 2svh, 28px); } }

/* Servicios: enlace para cotizar (preselecciona el tipo en el formulario) */
.service__cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  min-height: 32px;
  font-weight: 600;
  font-size: 15px;
  color: #fff;
  text-decoration: none;
}
.service__cta::before {
  content: "";
  flex: none;
  width: 18px;
  height: 2px;
  background: var(--grad);
  transition: width .3s var(--ease-out);
}
.service__cta::after { content: ""; position: absolute; inset: 0; } /* toda la celda es clicable */
.service__cta:hover::before, .service:hover .service__cta::before { width: 32px; }
.service:has(.service__cta) { cursor: pointer; }
.service__cta:focus-visible { outline: none; }
.service:has(.service__cta:focus-visible) { outline: 2px solid #fff; outline-offset: -2px; border-radius: 6px; }
.service--wide { grid-template-areas: "icon text" "title text" "cta text"; }
.service--wide .service__cta { grid-area: cta; justify-self: start; }
@media (min-width: 1021px) {
  @supports (grid-template-columns: subgrid) {
    .service--wide { grid-template-areas: "icon text text" "title text text" "cta text text"; }
  }
}
/* Resalta el selector cuando llega preseleccionado */
@keyframes flash { 0%, 100% { box-shadow: 0 0 0 0 rgba(226, 27, 200, 0); } 30% { box-shadow: 0 0 0 4px rgba(226, 27, 200, .45); } }
.field select.is-flash { animation: flash 1.4s ease 2; border-color: var(--magenta); }

/* Preguntas frecuentes */
.faq { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; align-items: start; }
.faq .section__head { margin-bottom: 0; position: sticky; top: calc(var(--nav-h) + 32px); }
.faq__list { border-top: 1px solid var(--line-2); }
.faq__item { border-bottom: 1px solid var(--line-2); }
.faq__item summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 0;
  min-height: 48px;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
  cursor: pointer;
  transition: color .2s ease;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: "";
  flex: none;
  width: 14px; height: 14px;
  background:
    linear-gradient(currentColor, currentColor) center / 100% 2px no-repeat,
    linear-gradient(currentColor, currentColor) center / 2px 100% no-repeat;
  color: var(--magenta);
  transition: transform .35s var(--ease-out);
}
.faq__item[open] summary::after { transform: rotate(135deg); }
.faq__item summary:hover { color: #fff; }
.faq__item summary:focus-visible { outline-offset: 4px; }
.faq__body { padding: 0 40px 26px 0; color: var(--muted); }
.motion .faq__item[open] .faq__body { animation: faq-open .45s var(--ease-out); }
@keyframes faq-open { from { opacity: 0; transform: translate3d(0, -8px, 0); } to { opacity: 1; transform: none; } }

/* Footer */
.foot { border-top: 1px solid var(--line); padding: 72px 0 calc(28px + env(safe-area-inset-bottom)); background: var(--ink); }
.foot__grid { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); gap: 48px; }
.foot__brand img { height: 30px; width: auto; }
.foot__tag { margin: 18px 0 24px; color: var(--dim); font-size: 15px; max-width: 26em; }
.foot__brand .btn { margin-left: 6px; }
.foot__title { font-size: 14px; font-weight: 600; letter-spacing: .02em; color: var(--muted); margin-bottom: 14px; }
.foot__col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.foot__col a { display: inline-block; padding: 7px 0; color: var(--dim); text-decoration: none; font-size: 15px; transition: color .2s ease; }
.foot__col a:hover { color: #fff; }
.foot__mail { overflow-wrap: anywhere; }
.foot__bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 56px; padding-top: 22px; border-top: 1px solid var(--line); }
.foot__copy { color: var(--dim); font-size: 14px; }
.foot__top { display: inline-block; padding: 10px 0; font-size: 14px; color: var(--muted); text-decoration: none; }
.foot__top:hover { color: #fff; }

@media (max-width: 1020px) {
  .faq { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .faq .section__head { position: static; }
  .foot__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .foot__brand { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .faq__item summary { font-size: 18px; padding: 20px 0; }
  .faq__body { padding-right: 0; }
  .foot { padding-top: 56px; }
  .foot__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 24px; }
  .foot__grid > .foot__col:last-child { grid-column: 1 / -1; }
  .service--wide .service__cta { margin-top: 18px; }
}
/* La luz bajo el cursor se queda dentro de su celda. En los bordes abiertos de la grilla
   (izquierda de la primera columna, derecha de la última) se desvanece en vez de cortarse. */
@media (min-width: 1021px) {
  .service:nth-child(3n + 1)::before { -webkit-mask-image: linear-gradient(90deg, transparent, #000 90px); mask-image: linear-gradient(90deg, transparent, #000 90px); }
  .service:nth-child(3n)::before { -webkit-mask-image: linear-gradient(270deg, transparent, #000 90px); mask-image: linear-gradient(270deg, transparent, #000 90px); }
}
@media (min-width: 641px) and (max-width: 1020px) {
  .service:nth-child(2n + 1)::before { -webkit-mask-image: linear-gradient(90deg, transparent, #000 90px); mask-image: linear-gradient(90deg, transparent, #000 90px); }
  .service:nth-child(2n)::before { -webkit-mask-image: linear-gradient(270deg, transparent, #000 90px); mask-image: linear-gradient(270deg, transparent, #000 90px); }
}
@media (min-width: 641px) {
  .service.service--wide::before { -webkit-mask-image: linear-gradient(90deg, transparent, #000 90px, #000 calc(100% - 90px), transparent); mask-image: linear-gradient(90deg, transparent, #000 90px, #000 calc(100% - 90px), transparent); }
}

/* Insignia "Pronto": contorno en vez de relleno, para leerse como aviso y no como novedad */
.service--wide:not(:has(.service__cta)) .badge { color: var(--muted); }
.service--wide:not(:has(.service__cta)) .badge::before { background: transparent; box-shadow: inset 0 0 0 1px rgba(226, 27, 200, .6); }

/* =====================================================================
   PÁGINAS DE SERVICIO (/desarrollo-web/, /software-a-medida/, /ecommerce/)
   ===================================================================== */
.page-hero { position: relative; padding: calc(var(--nav-h) + 72px) 0 96px; overflow: hidden; }
.page-hero h1 {
  margin-top: 22px;
  font-size: clamp(38px, 6vw, 76px);
  font-weight: 700;
  letter-spacing: -.025em;
  max-width: 14em;
}
.page-hero .lead { max-width: 38em; }
.motion .page-hero h1 .w__i { transition-delay: calc(var(--i, 0) * 45ms + 80ms); }

.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px 10px; margin: 0; padding: 0; list-style: none; font-size: 14px; color: var(--dim); }
.crumbs li { display: flex; align-items: center; gap: 10px; }
.crumbs li + li::before { content: ""; width: 7px; height: 12px; background: var(--grad); transform: skewX(var(--skew)); border-radius: 1px; opacity: .8; }
.crumbs a { color: var(--muted); text-decoration: none; padding: 6px 0; }
.crumbs a:hover { color: #fff; text-decoration: underline; text-underline-offset: 4px; }
.crumbs [aria-current] { color: var(--text); }

.features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line-2);
}
.feature { padding: 32px 32px 36px 0; border-bottom: 1px solid var(--line); }
.feature:not(:nth-child(3n + 1)) { padding-left: 32px; border-left: 1px solid var(--line); }
.feature h3, .kind h3 { font-size: 20px; font-weight: 600; display: flex; align-items: center; gap: 12px; }
.feature h3::before {
  content: "";
  flex: none;
  width: 12px; height: 18px;
  background: var(--grad);
  transform: skewX(var(--skew));
  border-radius: 2px;
}
.feature p, .kind p { margin-top: 10px; color: var(--muted); font-size: 16px; }

.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; align-items: start; }
.split .section__head { margin-bottom: 0; }
.kinds { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.kind { padding: 26px 26px 28px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.prose { display: grid; gap: 18px; font-size: 18px; color: var(--muted); max-width: 40em; }

.cta--band { padding: 120px 0; }
.cta-band { text-align: left; }
.cta-band h2 { font-size: clamp(34px, 4.6vw, 60px); font-weight: 700; }
.cta-band .hero__ctas { margin-top: 32px; }

@media (max-width: 1020px) {
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature:not(:nth-child(3n + 1)) { padding-left: 0; border-left: 0; }
  .feature:nth-child(2n) { padding-left: 32px; border-left: 1px solid var(--line); }
  .split { grid-template-columns: minmax(0, 1fr); gap: 36px; }
}
@media (max-width: 640px) {
  .page-hero { padding: calc(var(--nav-h) + 40px) 0 72px; }
  .features, .kinds { grid-template-columns: minmax(0, 1fr); }
  .feature, .feature:nth-child(2n) { padding: 26px 0 28px; border-left: 0; }
  .cta--band { padding: 88px 0; }
}

/* Celulares: menos trabajo de dibujo por cuadro */
@media (max-width: 820px) {
  .motion .hero__grid-lines { animation: none; }
  .nav.is-scrolled { background-color: rgba(14, 12, 24, .95); -webkit-backdrop-filter: none; backdrop-filter: none; }
}

/* =====================================================================
   WHATSAPP: botón en contacto y botón flotante
   ===================================================================== */
.btn--wa { color: #0E0C18; }
.btn--wa::before { background: #25D366; box-shadow: 0 10px 30px -12px rgba(37, 211, 102, .55); }
.btn--wa:hover::before { filter: brightness(1.08); box-shadow: 0 14px 36px -12px rgba(37, 211, 102, .75); }
.btn--wa span { display: inline-flex; align-items: center; gap: 10px; }
.btn--wa svg { width: 20px; height: 20px; fill: currentColor; flex: none; }
.cta__direct { margin-top: 28px; display: grid; gap: 16px; justify-items: start; padding-left: 8px; }
.cta__direct .cta__mail { margin-top: 0; margin-left: -8px; }

.wa-float {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 45;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25D366;
  color: #0E0C18;
  box-shadow: 0 12px 30px -8px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .1) inset;
  opacity: 0;
  visibility: hidden;
  transform: translate3d(0, 16px, 0) scale(.9);
  transition: opacity .3s ease, transform .35s var(--ease-out, ease), visibility .3s;
}
.wa-float svg { width: 28px; height: 28px; fill: currentColor; }
.wa-float.is-visible { opacity: 1; visibility: visible; transform: none; }
.wa-float:hover { transform: translate3d(0, -2px, 0) scale(1.05); }
.wa-float:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
/* Sin JavaScript se muestra siempre */
html:not(.motion) .wa-float { opacity: 1; visibility: visible; transform: none; }
@media print { .wa-float { display: none; } }

/* =====================================================================
   PROYECTOS
   Grilla tipo bento: capturas reales dentro de marcos de navegador o
   teléfono, sobre un fondo teñido con el color de cada marca.
   ===================================================================== */
.works {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.work {
  --a: var(--violet);
  --b: var(--magenta);
  grid-column: span 4;
  display: flex;
  flex-direction: column;
  background: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.work--wide { grid-column: span 8; }
.work--half { grid-column: span 6; }
.work--coase { --a: #1d5aa6; --b: #f5b400; }
.work--pelotapp { --a: #a3e635; --b: #15803d; }
.work--patin { --a: #22d3ee; --b: #2563eb; }
.work--nk { --a: #c9a27a; --b: #9f1239; }
.work--nexoid { --a: #3b82f6; --b: #8b5cf6; }
.work--sv { --a: #c026d3; --b: #f472b6; }

.work__visual {
  position: relative;
  height: 360px;
  overflow: hidden;
  isolation: isolate;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(110% 90% at 88% 0%, color-mix(in srgb, var(--a) 50%, transparent), transparent 62%),
    radial-gradient(90% 80% at 0% 100%, color-mix(in srgb, var(--b) 34%, transparent), transparent 66%),
    var(--surface);
}
/* Líneas finas con la inclinación de la Z */
.work__visual::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: repeating-linear-gradient(76deg, rgba(255, 255, 255, .04) 0 1px, transparent 1px 56px);
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent 85%);
  mask-image: linear-gradient(to bottom, #000, transparent 85%);
}

/* Marco de navegador: sangra por el borde inferior */
.browser {
  position: absolute;
  top: 44px;
  bottom: -24px;
  left: 50%;
  width: min(88%, 720px);
  margin: 0;
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  overflow: hidden;
  background: #0b0a14;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .12), 0 30px 60px -18px rgba(0, 0, 0, .75);
  transform: translateX(-50%);
  transition: transform .6s var(--ease-out, ease);
}
.browser__bar {
  flex: none;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  background: #1c1930;
  border-bottom: 1px solid var(--line);
}
.browser__bar i { width: 9px; height: 9px; border-radius: 50%; background: #3a3456; }
.browser__url {
  flex: 1;
  max-width: 240px;
  height: 18px;
  margin-left: 10px;
  padding: 0 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, .06);
  font: 11px/18px var(--mono);
  color: var(--dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.browser > img {
  flex: 1;
  min-height: 0;
  width: 100%;
  object-fit: cover;
  object-position: top center;
}
.works__note { margin-top: 20px; font-size: 14px; color: var(--dim); }

/* Marco de teléfono: también sangra por abajo */
.phone {
  position: absolute;
  top: 40px;
  left: 50%;
  width: 232px;
  margin: 0;
  padding: 9px 9px 0;
  border-radius: 42px 42px 0 0;
  background: #07060d;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .16), inset 0 0 0 1px rgba(255, 255, 255, .05), 0 30px 60px -18px rgba(0, 0, 0, .8);
  transform: translateX(-50%);
  transition: transform .6s var(--ease-out, ease);
}
.phone__screen {
  position: relative;
  border-radius: 33px 33px 0 0;
  overflow: hidden;
  background: var(--screen, #000);
}
.phone__screen::before {
  content: "";
  position: absolute;
  top: 9px;
  left: 50%;
  width: 70px;
  height: 20px;
  margin-left: -35px;
  border-radius: 20px;
  background: #000;
}
.phone img { width: 100%; height: auto; }
.work--pelotapp { --screen: #060d09; }
.work--patin { --screen: #0a1120; }

@media (hover: hover) and (pointer: fine) and (min-width: 641px) {
  .work:hover { border-color: var(--line-2); }
  .work:hover .browser,
  .work:hover .phone { transform: translateX(-50%) translateY(-8px); }
}

.work__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 26px 28px 28px;
}
.work__kind {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--dim);
}
.work h3 { margin-top: 10px; font-size: 22px; font-weight: 600; }
.work__body > p:not(.work__kind) { margin-top: 10px; font-size: 16px; color: var(--muted); max-width: 36em; }
.work__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: auto 0 0;
  padding: 20px 0 0;
  list-style: none;
}
.work__tags li {
  padding: 8px 11px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  font: 12.5px/1 var(--mono);
  color: var(--muted);
}

.works__cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 18px 28px;
  margin-top: 56px;
  text-align: center;
}
.works__cta p { font-size: 20px; font-weight: 600; }

@media (max-width: 1020px) {
  .work, .work--half { grid-column: span 6; }
  .work--wide { grid-column: span 12; }
}

@media (max-width: 640px) {
  .works { gap: 18px; }
  .work, .work--wide, .work--half { grid-column: span 12; }
  .work__visual { height: 300px; }
  .phone { top: 30px; width: 210px; }
  /* En móvil la captura de escritorio se muestra completa, sin recortes */
  .work--wide .work__visual,
  .work--half .work__visual { height: auto; padding-top: 28px; }
  .browser { position: relative; top: auto; bottom: auto; left: auto; width: 90%; margin: 0 auto -1px; border-radius: 10px 10px 0 0; transform: none; }
  .browser > img { flex: none; height: auto; }
  .work__body { padding: 22px 22px 24px; }
  .works__cta { margin-top: 40px; }
}

@media (forced-colors: active) {
  .work__visual { background: Canvas; }
}

/* Nav con 5 enlaces: en pantallas medianas se aprieta y, si no cabe, "Por qué nosotros" queda solo en el footer */
@media (min-width: 821px) and (max-width: 1080px) {
  .nav__links { gap: 18px; }
  .nav__links a { white-space: nowrap; }
}
@media (min-width: 821px) and (max-width: 960px) {
  .nav__links a[href="#por-que"] { display: none; }
}
