/* ==========================================================================
   J&A Web Solution: estilos
   Tokens en tres capas (primitivos → semánticos → componente), según
   docs/PLAN_DISENO.md §2. Los componentes solo usan tokens semánticos.
   ========================================================================== */

/* ---------- 1. Primitivos (medidos sobre Logo.jpeg) ---------- */
:root {
  --c-black-1000: #000000;
  --c-black-950: #05070B;
  --c-black-900: #0D1118;
  --c-black-850: #161C25;
  --c-logo-black: #010005;
  --c-white-50: #F2F5F9;
  --c-grey-400: #A3AEBB;
  --c-cyan-300: #40DDFE;
  --c-cyan-350: #5FD6FF;
  --c-cyan-400: #00BEF8;
  --c-cyan-500: #00A0EC;
  --c-blue-400: #4FA3F0;
  --c-blue-500: #2179D3;
  --c-blue-750: #0A4BBF;
  --c-blue-800: #0142B6;
  --c-blue-100: #C7D6F5;
  --c-green-400: #3DD68C;
  --c-amber-400: #F5B841;
  --c-red-400: #FF7A7A;
  --c-whatsapp: #25D366;

  /* Tipografía */
  --font-display: "Red Hat Display", "Arial Black", "Helvetica Neue", Arial, sans-serif;
  --font-text: "Red Hat Text", "Helvetica Neue", Arial, sans-serif;

  /* Espaciado 4/8 */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 6rem;
  --space-10: 8rem;
  --space-11: 10rem;

  /* Movimiento */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-soft: cubic-bezier(0.33, 1, 0.68, 1);
  --t-press: 140ms;
  --t-hover: 180ms;
  --t-ui: 240ms;
  --t-reveal: 800ms;
}

/* ---------- 2. Semánticos ---------- */
:root {
  color-scheme: dark;

  --bg: var(--c-black-950);
  --surface: var(--c-black-900);
  --surface-2: var(--c-black-850);
  --ink: var(--c-white-50);
  --muted: var(--c-grey-400);
  --accent: var(--c-cyan-400);
  --accent-strong: var(--c-cyan-350);
  --accent-ink: var(--c-black-950);
  --link: var(--c-blue-400);
  --success: var(--c-green-400);
  --warning: var(--c-amber-400);
  --error: var(--c-red-400);

  --footer-bg: var(--c-black-1000);

  --field-deep: var(--c-blue-800);
  --field-deep-2: var(--c-blue-750);
  --field-deep-ink: var(--c-white-50);
  --field-deep-muted: var(--c-blue-100);

  /* Degradado: solo activo de marca (logo y barra de progreso) */
  --brand-arc: linear-gradient(90deg, #0142B6 0%, #00A0EC 45%, #00BEF8 75%, #40DDFE 100%); /* taste-skill-ignore: arco del logo, activo de marca (plan §0) */
  --brand-arc-short: linear-gradient(90deg, #00A0EC, #40DDFE); /* taste-skill-ignore: arco del logo en la barra de progreso (plan §0) */

  /* El único glow: solo para lo que flota */
  --glow: 0 0 0 1px rgb(0 190 248 / 0.30), 0 12px 40px -12px rgb(0 190 248 / 0.55);

  /* Escala tipográfica: 5 pasos */
  --step-small: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --step-statement: clamp(1.5rem, 1.1rem + 1.6vw, 2.25rem);
  --step-display: clamp(1.875rem, 0.6rem + 6vw, 6rem);

  /* Layout */
  --margin: clamp(1rem, 2.2vw, 2rem);
  --gutter: clamp(0.75rem, 1.4vw, 1.5rem);
  --section-gap: clamp(4.5rem, 2rem + 8vw, 10rem);
  --header-h: 3.5rem;
  --layout-max: 110rem;

  --radius: 0;
  --radius-fab: 999px;
  --o-dim: 0.4;
  --o-veil: 0.45;
}

/* ---------- 3. Componente ---------- */
:root {
  --btn-primary-bg: var(--accent);
  --btn-primary-fg: var(--accent-ink);
  --btn-primary-bg-hover: var(--accent-strong);
  --btn-height: 3rem;
  --chip-bg: var(--field-deep-2);
  --chip-bg-selected: var(--field-deep-ink);
  --chip-fg-selected: var(--field-deep);
  --frame-h-hero: clamp(14rem, 34svh, 20rem);
  --frame-h-work: 7.5rem;
  --fab-size: 3.5rem;
  --focus-ring: 2px solid var(--accent);
  --focus-offset: 3px;
}

@media (min-width: 40em) {
  :root {
    --header-h: 4rem;
    --frame-h-hero: clamp(15rem, 36svh, 20rem);
    --frame-h-work: 9.5rem;
  }
}

@media (min-width: 64em) {
  :root {
    --frame-h-hero: clamp(13.75rem, 30svh, 20rem);
    --frame-h-work: clamp(10.5rem, 13vw, 11.875rem);
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  scrollbar-color: var(--surface-2) var(--bg);
  scroll-padding-top: calc(var(--header-h) + var(--space-4));
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  min-height: 100svh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: var(--step-body);
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.005em;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  caret-color: var(--accent);
}

img { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol, figure, fieldset { margin: 0; }
ul, ol { padding: 0; list-style: none; }
fieldset { border: 0; padding: 0; min-width: 0; }
legend { padding: 0; }
button { font: inherit; color: inherit; }
h1, h2, h3 { text-wrap: balance; hyphens: none; }
p { text-wrap: pretty; }
strong { font-weight: 500; }

::selection { background: var(--accent); color: var(--accent-ink); }

a { color: inherit; }

:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-offset);
}

a, button, label, [role="button"] {
  touch-action: manipulation;
}

button, .btn, .chip, .filter, .menu-toggle, .menu-close {
  -webkit-user-select: none;
  user-select: none;
}

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

.skip {
  position: fixed;
  top: var(--space-2);
  left: var(--space-2);
  z-index: 100;
  padding: var(--space-3) var(--space-4);
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 500;
  text-decoration: none;
  transform: translateY(-200%);
}
.skip:focus-visible { transform: none; }

main > section {
  max-width: var(--layout-max);
  margin-inline: auto;
}

/* ==========================================================================
   Componentes
   ========================================================================== */

/* Botón */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: var(--btn-height);
  padding: var(--space-2) var(--space-5);
  border: 0;
  border-radius: var(--radius);
  font-family: var(--font-text);
  font-size: var(--step-body);
  font-weight: 500;
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover) ease;
}
.btn:active { transform: scale(0.97); }
.btn--primary { background: var(--btn-primary-bg); color: var(--btn-primary-fg); }
.btn--compact { min-height: 2.75rem; padding: 0 var(--space-4); font-size: var(--step-small); white-space: nowrap; }
.btn--block { width: 100%; }

@media (hover: hover) and (pointer: fine) {
  .btn--primary:hover { background: var(--btn-primary-bg-hover); }
}

/* Enlace de texto */
.link {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  min-height: 2.75rem;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 0.07em;
  text-underline-offset: 0.22em;
  text-decoration-color: rgb(242 245 249 / 0.4);
  transition: text-decoration-color var(--t-hover) ease, transform var(--t-press) var(--ease-out);
}
.link:active { transform: scale(0.98); }
.link--ink { display: inline; min-height: 0; }

@media (hover: hover) and (pointer: fine) {
  .link:hover { text-decoration-color: currentColor; }
}

.icon-ext { width: 0.7em; height: 0.7em; flex: none; }

/* ==========================================================================
   Header
   ========================================================================== */
.sentinel {
  position: absolute;
  top: 0; left: 0;
  width: 1px; height: 24px;
  pointer-events: none;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 40;
  padding-top: env(safe-area-inset-top, 0px);
}
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--surface);
  opacity: 0;
  transition: opacity var(--t-ui) ease;
}
.site-header.is-scrolled::before { opacity: 1; }

.site-header__bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-6);
  max-width: var(--layout-max);
  height: var(--header-h);
  margin-inline: auto;
  padding-inline: max(var(--margin), env(safe-area-inset-left, 0px)) max(var(--margin), env(safe-area-inset-right, 0px));
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: var(--space-2);
  min-height: 2.75rem;
  align-items: center;
  margin-right: auto;
  color: var(--ink);
  text-decoration: none;
}
.brand__mark {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: var(--step-lead);
  line-height: 1;
  letter-spacing: -0.02em;
}
.brand__name {
  font-size: var(--step-small);
  color: var(--muted);
}

.nav { display: none; }
.nav__list { display: flex; gap: var(--space-5); }
.nav__link {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  font-size: var(--step-small);
  font-weight: 500;
  color: var(--muted);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.3em;
  transition: color var(--t-hover) ease, text-decoration-color var(--t-hover) ease;
}
.nav__link[aria-current="true"] { color: var(--ink); }

@media (hover: hover) and (pointer: fine) {
  .nav__link:hover { color: var(--ink); text-decoration-color: currentColor; }
}

.site-header__cta { display: none; }

.menu-toggle,
.menu-close {
  min-height: 2.75rem;
  min-width: 2.75rem;
  padding: 0 var(--space-3);
  margin-right: calc(var(--space-3) * -1);
  background: none;
  border: 0;
  font-size: var(--step-body);
  font-weight: 500;
  cursor: pointer;
  transition: transform var(--t-press) var(--ease-out);
}
.menu-toggle:active,
.menu-close:active { transform: scale(0.97); }

@media (min-width: 64em) {
  .nav { display: block; }
  .site-header__cta { display: inline-flex; }
  .menu-toggle { display: none; }
}

/* Menú móvil */
.menu {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--surface);
  color: var(--ink);
  overscroll-behavior: contain;
}
.menu::backdrop { background: rgb(5 7 11 / 0.6); }
.menu__inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-7);
  min-height: 100%;
  padding: env(safe-area-inset-top, 0px) var(--margin) calc(var(--space-6) + env(safe-area-inset-bottom, 0px));
}
.menu__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}
.menu__list { display: grid; gap: var(--space-2); }
.menu__list a {
  display: flex;
  align-items: center;
  min-height: 3.5rem;
  font-size: var(--step-statement);
  font-weight: 500;
  text-decoration: none;
}
.menu .btn { margin-top: auto; }

@media (prefers-reduced-motion: no-preference) {
  .menu[open] .menu__inner {
    transform-origin: top right;
    animation: menu-in var(--t-ui) var(--ease-drawer);
  }
  .menu[open] .menu__list li,
  .menu[open] .btn {
    animation: rise-sm 300ms var(--ease-out) both;
    animation-delay: calc(var(--i, 0) * 40ms + 60ms);
  }
  .menu.is-closing .menu__inner {
    animation: menu-out 180ms var(--ease-out) forwards;
  }
}
@media (prefers-reduced-motion: reduce) {
  .menu[open] .menu__inner { animation: fade-in 200ms ease; }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  padding: calc(var(--header-h) + env(safe-area-inset-top, 0px) + var(--space-5)) 0 var(--space-6);
}

.hero__title {
  padding-inline: var(--margin);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: var(--step-display);
  line-height: 0.92;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  margin-left: -0.04em;
}
.line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.08em;
  margin-bottom: -0.08em;
}
.line > span { display: block; }

.hero__facts {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-5);
  padding-inline: var(--margin);
  font-size: var(--step-body);
  line-height: 1.4;
}
.hero__facts li { max-width: 34ch; }
.hero__facts li:nth-child(-n+3) { display: none; }

.strip {
  margin-top: var(--space-6);
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  cursor: grab;
}
.strip::-webkit-scrollbar { display: none; }
.strip:focus-visible { outline-offset: -2px; }
.strip.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.strip.is-dragging img { pointer-events: none; }

.strip__list {
  display: flex;
  gap: var(--space-2);
  width: max-content;
  padding-inline: var(--margin);
}

.frame {
  position: relative;
  flex: none;
  height: var(--frame-h-hero);
  background: var(--surface-2);
  scroll-snap-align: center;
}
.frame img {
  height: 100%;
  width: auto;
  -webkit-user-drag: none;
  user-select: none;
}
.frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #000;
  opacity: var(--o-veil);
  transition: opacity var(--t-ui) ease;
  pointer-events: none;
}
.frame.is-center::after { opacity: 0; }

/* Frame vivo: una captura alta del sitio que se recorre dentro del frame */
.live {
  height: 100%;
  aspect-ratio: 296 / 640;
  overflow: hidden;
}
.frame .live img { width: 100%; height: auto; }

@media (hover: hover) and (pointer: fine) {
  .frame:hover::after { opacity: 0; }
}

.strip__caption {
  min-height: 1.45em;
  margin-top: var(--space-3);
  padding-inline: var(--margin);
  font-size: var(--step-small);
  color: var(--muted);
}

.hero__foot {
  display: grid;
  gap: var(--space-5);
  margin-top: auto;
  padding: var(--space-6) var(--margin) 0;
}
.hero__foot > * { min-width: 0; }
.hero__lead {
  max-width: 44ch;
  font-size: var(--step-lead);
  line-height: 1.35;
  letter-spacing: -0.005em;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3) var(--space-5);
}
.hero__actions .btn { flex: 1 1 auto; }

@media (min-width: 40em) {
  .hero__facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-4) var(--gutter);
  }
  .hero__facts li:nth-child(-n+3) { display: list-item; }
  .hero__actions .btn { flex: none; }
}

@media (min-width: 64em) {
  .hero { padding-top: calc(var(--header-h) + var(--space-6)); }
  .hero__facts {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: var(--space-6);
  }
  .hero__facts li { max-width: 30ch; }
  .hero__foot {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    align-items: end;
  }
  .hero__actions { justify-content: flex-end; }
}

/* ==========================================================================
   Trabajos
   ========================================================================== */
.work {
  padding-top: var(--section-gap);
}

.work__rail {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-inline: var(--margin);
  margin-bottom: var(--space-5);
}
.work__title {
  font-size: var(--step-lead);
  font-weight: 500;
  line-height: 1.2;
}

.filters { display: flex; gap: var(--space-4); }
.filter {
  position: relative;
  min-height: 2.75rem;
  padding: 0;
  background: none;
  border: 0;
  font-size: var(--step-body);
  color: var(--muted);
  cursor: pointer;
  transition: color var(--t-hover) ease, transform var(--t-press) var(--ease-out);
}
.filter::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0.45rem;
  height: 4px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t-ui) var(--ease-out);
}
.filter[aria-pressed="true"] { color: var(--ink); }
.filter[aria-pressed="true"]::after { transform: scaleX(1); }
.filter:active { transform: scale(0.97); }

@media (hover: hover) and (pointer: fine) {
  .filter:hover { color: var(--ink); }
}

.work__list { display: grid; gap: var(--space-7); min-width: 0; }
.project { min-width: 0; }

.project__strip {
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}
.project__strip::-webkit-scrollbar { display: none; }
.project__strip:focus-visible { outline-offset: -2px; }

.project__frames {
  display: flex;
  gap: var(--space-2);
  width: max-content;
  padding-inline: var(--margin);
}
.pframe {
  flex: none;
  height: var(--frame-h-work);
  background: var(--surface-2);
  scroll-snap-align: start;
  scroll-margin-inline: var(--margin);
}
.pframe img {
  height: 100%;
  width: auto;
  transition: opacity var(--t-hover) ease;
}
.work[data-view="escritorio"] .pframe[data-view="celular"],
.work[data-view="celular"] .pframe[data-view="escritorio"] { display: none; }

.work__list.is-swapping .project__frames {
  opacity: 0;
}
.project { position: relative; }
.project__frames { transition: opacity 200ms ease; }

.project__meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, auto);
  align-items: center;
  gap: var(--space-1) var(--space-4);
  margin-top: var(--space-2);
  padding-inline: var(--margin);
  font-size: var(--step-small);
}
.project__name {
  font-size: var(--step-body);
  font-weight: 500;
  line-height: 1.3;
}
.project__kind { display: none; color: var(--muted); }
.project__end {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: var(--space-4);
  color: var(--muted);
}
.project__year { font-variant-numeric: tabular-nums; }

.work__cta {
  padding-inline: var(--margin);
  font-size: var(--step-body);
  color: var(--muted);
}
.work__cta .link { color: var(--ink); }

@media (hover: hover) and (pointer: fine) {
  .work__list:has(.project:hover) .project:not(:hover) .pframe img { opacity: var(--o-dim); }
}

@media (min-width: 40em) {
  .project__meta { grid-template-columns: minmax(0, 1fr) minmax(0, auto) minmax(0, 1fr); }
  .project__kind { display: block; text-align: center; }
  .project__end { justify-content: flex-end; }
}

@media (min-width: 64em) {
  .work {
    display: grid;
    grid-template-columns: 13% minmax(0, 1fr);
    align-items: start;
  }
  .work__rail {
    position: sticky;
    top: calc(var(--header-h) + var(--space-6));
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-4);
    padding-right: 0;
    margin-bottom: 0;
  }
  .filters { flex-direction: column; gap: 0; }
  .project__frames,
  .project__meta { padding-left: var(--gutter); }
  .project__meta { padding-right: var(--margin); }
  .work__cta { padding-left: var(--gutter); }
}

/* ==========================================================================
   Servicios
   ========================================================================== */
.services {
  padding: var(--section-gap) var(--margin) 0;
}
.services__title {
  font-size: var(--step-lead);
  font-weight: 500;
  line-height: 1.2;
  margin-bottom: var(--space-7);
}
.services__grid { display: grid; gap: var(--space-7); }

.svc-group__name {
  font-size: var(--step-lead);
  font-weight: 500;
  line-height: 1.25;
  margin-bottom: var(--space-4);
}
.svc-list { display: grid; gap: var(--space-4); }
.svc { outline-offset: 4px; }
.svc__name {
  display: block;
  font-size: var(--step-lead);
  line-height: 1.25;
  color: var(--ink);
}
.svc__desc {
  display: block;
  margin-top: var(--space-1);
  max-width: 40ch;
  color: var(--muted);
}
.services__detail { display: none; }

@media (min-width: 40em) {
  .services__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-7) var(--gutter); }
}

@media (min-width: 64em) {
  .services { padding-bottom: 0; }
  .services__title { margin-bottom: var(--space-8); }
  .services__grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    align-items: start;
    padding-block: 0 var(--space-6);
  }
  .svc-group:nth-child(1) { grid-column: 1 / span 3; }
  .svc-group:nth-child(2) { grid-column: 4 / span 3; }
  .svc-group:nth-child(3) { grid-column: 7 / span 3; }
  .svc-group__name { font-size: var(--step-statement); line-height: 1.15; margin-bottom: var(--space-5); }
  .svc-list { gap: var(--space-3); }
  .svc { cursor: default; }
  .svc__name {
    font-size: var(--step-statement);
    line-height: 1.15;
    color: var(--muted);
    transition: color var(--t-hover) ease;
  }
  .svc.is-active .svc__name { color: var(--ink); }
  .svc__desc { display: none; }
  .services__detail {
    display: block;
    grid-column: 10 / span 3;
    grid-row: 1;
    min-height: 4lh;
    font-size: var(--step-lead);
    line-height: 1.3;
    transition: opacity 150ms ease;
  }
  .services__detail.is-swapping { opacity: 0; }
}

/* ==========================================================================
   Proceso
   ========================================================================== */
.process {
  padding-top: var(--section-gap);
}
.process__title {
  padding-inline: var(--margin);
  font-size: var(--step-lead);
  font-weight: 500;
  line-height: 1.2;
}

.progress {
  height: 6px;
  margin: var(--space-5) var(--margin) var(--space-6);
  background: var(--surface-2);
  overflow: hidden;
}
.progress__fill {
  display: block;
  height: 100%;
  background: var(--brand-arc-short);
  transform: scaleX(0.25);
  transform-origin: left;
}

.process__row {
  display: flex;
  gap: var(--space-4);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--margin);
  padding-inline: var(--margin);
  scrollbar-width: none;
}
.process__row::-webkit-scrollbar { display: none; }
.process__row:focus-visible { outline-offset: -2px; }

.step {
  flex: none;
  width: 78vw;
  max-width: 22rem;
  scroll-snap-align: start;
}
.step__title {
  font-size: var(--step-lead);
  font-weight: 500;
  line-height: 1.25;
}
.step__text {
  margin-top: var(--space-2);
  color: var(--muted);
}
.step__media {
  position: relative;
  margin-top: clamp(1rem, calc(var(--drop) * 0.5), 3.5rem);
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--surface-2);
}
.step__media > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

/* Fragmentos de interfaz construidos en HTML (no son imágenes) */
.chat {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  height: 100%;
  padding: var(--space-4);
  background: #0B141A;
  font-size: var(--step-small);
  line-height: 1.4;
}
.chat__head {
  margin: calc(var(--space-4) * -1) calc(var(--space-4) * -1) var(--space-2);
  padding: var(--space-3) var(--space-4);
  background: #1F2C33;
  font-weight: 500;
}
.chat__bubble {
  max-width: 85%;
  padding: var(--space-2) var(--space-3);
  border-radius: 8px;
}
.chat__bubble--out { align-self: flex-end; background: #005C4B; color: #E9EDEF; }
.chat__bubble--in { align-self: flex-start; background: #202C33; color: #E9EDEF; }

.browser {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--surface);
}
.browser__bar {
  flex: none;
  padding: var(--space-2) var(--space-3);
  background: var(--surface-2);
  font-size: var(--step-small);
}
.browser__url {
  display: block;
  padding: var(--space-1) var(--space-3);
  background: var(--bg);
  border-radius: 999px;
  color: var(--ink);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.browser img {
  flex: 1;
  min-height: 0;
  width: 100%;
  object-fit: cover;
  object-position: top center;
}

@media (min-width: 40em) {
  .step { width: 44vw; }
}

@media (min-width: 64em) {
  .progress { display: none; }
  .process__title { margin-bottom: var(--space-8); }
  .process__row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--gutter);
    overflow: visible;
  }
  .step { width: auto; max-width: none; }
  .step__media { margin-top: var(--drop); }
}

/* ==========================================================================
   Por qué J&A: marquee + capitular
   ========================================================================== */
.about {
  padding-top: var(--section-gap);
}

.marquee {
  overflow: hidden;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: var(--step-display);
  line-height: 1;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  color: var(--surface-2);
  -webkit-text-stroke: 0;
}
.marquee__track {
  display: flex;
  width: max-content;
}
.marquee__group {
  display: flex;
  flex: none;
  gap: 0.5em;
  padding-right: 0.5em;
}
.marquee__group li { color: var(--muted); }
.marquee__note {
  margin-top: var(--space-3);
  padding-inline: var(--margin);
  font-size: var(--step-small);
  color: var(--muted);
}

@media (prefers-reduced-motion: no-preference) {
  .marquee__track { animation: marquee 45s linear infinite; }
  .marquee.is-paused .marquee__track { animation-play-state: paused; }
}
@media (prefers-reduced-motion: no-preference) and (hover: hover) and (pointer: fine) {
  .marquee:hover .marquee__track { animation-play-state: paused; }
}
@media (prefers-reduced-motion: reduce) {
  .marquee__track { width: auto; padding-inline: var(--margin); }
  .marquee__group { flex-wrap: wrap; }
  .marquee__group + .marquee__group { display: none; }
}

.about__body {
  display: grid;
  gap: var(--space-6);
  margin-top: var(--space-9);
  padding-inline: var(--margin);
}
.about__facts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
  order: 2;
  font-size: var(--step-small);
  color: var(--muted);
}
.about__text { display: grid; gap: var(--space-5); }

.statement {
  font-size: var(--step-statement);
  line-height: 1.2;
  letter-spacing: -0.01em;
  max-width: 52ch;
}
.statement strong { font-weight: 500; }
.statement--muted { color: var(--muted); }

.dropcap {
  float: left;
  width: 4.8em;
  height: 4.8em;
  margin: 0.2em 0.5em 0 0;
  background: var(--c-logo-black);
}

@media (min-width: 64em) {
  .about__body {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: var(--gutter);
    align-items: start;
  }
  .about__facts {
    grid-column: 1 / span 2;
    order: 0;
    flex-direction: column;
    gap: var(--space-2);
    padding-top: 0.5em;
  }
  .about__text { grid-column: 3 / -1; }
  .dropcap { width: 3.6em; height: 3.6em; margin-top: 0.15em; }
}

/* ==========================================================================
   Contacto: el campo azul
   ========================================================================== */
.contact {
  margin-top: var(--section-gap);
  padding: var(--section-gap) var(--margin);
  background: var(--field-deep);
  color: var(--field-deep-ink);
  max-width: none;
}
.contact :focus-visible { outline-color: var(--field-deep-ink); }

.contact__grid {
  display: grid;
  gap: var(--space-7);
  max-width: var(--layout-max);
  margin-inline: auto;
}
.contact__statement { max-width: 30ch; }

.measure { display: none; gap: var(--space-6); }
.js .measure { display: grid; }

.measure__legend {
  margin-bottom: var(--space-3);
  font-size: var(--step-body);
  font-weight: 500;
}
.chips { display: flex; flex-wrap: wrap; gap: var(--space-2); }

.chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: var(--space-2) var(--space-4);
  background: var(--chip-bg);
  color: var(--field-deep-ink);
  cursor: pointer;
  transition: background-color var(--t-hover) ease, color var(--t-hover) ease, transform var(--t-press) var(--ease-out);
}
.chip input {
  position: absolute;
  opacity: 0;
  width: 1px; height: 1px;
  pointer-events: none;
}
.chip:active { transform: scale(0.97); }
.chip:has(input:checked) {
  background: var(--chip-bg-selected);
  color: var(--chip-fg-selected);
}
.chip:has(input:focus-visible) {
  outline: 2px solid var(--field-deep-ink);
  outline-offset: 3px;
}

@media (hover: hover) and (pointer: fine) {
  .chip:not(:has(input:checked)):hover { background: #1557C9; }
}

.contact__out { display: grid; gap: var(--space-6); }

.preview {
  display: none;
  padding: var(--space-5);
  background: var(--field-deep-2);
}
.js .preview { display: block; }
.preview__title {
  font-size: var(--step-small);
  font-weight: 500;
  color: var(--field-deep-muted);
}
.preview__msg {
  margin-top: var(--space-2);
  font-size: var(--step-lead);
  line-height: 1.35;
  transition: opacity 200ms ease, filter 200ms ease;
}
.preview__msg.is-swapping { opacity: 0; filter: blur(2px); }

.match {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-top: var(--space-5);
  transition: opacity 240ms ease;
}
.match[hidden] { display: none; }
.match__img {
  flex: none;
  width: 4rem;
  height: 5rem;
  object-fit: cover;
  object-position: top;
}
.match__text { color: var(--field-deep-muted); }
.match__text strong { color: var(--field-deep-ink); }

.channels { display: grid; gap: var(--space-2); }
.channels .btn { margin-bottom: var(--space-3); }
.channel {
  display: flex;
  align-items: center;
  min-height: 3rem;
  font-size: var(--step-lead);
  font-weight: 500;
  color: var(--field-deep-ink);
  text-decoration: underline;
  text-decoration-thickness: 0.07em;
  text-underline-offset: 0.22em;
  text-decoration-color: rgb(242 245 249 / 0.45);
  overflow-wrap: anywhere;
  transition: text-decoration-color var(--t-hover) ease, transform var(--t-press) var(--ease-out);
}
.channel:active { transform: scale(0.98); }
@media (hover: hover) and (pointer: fine) {
  .channel:hover { text-decoration-color: currentColor; }
}
.channels__note {
  margin-top: var(--space-3);
  font-size: var(--step-small);
  color: var(--field-deep-muted);
}

@media (min-width: 40em) {
  .contact__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-7) var(--gutter); }
  .contact__statement { grid-column: 1 / -1; }
}

@media (min-width: 64em) {
  .contact__grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    align-items: start;
  }
  .contact__statement { grid-column: 1 / span 7; }
  .measure { grid-column: 1 / span 7; }
  .contact__out { grid-column: 8 / -1; grid-row: 1 / span 2; }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  padding: var(--space-2) var(--margin) calc(var(--space-2) + env(safe-area-inset-bottom, 0px));
  background: var(--footer-bg);
}
.site-footer__line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 var(--space-5);
  max-width: var(--layout-max);
  margin-inline: auto;
  font-size: var(--step-small);
  color: var(--muted);
}
.site-footer__about { display: none; }
.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--space-4);
}
.site-footer__links a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  color: var(--ink);
  text-decoration: none;
}
@media (hover: hover) and (pointer: fine) {
  .site-footer__links a:hover { text-decoration: underline; text-underline-offset: 0.25em; }
}

@media (min-width: 64em) {
  .site-footer__about { display: block; }
  .site-footer__line {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
  }
  .site-footer__links { gap: 0 var(--space-5); }
  .site-footer__line > p:last-child { text-align: right; }
}

/* ==========================================================================
   Botón flotante de WhatsApp
   ========================================================================== */
.fab {
  position: fixed;
  right: max(var(--space-4), env(safe-area-inset-right, 0px));
  bottom: calc(var(--space-4) + env(safe-area-inset-bottom, 0px));
  z-index: 30;
  display: grid;
  place-items: center;
  width: var(--fab-size);
  height: var(--fab-size);
  border-radius: var(--radius-fab);
  background: var(--c-whatsapp);
  color: var(--bg);
  box-shadow: var(--glow); /* taste-skill-ignore: el botón flotante flota sobre el contenido (plan §2.6) */
  transition: opacity 300ms var(--ease-out), transform 300ms var(--ease-out), visibility 0s;
}
.fab svg { width: 1.75rem; height: 1.75rem; }
.fab[data-state="hidden"] {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(16px) scale(0.96);
  transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out), visibility 0s 200ms;
}
.fab:active { transform: scale(0.96); transition-duration: var(--t-press); }

@media (hover: hover) and (pointer: fine) {
  .fab:hover { transform: translateY(-2px); }
}
@media (min-width: 64em) {
  .fab { right: max(var(--space-6), env(safe-area-inset-right, 0px)); bottom: calc(var(--space-6) + env(safe-area-inset-bottom, 0px)); }
}

/* ==========================================================================
   Movimiento
   El estado oculto solo aplica con html.js; sin JavaScript todo es visible.
   ========================================================================== */
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes rise-sm { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes line-up { from { transform: translateY(105%); } to { transform: none; } }
@keyframes strip-in { from { opacity: 0; transform: translateX(48px); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes menu-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@keyframes menu-out { to { opacity: 0; transform: translateY(-6px); } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes live-scroll { 0%, 8% { transform: none; } 92%, 100% { transform: translateY(-67.56%); } }

@media (prefers-reduced-motion: no-preference) and (hover: hover) and (pointer: fine) {
  .frame:hover .live img { animation-play-state: running; }
}

/* Entradas de scroll: base (con reduce, solo opacidad) */
.js [data-reveal] {
  opacity: 0;
  transition: opacity 400ms ease;
  transition-delay: calc(var(--i, 0) * 70ms);
}
.js [data-reveal].is-in { opacity: 1; }

@media (prefers-reduced-motion: no-preference) {
  /* Hero: titular por líneas, luego bloques, tira y acciones */
  .js .hero__title [data-line] {
    transform: translateY(105%);
    animation: line-up 900ms var(--ease-out) forwards;
    animation-delay: calc(var(--i) * 110ms + 150ms);
  }
  .js .hero [data-rise] {
    opacity: 0;
    animation: rise 700ms var(--ease-out) forwards;
    animation-delay: calc(var(--i, 0) * 70ms + 380ms);
  }
  .js .strip__list {
    opacity: 0;
    animation: strip-in 1100ms var(--ease-soft) 300ms forwards;
  }

  /* Secciones */
  .js [data-reveal] {
    transform: translateY(24px);
    transition: opacity 700ms var(--ease-out), transform 800ms var(--ease-out);
    transition-delay: calc(var(--i, 0) * 80ms);
  }
  .js [data-reveal].is-in { transform: none; }

  /* Tiras de trabajos: una cortina del color del fondo se retira hacia la derecha.
     Se usa transform (no clip-path) para no impedir la carga diferida de las imágenes. */
  .js .project[data-reveal] { transform: none; opacity: 1; }
  .js .project[data-reveal]::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: var(--frame-h-work);
    z-index: 1;
    background: var(--bg);
    transform-origin: right;
    pointer-events: none;
    transition: transform 900ms var(--ease-in-out) calc(var(--i, 0) * 80ms);
  }
  .js .project[data-reveal].is-in::before { transform: scaleX(0); }
  .js .project[data-reveal] .project__meta {
    opacity: 0;
    transition: opacity 400ms ease calc(var(--i, 0) * 80ms + 500ms);
  }
  .js .project[data-reveal].is-in .project__meta { opacity: 1; }

  /* Imágenes del proceso: la cortina se recoge hacia arriba */
  .js .step[data-reveal] .step__media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--bg);
    transform-origin: top;
    pointer-events: none;
    transition: transform 900ms var(--ease-in-out) calc(var(--i, 0) * 80ms + 150ms);
  }
  .js .step[data-reveal].is-in .step__media::after { transform: scaleY(0); }

  /* Frame vivo: se recorre solo cuando está centrado o bajo el puntero */
  .live img {
    animation: live-scroll 14s var(--ease-in-out) infinite alternate;
    animation-play-state: paused;
  }
  .frame.is-center .live img { animation-play-state: running; }

  /* Capitular del logo */
  .js .statement[data-reveal] .dropcap {
    clip-path: inset(0 0 100% 0);
    transition: clip-path 900ms var(--ease-in-out) 200ms;
  }
  .js .statement[data-reveal].is-in .dropcap { clip-path: inset(0 0 0 0); }
}
