/* =========================================================
   AMASYS — Diseño y desarrollo 100% a medida
   Concepto: la web como placa de circuito (PCB).
   ========================================================= */

@font-face { font-family: "Michroma"; src: url("../fonts/michroma-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("../fonts/manrope-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("../fonts/manrope-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("../fonts/manrope-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("../fonts/manrope-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("../fonts/manrope-latin-800-normal.woff2") format("woff2"); font-weight: 800; font-display: swap; }

:root {
  /* Placa: derivados del color principal de marca #324243 */
  --board-0: #121b1c;
  --board: #172223;
  --board-2: #1d2a2b;
  --surface: #223233;
  --slate: #324243;
  --trace: #2c3f40;
  --line: rgba(233, 240, 238, .09);
  --line-2: rgba(233, 240, 238, .16);

  --ink: #e9f0ee;
  --muted: #9bb0ad;
  --dim: #6f8583;

  /* Acentos de marca (manual) */
  --cyan: #40b3cf;
  --yellow: #f1cf11;
  --orange: #ec8618;

  --paper: #e7edeb;
  --paper-2: #f3f6f5;
  --paper-ink: #1b2728;
  --paper-muted: #55696a;

  --display: "Michroma", "Eurostile", "Arial Black", sans-serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 1240px;
  --gut: clamp(20px, 4vw, 48px);
  --sec: clamp(80px, 10vw, 140px);
  --r-s: 6px;
  --r-m: 12px;
  --ease: cubic-bezier(.2, .7, .1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: auto; overflow-x: clip; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  margin: 0;
  background: var(--board);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
::selection { background: var(--yellow); color: var(--board-0); }

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

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut); }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: 16px; top: -60px; z-index: 200; background: var(--yellow); color: var(--board-0); padding: 10px 16px; border-radius: var(--r-s); font-weight: 700; }
.skip:focus { top: 16px; }

/* ---------- Tipografía ---------- */
h1, h2, h3, h4 { margin: 0; font-weight: 400; }
.display { font-family: var(--display); letter-spacing: .01em; line-height: 1.14; }
h2.display { font-size: clamp(1.55rem, 3.1vw, 2.55rem); max-width: 22ch; }
h3 { font-family: var(--sans); font-weight: 700; font-size: 1.2rem; line-height: 1.3; letter-spacing: -.005em; }
p { margin: 0 0 1em; }
.lead { font-size: clamp(1.05rem, 1.35vw, 1.2rem); color: var(--muted); max-width: 60ch; }
.kicker { display: inline-flex; align-items: center; gap: 10px; font-size: .9rem; font-weight: 600; color: var(--muted); margin-bottom: 22px; }
.kicker i { width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 4px rgba(64,179,207,.18); }

/* ---------- Botones ---------- */
.btn {
  --bg: var(--yellow); --fg: var(--board-0);
  position: relative; display: inline-flex; align-items: center; gap: 12px;
  padding: 16px 26px; border-radius: 999px; border: 0;
  background: var(--bg); color: var(--fg);
  font-weight: 700; font-size: 1rem; letter-spacing: .005em;
  transition: background .3s var(--ease), color .3s var(--ease), box-shadow .3s var(--ease);
  will-change: transform;
}
.btn svg { width: 18px; height: 18px; transition: transform .35s var(--ease); }
.btn:hover { box-shadow: 0 10px 40px -10px rgba(241, 207, 17, .55); }
.btn:hover svg { transform: translateX(3px); }
.btn--ghost { --bg: transparent; --fg: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line-2); }
.btn--ghost:hover { --bg: rgba(233,240,238,.06); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn--dark { --bg: var(--paper-ink); --fg: var(--paper-2); }
.btn--dark:hover { box-shadow: 0 10px 40px -12px rgba(27,39,40,.6); }

/* ---------- Barra de progreso ---------- */
.progress { position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 120; pointer-events: none; }
.progress span { display: block; height: 100%; width: 100%; background: var(--cyan); transform-origin: 0 50%; transform: scaleX(0); box-shadow: 0 0 12px var(--cyan); }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  transition: background .4s var(--ease), box-shadow .4s var(--ease), transform .45s var(--ease);
}
.nav.is-scrolled { background: none; }
.nav.is-hidden { transform: translateY(-100%); }
.nav { padding-top: env(safe-area-inset-top, 0px); }
.nav__in { display: flex; align-items: center; justify-content: space-between; height: 96px; gap: 24px; margin: 0 auto; border-radius: 999px; transition: height .5s var(--ease), margin .5s var(--ease), padding .5s var(--ease), max-width .5s var(--ease), background .4s, box-shadow .4s; }
.nav.is-scrolled .nav__in {
  height: 64px; margin-top: 12px; padding: 0 8px 0 22px;
  max-width: calc(min(var(--wrap), 100vw) - 2 * var(--gut) + 44px); width: calc(100% - 2 * var(--gut) + 44px);
  background: rgba(18, 27, 28, .78); backdrop-filter: blur(16px) saturate(150%); -webkit-backdrop-filter: blur(16px) saturate(150%);
  box-shadow: inset 0 0 0 1px var(--line-2), 0 18px 40px -20px rgba(0,0,0,.7);
}
.nav.is-scrolled .nav__cta { padding: 11px 20px; }
.nav__logo img { height: 42px; width: auto; transition: height .45s var(--ease); }
.nav.is-scrolled .nav__logo img { height: 38px; }
.nav__links { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav__links a { position: relative; display: block; padding: 10px 14px; font-size: .95rem; font-weight: 600; color: var(--muted); transition: color .25s; }
.nav__links a:hover, .nav__links a.is-active { color: var(--ink); }
.nav__links a::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 2px; background: var(--cyan); transform: scaleX(0); transform-origin: left; transition: transform .4s var(--ease); }
.nav__links a.is-active::after { transform: scaleX(1); }
.nav__cta { padding: 12px 20px; font-size: .92rem; }
.nav__burger { display: none; width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgba(233,240,238,.07); position: relative; }
.nav__burger span { position: absolute; left: 14px; right: 14px; height: 2px; background: var(--ink); transition: transform .4s var(--ease), opacity .3s; }
.nav__burger span:nth-child(1) { top: 18px; }
.nav__burger span:nth-child(2) { top: 26px; }
.menu-open .nav__burger span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
.menu-open .nav__burger span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }

.mmenu { position: fixed; inset: 0; z-index: 90; background: var(--board-0); display: flex; flex-direction: column; justify-content: center; padding: 100px var(--gut) 40px; visibility: hidden; clip-path: circle(0% at calc(100% - 46px) calc(env(safe-area-inset-top, 0px) + 48px)); transition: clip-path .7s var(--ease), visibility 0s .7s; }
.menu-open .mmenu { visibility: visible; clip-path: circle(150% at calc(100% - 46px) calc(env(safe-area-inset-top, 0px) + 48px)); transition: clip-path .8s var(--ease); }
.mmenu ul { list-style: none; margin: 0; padding: 0; }
.mmenu li { overflow: hidden; }
.mmenu li a { display: block; font-family: var(--display); font-size: clamp(1.5rem, 7vw, 2.4rem); padding: 10px 0; transform: translateY(110%); transition: transform .7s var(--ease); }
.menu-open .mmenu li a { transform: none; }
.menu-open .mmenu li:nth-child(2) a { transition-delay: .05s; }
.menu-open .mmenu li:nth-child(3) a { transition-delay: .1s; }
.menu-open .mmenu li:nth-child(4) a { transition-delay: .15s; }
.menu-open .mmenu li:nth-child(5) a { transition-delay: .2s; }
.menu-open .mmenu li:nth-child(6) a { transition-delay: .25s; }
.mmenu__foot { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--muted); display: grid; gap: 10px; font-size: 1rem; font-weight: 600; }
.mmenu__foot a { display: inline-block; transition: color .25s; }
.mmenu__foot a:hover { color: var(--ink); }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; overflow: hidden; background: radial-gradient(120% 90% at 75% 45%, var(--board-2) 0%, var(--board) 45%, var(--board-0) 100%); }
.hero__board { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__in { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); align-items: center; gap: clamp(24px, 4vw, 64px); padding-top: 140px; padding-bottom: 96px; pointer-events: none; }
.hero__in > * { pointer-events: auto; }
.hero__copy { max-width: 640px; }
.hero h1 { font-size: clamp(1.8rem, 3.45vw, 3.05rem); line-height: 1.12; margin-bottom: 28px; }
.hero h1 .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
.hero h1 .wi { display: inline-block; }
.hero h1 .hl { color: var(--yellow); }
.pct { font-family: var(--sans); font-weight: 800; font-size: .92em; letter-spacing: 0; }
.hero .lead { margin-bottom: 38px; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 14px; }
.hero__chip { position: relative; justify-self: center; width: min(100%, 470px); aspect-ratio: 212 / 228.58; perspective: 900px; }
.chip { width: 100%; height: 100%; overflow: visible; transform-style: preserve-3d; }
.chip * { transform-box: fill-box; transform-origin: center; }
.chip .c-body { fill: var(--ink); }
.chip .c-core { fill: var(--ink); }
.chip .c-as { fill: var(--ink); }
.chip .c-y { fill: var(--yellow); }
.chip .c-o { fill: var(--orange); }
.chip .c-b { fill: var(--cyan); }
.chip .pins path { transition: filter .5s var(--ease); }
.chip .pins.flash path { filter: drop-shadow(0 0 5px currentColor) brightness(1.15); }
.chip .pins-y { color: var(--yellow); }
.chip .pins-o { color: var(--orange); }
.chip .pins-b { color: var(--cyan); }
.hero__glow { position: absolute; inset: 18% 18%; border-radius: 50%; background: radial-gradient(circle, rgba(64,179,207,.28), rgba(64,179,207,0) 70%); filter: blur(20px); z-index: -1; animation: breathe 5s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .55; transform: scale(.92); } }
.hero__scroll { position: absolute; left: 50%; bottom: 26px; z-index: 3; translate: -50% 0; display: flex; flex-direction: column; align-items: center; gap: 10px; font-size: .8rem; color: var(--dim); }
.hero__scroll i { width: 1.5px; height: 46px; background: linear-gradient(var(--cyan), transparent); position: relative; overflow: hidden; }
.hero__scroll i::after { content: ""; position: absolute; left: 0; right: 0; height: 14px; background: var(--ink); animation: drip 2.2s var(--ease) infinite; }
@keyframes drip { from { transform: translateY(-14px); } to { transform: translateY(46px); } }

/* ---------- Stats ---------- */
.stats { position: relative; background: var(--board-0); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stats__grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { position: relative; padding: 44px 28px 40px; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat + .stat::before { content: ""; position: absolute; left: -4px; top: 50%; width: 7px; height: 7px; border-radius: 50%; background: var(--board-0); box-shadow: 0 0 0 1.5px var(--line-2); }
.stat__n { font-family: var(--display); font-size: clamp(2rem, 3.6vw, 3rem); line-height: 1; display: flex; align-items: baseline; gap: 4px; }
.stat__n small { font-family: var(--sans); font-weight: 800; font-size: .5em; color: var(--yellow); }
.stat__l { margin-top: 12px; color: var(--muted); font-size: .95rem; }

/* ---------- Secciones ---------- */
.sec { position: relative; padding: var(--sec) 0; }
.sec__head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .8fr); gap: 32px 64px; align-items: end; margin-bottom: clamp(48px, 6vw, 80px); }
.sec__head .lead { margin: 0; }
.tag { display: inline-flex; align-items: center; gap: 8px; font-size: .82rem; font-weight: 600; color: var(--muted); padding: 6px 12px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line-2); }

/* ---------- Nosotros ---------- */
.about__grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(40px, 7vw, 110px); align-items: start; }
.about h2 { margin-bottom: 36px; }
.about__text p { color: var(--muted); max-width: 58ch; }
.about__text p strong { color: var(--ink); font-weight: 600; }
.diff { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.diff li { position: relative; display: grid; grid-template-columns: 44px 1fr; gap: 0 18px; padding: 26px 0; border-bottom: 1px solid var(--line); }
.diff__ic { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; box-shadow: inset 0 0 0 1px var(--line-2); color: var(--cyan); transition: color .4s, box-shadow .4s; }
.diff li:nth-child(2) .diff__ic { color: var(--yellow); }
.diff li:nth-child(3) .diff__ic { color: var(--orange); }
.diff__ic svg { width: 22px; height: 22px; }
.diff h3 { margin-bottom: 6px; }
.diff p { margin: 0; color: var(--muted); font-size: .97rem; }
.diff li:hover .diff__ic { box-shadow: inset 0 0 0 1px currentColor, 0 0 24px -6px currentColor; }

.stack { margin-top: clamp(64px, 8vw, 110px); position: relative; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.stack__track { display: flex; gap: 14px; width: max-content; animation: marquee 38s linear infinite; }
.stack__item { display: inline-flex; align-items: center; gap: 10px; padding: 12px 20px; border-radius: 999px; background: var(--board-2); box-shadow: inset 0 0 0 1px var(--line); font-weight: 600; color: var(--ink); white-space: nowrap; font-size: .95rem; }
.stack__item i { width: 6px; height: 6px; border-radius: 50%; background: var(--c, var(--cyan)); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Servicios (módulos) ---------- */
.services { background: var(--board-0); }
.mods { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 18px; }
.mod {
  --acc: var(--cyan);
  position: relative; grid-column: span 2; padding: 34px 30px 32px; border-radius: var(--r-m);
  background: linear-gradient(180deg, var(--board-2), var(--board));
  box-shadow: inset 0 0 0 1px var(--line);
  isolation: isolate; overflow: hidden;
  transition: box-shadow .5s var(--ease);
}
.mod--wide { grid-column: span 4; }
.mod--y { --acc: var(--yellow); }
.mod--o { --acc: var(--orange); }
/* pines del módulo, como un integrado */
.mod::before, .mod::after { content: ""; position: absolute; top: 28px; bottom: 28px; width: 5px; background: repeating-linear-gradient(180deg, var(--line-2) 0 3px, transparent 3px 14px); transition: background .5s; }
.mod::before { left: 0; }
.mod::after { right: 0; }
.mod:hover { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--acc) 55%, transparent), 0 30px 80px -40px color-mix(in srgb, var(--acc) 60%, transparent); }
.mod:hover::before, .mod:hover::after { background: repeating-linear-gradient(180deg, var(--acc) 0 3px, transparent 3px 14px); }
.mod__spot { position: absolute; inset: 0; z-index: -1; opacity: 0; background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--acc) 16%, transparent), transparent 60%); transition: opacity .4s; }
.mod:hover .mod__spot { opacity: 1; }
.mod__ic { width: 52px; height: 52px; border-radius: 12px; display: grid; place-items: center; color: var(--acc); background: color-mix(in srgb, var(--acc) 10%, transparent); margin-bottom: 26px; }
.mod__ic svg { width: 26px; height: 26px; }
.mod h3 { font-size: 1.3rem; margin-bottom: 12px; }
.mod p { color: var(--muted); margin: 0; }
.mod__langs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.mod__langs span { font-size: .82rem; font-weight: 600; padding: 6px 12px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line-2); color: var(--ink); }

.express { margin-top: clamp(64px, 8vw, 100px); display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 32px 64px; align-items: start; }
.express__head h3 { font-family: var(--display); font-weight: 400; font-size: clamp(1.3rem, 2.2vw, 1.75rem); line-height: 1.2; margin-bottom: 14px; }
.express__head p { color: var(--muted); }
.express__list { display: grid; gap: 14px; }
.offer { position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 22px; padding: 26px 28px; border-radius: var(--r-m); background: var(--surface); overflow: hidden; transition: background .4s var(--ease), transform .5s var(--ease); }
.offer:hover { background: #283b3c; }
.offer__badge { font-family: var(--display); font-size: 1.35rem; line-height: 1; color: var(--yellow); text-align: center; min-width: 76px; }
.offer__badge small { display: block; font-family: var(--sans); font-size: .75rem; font-weight: 600; color: var(--muted); margin-top: 6px; }
.offer h4 { font-weight: 700; font-size: 1.12rem; margin-bottom: 4px; }
.offer p { margin: 0; color: var(--muted); font-size: .95rem; }
.offer__go { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; box-shadow: inset 0 0 0 1.5px var(--line-2); transition: background .35s, color .35s, box-shadow .35s; }
.offer__go svg { width: 18px; height: 18px; }
.offer:hover .offer__go { background: var(--yellow); color: var(--board-0); box-shadow: none; }

/* ---------- Proceso ---------- */
.process__grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(40px, 7vw, 110px); align-items: start; }
.process__aside { position: sticky; top: 120px; }
.process__aside h2 { margin-bottom: 28px; }
.process__aside .lead { margin-bottom: 36px; }
.pm { display: flex; gap: 16px; align-items: flex-start; padding: 22px; border-radius: var(--r-m); background: var(--board-2); box-shadow: inset 0 0 0 1px var(--line); }
.pm__ic { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: rgba(241,207,17,.12); color: var(--yellow); }
.pm__ic svg { width: 22px; height: 22px; }
.pm p { margin: 0; color: var(--muted); font-size: .96rem; }
.pm strong { color: var(--ink); display: block; margin-bottom: 4px; font-size: 1rem; }

.steps { position: relative; padding-left: 64px; }
.steps__list { list-style: none; margin: 0; padding: 0; }
.steps__rail { position: absolute; left: 21px; top: 10px; bottom: 10px; width: 2px; background: var(--trace); border-radius: 2px; }
.steps__rail i { position: absolute; inset: 0; background: linear-gradient(var(--cyan), var(--yellow) 55%, var(--orange)); transform-origin: top; transform: scaleY(0); border-radius: 2px; box-shadow: 0 0 14px rgba(64,179,207,.5); }
.step { position: relative; padding: 0 0 56px; }
.step:last-child { padding-bottom: 0; }
.step__node { position: absolute; left: -64px; top: 0; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--board); box-shadow: inset 0 0 0 2px var(--trace); font-family: var(--display); font-size: .78rem; color: var(--dim); transition: box-shadow .5s var(--ease), color .5s var(--ease), background .5s; }
.step.is-on .step__node { box-shadow: inset 0 0 0 2px var(--cyan), 0 0 0 6px rgba(64,179,207,.12), 0 0 30px -4px rgba(64,179,207,.6); color: var(--ink); background: var(--board-2); }
.step h3 { font-size: 1.25rem; margin: 8px 0 10px; transition: color .5s; color: var(--muted); }
.step.is-on h3 { color: var(--ink); }
.step p { margin: 0; color: var(--muted); max-width: 52ch; }

.pillars { margin-top: clamp(72px, 9vw, 120px); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.pillar { display: flex; gap: 14px; align-items: center; padding: 24px 20px 24px 0; border-bottom: 1px solid var(--line); font-weight: 600; }
.pillar svg { flex: none; width: 22px; height: 22px; color: var(--cyan); }

/* ---------- Portfolio (sección clara) ---------- */
.work { background: var(--paper); color: var(--paper-ink); }
.work .lead { color: var(--paper-muted); }
.work .kicker { color: var(--paper-muted); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 40px; }
.filter { border: 0; background: transparent; padding: 11px 18px; border-radius: 999px; font-weight: 700; font-size: .93rem; color: var(--paper-muted); box-shadow: inset 0 0 0 1.5px rgba(27,39,40,.14); transition: background .3s, color .3s, box-shadow .3s; }
.filter span { font-weight: 500; opacity: .6; margin-left: 4px; }
.filter:hover { color: var(--paper-ink); box-shadow: inset 0 0 0 1.5px var(--paper-ink); }
.filter[aria-pressed="true"] { background: var(--paper-ink); color: var(--paper-2); box-shadow: none; }

.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-flow: row dense; gap: 28px 22px; }
.card { position: relative; display: flex; flex-direction: column; text-align: left; border: 0; padding: 0; background: none; color: inherit; cursor: pointer; }
.card[hidden] { display: none; }
.card__media { position: relative; aspect-ratio: 16 / 10.5; border-radius: var(--r-m); overflow: hidden; background: #0f1718; box-shadow: 0 1px 0 rgba(27,39,40,.06), 0 18px 40px -26px rgba(27,39,40,.45); transform: translateZ(0); }
.card__media img { width: 100%; height: 100%; object-fit: cover; object-position: center; transition: transform 1.1s var(--ease), filter .6s; }
.card[data-cat="apps"] .card__media img { object-fit: contain; object-position: center; }
.card:hover .card__media img { transform: scale(1.06); }
.card__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(18,27,28,.85)); opacity: 0; transition: opacity .5s var(--ease); }
.card:hover .card__media::after { opacity: 1; }
.card__open { position: absolute; right: 16px; bottom: 16px; z-index: 2; display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; background: var(--yellow); color: var(--board-0); font-weight: 700; font-size: .85rem; opacity: 0; transform: translateY(10px); transition: opacity .4s var(--ease), transform .5s var(--ease); }
.card:hover .card__open, .card:focus-visible .card__open { opacity: 1; transform: none; }
.card__body { padding: 18px 4px 0; }
.card__meta { display: flex; align-items: center; gap: 10px; font-size: .82rem; font-weight: 600; color: var(--paper-muted); margin-bottom: 6px; }
.card__meta i { width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.card h3 { font-size: 1.12rem; margin-bottom: 6px; }
.card p { margin: 0; color: var(--paper-muted); font-size: .95rem; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card--feat { grid-column: span 2; }
.card--feat .card__media { aspect-ratio: 16 / 8.2; }
.work__more { display: flex; justify-content: center; margin-top: 56px; }

/* ---------- Modal de proyecto ---------- */
.pmodal { position: fixed; inset: 0; z-index: 150; display: grid; place-items: center; padding: clamp(12px, 3vw, 40px); visibility: hidden; }
.pmodal.is-open { visibility: visible; }
.pmodal__bg { position: absolute; inset: 0; background: rgba(12, 18, 19, .82); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); opacity: 0; }
.pmodal__box { position: relative; width: min(1180px, 100%); max-height: 100%; display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); border-radius: 16px; overflow: hidden; background: var(--board); box-shadow: 0 40px 120px -30px rgba(0,0,0,.7), inset 0 0 0 1px var(--line); opacity: 0; }
.pmodal__media { position: relative; background: #0d1415; min-height: 300px; display: flex; flex-direction: column; }
.pmodal__stage { position: relative; flex: 1; display: grid; place-items: center; overflow: hidden; aspect-ratio: 16/10.5; }
.pmodal__stage img { width: 100%; height: 100%; object-fit: contain; }
.pmodal__nav { position: absolute; top: 50%; translate: 0 -50%; width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgba(18,27,28,.75); display: grid; place-items: center; backdrop-filter: blur(6px); transition: background .3s; }
.pmodal__nav:hover { background: var(--yellow); color: var(--board-0); }
.pmodal__nav svg { width: 18px; height: 18px; }
.pmodal__nav--p { left: 14px; }
.pmodal__nav--n { right: 14px; }
.pmodal__thumbs { display: flex; gap: 8px; padding: 12px; overflow-x: auto; scrollbar-width: thin; }
.pmodal__thumbs button { flex: none; width: 74px; height: 50px; border: 0; padding: 0; border-radius: 6px; overflow: hidden; opacity: .45; box-shadow: inset 0 0 0 2px transparent; transition: opacity .3s; background: #000; }
.pmodal__thumbs button img { width: 100%; height: 100%; object-fit: cover; }
.pmodal__thumbs button[aria-current="true"] { opacity: 1; outline: 2px solid var(--yellow); outline-offset: -2px; }
.pmodal__info { padding: clamp(28px, 3.5vw, 48px); overflow-y: auto; display: flex; flex-direction: column; }
.pmodal__info .card__meta { color: var(--muted); }
.pmodal__info h3 { font-family: var(--display); font-weight: 400; font-size: clamp(1.25rem, 2vw, 1.6rem); line-height: 1.25; margin: 6px 0 18px; }
.pmodal__info p { color: var(--muted); }
.pmodal__actions { margin-top: auto; padding-top: 20px; display: flex; flex-wrap: wrap; gap: 12px; }
.pmodal__close { position: absolute; top: 14px; right: 14px; z-index: 3; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(233,240,238,.08); display: grid; place-items: center; transition: background .3s, transform .4s var(--ease); }
.pmodal__close:hover { background: var(--ink); color: var(--board); transform: rotate(90deg); }
.pmodal__close svg { width: 18px; height: 18px; }

/* ---------- Clientes ---------- */
.clients { padding: clamp(72px, 9vw, 120px) 0; background: var(--paper-2); color: var(--paper-ink); overflow: hidden; }
.clients__head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 48px; }
.clients__head h2 { font-size: clamp(1.3rem, 2.4vw, 1.9rem); }
.clients__head p { margin: 0; color: var(--paper-muted); max-width: 40ch; }
.logos { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.logos + .logos { margin-top: 18px; }
.logos__track { display: flex; gap: 18px; width: max-content; animation: marquee 48s linear infinite; }
.logos--rev .logos__track { animation-direction: reverse; animation-duration: 56s; }
.logos:hover .logos__track { animation-play-state: paused; }
.logo-tile { flex: none; width: 200px; height: 104px; display: grid; place-items: center; padding: 18px 26px; border-radius: var(--r-m); background: #fff; box-shadow: inset 0 0 0 1px rgba(27,39,40,.07); }
.logo-tile img { max-height: 64px; max-width: 100%; width: auto; object-fit: contain; filter: grayscale(1) contrast(1.05); opacity: .8; transition: filter .4s, opacity .4s, transform .5s var(--ease); }
.logo-tile:hover img { filter: none; opacity: 1; transform: scale(1.05); }

/* ---------- Contacto ---------- */
.contact { position: relative; overflow: hidden; background: var(--board-0); }
.contact__board { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .75; }
.contact .wrap { position: relative; z-index: 2; }
.contact__grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(40px, 6vw, 96px); align-items: start; }
.contact h2 { font-size: clamp(1.8rem, 3.8vw, 3.1rem); max-width: 14ch; margin-bottom: 26px; }
.channels { margin-top: 44px; display: grid; gap: 12px; }
.channel { display: flex; align-items: center; gap: 16px; padding: 18px 20px; border-radius: var(--r-m); background: rgba(29, 42, 43, .75); backdrop-filter: blur(6px); box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow .4s, background .4s; }
a.channel:hover { box-shadow: inset 0 0 0 1px var(--c, var(--cyan)); background: rgba(34, 50, 51, .9); }
.channel__ic { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: var(--c, var(--cyan)); background: color-mix(in srgb, var(--c, var(--cyan)) 13%, transparent); }
.channel__ic svg { width: 21px; height: 21px; }
.channel small { display: block; color: var(--muted); font-size: .82rem; }
.channel strong { font-weight: 700; }

.form { position: relative; padding: clamp(26px, 3.5vw, 44px); border-radius: 18px; background: rgba(23, 34, 35, .88); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: inset 0 0 0 1px var(--line-2), 0 40px 100px -50px rgba(0,0,0,.8); }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { position: relative; margin-bottom: 16px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 26px 16px 10px; border: 0; border-radius: 10px;
  background: var(--board-0); color: var(--ink); font: inherit; font-size: 1rem;
  box-shadow: inset 0 0 0 1px var(--line-2); transition: box-shadow .3s; -webkit-appearance: none; appearance: none;
}
.field textarea { min-height: 140px; resize: vertical; }
.field select { padding-right: 44px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239bb0ad' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; background-size: 20px; cursor: pointer; }
.field label { position: absolute; left: 16px; top: 18px; color: var(--muted); pointer-events: none; transition: transform .25s var(--ease), color .25s, font-size .25s; transform-origin: left top; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; box-shadow: inset 0 0 0 1.5px var(--cyan), 0 0 0 4px rgba(64,179,207,.14); }
.field input:focus + label, .field input:not(:placeholder-shown) + label,
.field textarea:focus + label, .field textarea:not(:placeholder-shown) + label,
.field select + label { transform: translateY(-10px) scale(.78); color: var(--cyan); }
.field.is-error input, .field.is-error textarea { box-shadow: inset 0 0 0 1.5px var(--orange); }
.field__err { display: none; color: var(--orange); font-size: .82rem; margin-top: 6px; }
.field.is-error .field__err { display: block; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 8px; }
.form__note { margin: 0; color: var(--dim); font-size: .85rem; max-width: 34ch; }
.form__status { margin: 14px 0 0; font-size: .92rem; color: var(--orange); min-height: 1em; }
.btn[disabled] { opacity: .7; cursor: progress; }
.btn .spin { display: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; }
.btn.is-loading .spin { display: block; }
.btn.is-loading .arr { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.form__ok { position: absolute; inset: 0; border-radius: inherit; background: var(--board); display: none; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 40px; }
.form.is-sent .form__ok { display: flex; }
.form__ok svg { width: 84px; height: 84px; margin-bottom: 24px; }
.form__ok h3 { font-family: var(--display); font-weight: 400; font-size: 1.4rem; margin-bottom: 12px; }
.form__ok p { color: var(--muted); max-width: 36ch; }
.ok-ring { fill: none; stroke: var(--cyan); stroke-width: 2.5; stroke-dasharray: 230; stroke-dashoffset: 230; }
.ok-check { fill: none; stroke: var(--yellow); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 60; stroke-dashoffset: 60; }
.form.is-sent .ok-ring { animation: dash 1s var(--ease) forwards; }
.form.is-sent .ok-check { animation: dash .6s .6s var(--ease) forwards; }
@keyframes dash { to { stroke-dashoffset: 0; } }

/* ---------- Footer ---------- */
.foot { background: var(--board-0); border-top: 1px solid var(--line); padding: 56px 0 40px; color: var(--muted); font-size: .92rem; }
.foot__in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px; }
.foot__logo img { height: 46px; width: auto; }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.foot nav a:hover { color: var(--ink); }
.foot__copy { width: 100%; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 28px; border-top: 1px solid var(--line); color: var(--dim); }

/* ---------- WhatsApp flotante ---------- */
.wa { position: fixed; right: 22px; bottom: 22px; z-index: 80; display: flex; align-items: center; gap: 0; height: 58px; padding: 0; border-radius: 999px; background: #25d366; color: #fff; box-shadow: 0 14px 40px -12px rgba(37,211,102,.7); overflow: hidden; transition: gap .5s var(--ease), padding .5s var(--ease); }
.wa__ic { width: 58px; height: 58px; display: grid; place-items: center; flex: none; }
.wa__ic svg { width: 28px; height: 28px; }
.wa__tx { max-width: 0; white-space: nowrap; font-weight: 700; overflow: hidden; transition: max-width .55s var(--ease); }
.wa:hover .wa__tx, .wa:focus-visible .wa__tx { max-width: 220px; padding-right: 22px; }
.wa::before { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: 0 0 0 0 rgba(37,211,102,.6); animation: ping 2.8s infinite; pointer-events: none; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(37,211,102,.55); } 70%, 100% { box-shadow: 0 0 0 16px rgba(37,211,102,0); } }

/* ---------- Revelados ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(28px); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .nav__links, .nav__cta { display: none; }
  .nav__burger { display: block; }
  .mods { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mod, .mod--wide { grid-column: span 1; }
  .mod--wide { grid-column: span 2; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .hero__in { grid-template-columns: 1fr; padding-top: 110px; padding-bottom: 110px; text-align: left; }
  .hero__chip { order: -1; width: min(40vw, 170px); justify-self: center; margin: 0 auto -8px; }
  .sec__head, .about__grid, .process__grid, .express, .contact__grid { grid-template-columns: 1fr; }
  .process__aside { position: static; }
  .stats__grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(3)::before { display: none; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .pillars { grid-template-columns: 1fr 1fr; }
  .pmodal__box { grid-template-columns: 1fr; overflow-y: auto; }
  .clients__head { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .mods { grid-template-columns: 1fr; }
  .mod, .mod--wide { grid-column: auto; }
  .grid { grid-template-columns: 1fr; }
  .card--feat { grid-column: auto; }
  .card--feat .card__media { aspect-ratio: 16/10.5; }
  .form__row { grid-template-columns: 1fr; gap: 0; }
  .pillars { grid-template-columns: 1fr; }
  .offer { grid-template-columns: auto 1fr; }
  .offer__go { display: none; }
  .hero__scroll { display: none; }
  .hero__chip { display: none; }
  .hero__in { padding-top: 128px; }
  .nav__in { height: 80px; }
  .nav.is-scrolled .nav__in { height: 60px; margin-top: 10px; padding: 0 7px 0 16px; width: calc(100% - 20px); max-width: none; }
  .nav__logo img { height: 38px; }
  .nav.is-scrolled .nav__logo img { height: 34px; }
  .stat { padding: 30px 18px; }
  .logo-tile { width: 160px; height: 88px; }
  .wa { right: 16px; bottom: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
  .stack__track, .logos__track { animation: none; flex-wrap: wrap; width: auto; }
}
