@font-face {
  font-family: "HK Grotesk";
  src: url("../fonts/hkgrotesk-light-webfont.woff2") format("woff2"),
    url("../fonts/hkgrotesk-light-webfont.woff") format("woff");
  font-weight: 300;
  font-display: swap;
}
@font-face {
  font-family: "HK Grotesk";
  src: url("../fonts/hkgrotesk-regular-webfont.woff2") format("woff2"),
    url("../fonts/hkgrotesk-regular-webfont.woff") format("woff");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "HK Grotesk";
  src: url("../fonts/hkgrotesk-medium-webfont.woff2") format("woff2"),
    url("../fonts/hkgrotesk-medium-webfont.woff") format("woff");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "HK Grotesk";
  src: url("../fonts/hkgrotesk-bold-webfont.woff2") format("woff2"),
    url("../fonts/hkgrotesk-bold-webfont.woff") format("woff");
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Space Grotesk";
  src: url("../fonts/spacegrotesk-light.woff") format("woff");
  font-weight: 300;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("../fonts/spacegrotesk-regular.woff") format("woff");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("../fonts/spacegrotesk-medium.woff") format("woff");
  font-weight: 500;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --bg: #000;
  --surface: #0b0c0f;
  --surface-2: #121419;
  --surface-3: #1a1c21;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --text: #fff;
  --muted: #979797;
  --dim: #5c6066;
  --accent: #468eff;
  --accent-soft: rgba(70, 142, 255, 0.14);
  --font: "HK Grotesk", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --display: "Space Grotesk", var(--font);
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --pad: clamp(16px, 4vw, 48px);
  --max: 1280px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  /* Canvas de Figma: rejilla de puntos */
  background-image: radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 24px 24px;
}
img {
  display: block;
  max-width: 100%;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  font: inherit;
  color: inherit;
}
h1,
h2,
h3,
p {
  margin: 0;
}
::selection {
  background: var(--accent);
  color: #fff;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

main,
.nav {
  position: relative;
  z-index: 2;
}
main {
  overflow: clip; /* las auras se salen de main (lados y final): clip no crea scroll ni rompe los pins */
}
.container {
  width: 100%;
  max-width: calc(var(--max) + var(--pad) * 2);
  margin: 0 auto;
  padding: 0 var(--pad);
}
section {
  position: relative;
}

/* ---------- Tipografia ---------- */
h1,
h2,
h3,
.h2,
.statement-text,
.atomic-steps strong,
.step-num,
.tk-type b,
.next-title,
.contact-mail {
  font-family: var(--display);
}
.h2 {
  font-size: clamp(34px, 5vw, 64px);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.04em;
  text-wrap: balance;
}
.lead {
  color: var(--muted);
  font-size: clamp(17px, 1.5vw, 20px);
  max-width: 52ch;
}
.kicker,
.frame-label {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--muted);
}
.frame-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}
.frame-label::before {
  content: "#";
  color: var(--dim);
}
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  border: 1px solid transparent;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.btn-primary {
  background: var(--accent);
}
.btn-primary:hover {
  background: #5d9cff;
}
.btn-ghost {
  border-color: var(--line-2);
}
.btn-ghost:hover {
  border-color: var(--text);
}

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px var(--pad);
}
.nav-logo img {
  width: 36px;
  height: auto;
}
.nav-pill {
  display: flex;
  gap: 4px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(11, 12, 15, 0.7);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.nav-pill a {
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 14px;
  color: var(--muted);
  transition: color 0.25s, background 0.25s;
}
.nav-pill a:hover,
.nav-pill a.is-active {
  color: var(--text);
  background: var(--surface-3);
}
.nav-cta {
  height: 40px;
  padding: 0 18px;
  font-size: 14px;
}

/* ---------- Cursor Figma ---------- */
.cursor,
.ai-cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  pointer-events: none;
  display: none;
}
.cursor svg path,
.ai-cursor svg path {
  fill: var(--accent);
  stroke: #fff;
  stroke-width: 1.4;
  stroke-linejoin: round;
}
.cursor-chip,
.ai-chip {
  position: absolute;
  left: 16px;
  top: 18px;
  padding: 3px 9px;
  border-radius: 4px 12px 12px 12px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.2s;
}
.cursor.is-hover .cursor-chip {
  background: #fff;
  color: #000;
}
.cursor.is-down svg {
  transform: scale(0.88);
}
html.has-cursor .cursor {
  display: block;
}
html.has-cursor,
html.has-cursor * {
  cursor: none !important;
}
.ai-cursor {
  position: absolute;
  z-index: 5;
  display: block;
  opacity: 0;
}
.ai-cursor svg path {
  fill: #fff;
  stroke: #000;
}
.ai-chip {
  background: #fff;
  color: #000;
}
button.ai-cursor {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  pointer-events: auto;
  cursor: pointer;
}
.ai-cursor:hover .ai-chip,
.ai-cursor[aria-expanded="true"] .ai-chip {
  background: var(--accent);
  color: #fff;
}
.ai-cursor svg {
  display: block;
  transition: transform 0.15s;
  transform-origin: 3px 2px;
}
.ai-cursor.is-down svg {
  transform: scale(0.82);
}

/* ---------- Copiloto IA: capa de acciones ---------- */
.hero-inner {
  position: relative;
}
.ai-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}
.ai-sel,
.ai-frame {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  visibility: hidden;
  letter-spacing: normal;
}
.ai-sel {
  border: 1px solid #fff;
}
.ai-sel i {
  position: absolute;
  width: 7px;
  height: 7px;
  background: #000;
  border: 1px solid #fff;
}
.ai-sel i:nth-child(1) { top: -4px; left: -4px; }
.ai-sel i:nth-child(2) { top: -4px; right: -4px; }
.ai-sel i:nth-child(3) { bottom: -4px; left: -4px; }
.ai-sel i:nth-child(4) { bottom: -4px; right: -4px; }
.ai-sel-label,
.ai-sel-size,
.ai-frame-label,
.ai-frame-size {
  position: absolute;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  line-height: 1;
  white-space: nowrap;
}
.ai-sel-label,
.ai-frame-label {
  left: -1px;
  bottom: calc(100% + 6px);
  color: #fff;
}
.ai-sel-size,
.ai-frame-size {
  left: 50%;
  top: calc(100% + 8px);
  transform: translateX(-50%);
  padding: 4px 6px;
  border-radius: 3px;
  background: #fff;
  color: #000;
}
.ai-frame {
  border-radius: 12px;
  transform-origin: center;
}
.ai-frame.is-drawing {
  border: 1px dashed rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.03);
}
.ai-frame.is-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background: linear-gradient(100deg, transparent 30%, rgba(70, 142, 255, 0.22) 50%, transparent 70%);
  background-size: 250% 100%;
  animation: shimmer 1.1s linear infinite;
}
.ai-frame.is-built {
  border: 1px solid var(--line-2);
  background: var(--surface);
  box-shadow: 0 30px 80px -30px rgba(70, 142, 255, 0.35);
}
.ai-frame-inner {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 14px;
  padding: 14px;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.5s var(--ease);
}
.ai-frame.is-built .ai-frame-inner {
  opacity: 1;
}
.af-img {
  border-radius: 8px;
  background: linear-gradient(135deg, #1b2a52, #2b1d5c 60%, var(--accent));
}
.af-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 10px;
}
.af-tag {
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: #9cc2ff;
  font-size: 11px;
}
.af-line {
  width: 100%;
  height: 9px;
  border-radius: 4px;
  background: #fff;
}
.af-line--short {
  width: 60%;
  height: 7px;
  background: var(--dim);
}
.af-btn {
  margin-top: 4px;
  padding: 6px 12px;
  border-radius: 7px;
  background: var(--accent);
  font-size: 12px;
  font-weight: 500;
}
.ai-mark {
  border-radius: 3px;
  background-color: rgba(70, 142, 255, 0.35);
  box-shadow: 0 0 0 3px rgba(70, 142, 255, 0.35);
}
.hero-sub strong {
  transition: background-color 0.4s, box-shadow 0.4s;
}
/* Acciones rapidas del copiloto */
.ai-menu {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 6;
  width: min(300px, calc(100vw - 32px));
  pointer-events: auto;
}
.ai-menu-box {
  padding: 6px;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: #1c1d22;
  box-shadow: 0 24px 60px -12px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transform: translateY(6px) scale(0.97);
  transform-origin: top left;
  transition: opacity 0.2s var(--ease), transform 0.25s var(--ease);
}
.ai-menu.is-above .ai-menu-box {
  transform-origin: bottom left;
}
.ai-menu.is-open .ai-menu-box {
  opacity: 1;
  transform: none;
}
.ai-menu-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px 10px;
  border-bottom: 1px solid var(--line);
}
.ai-menu-input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: none;
  color: var(--text);
  font: inherit;
  font-size: 14px;
}
.ai-menu-input::placeholder {
  color: var(--dim);
}
.ai-menu kbd {
  padding: 2px 6px;
  border: 1px solid var(--line-2);
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
}
.ai-menu-group {
  padding: 10px 10px 6px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--dim);
}
.ai-menu-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.ai-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 7px 10px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--text);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}
.ai-menu-item i {
  display: grid;
  place-items: center;
  width: 18px;
  font-style: normal;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}
.ai-menu-item:hover,
.ai-menu-item:focus-visible {
  outline: 0;
  background: var(--accent);
}
.ai-menu-item:hover i,
.ai-menu-item:focus-visible i {
  color: #fff;
}
.ai-menu-empty {
  padding: 10px;
  font-size: 13px;
  color: var(--dim);
}
.btn-primary.is-ai-hover {
  background: #5d9cff;
  transform: translateY(-2px);
  box-shadow: 0 12px 30px -10px rgba(70, 142, 255, 0.7);
}

/* ---------- Seleccion Figma (hover) ---------- */
.sel {
  position: relative;
}
.sel-ui {
  position: absolute;
  inset: -10px;
  border: 1px solid var(--accent);
  pointer-events: none;
  opacity: 0;
  transform: scale(0.985);
  transition: opacity 0.25s var(--ease), transform 0.35s var(--ease);
  z-index: 3;
  letter-spacing: normal;
  line-height: 1;
}
.sel-ui i {
  position: absolute;
  width: 8px;
  height: 8px;
  background: #fff;
  border: 1px solid var(--accent);
}
.sel-ui i:nth-child(1) { top: -4px; left: -4px; }
.sel-ui i:nth-child(2) { top: -4px; right: -4px; }
.sel-ui i:nth-child(3) { bottom: -4px; left: -4px; }
.sel-ui i:nth-child(4) { bottom: -4px; right: -4px; }
.sel-label,
.sel-size {
  position: absolute;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  line-height: 1;
  white-space: nowrap;
}
.sel-label {
  left: -1px;
  bottom: calc(100% + 6px);
  color: var(--accent);
}
.sel-size {
  left: 50%;
  top: calc(100% + 8px);
  transform: translateX(-50%);
  padding: 4px 6px;
  border-radius: 3px;
  background: var(--accent);
  color: #fff;
}
.sel:hover > .sel-ui,
.sel.is-selected > .sel-ui {
  opacity: 1;
  transform: none;
}

/* ---------- Trazo vectorial ---------- */
.pen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1;
  pointer-events: none;
}
.pen-svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.pen-track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.06);
  stroke-width: 1;
  stroke-dasharray: 3 6;
}
.pen-line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.5;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}
.pen-anchors rect {
  fill: #000;
  stroke: var(--accent);
  stroke-width: 1.2;
  opacity: 0.25;
  transition: opacity 0.3s, fill 0.3s;
}
.pen-anchors rect.on {
  opacity: 1;
  fill: #fff;
}
.pen-handles g,
.ai-pen-handles g {
  opacity: 0;
  transition: opacity 0.4s;
}
.pen-handles g.on,
.ai-pen-handles g.on {
  opacity: 1;
}
.pen-handles line,
.ai-pen-handles line {
  stroke: var(--accent);
  stroke-width: 1;
  opacity: 0.6;
}
.pen-handles circle,
.ai-pen-handles circle {
  fill: #000;
  stroke: var(--accent);
  stroke-width: 1;
}
.pen-head {
  fill: var(--accent);
  filter: drop-shadow(0 0 6px var(--accent));
}

/* ---------- HUD ---------- */
.hud {
  position: fixed;
  left: var(--pad);
  bottom: 20px;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(11, 12, 15, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}
.hud-icon {
  color: var(--accent);
}
.hud-frame {
  color: var(--text);
}
.hud-sep {
  width: 1px;
  height: 12px;
  background: var(--line-2);
}

/* ---------- Hero ---------- */
.hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 140px 0 100px;
}

/* Aura: luz ambiental azul y violeta que deriva despacio. Detras del contenido (z-index -1) y sin recorte,
   asi pasa de un modulo a otro sin corte. Solo anima transform (barato) */
.aura {
  position: absolute;
  z-index: -1;
  width: min(1100px, 95vw);
  aspect-ratio: 1;
  pointer-events: none;
  background: radial-gradient(closest-side, rgba(70, 142, 255, var(--aura, 0.2)), rgba(70, 142, 255, calc(var(--aura, 0.2) * 0.3)) 55%, transparent);
  animation: aura-drift 14s ease-in-out infinite alternate;
  will-change: transform;
}
.aura::after {
  content: "";
  position: absolute;
  inset: 20% -25% -15% 30%;
  background: radial-gradient(closest-side, rgba(98, 60, 255, calc(var(--aura, 0.2) * 0.5)), transparent);
  animation: aura-drift-2 9s ease-in-out infinite alternate;
}
.aura--hero {
  --aura: 0.3;
  right: -18%;
  bottom: -55%;
}
.aura--left {
  left: -20%;
  top: 5%;
}
.aura--right {
  right: -20%;
  top: 0;
}
@keyframes aura-drift {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  33% {
    transform: translate3d(-18%, -10%, 0) scale(1.18);
  }
  66% {
    transform: translate3d(-6%, 12%, 0) scale(0.92);
  }
  100% {
    transform: translate3d(14%, -6%, 0) scale(1.1);
  }
}
@keyframes aura-drift-2 {
  0% {
    transform: translate3d(0, 0, 0) rotate(0deg) scale(1);
  }
  50% {
    transform: translate3d(-30%, 18%, 0) rotate(50deg) scale(1.3);
  }
  100% {
    transform: translate3d(10%, -14%, 0) rotate(-20deg) scale(0.9);
  }
}
@media (prefers-reduced-motion: reduce) {
  .aura,
  .aura::after {
    animation: none;
  }
}
.hero-title {
  font-size: clamp(46px, 9.8vw, 136px);
  font-weight: 500;
  line-height: 0.92;
  letter-spacing: -0.06em;
  margin-bottom: 40px;
}
.hero-title .line {
  display: block;
  padding: 0.04em 0.12em 0.08em 0;
  margin-right: -0.12em;
}
.hero-title .line > span {
  display: inline-block;
}
.hero-title .line:first-child > span {
  color: var(--muted);
  font-weight: 300;
}
.hero-target .sel-label {
  font-size: 12px;
}
@media (min-width: 861px) {
  .hero-target {
    white-space: nowrap;
  }
}
.hero-sub {
  max-width: 46ch;
  font-size: clamp(18px, 1.7vw, 22px);
  color: var(--muted);
  margin-bottom: 40px;
}
.hero-sub strong {
  color: var(--text);
  font-weight: 500;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.scroll-hint {
  position: absolute;
  right: var(--pad);
  bottom: 28px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}
.scroll-hint span {
  width: 1px;
  height: 36px;
  background: linear-gradient(var(--accent), transparent);
  animation: hint 1.8s var(--ease) infinite;
  transform-origin: top;
}
@keyframes hint {
  0% { transform: scaleY(0); }
  60% { transform: scaleY(1); }
  100% { transform: scaleY(1); opacity: 0; }
}

/* ---------- Statement ---------- */
.statement {
  padding: 18vh 0;
}
.statement-text {
  font-size: clamp(28px, 4.2vw, 60px);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.03em;
  max-width: 22ch;
  text-wrap: pretty;
}
.statement-text em {
  font-style: normal;
  color: var(--accent);
}
.word {
  display: inline-block;
  will-change: opacity;
}

/* ---------- Trabajo ---------- */
.work {
  padding: 12vh 0 16vh;
}
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 56px;
}
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}
.filter {
  padding: 7px 12px;
  border: 0;
  border-radius: 7px;
  background: none;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.filter:hover {
  color: var(--text);
}
.filter.is-active {
  background: var(--surface-3);
  color: var(--text);
}
.work-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 72px 40px;
}
.card {
  display: block;
  perspective: 1200px;
  transition: opacity 0.4s var(--ease);
}
.card.is-hidden {
  display: none;
}
.card-media {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--line);
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--ty, 0));
  transition: transform 0.5s var(--ease);
  will-change: transform;
}
.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.01);
  transition: transform 0.8s var(--ease);
}
.card-media--light {
  background: #f4f4f4;
}
.card-media--light img {
  object-fit: contain;
  padding: 8%;
}
.card:hover .card-media {
  --ty: -6px;
}
.card:hover .card-media img {
  transform: scale(1.05);
}
.card-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-top: 20px;
}
.card-meta h3 {
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.card-meta span {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}
.card .sel-ui {
  inset: -12px -12px -12px -12px;
}

/* ---------- Sistema atomico ---------- */
.atomic-pin {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 100px 0 60px;
}
.atomic-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
}
.atomic-copy .h2 {
  margin-bottom: 40px;
  font-size: clamp(32px, 4vw, 52px);
}
.atomic-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.atomic-steps li {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 8px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  color: var(--dim);
  transition: color 0.4s var(--ease);
}
.atomic-steps li > span {
  font-family: var(--mono);
  font-size: 12px;
  padding-top: 4px;
}
.atomic-steps strong {
  display: block;
  font-size: 19px;
  font-weight: 500;
}
.atomic-steps p {
  font-size: 15px;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.5s var(--ease), opacity 0.4s;
}
.atomic-steps li.is-active {
  color: var(--text);
}
.atomic-steps li.is-active > span {
  color: var(--accent);
}
.atomic-steps li.is-active p {
  max-height: 60px;
  opacity: 1;
  color: var(--muted);
  padding-top: 4px;
}

/* Ventana Figma */
.fw {
  border: 1px solid var(--line-2);
  border-radius: 14px;
  background: var(--surface);
  overflow: hidden;
  box-shadow: 0 40px 120px -40px rgba(70, 142, 255, 0.25);
}
.fw-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 44px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}
.fw-file i {
  font-style: normal;
  color: var(--dim);
  margin: 0 4px;
}
.fw-file b {
  font-weight: 400;
  color: var(--text);
}
.fw-body {
  display: grid;
  grid-template-columns: 150px 1fr;
  height: clamp(380px, 52vh, 520px);
}
.fw-layers {
  list-style: none;
  margin: 0;
  padding: 12px 8px;
  border-right: 1px solid var(--line);
  font-size: 13px;
  color: var(--dim);
}
.fw-layers li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border-radius: 6px;
  transition: background 0.3s, color 0.3s;
}
.fw-layers i {
  font-style: normal;
  font-size: 11px;
  width: 12px;
  text-align: center;
}
.fw-layers li.is-done {
  color: var(--muted);
}
.fw-layers li.is-active {
  background: var(--accent-soft);
  color: var(--text);
}
.fw-layers li.is-active i {
  color: var(--accent);
}
.fw-canvas {
  position: relative;
  background-image: radial-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 16px 16px;
}
.stage {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 22px;
  padding: clamp(20px, 3vw, 40px);
}
.stage:not(:first-child) {
  opacity: 0;
  visibility: hidden;
}

/* Tokens */
.tk-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.tk-row--split {
  justify-content: space-between;
  align-items: center;
}
.tk-sw {
  flex: 1;
  min-width: 70px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
}
.tk-sw b {
  display: block;
  height: 54px;
  border-radius: 8px;
  background: var(--c);
  border: 1px solid var(--line-2);
  margin-bottom: 6px;
}
.tk-type {
  display: flex;
  align-items: center;
  gap: 14px;
}
.tk-type b {
  font-size: 56px;
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1;
}
.tk-type span,
.tk-space span {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
}
.tk-space {
  display: flex;
  align-items: flex-end;
  gap: 6px;
}
.tk-space i {
  width: var(--w);
  height: var(--w);
  background: var(--accent-soft);
  border: 1px solid var(--accent);
}
.tk-space span {
  margin-left: 6px;
}
.tk-rad {
  width: 64px;
  height: 64px;
  border: 1px solid var(--line-2);
  border-top-left-radius: var(--r);
  border-top: 2px solid var(--accent);
  border-left: 2px solid var(--accent);
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 6px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
}

/* Componentes de demo */
.comp {
  position: relative;
  padding: 14px;
  border: 1px dashed rgba(151, 71, 255, 0.55);
  border-radius: 8px;
}
.comp > em {
  position: absolute;
  top: -9px;
  left: 10px;
  padding: 0 6px;
  background: var(--surface);
  font-family: var(--mono);
  font-style: normal;
  font-size: 10px;
  color: #b78bff;
}
.comp > em::before {
  content: "◇ ";
}
.at-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px 16px;
}
.at-grid .comp {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 72px;
}
.ui-btn {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 14px;
  border-radius: 8px;
  background: var(--accent);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}
.ui-btn--ghost {
  background: none;
  border: 1px solid var(--line-2);
}
.ui-input {
  display: inline-flex;
  align-items: center;
  height: 34px;
  min-width: 110px;
  padding: 0 12px;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  font-size: 13px;
  color: var(--dim);
}
.ui-tag {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: #9cc2ff;
  font-size: 12px;
}
.ui-avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 50%;
  background: linear-gradient(135deg, #468eff, #6a4dff);
  font-size: 12px;
  font-weight: 500;
}
.ui-toggle {
  position: relative;
  width: 40px;
  height: 22px;
  border-radius: 999px;
  background: var(--accent);
}
.ui-toggle::after {
  content: "";
  position: absolute;
  top: 3px;
  right: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
}
.mol-stack,
.org-stack {
  display: flex;
  flex-direction: column;
  gap: 26px;
}
.ui-search {
  display: flex;
  gap: 8px;
}
.ui-search .ui-input {
  flex: 1;
}
.ui-user {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}
.ui-user b {
  display: block;
  font-weight: 500;
}
.ui-user small {
  color: var(--muted);
  font-size: 12px;
}
.ui-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.ui-nav {
  display: flex;
  align-items: center;
  gap: 14px;
}
.ui-nav span:not(.ui-btn) {
  width: 44px;
  height: 6px;
  border-radius: 3px;
  background: var(--line-2);
}
.ui-nav .ui-btn {
  margin-left: auto;
  height: 30px;
}
.ui-card {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 14px;
  align-items: center;
}
.ui-card-img {
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  background: linear-gradient(135deg, #1b2a52, #2b1d5c 60%, #468eff);
}
.ui-card-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}
.ui-card-body b {
  font-size: 17px;
  font-weight: 500;
}
.tpl {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: var(--bg);
}
.tpl-nav,
.po-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}
.tpl-nav b {
  font-size: 12px;
}
.tpl-nav span,
.po-nav span {
  width: 32px;
  height: 5px;
  border-radius: 3px;
  background: var(--line-2);
}
.tpl-nav i,
.po-nav i {
  margin-left: auto;
  width: 54px;
  height: 20px;
  border-radius: 5px;
  background: var(--accent);
}
.tpl-hero,
.po-hero {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 0 8px;
}
.tpl-hero span,
.po-hero span {
  height: 14px;
  border-radius: 4px;
  background: #fff;
}
.tpl-hero .w70 {
  width: 70%;
}
.tpl-hero .w50 {
  width: 45%;
  background: var(--muted);
  height: 8px;
}
.tpl-hero i,
.po-hero i {
  width: 80px;
  height: 22px;
  border-radius: 6px;
  background: var(--accent);
  margin-top: 6px;
}
.tpl-cards,
.po-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.tpl-cards div,
.po-cards div {
  aspect-ratio: 4 / 3;
  border-radius: 6px;
  background: linear-gradient(160deg, var(--surface-3), #1b2a52);
  border: 1px dashed rgba(151, 71, 255, 0.5);
}

/* ---------- IA horizontal ---------- */
.ai-pin {
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
}
.ai-track {
  position: relative;
  display: flex;
  height: 100%;
  will-change: transform;
}
/* Linea de pluma horizontal: cruza los paneles por detras */
.ai-pen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  z-index: 0;
}
.ai-pen-track,
.ai-pen-draw {
  fill: none;
}
.ai-pen-track {
  stroke: rgba(255, 255, 255, 0.06);
  stroke-width: 1;
  stroke-dasharray: 3 6;
}
.ai-pen-draw {
  stroke: var(--accent);
  stroke-width: 1.5;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}
.ai-pen-anchors rect {
  fill: #000;
  stroke: var(--accent);
  stroke-width: 1.2;
  opacity: 0.25;
  transition: opacity 0.3s, fill 0.3s;
}
.ai-pen-anchors rect.on {
  opacity: 1;
  fill: #fff;
}
.ai-pen-head {
  fill: var(--accent);
  filter: drop-shadow(0 0 6px var(--accent));
}
.panel {
  position: relative;
  z-index: 1;
  flex: none;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.panel--intro {
  width: 100vw;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  padding: 100px max(var(--pad), calc((100vw - var(--max)) / 2));
}
.panel-copy {
  max-width: 520px;
}
.panel-copy .h2 {
  margin-bottom: 28px;
}
.panel--step {
  width: min(560px, 80vw);
  padding: 100px 56px;
  border-left: 1px solid var(--line);
}
.panel--step:last-child {
  width: min(720px, 90vw);
  padding-right: max(var(--pad), 160px);
}
.step-num {
  font-size: clamp(80px, 11vw, 160px);
  font-weight: 300;
  line-height: 0.9;
  letter-spacing: -0.06em;
  color: transparent;
  -webkit-text-stroke: 1px var(--line-2);
  margin-bottom: 24px;
  transition: -webkit-text-stroke-color 0.5s var(--ease), color 0.5s var(--ease);
}
.step-num.is-reached {
  color: rgba(70, 142, 255, 0.08);
  -webkit-text-stroke-color: var(--accent);
}
.panel--step h3 {
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 500;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}
.panel--step > p:not(.frame-label) {
  color: var(--muted);
  max-width: 38ch;
}
.panel--step .ai-line {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--text) !important;
}
.ai-line span {
  display: inline-block;
  margin-right: 10px;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 11px;
  vertical-align: 2px;
}

/* Prompt demo */
.prompt {
  width: min(520px, 100%);
  flex: none;
  border: 1px solid var(--line-2);
  border-radius: 14px;
  background: var(--surface);
  overflow: hidden;
  box-shadow: 0 40px 120px -40px rgba(70, 142, 255, 0.3);
}
.prompt-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  font-weight: 500;
}
.prompt-head em {
  margin-left: auto;
  font-style: normal;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}
.spark {
  color: var(--accent);
}
.prompt-input {
  margin: 14px 16px;
  padding: 12px 14px;
  min-height: 66px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: var(--surface-2);
  font-size: 14px;
  line-height: 1.45;
}
.caret {
  display: inline-block;
  width: 1px;
  height: 1em;
  margin-left: 1px;
  vertical-align: -2px;
  background: var(--accent);
  animation: blink 1s steps(1) infinite;
}
@keyframes blink {
  50% { opacity: 0; }
}
.prompt-out {
  position: relative;
  margin: 0 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
}
.prompt-out > * {
  opacity: 0.12;
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
  transform: translateY(6px);
}
.prompt-out.is-built > * {
  opacity: 1;
  transform: none;
}
.prompt-out.is-built > :nth-child(2) { transition-delay: 0.15s; }
.prompt-out.is-built > :nth-child(3) { transition-delay: 0.3s; }
.prompt-out.is-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 10px;
  background: linear-gradient(100deg, transparent 30%, rgba(70, 142, 255, 0.16) 50%, transparent 70%);
  background-size: 250% 100%;
  animation: shimmer 1.1s linear infinite;
}
@keyframes shimmer {
  from { background-position: 120% 0; }
  to { background-position: -120% 0; }
}
.po-nav b {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  background: #fff;
}
.prompt-foot {
  display: flex;
  justify-content: space-between;
  padding: 12px 16px 14px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}
.po-status::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--dim);
  vertical-align: 1px;
}
.po-status.is-ok::before {
  background: #3ddc97;
}

/* ---------- Servicios ---------- */
.services {
  padding: 18vh 0 10vh;
}
.svc-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}
.svc {
  padding: 28px 24px 30px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  transition: background 0.3s;
}
.svc:hover {
  background: var(--surface-2);
}
.svc-ico {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 40px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 14px;
}
.svc h3 {
  font-size: 21px;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.svc > p {
  color: var(--muted);
  font-size: 15px;
  margin-bottom: 22px;
}
.svc ul {
  list-style: none;
  margin: 0;
  padding: 18px 0 0;
  border-top: 1px solid var(--line);
  font-size: 14px;
  display: grid;
  gap: 6px;
}
.svc-note {
  margin-top: 28px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--dim);
}

/* ---------- Clientes ---------- */
.clients {
  padding: 10vh 0 14vh;
}
.clients-head .h2 {
  max-width: 20ch;
  font-size: clamp(28px, 3.6vw, 48px);
  margin-bottom: 64px;
}
.marquee {
  position: relative;
  overflow: hidden;
  border-block: 1px solid var(--line);
  isolation: isolate; /* sus degradados quedan por debajo de la linea azul */
}
/* Bordes difuminados con capas encima (mask-image falla en Safari iOS con hijos animados) */
.marquee::before,
.marquee::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 1;
  width: 12%;
  pointer-events: none;
}
.marquee::before {
  left: 0;
  background: linear-gradient(90deg, var(--bg), transparent);
}
.marquee::after {
  right: 0;
  background: linear-gradient(270deg, var(--bg), transparent);
}
.marquee-track {
  display: flex;
  align-items: center;
  gap: 72px;
  width: max-content;
  padding: 40px 36px;
  animation: marquee 40s linear infinite;
  will-change: transform;
}
.marquee:hover .marquee-track {
  animation-play-state: paused;
}
.marquee img {
  height: 26px;
  width: auto;
  opacity: 0.5;
  transition: opacity 0.3s;
}
.marquee img:hover {
  opacity: 1;
}
.marquee img.logo-tall {
  height: 40px;
}
@keyframes marquee {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-50%, 0, 0); }
}

/* ---------- Sobre mi ---------- */
.about {
  padding: 14vh 0;
}
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: center;
}
.about-photo {
  margin: 0;
  border-radius: 14px;
}
.about-photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 40% 50%;
  border-radius: 14px;
  filter: grayscale(0.15);
}
.about-copy .h2 {
  font-size: clamp(30px, 3.6vw, 48px);
  margin-bottom: 28px;
}
.about-copy > p:not(.frame-label) {
  color: var(--muted);
  margin-bottom: 18px;
  max-width: 56ch;
}
.hl {
  padding: 0 6px;
  border-radius: 4px;
  color: var(--text);
  background: linear-gradient(var(--accent-soft), var(--accent-soft)) no-repeat 0 0 / 0% 100%;
  transition: background-size 0.9s var(--ease);
}
.hl.is-on {
  background-size: 100% 100%;
}
.tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 32px 0 0;
  padding: 0;
}
.tools li {
  padding: 6px 12px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-size: 13px;
  color: var(--muted);
}

/* ---------- Contacto ---------- */
.contact {
  padding: 18vh 0 0;
}
.contact-title {
  font-size: clamp(44px, 8vw, 120px);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.055em;
  margin-bottom: 28px;
}
.contact-target {
  display: inline-block;
  white-space: nowrap;
}
/* Esqueleto del formulario mientras el copiloto lo genera */
.ai-frame-skel {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  gap: 10px;
  padding: 26px;
  overflow: hidden;
}
.ai-frame--form.is-loading .ai-frame-skel {
  display: flex;
}
.ai-frame-skel i {
  width: 22%;
  height: 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.14);
}
.ai-frame-skel b {
  height: 44px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  margin-bottom: 8px;
}
.ai-frame-skel b.tall {
  height: 120px;
}
.ai-frame-skel b.line {
  height: 10px;
  width: 70%;
}
.ai-frame-skel b.btn {
  width: 150px;
  height: 46px;
  border-radius: 999px;
  background: rgba(70, 142, 255, 0.45);
}
.contact-mail.is-ai-hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* Formulario de contacto (lo genera el copiloto) */
.contact-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 440px);
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
}
.contact-form-wrap {
  position: relative;
  margin-top: 36px;
}
.cf-label {
  position: absolute;
  left: 0;
  bottom: calc(100% + 8px);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}
.cf-label::before {
  content: "◇ ";
  color: #b78bff;
}
.contact-form {
  display: grid;
  gap: 16px;
  padding: 26px;
  border: 1px solid var(--line-2);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 30px 80px -30px rgba(70, 142, 255, 0.3);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.contact-form-wrap.is-pending .contact-form,
.contact-form-wrap.is-pending .cf-label {
  opacity: 0;
  pointer-events: none;
}
.cf-field {
  display: grid;
  gap: 6px;
}
.cf-field > label:not(.cf-consent) {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}
.cf-field input,
.cf-field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.cf-field textarea {
  min-height: 120px;
  resize: vertical;
}
.cf-field input:focus,
.cf-field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.cf-error {
  font-size: 12.5px;
  line-height: 1.4;
  color: #ff7a7a;
}
.cf-error:empty {
  display: none;
}
.cf-field.is-invalid input,
.cf-field.is-invalid textarea,
.cf-field.is-invalid input:focus,
.cf-field.is-invalid textarea:focus {
  border-color: #ff7a7a;
  box-shadow: 0 0 0 3px rgba(255, 122, 122, 0.16);
}
.cf-field.is-invalid > label:not(.cf-consent) {
  color: #ff9a9a;
}
.cf-field--consent.is-invalid .cf-consent input {
  outline: 2px solid #ff7a7a;
  outline-offset: 2px;
}
.cf-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.cf-consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
  cursor: pointer;
}
.cf-consent input {
  flex: none;
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
  accent-color: var(--accent);
}
.cf-submit {
  justify-self: start;
}
.cf-submit:disabled {
  opacity: 0.6;
  pointer-events: none;
}
.cf-status {
  min-height: 1.3em;
  font-size: 14px;
  color: var(--muted);
}
.cf-status.is-ok {
  color: #3ddc97;
}
.cf-status.is-error {
  color: #ff7a7a;
}
@media (max-width: 1024px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .ai-layer--contact {
    display: none;
  }
}
.contact-mail {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-top: 48px;
  font-size: clamp(24px, 3.4vw, 44px);
  letter-spacing: -0.02em;
  border-bottom: 1px solid var(--line-2);
  padding-bottom: 6px;
  transition: color 0.3s, border-color 0.3s;
}
.contact-mail:hover {
  color: var(--accent);
  border-color: var(--accent);
}
.contact-mail span {
  transition: transform 0.4s var(--ease);
}
.contact-mail:hover span {
  transform: translate(4px, -4px);
}
.footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 18vh;
  padding-top: 24px;
  padding-bottom: 32px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--dim);
}
/* Marca a todo el ancho del grid, solo contorno. El viewBox es la caja de tinta del texto (medida con la fuente) */
.footer-mark {
  flex: 0 0 100%;
  display: block;
  width: 100%;
  height: auto;
  margin-top: 56px;
  overflow: visible;
}
.footer-mark text {
  font-family: var(--display);
  font-weight: 500;
  font-size: 200px;
  letter-spacing: -8px;
  fill: none;
  stroke: rgba(255, 255, 255, 0.16);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .svc-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .atomic-grid {
    grid-template-columns: 1fr;
  }
  .atomic-steps p {
    display: none;
  }
}
@media (max-width: 1024px) {
  .atomic-pin {
    padding: 80px 0;
  }
  .atomic-steps {
    display: none;
  }
  .fw-body {
    grid-template-columns: 1fr;
    height: auto;
  }
  .fw-layers {
    display: none;
  }
  .fw-canvas {
    display: grid;
  }
  .stage,
  .stage:not(:first-child) {
    position: relative;
    opacity: 1;
    visibility: visible;
    border-bottom: 1px solid var(--line);
  }
  /* IA: apilado vertical */
  .ai-pen {
    display: none;
  }
  .ai-pin {
    height: auto;
  }
  .ai-track {
    flex-direction: column;
    height: auto;
  }
  .panel,
  .panel--intro,
  .panel--step,
  .panel--step:last-child {
    width: 100%;
    height: auto;
    padding: 56px var(--pad);
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .panel--intro {
    flex-direction: column;
    align-items: stretch;
    border-top: 0;
  }
}
@media (max-width: 860px) {
  .nav-pill,
  .hud,
  .scroll-hint {
    display: none;
  }
  .work-grid {
    grid-template-columns: 1fr;
    gap: 56px;
  }
  .about-grid {
    grid-template-columns: 1fr;
  }
  .step-num {
    font-size: 72px;
  }
}
@media (max-width: 560px) {
  body {
    font-size: 16px;
  }
  .svc-grid {
    grid-template-columns: 1fr;
  }
  .at-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .tk-row--split {
    flex-direction: column;
    align-items: flex-start;
  }
  .ui-card {
    grid-template-columns: 1fr;
  }
  .footer {
    flex-direction: column;
  }
  .hero-target .sel-label,
  .prompt-foot span:last-child {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .marquee-track {
    animation: none;
    flex-wrap: wrap;
    width: auto;
  }
}

/* Movimiento reducido en escritorio: sin pins, todo apilado */
.motion-reduced .ai-pen {
  display: none;
}
.motion-reduced .ai-pin {
  height: auto;
}
.motion-reduced .ai-track {
  flex-wrap: wrap;
  height: auto;
}
.motion-reduced .panel,
.motion-reduced .panel--step,
.motion-reduced .panel--step:last-child {
  height: auto;
}

/* ---------- Entrada (sin loader) ---------- */
.is-entering main,
.is-entering .nav {
  opacity: 0;
}

/* ---------- Transicion entre paginas ---------- */
.pt-bg {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: var(--bg);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* View Transitions entre documentos: la imagen de la card vuela hasta el mockup de la PDP
   dentro de un marco de seleccion Figma (borde y tiradores dibujados sobre el grupo de la transicion) */
@media (prefers-reduced-motion: no-preference) {
  @view-transition {
    navigation: auto;
  }
}
.nav {
  view-transition-name: pt-nav;
}
.p-frame {
  view-transition-name: pt-media;
}
::view-transition-old(root) {
  animation: pt-out 0.35s cubic-bezier(0.4, 0, 0.6, 1) both;
}
::view-transition-new(root) {
  animation: pt-in 0.6s 0.15s cubic-bezier(0.22, 1, 0.36, 1) both;
}
::view-transition-group(pt-media) {
  animation-duration: 0.75s;
  animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 2;
}
/* Solo card -> PDP (tipo "card", lo pone el head al llegar): al volver atras no hay marco */
html:active-view-transition-type(card)::view-transition-group(pt-media) {
  /* 14px de aire alrededor de la imagen: marco a 10px como .sel-ui y tiradores centrados en sus esquinas */
  box-sizing: content-box;
  padding: 14px;
  margin: -14px;
  outline: 1px solid var(--accent);
  outline-offset: -4px;
  background:
    linear-gradient(#fff, #fff) left 1px top 1px / 6px 6px no-repeat,
    linear-gradient(#fff, #fff) right 1px top 1px / 6px 6px no-repeat,
    linear-gradient(#fff, #fff) left 1px bottom 1px / 6px 6px no-repeat,
    linear-gradient(#fff, #fff) right 1px bottom 1px / 6px 6px no-repeat,
    linear-gradient(var(--accent), var(--accent)) left top / 8px 8px no-repeat,
    linear-gradient(var(--accent), var(--accent)) right top / 8px 8px no-repeat,
    linear-gradient(var(--accent), var(--accent)) left bottom / 8px 8px no-repeat,
    linear-gradient(var(--accent), var(--accent)) right bottom / 8px 8px no-repeat;
}
html:active-view-transition-type(card)::view-transition-image-pair(pt-media) {
  inset: 14px;
}
::view-transition-old(pt-media),
::view-transition-new(pt-media) {
  animation-duration: 0.45s;
  height: 100%;
  object-fit: cover;
}
@keyframes pt-out {
  to {
    opacity: 0;
    transform: translateY(-48px) scale(0.97);
  }
}
@keyframes pt-in {
  from {
    opacity: 0;
    transform: translateY(72px);
  }
}

/* ---------- Footer: redes ---------- */
.socials {
  display: flex;
  gap: 20px;
}
.socials a {
  transition: color 0.25s;
}
.socials a:hover {
  color: var(--text);
}

/* ---------- Pagina de proyecto ---------- */
.p-hero {
  padding: 132px 0 40px;
}
.crumb {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 36px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  transition: color 0.25s;
}
.crumb i {
  font-style: normal;
  color: var(--dim);
}
.crumb:hover {
  color: var(--text);
}
.p-title {
  font-size: clamp(48px, 8.4vw, 132px);
  font-weight: 500;
  line-height: 0.92;
  letter-spacing: -0.055em;
  margin-bottom: 24px;
}
.p-title .line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.06em;
}
.p-title .line > span {
  display: inline-block;
}
.p-intro {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}
.p-type {
  display: inline-flex;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: #9cc2ff;
  font-family: var(--mono);
  font-size: 12px;
}
.p-lead {
  font-family: var(--display);
  font-size: clamp(24px, 2.6vw, 36px);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.025em;
  text-wrap: pretty;
}
.props {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  padding: 18px 20px 20px;
}
.props-head {
  margin-bottom: 8px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.props dl {
  margin: 0 0 20px;
}
.props dl div {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}
.props dt {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  padding-top: 2px;
}
.props dd {
  margin: 0;
}
.p-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.p-ctas .btn {
  height: 42px;
  gap: 8px;
  font-size: 14px;
}
.p-media {
  padding: 0 0 12vh;
}
.p-introsec {
  padding: 0 0 14vh;
}
.p-frame {
  margin: 0;
  border-radius: 14px;
  background: var(--surface-2);
}
.p-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 14px;
  clip-path: inset(0 round 14px);
}
.p-overview {
  padding: 0 0 14vh;
}
.p-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 6vw, 96px);
}
.p-text p {
  color: var(--muted);
  font-size: clamp(17px, 1.4vw, 19px);
  margin-bottom: 20px;
  max-width: 60ch;
}
.p-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  margin-top: 72px;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--line);
}
.stat {
  padding: 26px 24px;
  background: var(--bg);
}
.stat b {
  display: block;
  font-family: var(--display);
  font-size: clamp(36px, 4vw, 56px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.04em;
  margin-bottom: 10px;
}
.stat span {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}
.p-details {
  padding: 0 0 12vh;
}
.p-row {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(24px, 6vw, 96px);
  padding: 40px 0;
  border-top: 1px solid var(--line);
}
.p-row-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
}
.p-row-head span {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
}
.p-row-head h3 {
  font-size: clamp(24px, 2.4vw, 32px);
  font-weight: 500;
  letter-spacing: -0.03em;
}
.p-row-body p {
  color: var(--muted);
  font-size: clamp(16px, 1.3vw, 18px);
  margin-bottom: 16px;
  max-width: 62ch;
}
.p-row-body p:last-child {
  margin-bottom: 0;
}
.p-rolesec {
  padding: 0 0 14vh;
}
.p-role-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 20px;
  align-items: stretch;
}
.p-role {
  padding: 28px 30px;
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent);
  border-radius: 4px 14px 14px 4px;
  background: var(--surface);
}
.p-role span {
  display: block;
  margin-bottom: 12px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
}
.p-role p {
  font-family: var(--display);
  font-size: clamp(19px, 1.8vw, 24px);
  line-height: 1.35;
  letter-spacing: -0.015em;
}
.p-deliver {
  padding: 28px 30px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}
.p-deliver .frame-label {
  margin-bottom: 16px;
}
.p-deliver ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.p-deliver li {
  padding: 6px 12px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-size: 14px;
}
.p-gallery {
  padding: 0 0 14vh;
}
.p-shots {
  display: grid;
  gap: 56px;
}
.p-shot {
  margin: 0;
  border-radius: 14px;
  background: var(--surface-2);
}
.p-shot img {
  width: 100%;
  height: auto;
  border-radius: 14px;
}
.p-view {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  background: var(--surface-2);
}
.p-shot--long .p-view {
  aspect-ratio: 16 / 10;
}
.p-pan {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  will-change: transform;
}
.p-pan img {
  width: 100%;
  height: auto;
  border-radius: 0;
}
.p-phones {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 3vw, 48px);
  width: min(100%, 1000px);
  margin: 0 auto;
}
.p-shot--phone {
  border-radius: 36px;
  background: none;
}
.p-shot--phone .p-view {
  aspect-ratio: 375 / 780;
  border-radius: 36px;
  border: 8px solid var(--surface-3);
  box-shadow: 0 30px 80px -30px rgba(70, 142, 255, 0.25);
}
.p-shot--phone .sel-ui {
  inset: -14px;
}
/* Visor de imagenes */
.viewer-stage {
  position: relative;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface-2);
}
.vslide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.7s var(--ease), visibility 0s linear 0.7s;
}
.vslide.is-active {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.7s var(--ease);
}
.vslide-view {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.vslide img {
  display: block;
  width: 100%;
  height: auto;
  will-change: transform;
}
.vslide--shot img {
  height: 100%;
  object-fit: contain;
}
.vslide--phone .vslide-view {
  inset: 6% auto 6% 50%;
  aspect-ratio: 375 / 780;
  transform: translateX(-50%);
  border: 8px solid var(--surface-3);
  border-radius: 34px;
  box-shadow: 0 30px 80px -30px rgba(70, 142, 255, 0.35);
}
.vslide--phone {
  background: radial-gradient(60% 70% at 50% 50%, rgba(70, 142, 255, 0.12), transparent);
}
.viewer-top {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  pointer-events: none;
  z-index: 2;
}
.viewer-top span,
.vbtn {
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(11, 12, 15, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text);
}
.viewer-ctrls {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: flex;
  gap: 6px;
  z-index: 2;
}
.vbtn {
  min-width: 34px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.vbtn:hover {
  background: var(--accent);
  border-color: var(--accent);
}
.viewer-thumbs {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  padding: 4px 2px 8px;
  overflow-x: auto;
  scrollbar-width: thin;
}
.vthumb {
  position: relative;
  flex: none;
  width: 156px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface-2);
  color: var(--muted);
  text-align: left;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.3s, border-color 0.3s;
}
.vthumb img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top;
}
.vthumb-label {
  display: block;
  padding: 7px 9px;
  font-family: var(--mono);
  font-size: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vthumb-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
}
.vthumb:hover,
.vthumb.is-active {
  opacity: 1;
}
.vthumb.is-active {
  border-color: var(--accent);
  color: var(--text);
}

/* Visor ampliado */
.lb-open,
.lb-open body {
  overflow: hidden;
}
.lb {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: grid;
  grid-template-rows: auto 1fr;
  background: rgba(0, 0, 0, 0.94);
  opacity: 0;
  transition: opacity 0.25s var(--ease);
}
.lb.is-open {
  opacity: 1;
}
.lb-top {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px var(--pad);
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}
.lb-label {
  color: var(--text);
}
.lb-zoom {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  padding: 3px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: var(--surface);
}
.lb-zoom button,
.lb-close,
.lb-nav {
  min-width: 30px;
  height: 30px;
  padding: 0 8px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--text);
  font: inherit;
  cursor: pointer;
}
.lb-zoom button:hover,
.lb-close:hover,
.lb-nav:hover {
  background: var(--accent);
}
.lb-pct {
  min-width: 48px;
  text-align: center;
  color: var(--text);
}
.lb-close {
  border: 1px solid var(--line-2);
}
.lb-canvas {
  display: flex;
  overflow: auto;
  padding: 24px;
  overscroll-behavior: contain;
}
.lb-canvas.is-pannable {
  cursor: grab;
}
.lb-canvas.is-dragging {
  cursor: grabbing;
}
.lb-img {
  display: block;
  flex: none;
  max-width: none;
  height: auto;
  margin: auto;
  border-radius: 8px;
  user-select: none;
  -webkit-user-drag: none;
}
.lb-nav {
  position: fixed;
  top: 50%;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  background: rgba(11, 12, 15, 0.8);
  transform: translateY(-50%);
}
.lb-prev {
  left: 16px;
}
.lb-next {
  right: 16px;
}

.p-stack {
  padding: 0 0 14vh;
}
/* Hueco extra entre modulos de la PDP para que la linea azul cambie de lado con curvas amplias */
.p-introsec,
.p-overview,
.p-details,
.p-rolesec,
.p-gallery,
.p-stack {
  padding-top: 12vh;
}
.stack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}
.stack-group {
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}
.stack-group p {
  margin-bottom: 14px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}
.stack-group ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.stack-group li {
  padding: 6px 12px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-size: 14px;
}
.p-next {
  padding: 4vh 0 4vh;
}
.next {
  display: block;
  padding: 56px 0 48px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.next-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.next-title {
  display: inline-flex;
  align-items: center;
  gap: 0.25em;
  font-size: clamp(48px, 9vw, 140px);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.06em;
  transition: color 0.4s var(--ease);
}
.next-arrow {
  font-size: 0.6em;
  color: var(--accent);
  transform: translateX(-12px);
  opacity: 0;
  transition: transform 0.5s var(--ease), opacity 0.5s var(--ease);
}
.next-media {
  flex: none;
  width: clamp(180px, 26vw, 380px);
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface-2);
}
.next-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.08);
  filter: grayscale(0.6) brightness(0.7);
  transition: transform 0.8s var(--ease), filter 0.6s var(--ease);
}
.next-type {
  display: block;
  margin-top: 16px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}
.next:hover .next-arrow {
  transform: none;
  opacity: 1;
}
.next:hover .next-media img {
  transform: scale(1);
  filter: none;
}
.prev {
  display: inline-flex;
  gap: 8px;
  margin-top: 24px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  transition: color 0.25s;
}
.prev:hover {
  color: var(--text);
}
.contact--compact {
  padding-top: 14vh;
}
.contact--compact .contact-title {
  font-size: clamp(40px, 6vw, 92px);
}

/* 404 */
.nf {
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 140px 0 80px;
}
.nf .p-title {
  margin-bottom: 28px;
}
.nf .lead {
  margin-bottom: 40px;
}

@media (max-width: 860px) {
  .p-intro,
  .p-overview-grid,
  .p-row,
  .p-role-grid {
    grid-template-columns: 1fr;
  }
  .p-hero {
    padding-top: 120px;
  }
  .p-shots {
    gap: 28px;
  }
  .viewer-stage {
    aspect-ratio: 4 / 3;
  }
  .vbtn--zoom {
    display: none;
  }
  .vthumb {
    width: 120px;
  }
  .lb-count {
    display: none;
  }
  .p-phones {
    grid-template-columns: repeat(3, 72%);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 16px 4px 24px;
  }
  .p-shot--phone {
    scroll-snap-align: center;
  }
  .next-row {
    flex-direction: column;
    align-items: flex-start;
  }
  .next-media {
    width: 100%;
  }
  .next-arrow {
    opacity: 1;
    transform: none;
  }
  .footer {
    flex-direction: column;
  }
}
