/* =========================================================
   Talento sin Filtro — estilos compartidos
   Estética: papel cuadriculado, anotaciones a mano, notas
   inclinadas, ilustración isométrica y bloques dinámicos.
   ========================================================= */

/* ---------- Tokens ---------- */
:root {
  /* Paleta de marca TsF */
  --negro: #0B0910;
  --violeta: #6A19A5;
  --violeta-vivo: #9B30E8;
  --violeta-hondo: #5A15A0;
  --violeta-claro: #B98CFF;
  --lila: #E3C9FF;
  --perla: #F6F0FD;
  --perla-2: #E9D8FB;
  --blanco: #FFFFFF;
  --tinta: #1A0F2E;
  --rosa: #FF5C93;
  --verde: #2BD576;

  /* Semánticos */
  --bg: var(--perla);
  --surface: var(--blanco);
  --border: #E2D2F4;
  --text: var(--tinta);
  --text-muted: #4E4166;
  --accent: var(--violeta);
  --error: #B0124B;
  --success-text: #0E6B37;
  --focus: var(--violeta-vivo);
  --grid-line: rgba(106, 25, 165, 0.07);

  --grad: linear-gradient(135deg, var(--violeta-vivo) 0%, var(--violeta-hondo) 100%);

  --shadow-card: 0 1px 0 rgba(26, 15, 46, 0.04), 0 18px 40px -22px rgba(90, 21, 160, 0.45);
  --shadow-pop: 0 30px 60px -28px rgba(90, 21, 160, 0.55), 0 10px 20px -12px rgba(26, 15, 46, 0.2);

  /* Tipografía */
  --font: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  --fs-hero: clamp(2rem, 1.2rem + 3.6vw, 3.75rem);
  --fs-h2: clamp(1.875rem, 1.3rem + 2.4vw, 3.25rem);
  --fs-h3: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --fs-lead: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  --fs-small: 0.875rem;

  /* Espaciado (múltiplos de 8) */
  --s1: 0.5rem;
  --s2: 1rem;
  --s3: 1.5rem;
  --s4: 2rem;
  --s5: 3rem;
  --s6: 4rem;
  --s7: 6rem;
  --s8: 8rem;

  --radius: 20px;
  --radius-sm: 12px;
  --container: 1200px;
  --header-h: 72px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + var(--s2));
}

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  color: var(--text);
  font-family: var(--font);
  font-weight: 500;
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  /* Papel cuadriculado */
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 32px 32px;
}

main { flex: 1; }

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

h1, h2, h3 {
  margin: 0;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
  overflow-wrap: break-word;
}

p { margin: 0; }
a { color: inherit; }

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

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--s3);
}

.skip-link {
  position: absolute;
  left: var(--s2);
  top: -100px;
  z-index: 1000;
  padding: var(--s1) var(--s2);
  background: var(--tinta);
  color: var(--blanco);
  font-weight: 700;
  border-radius: 8px;
  text-decoration: none;
}
.skip-link:focus { top: var(--s2); }

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

/* ---------- Recursos tipográficos ---------- */

/* Firma de marca y chips: únicas mayúsculas con tracking */
.brand-word,
.chip {
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--s1);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: var(--blanco);
  border: 1.5px solid var(--tinta);
  color: var(--tinta);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.4;
}

.key { color: var(--violeta); }

/* Anotación "a mano": Montserrat itálica, inclinada, con flecha */
.note {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.4rem;
  font-style: italic;
  font-weight: 700;
  font-size: clamp(1.125rem, 1rem + 0.6vw, 1.5rem);
  line-height: 1.2;
  color: var(--violeta);
  transform: rotate(-4deg);
  transform-origin: left center;
}
.note svg {
  flex: none;
  width: 54px;
  height: 44px;
  margin-top: -6px;
}
.note svg path,
.doodle path {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.note small {
  display: block;
  margin-top: 4px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  transform: none;
}

/* Subrayado a mano */
.scribble { position: relative; white-space: nowrap; }
.scribble > svg {
  position: absolute;
  left: -3%;
  bottom: -0.16em;
  width: 106%;
  height: 0.32em;
  overflow: visible;
  pointer-events: none;
}
.scribble > svg path {
  fill: none;
  stroke: var(--violeta-vivo);
  stroke-width: 5;
  stroke-linecap: round;
}

.lead {
  font-size: var(--fs-lead);
  font-weight: 600;
  color: var(--text-muted);
  max-width: 44ch;
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s1);
  min-height: 48px;
  padding: 0.75rem 1.4rem;
  border: 2px solid var(--tinta);
  border-radius: 12px;
  font: inherit;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s var(--ease), box-shadow .15s var(--ease), background-color .15s ease;
}

/* Botón con sombra sólida desplazada, que "se hunde" al tocarlo */
.btn-primary {
  background: var(--violeta-vivo);
  color: var(--blanco);
  box-shadow: 4px 4px 0 var(--tinta);
}
.btn-primary:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--tinta); }
.btn-primary:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--tinta); }

.btn-ghost {
  background: var(--blanco);
  color: var(--tinta);
  box-shadow: 4px 4px 0 var(--lila);
}
.btn-ghost:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--violeta-claro); }
.btn-ghost:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--lila); }

.btn-light {
  background: var(--blanco);
  color: var(--tinta);
  border-color: var(--blanco);
  box-shadow: 4px 4px 0 var(--violeta-vivo);
}
.btn-light:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--violeta-vivo); }

.btn[disabled] { opacity: .5; cursor: progress; transform: none; }

.btn-row { display: flex; flex-wrap: wrap; gap: var(--s2); }

.text-link {
  color: var(--violeta);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}
.text-link:hover { color: var(--violeta-hondo); }

/* ---------- Header / navegación ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(246, 240, 253, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1.5px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s2);
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  min-height: 44px;
}
.brand img { width: 32px; height: auto; }
.brand .brand-word { font-size: 0.8125rem; font-weight: 800; color: var(--tinta); }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 2px solid var(--tinta);
  border-radius: 12px;
  background: var(--blanco);
  color: var(--tinta);
  cursor: pointer;
}
.nav-toggle svg { width: 24px; height: 24px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

.nav-menu {
  display: none;
  position: absolute;
  top: var(--header-h);
  left: 0;
  right: 0;
  padding: var(--s2) var(--s3) var(--s4);
  background: var(--perla);
  border-bottom: 1.5px solid var(--border);
}
.nav-menu.is-open { display: block; }

.no-js .nav-toggle { display: none; }
.no-js .nav-menu { display: block; position: static; padding: 0 0 var(--s2); border: 0; }

.nav-list {
  list-style: none;
  margin: 0 0 var(--s3);
  padding: 0;
}
.nav-list a {
  display: flex;
  align-items: center;
  min-height: 48px;
  font-weight: 600;
  text-decoration: none;
  color: var(--text-muted);
}
.nav-list a:hover { color: var(--tinta); }
.nav-list a[aria-current="page"] { color: var(--violeta); font-weight: 800; }

@media (min-width: 768px) {
  .nav-toggle { display: none; }
  .nav-menu,
  .no-js .nav-menu {
    display: flex;
    align-items: center;
    gap: var(--s4);
    position: static;
    padding: 0;
    background: none;
    border: 0;
  }
  .nav-list { display: flex; gap: var(--s4); margin: 0; }
  .nav-list a { min-height: 44px; font-size: 0.9375rem; position: relative; }
  .nav-list a[aria-current="page"]::after {
    content: "";
    position: absolute;
    left: -4px; right: -4px; bottom: 6px;
    height: 8px;
    background: var(--lila);
    border-radius: 4px;
    z-index: -1;
  }
  .nav-menu .btn { min-height: 44px; padding: 0.55rem 1.1rem; font-size: 0.9375rem; }
}

/* ---------- Secciones ---------- */
.section { padding-block: var(--s7); }

.section-head { max-width: 760px; margin-bottom: var(--s5); }
.section-head h2 { font-size: var(--fs-h2); margin-bottom: var(--s3); }
.section-head p { color: var(--text-muted); max-width: 56ch; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center p { margin-inline: auto; }
.section-head .note { margin-top: var(--s3); }

/* ---------- Hero ---------- */
.hero { padding-block: var(--s6) var(--s7); }

.hero-grid {
  display: grid;
  gap: var(--s6);
  align-items: center;
}
.hero-grid > * { min-width: 0; }

.hero .chip { margin-bottom: var(--s3); }
.hero h1 { font-size: var(--fs-hero); margin-bottom: var(--s3); }
.hero .lead { margin-bottom: var(--s4); }
.hero .note { margin-top: var(--s5); }

@media (min-width: 1024px) {
  .hero-grid { grid-template-columns: 1.1fr 1fr; gap: var(--s5); }
}

/* ---------- Ventana de aplicación (mockup) ---------- */
.app {
  position: relative;
  background: var(--surface);
  border: 2px solid var(--tinta);
  border-radius: var(--radius);
  box-shadow: 8px 8px 0 var(--lila);
  overflow: hidden;
  text-align: left;
}

.app-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-bottom: 1.5px solid var(--border);
}
.app-bar i { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--tinta); }
.app-bar i:nth-child(1) { background: var(--rosa); }
.app-bar i:nth-child(2) { background: var(--lila); }
.app-bar i:nth-child(3) { background: var(--violeta-claro); }
.app-bar span { margin-left: auto; font-size: 0.75rem; font-weight: 700; color: var(--text-muted); }

.app-layout { display: grid; grid-template-columns: 1fr; }
.app-side { display: none; }

@media (min-width: 560px) {
  .app-layout { grid-template-columns: 150px 1fr; }
  .app-side {
    display: block;
    padding: 14px 10px;
    border-right: 1.5px solid var(--border);
    background: var(--perla);
    font-size: 0.8125rem;
    font-weight: 600;
  }
}
.app-side b {
  display: block;
  padding: 0 6px 8px;
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--text-muted);
}
.app-side ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.app-side li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 8px;
}
.app-side li::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--lila);
}
.app-side li.on { background: var(--perla-2); color: var(--violeta); font-weight: 700; }
.app-side li.on::before { background: var(--violeta-vivo); }

.app-main { padding: 18px; min-width: 0; }
.app-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.app-title strong { font-size: 1.0625rem; font-weight: 800; }
.app-views { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.app-views span {
  padding: 3px 10px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
}
.app-views span.on { border-color: var(--tinta); color: var(--tinta); background: var(--lila); }

/* Tabla */
.m-table { width: 100%; border-collapse: collapse; font-size: 0.8125rem; }
.m-table th {
  text-align: left;
  font-weight: 700;
  color: var(--text-muted);
  padding: 0 8px 8px 0;
  border-bottom: 1.5px solid var(--border);
}
.m-table td {
  padding: 9px 8px 9px 0;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
}
.m-table tr:last-child td { border-bottom: 0; }

@media (max-width: 479px) {
  .m-table th:nth-child(2),
  .m-table td:nth-child(2) { display: none; }
}

.status {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}
.status.new { background: var(--perla-2); color: var(--violeta); }
.status.doing { background: var(--lila); color: var(--violeta-hondo); }
.status.done { background: rgba(43, 213, 118, 0.2); color: var(--success-text); }

/* Fila que entra con animación (pedido nuevo) */
@media (prefers-reduced-motion: no-preference) {
  .js .row-new td { animation: row-in .7s var(--ease) 1.2s both; }
  .js .row-new td:first-child { box-shadow: inset 3px 0 0 var(--violeta-vivo); }
}
@keyframes row-in {
  from { opacity: 0; transform: translateY(-8px); background: var(--perla-2); }
  60% { background: var(--perla-2); }
  to { opacity: 1; transform: none; background: transparent; }
}

/* Lista de tareas */
.m-tasks { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.8rem; }
.m-tasks li {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 0.7rem;
  align-items: start;
  font-weight: 700;
  line-height: 1.4;
}
.m-tasks small { display: block; font-size: 0.875rem; font-weight: 500; color: var(--text-muted); }
.box {
  width: 20px;
  height: 20px;
  margin-top: 1px;
  border-radius: 6px;
  border: 2px solid var(--tinta);
  background: var(--violeta-vivo) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 13px no-repeat;
}

/* Notificación flotante sobre el mockup */
.toast {
  position: absolute;
  right: -8px;
  bottom: -26px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 260px;
  padding: 10px 14px;
  background: var(--blanco);
  border: 2px solid var(--tinta);
  border-radius: 14px;
  box-shadow: 4px 4px 0 var(--tinta);
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.35;
  transform: rotate(2deg);
}
.toast .dot {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--violeta-vivo);
  color: var(--blanco);
}
.toast .dot svg { width: 16px; height: 16px; }
.toast small { display: block; font-weight: 600; color: var(--text-muted); }

@media (prefers-reduced-motion: no-preference) {
  .js .toast { animation: toast-in .6s var(--ease) 1.8s both; }
}
@keyframes toast-in {
  from { opacity: 0; transform: translateY(16px) rotate(2deg); }
  to { opacity: 1; transform: rotate(2deg); }
}

.hero-visual { position: relative; padding-bottom: var(--s3); }

/* ---------- Ilustración isométrica ---------- */
.iso-wrap {
  position: relative;
  max-width: 980px;
  margin-inline: auto;
}
.iso { width: 100%; height: auto; overflow: visible; }
.iso .win { stroke: rgba(255, 255, 255, 0.75); stroke-width: 4; stroke-dasharray: 7 7; stroke-linecap: round; }
.iso .win-r { stroke: rgba(255, 255, 255, 0.45); }
.iso path[fill] { stroke: var(--tinta); stroke-width: 1.5; stroke-linejoin: round; }
.iso-grid { fill: none; stroke: var(--perla-2); stroke-width: 1.5; }
.iso-links { fill: none; stroke: var(--violeta-vivo); stroke-width: 3; stroke-dasharray: 2 8; stroke-linecap: round; }
.iso-label {
  font-family: var(--font);
  font-style: italic;
  font-weight: 700;
  font-size: 19px;
  fill: var(--violeta);
}
.iso-label-hub { font-size: 24px; }

@media (max-width: 599px) {
  .iso-wrap { margin-inline: calc(var(--s3) * -1); }
  .iso-label { font-size: 30px; }
  .iso-label-hub { font-size: 32px; }
  .iso-state { text-align: center; }
}

/* Estado "antes": piezas separadas, cada una en su isla */
.iso-piece {
  transform: translate(var(--dx), var(--dy));
  transition: transform 1.2s var(--ease);
}
.iso-platform,
.iso-links,
.iso-hub,
.iso-label-hub { opacity: 0; transition: opacity .6s ease; }
.iso-island,
.iso-piece .iso-label { transition: opacity .6s ease .2s; }

/* Estado "después": todo se junta sobre una plataforma */
.iso-wrap.is-together .iso-piece { transform: none; }
.iso-wrap.is-together .iso-platform { opacity: 1; transition-delay: .3s; }
.iso-wrap.is-together .iso-hub { opacity: 1; transition-delay: .9s; }
.iso-wrap.is-together .iso-links,
.iso-wrap.is-together .iso-label-hub { opacity: 1; transition-delay: 1.3s; }
.iso-wrap.is-together .iso-island,
.iso-wrap.is-together .iso-piece .iso-label { opacity: 0; transition-delay: 0s; }

.iso-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  margin-top: var(--s4);
}
.iso-state {
  font-weight: 700;
  color: var(--text-muted);
}

/* Interruptor antes / después */
.switch {
  display: inline-flex;
  padding: 4px;
  border: 2px solid var(--tinta);
  border-radius: 14px;
  background: var(--blanco);
  box-shadow: 4px 4px 0 var(--lila);
}
.switch button {
  min-height: 44px;
  padding: 0.5rem 1.1rem;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
}
.switch button[aria-pressed="true"] { background: var(--violeta-vivo); color: var(--blanco); }

/* ---------- Notas adhesivas ---------- */
.stickies {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--s4);
}
.sticky {
  position: relative;
  padding: var(--s4) var(--s3) var(--s3);
  background: var(--blanco);
  border: 2px solid var(--tinta);
  border-radius: 6px;
  box-shadow: 6px 6px 0 var(--tinta);
  font-weight: 700;
  font-size: 1.125rem;
  line-height: 1.4;
  transform: rotate(var(--tilt, -2deg));
  transition: transform .3s var(--ease);
}
.sticky:nth-child(2) { --tilt: 1.5deg; background: var(--lila); }
.sticky:nth-child(3) { --tilt: -1deg; background: var(--perla-2); }
.sticky:nth-child(4) { --tilt: 2deg; }
.sticky:hover { transform: rotate(0deg) translateY(-4px); }
.sticky::before {
  content: "";
  position: absolute;
  top: -12px;
  left: 50%;
  width: 70px;
  height: 22px;
  transform: translateX(-50%) rotate(-3deg);
  background: rgba(155, 48, 232, 0.35);
  border-radius: 2px;
}
.sticky span { display: block; margin-top: var(--s2); font-size: 0.875rem; font-weight: 600; color: var(--text-muted); }

@media (min-width: 768px) {
  .stickies { grid-template-columns: repeat(2, 1fr); gap: var(--s5) var(--s4); }
}
@media (min-width: 1024px) {
  .stickies { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- Franja oscura con cinta en movimiento ---------- */
.band {
  background: var(--tinta);
  color: var(--blanco);
  padding-block: var(--s7);
  overflow: hidden;
  position: relative;
}
.band::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(227, 201, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(227, 201, 255, 0.06) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}
.band .section-head { position: relative; margin-bottom: var(--s5); }
.band .section-head p { color: var(--lila); }
.band .key { color: var(--violeta-claro); }

.marquee { position: relative; display: grid; gap: var(--s2); }
.marquee-track {
  display: flex;
  gap: var(--s2);
  width: max-content;
  list-style: none;
  margin: 0;
  padding: 0;
}
.marquee-track li {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 1.1rem;
  border-radius: 12px;
  border: 1.5px solid rgba(227, 201, 255, 0.35);
  background: rgba(255, 255, 255, 0.06);
  font-weight: 700;
  white-space: nowrap;
}
.marquee-track li::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 4px;
  background: var(--violeta-vivo);
}
.marquee-track.alt li::before { background: var(--lila); }

@media (prefers-reduced-motion: no-preference) {
  .marquee-track { animation: marquee 40s linear infinite; }
  .marquee-track.alt { animation-direction: reverse; animation-duration: 46s; }
  .marquee:hover .marquee-track,
  .marquee:focus-within .marquee-track,
  .marquee.is-paused .marquee-track { animation-play-state: paused; }
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.marquee-pause {
  position: relative;
  margin-top: var(--s4);
  display: flex;
  justify-content: center;
}
.btn-pill-dark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border: 1.5px solid rgba(227, 201, 255, 0.45);
  background: transparent;
  color: var(--lila);
  font: inherit;
  font-weight: 700;
  font-size: 0.875rem;
  cursor: pointer;
}
.btn-pill-dark:hover { border-color: var(--lila); color: var(--blanco); }
.btn-pill-dark svg { width: 16px; height: 16px; }
.no-js .marquee-pause { display: none; }
@media (prefers-reduced-motion: reduce) { .marquee-pause { display: none; } }

/* ---------- Pilares ---------- */
.pillars {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--s3);
}
.pillar {
  position: relative;
  padding: var(--s4);
  background: var(--blanco);
  border: 2px solid var(--tinta);
  border-radius: var(--radius);
  box-shadow: 6px 6px 0 var(--lila);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.pillar:hover { transform: translate(-3px, -3px); box-shadow: 9px 9px 0 var(--violeta-claro); }
.pillar h3 { font-size: var(--fs-h3); margin: var(--s3) 0 var(--s1); }
.pillar p { color: var(--text-muted); }

.icon-badge {
  display: grid;
  place-items: center;
  flex: none;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  border: 2px solid var(--tinta);
  background: var(--violeta-vivo);
  color: var(--blanco);
}
.icon-badge svg { width: 28px; height: 28px; }
.pillar:nth-child(2) .icon-badge { background: var(--violeta); }
.pillar:nth-child(3) .icon-badge { background: var(--violeta-hondo); }

.pillars-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s3) var(--s4);
  margin-top: var(--s5);
}

@media (min-width: 768px) {
  .pillars { grid-template-columns: repeat(3, 1fr); gap: var(--s4); }
}

/* ---------- CTA final ---------- */
.final-cta { padding-block: var(--s7); }
.cta-card {
  position: relative;
  display: grid;
  gap: var(--s4);
  padding: var(--s5) var(--s4);
  background: var(--grad);
  color: var(--blanco);
  border: 2px solid var(--tinta);
  border-radius: 28px;
  box-shadow: 10px 10px 0 var(--tinta);
  overflow: hidden;
}
.cta-card h2 { font-size: var(--fs-h2); }
.cta-card p { color: var(--perla); font-weight: 600; max-width: 46ch; margin-top: var(--s2); }
.cta-card .note { color: var(--lila); margin-top: var(--s3); }
.cta-card .scribble > svg path { stroke: var(--lila); }
.cta-mark {
  position: absolute;
  right: -30px;
  bottom: -40px;
  width: 240px;
  opacity: .25;
  pointer-events: none;
}
.cta-card > *:not(.cta-mark) { position: relative; }

@media (min-width: 900px) {
  .cta-card { grid-template-columns: 1fr auto; align-items: center; padding: var(--s6); }
  .cta-mark { width: 340px; right: 22%; bottom: -80px; }
}

/* ---------- Encabezado de páginas internas ---------- */
.page-hero { padding-block: var(--s6) var(--s5); }
.page-hero .chip { margin-bottom: var(--s3); }
.page-hero h1 { font-size: var(--fs-hero); max-width: 15ch; margin-bottom: var(--s3); }
.page-hero-grid { display: grid; gap: var(--s4); align-items: end; }
@media (min-width: 1024px) {
  .page-hero-grid { grid-template-columns: 1.5fr 1fr; }
  .page-hero-grid .note { justify-self: start; margin-bottom: var(--s4); }
}

/* ---------- Pestañas de servicios ---------- */
.tabs-list {
  display: flex;
  gap: var(--s1);
  padding: 6px;
  margin-bottom: var(--s4);
  border: 2px solid var(--tinta);
  border-radius: 16px;
  background: var(--blanco);
  box-shadow: 5px 5px 0 var(--lila);
  flex-wrap: wrap;
}

.tab {
  flex: 1 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0.5rem 1rem;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
}
.tab svg { width: 20px; height: 20px; }
.tab:hover { color: var(--tinta); background: var(--perla); }
.tab[aria-selected="true"] { background: var(--violeta-vivo); color: var(--blanco); }

.tab-panel {
  display: grid;
  gap: var(--s5);
  align-items: center;
  padding: var(--s3);
  background: var(--blanco);
  border: 2px solid var(--tinta);
  border-radius: 24px;
  box-shadow: 8px 8px 0 var(--tinta);
}
@media (min-width: 768px) { .tab-panel { padding: var(--s5); } }
.tab-panel[hidden] { display: none; }
.tab-panel > * { min-width: 0; }
.tab-panel h2 { font-size: var(--fs-h2); margin-bottom: var(--s2); }
.tab-panel .lead { margin-bottom: var(--s4); }
.tab-panel .note { margin-top: var(--s4); }

@media (prefers-reduced-motion: no-preference) {
  .tab-panel.is-entering { animation: panel-in .45s var(--ease) both; }
}
@keyframes panel-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

@media (min-width: 1024px) {
  .tab-panel { grid-template-columns: 1fr 1fr; padding: var(--s6); }
}

/* Mini mockups dentro de cada servicio */
.m-form { display: grid; gap: 10px; }
.m-field b { display: block; margin-bottom: 4px; font-size: 0.75rem; font-weight: 700; color: var(--text-muted); }
.m-field span {
  display: block;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  font-size: 0.8125rem;
  font-weight: 600;
}
.m-field.active span { border-color: var(--violeta-vivo); box-shadow: 0 0 0 3px var(--perla-2); }
.m-button {
  justify-self: start;
  padding: 6px 14px;
  border-radius: 9px;
  border: 1.5px solid var(--tinta);
  background: var(--violeta-vivo);
  color: var(--blanco);
  font-size: 0.8125rem;
  font-weight: 700;
}
.m-site-hero {
  padding: 18px;
  border-radius: 12px;
  background: var(--grad);
  color: var(--blanco);
}
.m-site-hero strong { display: block; font-size: 1.0625rem; font-weight: 800; line-height: 1.3; }
.m-site-hero small { display: block; margin: 4px 0 12px; font-weight: 600; color: var(--perla); }
.m-site-hero .m-button { display: inline-block; background: var(--blanco); color: var(--tinta); }
.m-site-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.m-site-cols span { height: 46px; border-radius: 10px; background: var(--perla-2); border: 1.5px solid var(--border); }
.m-person {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.8125rem;
  font-weight: 700;
}
.m-person:last-child { border-bottom: 0; }
.m-person small { display: block; font-weight: 600; color: var(--text-muted); }
.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid var(--tinta);
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 800;
  background: var(--lila);
  color: var(--violeta-hondo);
}
.avatar.b { background: var(--violeta-claro); color: var(--tinta); }
.avatar.c { background: var(--perla-2); }

/* ---------- Pasos (cómo trabajamos) ---------- */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--s4);
  counter-reset: step;
}
.step {
  position: relative;
  padding: var(--s4) var(--s3) var(--s3);
  background: var(--blanco);
  border: 2px solid var(--tinta);
  border-radius: var(--radius);
  box-shadow: 5px 5px 0 var(--lila);
  counter-increment: step;
}
.step::before {
  content: counter(step);
  position: absolute;
  top: -22px;
  left: var(--s3);
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 2px solid var(--tinta);
  background: var(--violeta-vivo);
  color: var(--blanco);
  font-weight: 800;
  font-size: 1.125rem;
}
.step h3 { font-size: 1.25rem; margin-bottom: var(--s1); }
.step p { color: var(--text-muted); }

@media (min-width: 768px) {
  .steps { grid-template-columns: repeat(2, 1fr); gap: var(--s5) var(--s4); }
}
@media (min-width: 1024px) {
  .steps { grid-template-columns: repeat(4, 1fr); }
}

.panel-cta { margin-top: var(--s4); }
.aside-title { font-size: var(--fs-h3); }

/* ---------- Contacto ---------- */
.contact-grid { display: grid; gap: var(--s5); align-items: start; padding-bottom: var(--s6); }
.contact-grid > * { min-width: 0; }

.form-card {
  padding: var(--s4);
  background: var(--blanco);
  border: 2px solid var(--tinta);
  border-radius: 24px;
  box-shadow: 8px 8px 0 var(--tinta);
}
.form-card h2 { font-size: var(--fs-h3); margin-bottom: var(--s1); }
.form-card > p { color: var(--text-muted); margin-bottom: var(--s4); }
.req { color: var(--violeta); }

.field { display: grid; gap: var(--s1); margin-bottom: var(--s3); border: 0; padding: 0; min-width: 0; }
.field label,
.field legend { font-weight: 700; padding: 0; }
.field-hint { font-size: var(--fs-small); color: var(--text-muted); }

.field input,
.field textarea {
  width: 100%;
  min-height: 52px;
  padding: 0.875rem 1rem;
  font: inherit;
  font-size: 1rem;
  color: var(--tinta);
  background: var(--perla);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color .15s ease, background-color .15s ease;
}
.field textarea { min-height: 160px; resize: vertical; }
.field input:hover,
.field textarea:hover { border-color: var(--violeta-claro); }
.field input:focus-visible,
.field textarea:focus-visible {
  outline: 3px solid var(--perla-2);
  outline-offset: 0;
  border-color: var(--tinta);
  background: var(--blanco);
}
.field [aria-invalid="true"] { border-color: var(--error); }

.choice-row { display: flex; flex-wrap: wrap; gap: var(--s1); margin-top: 4px; }
.choice {
  min-height: 44px;
  padding: 0.5rem 1rem;
  border: 2px solid var(--tinta);
  border-radius: 999px;
  background: var(--blanco);
  color: var(--tinta);
  font: inherit;
  font-weight: 700;
  font-size: 0.9375rem;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease, transform .15s var(--ease);
}
.choice:hover { background: var(--perla-2); }
.choice[aria-pressed="true"] { background: var(--violeta-vivo); color: var(--blanco); }
.choice[aria-pressed="true"]::before { content: "✓ "; }

.field-error {
  display: none;
  font-size: var(--fs-small);
  font-weight: 700;
  color: var(--error);
}
.field-error.is-visible { display: block; }

.form-status {
  display: none;
  margin-top: var(--s3);
  padding: var(--s2) var(--s3);
  border-radius: var(--radius-sm);
  font-weight: 600;
}
.form-status.is-success {
  display: flex;
  gap: 0.75rem;
  align-items: start;
  background: rgba(43, 213, 118, 0.12);
  border: 2px solid rgba(43, 213, 118, 0.7);
  color: var(--success-text);
}
.form-status.is-success svg { flex: none; width: 22px; height: 22px; margin-top: 2px; }
.form-status.is-error {
  display: block;
  background: rgba(255, 92, 147, 0.1);
  border: 2px solid rgba(176, 18, 75, 0.4);
  color: var(--error);
}

.contact-aside { display: grid; gap: var(--s5); }
.contact-aside .sticky { font-size: 1rem; }

.contact-links { list-style: none; margin: var(--s3) 0 0; padding: 0; display: grid; gap: var(--s2); }
.contact-links a {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: var(--s2);
  align-items: center;
  padding: var(--s2);
  border-radius: 14px;
  background: var(--blanco);
  border: 2px solid var(--tinta);
  box-shadow: 4px 4px 0 var(--lila);
  text-decoration: none;
  transition: transform .15s var(--ease), box-shadow .15s var(--ease);
}
.contact-links a:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--violeta-claro); }
.contact-links .icon-badge { width: 48px; height: 48px; border-radius: 12px; }
.contact-links .icon-badge svg { width: 24px; height: 24px; }
.contact-links strong { display: block; font-weight: 800; }
.contact-links span span { display: block; color: var(--text-muted); font-size: var(--fs-small); font-weight: 600; overflow-wrap: anywhere; }

@media (min-width: 1024px) {
  .contact-grid { grid-template-columns: 1.4fr 1fr; }
  .form-card { padding: var(--s5); }
}

/* ---------- Footer ---------- */
.site-footer {
  margin-top: var(--s6);
  padding-block: var(--s5) var(--s4);
  border-top: 2px solid var(--tinta);
  background: var(--blanco);
}

.footer-grid { display: grid; gap: var(--s4); margin-bottom: var(--s4); }
.footer-tagline { color: var(--text-muted); margin-top: var(--s1); font-weight: 600; }

.footer-col h2 {
  font-size: 0.9375rem;
  font-weight: 800;
  color: var(--tinta);
  margin-bottom: var(--s1);
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--text-muted);
  font-weight: 600;
  text-decoration: none;
}
.footer-col a:hover { color: var(--violeta); text-decoration: underline; text-underline-offset: 4px; }

.footer-bottom {
  padding-top: var(--s3);
  border-top: 1.5px solid var(--border);
  font-size: var(--fs-small);
  color: var(--text-muted);
}

@media (min-width: 768px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
}

/* ---------- Aparición al hacer scroll ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .7s var(--ease), transform .7s var(--ease);
    transition-delay: var(--delay, 0s);
  }
  .js [data-reveal].is-visible { opacity: 1; transform: none; }
  .js .sticky[data-reveal].is-visible { transform: rotate(var(--tilt, -2deg)); }
  .js .sticky[data-reveal].is-visible:hover { transform: rotate(0deg) translateY(-4px); }

  .js .hero-copy > * { animation: rise .8s var(--ease) both; }
  .js .hero-copy > *:nth-child(2) { animation-delay: .08s; }
  .js .hero-copy > *:nth-child(3) { animation-delay: .16s; }
  .js .hero-copy > *:nth-child(4) { animation-delay: .24s; }
  .js .hero-copy > *:nth-child(5) { animation-delay: .5s; }
  .js .hero-visual { animation: rise 1s var(--ease) .3s both; }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: none; }
}
.js .hero-copy > .note { animation-name: rise-note; }
@keyframes rise-note {
  from { opacity: 0; transform: translateY(24px) rotate(-4deg); }
  to { opacity: 1; transform: rotate(-4deg); }
}

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    transition-delay: 0s !important;
    scroll-behavior: auto !important;
  }
}
